From 86340de437377b2a366546ccf64f1437b0de95dc Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 3 Aug 2023 06:02:37 +0000 Subject: [PATCH 001/540] [API] Adds security.get_settings, security.update_settings --- .../api/actions/security/get_settings.rb | 48 +++++++++++++++++ .../api/actions/security/update_settings.rb | 51 +++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb new file mode 100644 index 0000000000..95feb9ca02 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb @@ -0,0 +1,48 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Security + module Actions + # Retrieve settings for the security system indices + # + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-settings.html + # + def get_settings(arguments = {}) + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = "_security/settings" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb new file mode 100644 index 0000000000..d05e85d06c --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb @@ -0,0 +1,51 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Security + module Actions + # Update settings for the security system index + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body An object with the new settings for each index, if any (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-settings.html + # + def update_settings(arguments = {}) + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_PUT + path = "_security/settings" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers) + ) + end + end + end + end +end From db193789150eaad3c494064a4639d4a60fec322b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 3 Aug 2023 06:02:37 +0000 Subject: [PATCH 002/540] [API] Updates docs url for synonyms APIs --- .../lib/elasticsearch/api/actions/synonyms/delete.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb | 2 +- .../lib/elasticsearch/api/actions/synonyms_sets/get.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb index c7d64979c3..cad771f386 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :synonyms_set The name of the synonyms set to be deleted # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonyms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonyms-set.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'synonyms_set' missing" unless arguments[:synonyms_set] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb index f20ae634da..173cd9f90d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of results to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonyms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonyms-set.html # def get(arguments = {}) raise ArgumentError, "Required argument 'synonyms_set' missing" unless arguments[:synonyms_set] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb index 4b0cd02143..82edeb9d19 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Synonyms set rules (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonyms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonyms-set.html # def put(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb index 8a20c6b9da..0de72b872b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of results to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-synonyms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-synonyms-sets.html # def get(arguments = {}) arguments = arguments.clone From 7636ff7fb757ef30db88b972a7efb0efd255b009 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 3 Aug 2023 09:07:43 +0100 Subject: [PATCH 003/540] [API] Adds tests for security get and update settings --- .../api/actions/security/get_settings_spec.rb | 34 +++++++++++++++++++ .../actions/security/update_settings_spec.rb | 34 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/security/get_settings_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/security/update_settings_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_settings_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/get_settings_spec.rb new file mode 100644 index 0000000000..f596687688 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/get_settings_spec.rb @@ -0,0 +1,34 @@ +# 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. + +require 'spec_helper' + +describe 'client#security#get_settings' do + let(:expected_args) do + [ + 'GET', + '_security/settings', + {}, + nil, + {} + ] + end + + it 'performs the request' do + expect(client_double.security.get_settings).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/update_settings_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/update_settings_spec.rb new file mode 100644 index 0000000000..ea6fa73be1 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/update_settings_spec.rb @@ -0,0 +1,34 @@ +# 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. + +require 'spec_helper' + +describe 'client#security#update_settings' do + let(:expected_args) do + [ + 'PUT', + '_security/settings', + {}, + {}, + {} + ] + end + + it 'performs the request' do + expect(client_double.security.update_settings(body: {})).to be_a Elasticsearch::API::Response + end +end From d966af80f327a436b634dd6523a7e76c36304654 Mon Sep 17 00:00:00 2001 From: Kazuma Suzuki Date: Tue, 1 Aug 2023 11:32:33 +0900 Subject: [PATCH 004/540] Correct the description of the default setting for retries --- docs/advanced-config.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced-config.asciidoc b/docs/advanced-config.asciidoc index cb0a54e77c..916a8f84c3 100644 --- a/docs/advanced-config.asciidoc +++ b/docs/advanced-config.asciidoc @@ -232,7 +232,7 @@ failed request on a different host: Elasticsearch::Client.new(hosts: ['localhost:9200', 'localhost:9201'], retry_on_failure: true) ``` -By default, the client retries the request 3 times. You can specify how many +By default, the client does not retry the request. You can specify how many times to retry before it raises an exception by passing a number to `retry_on_failure`: From a38b2dd4fe24f03edc11bf08549898f05c1cba17 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 22 Aug 2023 07:34:41 +0100 Subject: [PATCH 005/540] [API] Updates security create|update cross cluster api key from Experimental to Beta --- .../api/actions/security/create_cross_cluster_api_key.rb | 8 ++++---- .../api/actions/security/update_cross_cluster_api_key.rb | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb index ee3a6125b2..ef1f442980 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb @@ -23,10 +23,10 @@ module API module Security module Actions # Creates a cross-cluster API key for API key based remote cluster access. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The request to create a cross-cluster API key (*Required*) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb index 4d677d39c2..f2c68f5ec9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb @@ -23,10 +23,10 @@ module API module Security module Actions # Updates attributes of an existing cross-cluster API key. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # # @option arguments [String] :id The ID of the cross-cluster API key to update # @option arguments [Hash] :headers Custom HTTP headers From 78cfc2724f294021e3ce8f1da8b2c062324b8cfd Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 22 Aug 2023 07:35:40 +0100 Subject: [PATCH 006/540] [API] Adds experimental (internal use) Fleet APIs for secrets --- .../api/actions/fleet/delete_secret.rb | 57 +++++++++++++++++++ .../api/actions/fleet/get_secret.rb | 57 +++++++++++++++++++ .../api/actions/fleet/post_secret.rb | 55 ++++++++++++++++++ 3 files changed, 169 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb new file mode 100644 index 0000000000..cb08f91f90 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb @@ -0,0 +1,57 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Fleet + module Actions + # Deletes a secret stored by Fleet. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :id The ID of the secret + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see [TODO] + # + def delete_secret(arguments = {}) + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_DELETE + path = "_fleet/secret/#{Utils.__listify(_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb new file mode 100644 index 0000000000..dcbef0b0f5 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb @@ -0,0 +1,57 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Fleet + module Actions + # Retrieves a secret stored by Fleet. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :id The ID of the secret + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see [TODO] + # + def get_secret(arguments = {}) + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_GET + path = "_fleet/secret/#{Utils.__listify(_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb new file mode 100644 index 0000000000..c40eba1ff7 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb @@ -0,0 +1,55 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Fleet + module Actions + # Creates a secret stored by Fleet. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The secret value to store (*Required*) + # + # @see [TODO] + # + def post_secret(arguments = {}) + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = "_fleet/secret" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers) + ) + end + end + end + end +end From 451a61a00d474f28f1ff19a5386b8b17700ddcf1 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 22 Aug 2023 07:52:28 +0100 Subject: [PATCH 007/540] [API] Moves synonyms_sets, synonym_rule endpoints to synonyms namespace Updates code and specs, adds new unit tests. --- .../synonyms/{delete.rb => delete_synonym.rb} | 10 +++--- .../delete_synonym_rule.rb} | 18 +++++----- .../synonyms/{get.rb => get_synonym.rb} | 10 +++--- .../get.rb => synonyms/get_synonym_rule.rb} | 18 +++++----- .../get.rb => synonyms/get_synonyms_sets.rb} | 4 +-- .../synonyms/{put.rb => put_synonym.rb} | 10 +++--- .../put.rb => synonyms/put_synonym_rule.rb} | 18 +++++----- .../delete_synonym_rule_spec.rb} | 4 +-- .../actions/synonyms/delete_synonym_spec.rb | 34 +++++++++++++++++++ .../actions/synonyms/get_synonym_rule_spec.rb | 34 +++++++++++++++++++ .../get_synonym_spec.rb} | 6 ++-- .../get_synonyms_sets_spec.rb} | 4 +-- .../put_synonym_rule_spec.rb} | 4 +-- .../api/actions/synonyms/update_spec.rb | 4 +-- 14 files changed, 123 insertions(+), 55 deletions(-) rename elasticsearch-api/lib/elasticsearch/api/actions/synonyms/{delete.rb => delete_synonym.rb} (83%) rename elasticsearch-api/lib/elasticsearch/api/actions/{synonym_rule/delete.rb => synonyms/delete_synonym_rule.rb} (73%) rename elasticsearch-api/lib/elasticsearch/api/actions/synonyms/{get.rb => get_synonym.rb} (85%) rename elasticsearch-api/lib/elasticsearch/api/actions/{synonym_rule/get.rb => synonyms/get_synonym_rule.rb} (73%) rename elasticsearch-api/lib/elasticsearch/api/actions/{synonyms_sets/get.rb => synonyms/get_synonyms_sets.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/synonyms/{put.rb => put_synonym.rb} (84%) rename elasticsearch-api/lib/elasticsearch/api/actions/{synonym_rule/put.rb => synonyms/put_synonym_rule.rb} (74%) rename elasticsearch-api/spec/elasticsearch/api/actions/{synonym_rule/delete_spec.rb => synonyms/delete_synonym_rule_spec.rb} (84%) create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_rule_spec.rb rename elasticsearch-api/spec/elasticsearch/api/actions/{synonym_rule/get_spec.rb => synonyms/get_synonym_spec.rb} (83%) rename elasticsearch-api/spec/elasticsearch/api/actions/{synonyms_sets/get_spec.rb => synonyms/get_synonyms_sets_spec.rb} (87%) rename elasticsearch-api/spec/elasticsearch/api/actions/{synonym_rule/put_spec.rb => synonyms/put_synonym_rule_spec.rb} (84%) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb similarity index 83% rename from elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb index cad771f386..c902acb793 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb @@ -28,23 +28,23 @@ module Actions # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :synonyms_set The name of the synonyms set to be deleted + # @option arguments [String] :id The id of the synonyms set to be deleted # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonyms-set.html # - def delete(arguments = {}) - raise ArgumentError, "Required argument 'synonyms_set' missing" unless arguments[:synonyms_set] + def delete_synonym(arguments = {}) + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - _synonyms_set = arguments.delete(:synonyms_set) + _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE - path = "_synonyms/#{Utils.__listify(_synonyms_set)}" + path = "_synonyms/#{Utils.__listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb similarity index 73% rename from elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/delete.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb index 3a36171521..9af3c63419 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module SynonymRule + module Synonyms module Actions # Deletes a synonym rule in a synonym set # This functionality is Experimental and may be changed or removed @@ -28,27 +28,27 @@ module Actions # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :synonyms_set The id of the synonym set to be updated - # @option arguments [String] :synonym_rule The id of the synonym rule to be deleted + # @option arguments [String] :set_id The id of the synonym set to be updated + # @option arguments [String] :rule_id The id of the synonym rule to be deleted # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonym-rule.html # - def delete(arguments = {}) - raise ArgumentError, "Required argument 'synonyms_set' missing" unless arguments[:synonyms_set] - raise ArgumentError, "Required argument 'synonym_rule' missing" unless arguments[:synonym_rule] + def delete_synonym_rule(arguments = {}) + raise ArgumentError, "Required argument 'set_id' missing" unless arguments[:set_id] + raise ArgumentError, "Required argument 'rule_id' missing" unless arguments[:rule_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - _synonyms_set = arguments.delete(:synonyms_set) + _set_id = arguments.delete(:set_id) - _synonym_rule = arguments.delete(:synonym_rule) + _rule_id = arguments.delete(:rule_id) method = Elasticsearch::API::HTTP_DELETE - path = "_synonyms/#{Utils.__listify(_synonyms_set)}/#{Utils.__listify(_synonym_rule)}" + path = "_synonyms/#{Utils.__listify(_set_id)}/#{Utils.__listify(_rule_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb similarity index 85% rename from elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb index 173cd9f90d..0873064ccf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb @@ -28,25 +28,25 @@ module Actions # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :synonyms_set The name of the synonyms set to be retrieved + # @option arguments [String] :id The name of the synonyms set to be retrieved # @option arguments [Integer] :from Starting offset # @option arguments [Integer] :size specifies a max number of results to get # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonyms-set.html # - def get(arguments = {}) - raise ArgumentError, "Required argument 'synonyms_set' missing" unless arguments[:synonyms_set] + def get_synonym(arguments = {}) + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - _synonyms_set = arguments.delete(:synonyms_set) + _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET - path = "_synonyms/#{Utils.__listify(_synonyms_set)}" + path = "_synonyms/#{Utils.__listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb similarity index 73% rename from elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/get.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb index 3b09962ca1..9e006a31e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module SynonymRule + module Synonyms module Actions # Retrieves a synonym rule from a synonym set # This functionality is Experimental and may be changed or removed @@ -28,27 +28,27 @@ module Actions # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :synonyms_set The id of the synonym set to retrieve the synonym rule from - # @option arguments [String] :synonym_rule The id of the synonym rule to retrieve + # @option arguments [String] :set_id The id of the synonym set to retrieve the synonym rule from + # @option arguments [String] :rule_id The id of the synonym rule to retrieve # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonym-rule.html # - def get(arguments = {}) - raise ArgumentError, "Required argument 'synonyms_set' missing" unless arguments[:synonyms_set] - raise ArgumentError, "Required argument 'synonym_rule' missing" unless arguments[:synonym_rule] + def get_synonym_rule(arguments = {}) + raise ArgumentError, "Required argument 'set_id' missing" unless arguments[:set_id] + raise ArgumentError, "Required argument 'rule_id' missing" unless arguments[:rule_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - _synonyms_set = arguments.delete(:synonyms_set) + _set_id = arguments.delete(:set_id) - _synonym_rule = arguments.delete(:synonym_rule) + _rule_id = arguments.delete(:rule_id) method = Elasticsearch::API::HTTP_GET - path = "_synonyms/#{Utils.__listify(_synonyms_set)}/#{Utils.__listify(_synonym_rule)}" + path = "_synonyms/#{Utils.__listify(_set_id)}/#{Utils.__listify(_rule_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb index 0de72b872b..892388f62a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module SynonymsSets + module Synonyms module Actions # Retrieves a summary of all defined synonym sets # This functionality is Experimental and may be changed or removed @@ -34,7 +34,7 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-synonyms-sets.html # - def get(arguments = {}) + def get_synonyms_sets(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb similarity index 84% rename from elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb index 82edeb9d19..3708af4f39 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb @@ -28,25 +28,25 @@ module Actions # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :synonyms_set The name of the synonyms set to be created or updated + # @option arguments [String] :id The id of the synonyms set to be created or updated # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Synonyms set rules (*Required*) # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonyms-set.html # - def put(arguments = {}) + def put_synonym(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - raise ArgumentError, "Required argument 'synonyms_set' missing" unless arguments[:synonyms_set] + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - _synonyms_set = arguments.delete(:synonyms_set) + _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT - path = "_synonyms/#{Utils.__listify(_synonyms_set)}" + path = "_synonyms/#{Utils.__listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb similarity index 74% rename from elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb index 15063d7f63..b079a610ce 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module SynonymRule + module Synonyms module Actions # Creates or updates a synonym rule in a synonym set # This functionality is Experimental and may be changed or removed @@ -28,29 +28,29 @@ module Actions # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :synonyms_set The id of the synonym set to be updated with the synonym rule - # @option arguments [String] :synonym_rule The id of the synonym rule to be updated or created + # @option arguments [String] :set_id The id of the synonym set to be updated with the synonym rule + # @option arguments [String] :rule_id The id of the synonym rule to be updated or created # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Synonym rule (*Required*) # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonym-rule.html # - def put(arguments = {}) + def put_synonym_rule(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - raise ArgumentError, "Required argument 'synonyms_set' missing" unless arguments[:synonyms_set] - raise ArgumentError, "Required argument 'synonym_rule' missing" unless arguments[:synonym_rule] + raise ArgumentError, "Required argument 'set_id' missing" unless arguments[:set_id] + raise ArgumentError, "Required argument 'rule_id' missing" unless arguments[:rule_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - _synonyms_set = arguments.delete(:synonyms_set) + _set_id = arguments.delete(:set_id) - _synonym_rule = arguments.delete(:synonym_rule) + _rule_id = arguments.delete(:rule_id) method = Elasticsearch::API::HTTP_PUT - path = "_synonyms/#{Utils.__listify(_synonyms_set)}/#{Utils.__listify(_synonym_rule)}" + path = "_synonyms/#{Utils.__listify(_set_id)}/#{Utils.__listify(_rule_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonym_rule/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_rule_spec.rb similarity index 84% rename from elasticsearch-api/spec/elasticsearch/api/actions/synonym_rule/delete_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_rule_spec.rb index f31a224e51..644796bf9d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/synonym_rule/delete_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_rule_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.synonym_rule#put' do +describe 'client.synonyms#delete_synonym_rule' do let(:expected_args) do [ 'DELETE', @@ -29,6 +29,6 @@ end it 'performs the request' do - expect(client_double.synonym_rule.delete(synonyms_set: 'set', synonym_rule: 'rule')).to be_a Elasticsearch::API::Response + expect(client_double.synonyms.delete_synonym_rule(set_id: 'set', rule_id: 'rule')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_spec.rb new file mode 100644 index 0000000000..b6b792f76a --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_spec.rb @@ -0,0 +1,34 @@ +# 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. + +require 'spec_helper' + +describe 'client.synonyms#delete_synonym' do + let(:expected_args) do + [ + 'DELETE', + '_synonyms/foo', + {}, + nil, + {} + ] + end + + it 'performs the request' do + expect(client_double.synonyms.delete_synonym(id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_rule_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_rule_spec.rb new file mode 100644 index 0000000000..d5ba7485b7 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_rule_spec.rb @@ -0,0 +1,34 @@ +# 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. + +require 'spec_helper' + +describe 'client.synonyms#get_synonym_rule' do + let(:expected_args) do + [ + 'GET', + '_synonyms/foo/bar', + {}, + nil, + {} + ] + end + + it 'performs the request' do + expect(client_double.synonyms.get_synonym_rule(set_id: 'foo', rule_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonym_rule/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_spec.rb similarity index 83% rename from elasticsearch-api/spec/elasticsearch/api/actions/synonym_rule/get_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_spec.rb index 95bdf7c04f..53febb2b08 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/synonym_rule/get_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_spec.rb @@ -17,11 +17,11 @@ require 'spec_helper' -describe 'client.synonym_rule#put' do +describe 'client.synonyms#get_synonym' do let(:expected_args) do [ 'GET', - '_synonyms/set/rule', + '_synonyms/foo', {}, nil, {} @@ -29,6 +29,6 @@ end it 'performs the request' do - expect(client_double.synonym_rule.get(synonyms_set: 'set', synonym_rule: 'rule')).to be_a Elasticsearch::API::Response + expect(client_double.synonyms.get_synonym(id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms_sets/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonyms_sets_spec.rb similarity index 87% rename from elasticsearch-api/spec/elasticsearch/api/actions/synonyms_sets/get_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonyms_sets_spec.rb index 52d20c37be..f1ec7a0fa9 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms_sets/get_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonyms_sets_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.synonyms_sets#get' do +describe 'client.synonyms#get_synonyms_sets' do let(:expected_args) do [ 'GET', @@ -29,6 +29,6 @@ end it 'performs the request' do - expect(client_double.synonyms_sets.get).to be_a Elasticsearch::API::Response + expect(client_double.synonyms.get_synonyms_sets).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonym_rule/put_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/put_synonym_rule_spec.rb similarity index 84% rename from elasticsearch-api/spec/elasticsearch/api/actions/synonym_rule/put_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/synonyms/put_synonym_rule_spec.rb index 3790ee35a4..0dfcdc91a3 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/synonym_rule/put_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/put_synonym_rule_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.synonym_rule#put' do +describe 'client.synonyms#put_synonym_rule' do let(:expected_args) do [ 'PUT', @@ -29,6 +29,6 @@ end it 'performs the request' do - expect(client_double.synonym_rule.put(body: {}, synonyms_set: 'set', synonym_rule: 'rule')).to be_a Elasticsearch::API::Response + expect(client_double.synonyms.put_synonym_rule(body: {}, set_id: 'set', rule_id: 'rule')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/update_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/update_spec.rb index a9a7f8e8a0..82a131a43d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/update_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/update_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.synonyms#put' do +describe 'client.synonyms#put_synonym' do let(:expected_args) do [ 'PUT', @@ -29,6 +29,6 @@ end it 'performs the request' do - expect(client_double.synonyms.put(body: {}, synonyms_set: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.synonyms.put_synonym(body: {}, id: 'foo')).to be_a Elasticsearch::API::Response end end From 8648bd4ed836b16140c56033b4fefad429e2063e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 22 Aug 2023 11:02:14 +0100 Subject: [PATCH 008/540] [API] Test Runner: Implements admin user get api key manually --- .../api_key/api_key_admin_user_spec.rb | 127 ++++++++++++++++++ .../spec/rest_api/skipped_tests_platinum.yml | 3 + 2 files changed, 130 insertions(+) create mode 100644 elasticsearch-api/spec/platinum/integration/api_key/api_key_admin_user_spec.rb diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_admin_user_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_admin_user_spec.rb new file mode 100644 index 0000000000..b5ca398a5e --- /dev/null +++ b/elasticsearch-api/spec/platinum/integration/api_key/api_key_admin_user_spec.rb @@ -0,0 +1,127 @@ +# 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. + +require 'base64' +require_relative '../platinum_helper' + +describe 'API keys' do + before do + ADMIN_CLIENT.security.put_user( + username: client_username, + body: { password: 'test-password', roles: ['superuser'] } + ) + end + + after do + ADMIN_CLIENT.security.delete_user(username: client_username) + end + + let(:client_username) { "superuser#{Time.now.to_i}"} + + let(:client) do + Elasticsearch::Client.new( + host: "https://#{HOST_URI.host}:#{HOST_URI.port}", + user: client_username, + password: 'test-password', + transport_options: TRANSPORT_OPTIONS + ) + end + + it 'gets api key (with role descriptors + metadata)' do + response = client.security.create_api_key( + body: { + name: "api-key-role", + expiration: "1d", + role_descriptors: { + 'role-a': { + cluster: ["all"], + index: [ + { + names: ["index-a"], + privileges: ["read"] + } + ] + } + }, + metadata: { + string: "bean", + number: 5, + boolean: true + } + } + ) + expect(response['name']).to eq 'api-key-role' + expect(response['id']).not_to be nil + expect(response['api_key']).not_to be nil + expect(response['expiration']).not_to be nil + api_key_id = response['id'] + api_key_name = response['name'] + credentials = response['encoded'] + + response = client.security.authenticate + owner_name = response['username'] + + response = client.security.get_api_key(id: api_key_id) + expect(response['api_keys'].first['id']).to eq api_key_id + expect(response['api_keys'].first['name']).to eq api_key_name + expect(response['api_keys'].first['username']).to eq owner_name + expect(response['api_keys'].first['invalidated']).to eq false + expect(response['api_keys'].first['creation']).not_to be nil + expect(response['api_keys'].first['metadata']['string']).to eq 'bean' + expect(response['api_keys'].first['metadata']['number']).to eq 5 + expect(response['api_keys'].first['metadata']['boolean']).to eq true + expect(response['api_keys'].first['role_descriptors']) + .to eq( + { + 'role-a' => { + 'cluster' => ['all'], + 'indices' => [ + { + 'names' => ['index-a'], + 'privileges' => ['read'], + 'allow_restricted_indices' => false + } + ], + 'applications' => [ ], + 'run_as' => [ ], + 'metadata' => { }, + 'transient_metadata' => { 'enabled' => true } + } + } + ) + + response = client.security.get_api_key(owner: true) + expect(response['api_keys'].length).to eq 1 + expect(response['api_keys'].first['id']).to eq api_key_id + expect(response['api_keys'].first['name']).to eq api_key_name + expect(response['api_keys'].first['username']).to eq owner_name + expect(response['api_keys'].first['invalidated']).to eq false + expect(response['api_keys'].first['creation']).not_to be nil + + client = Elasticsearch::Client.new( + host: "https://#{HOST_URI.host}:#{HOST_URI.port}", + api_key: credentials, + transport_options: TRANSPORT_OPTIONS + ) + + response = client.security.get_api_key(id: api_key_id) + expect(response['api_keys'].length).to eq 1 + expect(response['api_keys'].first['id']).to eq api_key_id + expect(response['api_keys'].first['name']).to eq api_key_name + expect(response['api_keys'].first['username']).to eq owner_name + end +end diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml index f3fd07c547..271ea581d0 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml @@ -99,3 +99,6 @@ - :file: 'eql/30_async_missing_events.yml' :description: 'Execute async EQL with missing events' +- + :file: 'api_key/60_admin_user.yml' + :description: 'Test get api key (with role descriptors + metadata)' From 5c1f03d290d2ae4c021e8d81967690d70ce40542 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 22 Aug 2023 11:19:22 +0100 Subject: [PATCH 009/540] [API] Test Runner: Implements admin user query api key manually --- .../api_key/query_api_keys_spec.rb | 113 ++++++++++++++++++ .../spec/rest_api/skipped_tests_platinum.yml | 3 + 2 files changed, 116 insertions(+) create mode 100644 elasticsearch-api/spec/platinum/integration/api_key/query_api_keys_spec.rb diff --git a/elasticsearch-api/spec/platinum/integration/api_key/query_api_keys_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/query_api_keys_spec.rb new file mode 100644 index 0000000000..e98c4501bd --- /dev/null +++ b/elasticsearch-api/spec/platinum/integration/api_key/query_api_keys_spec.rb @@ -0,0 +1,113 @@ +# 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. + +require 'base64' +require_relative '../platinum_helper' + +describe 'API keys' do + before do + ADMIN_CLIENT.security.put_user( + username: client_username, + body: { password: 'test-password', roles: ['superuser'] } + ) + end + + after do + ADMIN_CLIENT.security.delete_privileges(application: 'myapp', name: 'read,write', ignore: 404) + ADMIN_CLIENT.security.delete_user(username: client_username) + end + + let(:client_username) { "query_api_keys_#{Time.new.to_i}"} + + let(:client) do + Elasticsearch::Client.new( + host: "https://#{HOST_URI.host}:#{HOST_URI.port}", + user: client_username, + password: 'test-password', + transport_options: TRANSPORT_OPTIONS + ) + end + + it 'queries API keys' do + key_name_1 = "query-key-1-#{Time.new.to_i}" + response = client.security.create_api_key( + body: { + name: key_name_1, + expiration: "1d", + role_descriptors: {}, + metadata: { search: "this" } + } + ) + expect(response['name']).to eq key_name_1 + expect(response['api_key']).not_to be nil + api_key_id_1 = response['id'] + + key_name_2 = "query-key-2-#{Time.new.to_i}" + response = client.security.create_api_key( + body: { + name: key_name_2, + expiration: "2d", + role_descriptors: { "role-a" => { "cluster": [ "monitor"] } }, + metadata: { search: false } + } + ) + expect(response['name']).to eq key_name_2 + expect(response['api_key']).not_to be nil + api_key_id_2 = response['id'] + + key_name_3 = "query-key-3#{Time.new.to_i}" + response = client.security.create_api_key( + body: { + name: key_name_3, + expiration: "3d", + } + ) + expect(response['name']).to eq key_name_3 + expect(response['api_key']).not_to be nil + api_key_id_3 = response['id'] + + response = client.security.authenticate + owner_name = response['username'] + + response = client.security.query_api_keys( + body: { + query: { wildcard: { name: key_name_1 }} + } + ) + expect(response['total']).to eq 1 + expect(response['count']).to eq 1 + expect(response['api_keys'].first['id']).to eq api_key_id_1 + + response = client.security.query_api_keys( + body: { + query: { wildcard: { name: key_name_2 }} + } + ) + expect(response['total']).to eq 1 + expect(response['count']).to eq 1 + expect(response['api_keys'].first['id']).to eq api_key_id_2 + + response = client.security.query_api_keys( + body: { + query: { wildcard: { name: key_name_3 }} + } + ) + expect(response['total']).to eq 1 + expect(response['count']).to eq 1 + expect(response['api_keys'].first['id']).to eq api_key_id_3 + end +end diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml index 271ea581d0..bc79ecbcaf 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml @@ -102,3 +102,6 @@ - :file: 'api_key/60_admin_user.yml' :description: 'Test get api key (with role descriptors + metadata)' +- + :file: 'api_key/60_admin_user.yml' + :description: 'Test query api keys' From 11fc4b901d2a0f20991c84cb082675c5dd3aa437 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 23 Aug 2023 08:11:17 +0100 Subject: [PATCH 010/540] [API] Test Runner: Updates API Key tests --- ...c.rb => admin_user_query_api_keys_spec.rb} | 10 ++++----- .../api_key/api_key_cross_cluster_spec.rb | 15 ++++--------- .../api_key/api_key_invalidation_spec.rb | 21 ++++++++----------- .../integration/api_key/api_key_spec.rb | 9 ++++---- 4 files changed, 21 insertions(+), 34 deletions(-) rename elasticsearch-api/spec/platinum/integration/api_key/{query_api_keys_spec.rb => admin_user_query_api_keys_spec.rb} (92%) diff --git a/elasticsearch-api/spec/platinum/integration/api_key/query_api_keys_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/admin_user_query_api_keys_spec.rb similarity index 92% rename from elasticsearch-api/spec/platinum/integration/api_key/query_api_keys_spec.rb rename to elasticsearch-api/spec/platinum/integration/api_key/admin_user_query_api_keys_spec.rb index e98c4501bd..5939b2ac2b 100644 --- a/elasticsearch-api/spec/platinum/integration/api_key/query_api_keys_spec.rb +++ b/elasticsearch-api/spec/platinum/integration/api_key/admin_user_query_api_keys_spec.rb @@ -27,18 +27,16 @@ end after do - ADMIN_CLIENT.security.delete_privileges(application: 'myapp', name: 'read,write', ignore: 404) ADMIN_CLIENT.security.delete_user(username: client_username) end let(:client_username) { "query_api_keys_#{Time.new.to_i}"} + let(:credentials) { Base64.strict_encode64("#{client_username}:test-password") } let(:client) do Elasticsearch::Client.new( - host: "https://#{HOST_URI.host}:#{HOST_URI.port}", - user: client_username, - password: 'test-password', - transport_options: TRANSPORT_OPTIONS + host: HOST, + transport_options: TRANSPORT_OPTIONS.merge(headers: { Authorization: "Basic #{credentials}" }) ) end @@ -47,8 +45,8 @@ response = client.security.create_api_key( body: { name: key_name_1, - expiration: "1d", role_descriptors: {}, + expiration: "1d", metadata: { search: "this" } } ) diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_cross_cluster_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_cross_cluster_spec.rb index 6b42dccd6f..9ba92fbd9c 100644 --- a/elasticsearch-api/spec/platinum/integration/api_key/api_key_cross_cluster_spec.rb +++ b/elasticsearch-api/spec/platinum/integration/api_key/api_key_cross_cluster_spec.rb @@ -41,16 +41,9 @@ ADMIN_CLIENT.security.delete_user(username: user, ignore: 404) end - let(:client) do - Elasticsearch::Client.new( - host: "https://admin_user:x-pack-test-password@#{HOST_URI.host}:#{HOST_URI.port}", - transport_options: TRANSPORT_OPTIONS - ) - end - describe 'Cross Cluster API Key' do it 'updates api key' do - response = client.security.create_cross_cluster_api_key( + response = ADMIN_CLIENT.security.create_cross_cluster_api_key( body: { name: "my-cc-api-key", expiration: "1d", @@ -97,7 +90,7 @@ new_client.security.authenticate(headers: { authorization: "ApiKey #{credentials}" }) end.to raise_error(Elastic::Transport::Transport::Errors::Unauthorized) - response = client.security.get_api_key(id: id, with_limited_by: true) + response = ADMIN_CLIENT.security.get_api_key(id: id, with_limited_by: true) expect(response.status).to eq 200 api_key = response['api_keys'].first expect(api_key['name']) == 'my-cc-api-key' @@ -106,7 +99,7 @@ expect(api_key['metadata']).to eq({'answer' => 42, 'tag' => 'dev'}) # Tests update cc api_key - response = client.security.update_cross_cluster_api_key( + response = ADMIN_CLIENT.security.update_cross_cluster_api_key( id: id, body: { access: { @@ -117,7 +110,7 @@ ) expect(response['updated']).to be true - response = client.security.get_api_key(id: id, with_limited_by: true) + response = ADMIN_CLIENT.security.get_api_key(id: id, with_limited_by: true) expect(response['api_keys'].length).to eq 1 api_key = response['api_keys'].first expect(api_key['name']) == 'my-cc-api-key' diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_invalidation_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_invalidation_spec.rb index cc6b5a54cd..5162a77830 100644 --- a/elasticsearch-api/spec/platinum/integration/api_key/api_key_invalidation_spec.rb +++ b/elasticsearch-api/spec/platinum/integration/api_key/api_key_invalidation_spec.rb @@ -34,13 +34,13 @@ ADMIN_CLIENT.security.put_user( username: 'api_key_manager', body: { - password: 'x-pack-test-password', + password: 'changeme', roles: [ 'admin_role' ], full_name: 'API key manager' } ) ADMIN_CLIENT.security.put_user( - username: 'api_key_user1', + username: 'api_key_test_user1', body: { password: 'x-pack-test-password', roles: [ 'user_role' ], @@ -56,10 +56,12 @@ ADMIN_CLIENT.security.delete_user(username: "api_key_manager", ignore: 404) end + let(:credentials) { Base64.strict_encode64("api_key_manager:changeme") } + let(:client) do Elasticsearch::Client.new( - host: "https://api_key_manager:x-pack-test-password@#{HOST_URI.host}:#{HOST_URI.port}", - transport_options: TRANSPORT_OPTIONS + host: HOST, + transport_options: TRANSPORT_OPTIONS.merge(headers: { Authorization: "Basic #{credentials}" }) ) end @@ -77,11 +79,10 @@ expect(response['api_key']).not_to be nil expect(response['expiration']).not_to be nil + user_credentials = Base64.strict_encode64('api_key_test_user1:x-pack-test-password') user_client = Elasticsearch::Client.new( - host: "https://#{HOST_URI.host}:#{HOST_URI.port}", - user: 'api_key_user1', - password: 'x-pack-test-password', - transport_options: TRANSPORT_OPTIONS + host: HOST, + transport_options: TRANSPORT_OPTIONS.merge(headers: { Authentication: "Basic #{user_credentials}" }) ) response = user_client.security.create_api_key( body: { @@ -96,10 +97,6 @@ expect(response['api_key']).not_to be nil expect(response['expiration']).not_to be nil - expect do - user_client.security.invalidate_api_key(body: { realm_name: 'default_native'}) - end.to raise_error(Elastic::Transport::Transport::Errors::Forbidden) - response = client.security.invalidate_api_key(body: { realm_name: 'default_native'}) expect(response['invalidated_api_keys'].count).to be >= 2 expect(response['error_count']).to eq 0 diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_spec.rb index aadfd22c38..8b5c829f32 100644 --- a/elasticsearch-api/spec/platinum/integration/api_key/api_key_spec.rb +++ b/elasticsearch-api/spec/platinum/integration/api_key/api_key_spec.rb @@ -42,7 +42,7 @@ ADMIN_CLIENT.security.put_user( username: 'api_key_user', body: { - password: 'x-pack-test-password', + password: 'test-password', roles: [ 'admin_role' ], full_name: 'API key user' } @@ -72,12 +72,11 @@ ADMIN_CLIENT.security.delete_privileges(application: 'myapp', name: "read,write", ignore: 404) end + let(:credentials) { Base64.strict_encode64("api_key_user:test-password") } let(:client) do Elasticsearch::Client.new( - host: "https://#{HOST_URI.host}:#{HOST_URI.port}", - user: 'api_key_user', - password: 'x-pack-test-password', - transport_options: TRANSPORT_OPTIONS + host: HOST, + transport_options: TRANSPORT_OPTIONS.merge(headers: { Authorization: "Basic #{credentials}" }) ) end From 5543428080e4cb9c837a0773d47966358980f057 Mon Sep 17 00:00:00 2001 From: Nigel Small Date: Mon, 21 Aug 2023 14:08:47 +0100 Subject: [PATCH 011/540] Updated project metadata to use group email address --- elasticsearch-api/elasticsearch-api.gemspec | 4 ++-- elasticsearch/elasticsearch.gemspec | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/elasticsearch-api.gemspec b/elasticsearch-api/elasticsearch-api.gemspec index d8b8933060..a73f342a94 100644 --- a/elasticsearch-api/elasticsearch-api.gemspec +++ b/elasticsearch-api/elasticsearch-api.gemspec @@ -23,8 +23,8 @@ require 'elasticsearch/api/version' Gem::Specification.new do |s| s.name = 'elasticsearch-api' s.version = Elasticsearch::API::VERSION - s.authors = ['Karel Minarik', 'Emily Stolfo', 'Fernando Briano'] - s.email = ['clients-team@elastic.co'] + s.authors = ['Elastic Client Library Maintainers'] + s.email = ['client-libs@elastic.co'] s.summary = 'Ruby API for Elasticsearch.' s.homepage = 'https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html' s.license = 'Apache-2.0' diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index 56a200a035..e46d20df36 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -22,8 +22,8 @@ require 'elasticsearch/version' Gem::Specification.new do |s| s.name = 'elasticsearch' s.version = Elasticsearch::VERSION - s.authors = ['Karel Minarik', 'Emily Stolfo', 'Fernando Briano'] - s.email = ['clients-team@elastic.co'] + s.authors = ['Elastic Client Library Maintainers'] + s.email = ['client-libs@elastic.co'] s.summary = 'Ruby integrations for Elasticsearch' s.homepage = 'https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html' s.license = 'Apache-2.0' From 6bc2725e16d005e6884773804c7adc169aba8260 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Thu, 24 Aug 2023 10:12:28 +0000 Subject: [PATCH 012/540] Bumps main to 8.11.0 --- elasticsearch-api/lib/elasticsearch/api/version.rb | 2 +- elasticsearch/elasticsearch.gemspec | 2 +- elasticsearch/lib/elasticsearch/version.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index e26bcc3db3..d9c8373476 100644 --- a/elasticsearch-api/lib/elasticsearch/api/version.rb +++ b/elasticsearch-api/lib/elasticsearch/api/version.rb @@ -17,6 +17,6 @@ module Elasticsearch module API - VERSION = '8.10.0'.freeze + VERSION = '8.11.0'.freeze end end diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index e46d20df36..2c1663a7e1 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -46,7 +46,7 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 2.5' s.add_dependency 'elastic-transport', '~> 8' - s.add_dependency 'elasticsearch-api', '8.10.0' + s.add_dependency 'elasticsearch-api', '8.11.0' s.add_development_dependency 'bundler' s.add_development_dependency 'byebug' unless defined?(JRUBY_VERSION) || defined?(Rubinius) diff --git a/elasticsearch/lib/elasticsearch/version.rb b/elasticsearch/lib/elasticsearch/version.rb index d4df1c59f8..dd97a5edfe 100644 --- a/elasticsearch/lib/elasticsearch/version.rb +++ b/elasticsearch/lib/elasticsearch/version.rb @@ -16,5 +16,5 @@ # under the License. module Elasticsearch - VERSION = '8.10.0'.freeze + VERSION = '8.11.0'.freeze end From eddb2013a123b769fc2ee70b81e66ccfa9a316ad Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 24 Aug 2023 08:43:36 +0100 Subject: [PATCH 013/540] [CI] wait for container for longer to reduce log noise --- .buildkite/functions/wait-for-container.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/functions/wait-for-container.sh b/.buildkite/functions/wait-for-container.sh index 1a721b588f..32a4498f46 100755 --- a/.buildkite/functions/wait-for-container.sh +++ b/.buildkite/functions/wait-for-container.sh @@ -14,7 +14,7 @@ function wait_for_container { echo "" docker inspect -f "{{range .State.Health.Log}}{{.Output}}{{end}}" ${1} echo -e "\033[34;1mINFO:\033[0m waiting for node $1 to be up\033[0m" - sleep 2; + sleep 5; done; # Always show logs if the container is running, this is very useful both on CI as well as while developing From d57c8e681d298d9e94c79a002c2cbf8634873e5a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 23 Aug 2023 16:06:19 +0100 Subject: [PATCH 014/540] [CI] Test all minor 8.x versions of transport and main branch --- .buildkite/Dockerfile | 1 + .buildkite/pipeline.yml | 17 ++++++++++++++++- .buildkite/run-client.sh | 3 +++ .buildkite/run-tests.sh | 1 - .../spec/rest_api/rest_api_yaml_spec.rb | 2 ++ elasticsearch/Gemfile | 4 ++++ elasticsearch/elasticsearch.gemspec | 10 +++++++++- 7 files changed, 35 insertions(+), 3 deletions(-) diff --git a/.buildkite/Dockerfile b/.buildkite/Dockerfile index 5c4b64c2ab..3bf852d298 100644 --- a/.buildkite/Dockerfile +++ b/.buildkite/Dockerfile @@ -12,6 +12,7 @@ ARG QUIET=${QUIET:-true} ARG CI=${CI:-false} ENV QUIET=$QUIET ENV CI=$CI +ARG TRANSPORT_VERSION=${TRANSPORT_VERSION:-8} # Install required tools RUN apt-get -q update \ diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index a6f11c5a41..e547d216f6 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,11 +1,12 @@ steps: - - label: ":elasticsearch: :ruby: ES Ruby ({{ matrix.ruby }}) Test Suite: {{ matrix.suite }}" + - label: ":ruby: v{{ matrix.ruby }} :phone: Transport: {{ matrix.transport }} :elasticsearch: Suite: {{ matrix.suite }}" agents: provider: "gcp" env: RUBY_VERSION: "{{ matrix.ruby }}" TEST_SUITE: "{{ matrix.suite }}" STACK_VERSION: 8.10.0-SNAPSHOT + TRANSPORT_VERSION: "{{ matrix.transport }}" matrix: setup: suite: @@ -15,6 +16,8 @@ steps: - "3.2" - "3.1" - "3.0" + transport: + - "8.2" # Only run platinum once for the latest Ruby. You can use lots of combinations, check the # documentation on https://buildkite.com/docs/pipelines/build-matrix for more information. adjustments: @@ -26,6 +29,18 @@ steps: suite: "platinum" ruby: "3.0" skip: true + - with: + suite: "free" + ruby: "3.2" + transport: "8.0" + - with: + suite: "free" + ruby: "3.2" + transport: "8.1" + - with: + suite: "free" + ruby: "3.2" + transport: "main" command: ./.buildkite/run-tests.sh # I'm publishing test results to HTML and JUnit in this directory and this directive makes them # available in the Artifacts tab of a build in Buildkite. diff --git a/.buildkite/run-client.sh b/.buildkite/run-client.sh index 4f7cefba63..85c4cc9a77 100755 --- a/.buildkite/run-client.sh +++ b/.buildkite/run-client.sh @@ -7,12 +7,14 @@ set -euo pipefail repo=`pwd` export RUBY_VERSION=${RUBY_VERSION:-3.1} +export TRANSPORT_VERSION=${TRANSPORT_VERSION:-8} echo "--- :ruby: Building Docker image" docker build \ --file $script_path/Dockerfile \ --tag elastic/elasticsearch-ruby \ --build-arg RUBY_VERSION=$RUBY_VERSION \ + --build-arg TRANSPORT_VERSION=$TRANSPORT_VERSION \ . mkdir -p elasticsearch-api/tmp @@ -26,6 +28,7 @@ docker run \ --env "TEST_SUITE=${TEST_SUITE}" \ --env "ELASTIC_USER=elastic" \ --env "BUILDKITE=true" \ + --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ --volume $repo:/usr/src/app \ --name elasticsearch-ruby \ --rm \ diff --git a/.buildkite/run-tests.sh b/.buildkite/run-tests.sh index 12a24c2912..4aab738b3d 100755 --- a/.buildkite/run-tests.sh +++ b/.buildkite/run-tests.sh @@ -11,5 +11,4 @@ set -euo pipefail echo "--- :elasticsearch: Starting Elasticsearch" DETACH=true bash $script_path/run-elasticsearch.sh -echo "+++ :ruby: Run Client" bash $script_path/run-client.sh diff --git a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb index ebe1d58e81..7a64938f4a 100644 --- a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb +++ b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb @@ -22,6 +22,8 @@ LOGGER = Logger.new($stdout) describe 'Rest API YAML tests' do + LOGGER.info "Elastic Transport version: #{Elastic::Transport::VERSION}" + if REST_API_YAML_FILES.empty? LOGGER.error 'No test files found!' LOGGER.info 'Use rake rake elasticsearch:download_artifacts in the root directory of the project to download the test artifacts.' diff --git a/elasticsearch/Gemfile b/elasticsearch/Gemfile index 425340324f..847b0cc288 100644 --- a/elasticsearch/Gemfile +++ b/elasticsearch/Gemfile @@ -25,3 +25,7 @@ gemspec if File.exist? File.expand_path('../elasticsearch-api/elasticsearch-api.gemspec', __dir__) gem 'elasticsearch-api', path: File.expand_path('../elasticsearch-api', __dir__), require: false end + +if ENV['TRANSPORT_VERSION'] == 'main' + gem 'elastic-transport', git: 'https://github.com/elastic/elastic-transport-ruby.git', branch: 'main' +end diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index 2c1663a7e1..7c57a9c751 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -45,7 +45,15 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 2.5' - s.add_dependency 'elastic-transport', '~> 8' + transport_version = ENV.fetch('TRANSPORT_VERSION', '8') + if ['8', 'main'].include? transport_version + s.add_dependency 'elastic-transport', '~> 8' + else + major_version = transport_version.gsub(/[0-9]+$/, '') + next_minor_version = transport_version.gsub(/[0-9]+\./, '').to_i + 1 + s.add_dependency 'elastic-transport', "~> #{transport_version}", "< #{major_version}#{next_minor_version}" + end + s.add_dependency 'elasticsearch-api', '8.11.0' s.add_development_dependency 'bundler' From 1e54fe9701294b9dfcacdc2297ab147ac526716c Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 24 Jul 2023 16:23:56 +0200 Subject: [PATCH 015/540] Refactor thor generator --- .../utils/thor/generate_source.rb | 318 ++++++++++-------- .../thor/generator/endpoint_specifics.rb | 6 +- .../utils/thor/templates/_body.erb | 4 +- .../thor/templates/_documentation_top.erb | 46 +-- .../utils/thor/templates/_method_setup.erb | 20 +- .../utils/thor/templates/_perform_request.erb | 12 +- .../utils/thor/templates/method.erb | 38 +-- 7 files changed, 242 insertions(+), 202 deletions(-) diff --git a/elasticsearch-api/utils/thor/generate_source.rb b/elasticsearch-api/utils/thor/generate_source.rb index e9c40eb5f2..52a145d4ab 100644 --- a/elasticsearch-api/utils/thor/generate_source.rb +++ b/elasticsearch-api/utils/thor/generate_source.rb @@ -59,48 +59,195 @@ def generate print_tree if options[:verbose] end + class Spec + include EndpointSpecifics + + def initialize(filepath) + @path = Pathname(filepath) + json = MultiJson.load(File.read(@path)) + @spec = json.values.first + @endpoint_name = json.keys.first + + full_namespace = parse_full_namespace + @namespace_depth = full_namespace.size > 0 ? full_namespace.size - 1 : 0 + @module_namespace = full_namespace[0, namespace_depth] + @method_name = full_namespace.last + + @path_parts = parse_endpoint_parts(@spec) + @params = @spec['params'] || {} + @paths = @spec['url']['paths'].map { |b| b['path'] } if @spec['url'] + @http_method = parse_http_method(@spec) + @deprecation_note = @spec['url']['paths'].last&.[]('deprecated') + @http_path = parse_http_path(@paths) + @required_parts = parse_required_parts(@spec) + end + + attr_reader :module_namespace, + :method_name, + :endpoint_name, + :path, + :path_parts, + :params, + :deprecation_note, + :namespace_depth, + :http_path, + :required_parts, + :http_method, + :namespace_depth + + def body + @spec['body'] + end + + def documentation + @spec['documentation'] + end + + def stability + @spec['stability'] + end + + # Function that adds the listified h param code + def specific_params + super(@module_namespace.first, @method_name) + end + + private + + def parse_full_namespace + names = @endpoint_name.split('.') + # Return an array to expand 'ccr', 'ilm', 'ml' and 'slm' + names.map do |name| + name + .gsub(/^ml$/, 'machine_learning') + .gsub(/^ilm$/, 'index_lifecycle_management') + .gsub(/^ccr/, 'cross_cluster_replication') + .gsub(/^slm/, 'snapshot_lifecycle_management') + end + end + + def parse_endpoint_parts(spec) + parts = spec['url']['paths'].select do |a| + a.keys.include?('parts') + end.map do |path| + path&.[]('parts') + end + (parts.inject(&:merge) || []) + end + + def parse_http_method(spec) + return '_id ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @endpoint_name == 'index' + return '_name ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @method_name == 'create_service_token' + return post_and_get if @endpoint_name == 'count' + + default_method = spec['url']['paths'].map { |a| a['methods'] }.flatten.first + if spec['body'] && default_method == 'GET' + # When default method is GET and body is required, we should always use POST + if spec['body']['required'] + 'Elasticsearch::API::HTTP_POST' + else + post_and_get + end + else + "Elasticsearch::API::HTTP_#{default_method}" + end + end + + def parse_http_path(paths) + return "\"#{parse_path(paths.first)}\"" if paths.size == 1 + + result = '' + anchor_string = [] + paths.sort { |a, b| b.length <=> a.length }.each_with_index do |path, i| + var_string = extract_path_variables(path).map { |var| "_#{var}" }.join(' && ') + next if anchor_string.include? var_string + + anchor_string << var_string + result += if i.zero? + "if #{var_string}\n" + elsif (i == paths.size - 1) || var_string.empty? + "else\n" + else + "elsif #{var_string}\n" + end + result += "\"#{parse_path(path)}\"\n" + end + result += 'end' + result + end + + def parse_path(path) + path.gsub(/^\//, '') + .gsub(/\/$/, '') + .gsub('{', "\#{Utils.__listify(_") + .gsub('}', ')}') + end + + def path_variables + @paths.map do |path| + extract_path_variables(path) + end + end + + def parse_path_variables + @paths.map do |path| + extract_path_variables(path) + end + end + + # extract values that are in the {var} format: + def extract_path_variables(path) + path.scan(/{(\w+)}/).flatten + end + + # Find parts that are definitely required and should raise an error if + # they're not present + # + def parse_required_parts(spec) + required = [] + return required if @endpoint_name == 'tasks.get' + + required << 'body' if (spec['body'] && spec['body']['required']) + # Get required variables from paths: + req_variables = parse_path_variables.inject(:&) # find intersection + required << req_variables unless req_variables.empty? + required.flatten + end + + def post_and_get + # the METHOD is defined after doing arguments.delete(:body), so we need to check for `body` + <<~SRC + if body + Elasticsearch::API::HTTP_POST + else + Elasticsearch::API::HTTP_GET + end + SRC + end + end + private def generate_source - @output = FilesHelper.output_dir - cleanup_directory! + output = FilesHelper.output_dir + cleanup_directory!(output) FilesHelper.files.each do |filepath| - @path = Pathname(filepath) - @json = MultiJson.load(File.read(@path)) - @spec = @json.values.first - say_status 'json', @path, :yellow - - @spec['url'] ||= {} - - @endpoint_name = @json.keys.first - @full_namespace = __full_namespace - @namespace_depth = @full_namespace.size > 0 ? @full_namespace.size - 1 : 0 - @module_namespace = @full_namespace[0, @namespace_depth] + @spec = Spec.new(filepath) + say_status 'json', @spec.path, :yellow # Don't generate code for internal APIs: - next if @module_namespace.flatten.first == '_internal' - - @method_name = @full_namespace.last - @parts = __endpoint_parts - @params = @spec['params'] || {} - @specific_params = specific_params(@module_namespace.first) # See EndpointSpecifics - @http_method = __http_method - @paths = @spec['url']['paths'].map { |b| b['path'] } - # Using Ruby's safe operator on array: - @deprecation_note = @spec['url']['paths'].last&.[]('deprecated') - @http_path = __http_path - @required_parts = __required_parts + next if @spec.module_namespace.flatten.first == '_internal' - @path_to_file = @output.join(@module_namespace.join('/')).join("#{@method_name}.rb") - dir = @output.join(@module_namespace.join('/')) + path_to_file = output.join(@spec.module_namespace.join('/')).join("#{@spec.method_name}.rb") + dir = output.join(@spec.module_namespace.join('/')) empty_directory(dir, verbose: false) # Write the file with the ERB template: - template('templates/method.erb', @path_to_file, force: true) + template('templates/method.erb', path_to_file, force: true) - print_source_code(@path_to_file) if options[:verbose] + print_source_code(path_to_file) if options[:verbose] generate_tests if options[:tests] @@ -137,122 +284,15 @@ def original_build_hash match[1] end - def __full_namespace - names = @endpoint_name.split('.') - # Return an array to expand 'ccr', 'ilm', 'ml' and 'slm' - names.map do |name| - name - .gsub(/^ml$/, 'machine_learning') - .gsub(/^ilm$/, 'index_lifecycle_management') - .gsub(/^ccr/, 'cross_cluster_replication') - .gsub(/^slm/, 'snapshot_lifecycle_management') - end - end - # Create the hierarchy of directories based on API namespaces # - def __create_directories(key, value) + def create_directories(key, value) return if value['documentation'] empty_directory @output.join(key) create_directory_hierarchy * value.to_a.first end - # Extract parts from each path - # - def __endpoint_parts - parts = @spec['url']['paths'].select do |a| - a.keys.include?('parts') - end.map do |path| - path&.[]('parts') - end - (parts.inject(&:merge) || []) - end - - def __http_method - return '_id ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @endpoint_name == 'index' - return '_name ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @method_name == 'create_service_token' - return post_and_get if @endpoint_name == 'count' - - default_method = @spec['url']['paths'].map { |a| a['methods'] }.flatten.first - if @spec['body'] && default_method == 'GET' - # When default method is GET and body is required, we should always use POST - if @spec['body']['required'] - 'Elasticsearch::API::HTTP_POST' - else - post_and_get - end - else - "Elasticsearch::API::HTTP_#{default_method}" - end - end - - def post_and_get - # the METHOD is defined after doing arguments.delete(:body), so we need to check for `body` - <<~SRC - if body - Elasticsearch::API::HTTP_POST - else - Elasticsearch::API::HTTP_GET - end - SRC - end - - def __http_path - return "\"#{__parse_path(@paths.first)}\"" if @paths.size == 1 - - result = '' - anchor_string = [] - @paths.sort { |a, b| b.length <=> a.length }.each_with_index do |path, i| - var_string = __extract_path_variables(path).map { |var| "_#{var}" }.join(' && ') - next if anchor_string.include? var_string - - anchor_string << var_string - result += if i.zero? - "if #{var_string}\n" - elsif (i == @paths.size - 1) || var_string.empty? - "else\n" - else - "elsif #{var_string}\n" - end - result += "\"#{__parse_path(path)}\"\n" - end - result += 'end' - result - end - - def __parse_path(path) - path.gsub(/^\//, '') - .gsub(/\/$/, '') - .gsub('{', "\#{Utils.__listify(_") - .gsub('}', ')}') - end - - def __path_variables - @paths.map do |path| - __extract_path_variables(path) - end - end - - # extract values that are in the {var} format: - def __extract_path_variables(path) - path.scan(/{(\w+)}/).flatten - end - - # Find parts that are definitely required and should raise an error if - # they're not present - # - def __required_parts - required = [] - return required if @endpoint_name == 'tasks.get' - - required << 'body' if (@spec['body'] && @spec['body']['required']) - # Get required variables from paths: - req_variables = __path_variables.inject(:&) # find intersection - required << req_variables unless req_variables.empty? - required.flatten - end - def docs_helper(name, info) info['type'] = 'String' if info['type'] == 'enum' # Rename 'enums' to 'strings' info['type'] = 'Integer' if info['type'] == 'int' # Rename 'int' to 'Integer' @@ -319,8 +359,8 @@ def print_tree say_status('tree', lines.first + "\n" + lines[1, lines.size].map { |l| ' ' * 14 + l }.join("\n")) end - def cleanup_directory! - Dir["#{@output}/**/*.rb"].each do |file| + def cleanup_directory!(output) + Dir["#{output}/**/*.rb"].each do |file| # file = File.join(@output, f) File.delete(file) unless (['.', '..'].include? file) || Pathname(file).directory? end diff --git a/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb b/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb index 013358087e..a3a3a79522 100644 --- a/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb +++ b/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb @@ -55,10 +55,10 @@ module EndpointSpecifics recovery shards thread_pool].freeze # Function that adds the listified h param code - def specific_params(namespace) + def specific_params(namespace, method_name) params = [] - if H_PARAMS.include?(@method_name) && namespace == 'cat' - if @method_name == 'nodes' + if H_PARAMS.include?(method_name) && namespace == 'cat' + if method_name == 'nodes' params << 'params[:h] = Utils.__listify(params[:h], escape: false) if params[:h]' else params << 'params[:h] = Utils.__listify(params[:h]) if params[:h]' diff --git a/elasticsearch-api/utils/thor/templates/_body.erb b/elasticsearch-api/utils/thor/templates/_body.erb index 9ff997195e..5ffd9e96aa 100644 --- a/elasticsearch-api/utils/thor/templates/_body.erb +++ b/elasticsearch-api/utils/thor/templates/_body.erb @@ -17,7 +17,7 @@ # under the License. %> <%- -case @endpoint_name +case @spec.endpoint_name when 'mtermvectors' -%> body = if(ids = arguments.delete(:ids)) @@ -30,5 +30,5 @@ when 'mtermvectors' <%- when 'ml.find_file_structure' %> body = Utils.__bulkify(arguments.delete(:body)) <%- else -%> - <%= ' '*(@namespace_depth+3) %>body = <%= @spec['body'].nil? ? 'nil' : 'arguments.delete(:body)' %> + <%= ' '*(@spec.namespace_depth+3) %>body = <%= @spec.body.nil? ? 'nil' : 'arguments.delete(:body)' %> <%- end -%> diff --git a/elasticsearch-api/utils/thor/templates/_documentation_top.erb b/elasticsearch-api/utils/thor/templates/_documentation_top.erb index 5e1a856cc4..357db21749 100644 --- a/elasticsearch-api/utils/thor/templates/_documentation_top.erb +++ b/elasticsearch-api/utils/thor/templates/_documentation_top.erb @@ -13,45 +13,45 @@ # 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 +# @specific language governing permissions and limitations # under the License. %> -<%- if @spec['documentation']['description'] -%> - <%= ' '*(@namespace_depth+3) %># <%= @spec['documentation']['description'].gsub("\n", "\n#{' '*(@namespace_depth+3)}# ") -%> +<%- if @spec.documentation['description'] -%> + <%= ' '*(@spec.namespace_depth+3) %># <%= @spec.documentation['description'] .gsub("\n", "\n#{' '*(@spec.namespace_depth+3)}# ") -%> <%- else %> - <%= ' '*(@namespace_depth+3) %># TODO: Description + <%= ' '*(@spec.namespace_depth+3) %># TODO: Description <%- end %> -<%= stability_doc_helper(@spec['stability']) -%> -<%= ' '*(@namespace_depth+3) %># -<%- unless @parts.nil? || @parts.empty? %><%# URL parts -%> - <%- @parts.each do |name, info| -%> +<%= stability_doc_helper(@spec.stability) -%> +<%= ' '*(@spec.namespace_depth+3) %># +<%- unless @spec.path_parts.nil? || @spec.path_parts.empty? %><%# URL parts -%> + <%- @spec.path_parts.each do |name, info| -%> <%= docs_helper(name, info) -%> <%- end -%> <%- end -%><%# Body -%> <%# URL parameters -%> -<%- @params.each do |name, info| -%> - <%= docs_helper(name, info) unless (!@parts.empty? && @parts.keys.include?(name)) -%> +<%- @spec.params.each do |name, info| -%> + <%= docs_helper(name, info) unless (!@spec.path_parts.empty? && @spec.path_parts.keys.include?(name)) -%> <%- end -%> # @option arguments [Hash] :headers Custom HTTP headers -<%- if @spec['body'] -%> - <%- if @method_name == 'bulk' -%> - <%= bulk_doc_helper(@spec['body']['description']) -%> +<%- if @spec.body -%> + <%- if @spec.method_name == 'bulk' -%> + <%= bulk_doc_helper(@spec.body['description']) -%> <%- else -%> - <%= ' '*(@namespace_depth+1) + - '# @option arguments [Hash] :body ' + (@spec['body']['description'] ? - @spec['body']['description'].strip : 'TODO: Description') + - (@spec['body']['required'] ? ' (*Required*)' : '') + "\n" + <%= ' '*(@spec.namespace_depth+1) + + '# @option arguments [Hash] :body ' + (@spec.body['description'] ? + @spec.body['description'].strip : 'TODO: Description') + + (@spec.body['required'] ? ' (*Required*)' : '') + "\n" -%> <%- end -%> <%- end -%> -<% if @deprecation_note -%> +<% if @spec.deprecation_note -%> # # *Deprecation notice*: - # <%= @deprecation_note['description'] %> - # Deprecated since version <%= @deprecation_note['version'] %> + # <%= @spec.deprecation_note['description'] %> + # Deprecated since version <%= @spec.deprecation_note['version'] %> # <% end -%> -<%= ' '*(@namespace_depth+3) -%># +<%= ' '*(@spec.namespace_depth+3) -%># <%# Documentation link -%> -<%= ' '*(@namespace_depth+3) %># @see <%= @spec['documentation']['url'] ? Elasticsearch::API::FilesHelper.documentation_url(@spec['documentation']['url']) : "[TODO]" %> -<%= ' '*(@namespace_depth+3) %># +<%= ' '*(@spec.namespace_depth+3) %># @see <%= @spec.documentation['url'] ? Elasticsearch::API::FilesHelper.documentation_url(@spec.documentation['url']) : "[TODO]" %> +<%= ' '*(@spec.namespace_depth+3) %># diff --git a/elasticsearch-api/utils/thor/templates/_method_setup.erb b/elasticsearch-api/utils/thor/templates/_method_setup.erb index 96c174fbe8..4739f7a4a6 100644 --- a/elasticsearch-api/utils/thor/templates/_method_setup.erb +++ b/elasticsearch-api/utils/thor/templates/_method_setup.erb @@ -16,22 +16,22 @@ # specific language governing permissions and limitations # under the License. %> -<%- @parts.each do |name, _| %> - <%- unless @method_name == 'get_field_mapping' && name == 'fields' %> - <%= ' '*(@namespace_depth+3) + "_#{name}" %> = arguments.delete(:<%=name %>) +<%- @spec.path_parts.each do |name, _| %> + <%- unless @spec.method_name == 'get_field_mapping' && name == 'fields' %> + <%= ' '*(@spec.namespace_depth+3) + "_#{name}" %> = arguments.delete(:<%=name %>) <%- end -%> <%- end -%> -<%= ' '*(@namespace_depth+4) %>method = <%= @http_method %> -<%- if @method_name == 'termvectors' %> +<%= ' '*(@spec.namespace_depth+4) %>method = <%= @spec.http_method %> +<%- if @spec.method_name == 'termvectors' %> endpoint = arguments.delete(:endpoint) || '_termvectors' <%- end -%> -<%= ' '*(@namespace_depth+4) %>path = <%= @http_path %> -<%- if !@params.empty? || needs_ignore_404?(@endpoint_name) || needs_complex_ignore_404?(@endpoint_name)-%> - <%= ' '*(@namespace_depth+4) %>params = Utils.process_params(arguments) +<%= ' '*(@spec.namespace_depth+4) %>path = <%= @spec.http_path %> +<%- if !@spec.params.empty? || needs_ignore_404?(@spec.endpoint_name) || needs_complex_ignore_404?(@spec.endpoint_name)-%> + <%= ' '*(@spec.namespace_depth+4) %>params = Utils.process_params(arguments) <%- else -%> - <%= ' '*(@namespace_depth+4) %>params = {} + <%= ' '*(@spec.namespace_depth+4) %>params = {} <%- end -%> -<%- @specific_params.each do |param| -%> +<%- @spec.specific_params.each do |param| -%> <%= param %> <%- end -%> diff --git a/elasticsearch-api/utils/thor/templates/_perform_request.erb b/elasticsearch-api/utils/thor/templates/_perform_request.erb index 0d874ce388..3b0095c0ea 100644 --- a/elasticsearch-api/utils/thor/templates/_perform_request.erb +++ b/elasticsearch-api/utils/thor/templates/_perform_request.erb @@ -16,20 +16,20 @@ # specific language governing permissions and limitations # under the License. %> -<%- if ['bulk', 'msearch', 'msearch_template', 'find_structure'].include? @method_name -%> - <%= self.send("#{@method_name}_body_helper".to_s) %> +<%- if ['bulk', 'msearch', 'msearch_template', 'find_structure'].include? @spec.method_name -%> + <%= self.send("#{@spec.method_name}_body_helper".to_s) %> headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( perform_request(method, path, params, payload, headers) ) -<%- elsif @method_name == 'ping' -%> +<%- elsif @spec.method_name == 'ping' -%> <%= ping_perform_request %> <%- else -%> - <%- if needs_ignore_404?(@endpoint_name) %> + <%- if needs_ignore_404?(@spec.endpoint_name) %> Utils.__rescue_from_not_found do perform_request(method, path, params, body, headers).status == 200 ? true : false end - <%- elsif needs_complex_ignore_404?(@endpoint_name) -%> + <%- elsif needs_complex_ignore_404?(@spec.endpoint_name) -%> if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( @@ -47,4 +47,4 @@ ) <%- end -%> <%- end -%> -<%= ' '*(@namespace_depth+3) %>end +<%= ' '*(@spec.namespace_depth+3) %>end diff --git a/elasticsearch-api/utils/thor/templates/method.erb b/elasticsearch-api/utils/thor/templates/method.erb index ee56e4f303..af6e820fb2 100644 --- a/elasticsearch-api/utils/thor/templates/method.erb +++ b/elasticsearch-api/utils/thor/templates/method.erb @@ -16,29 +16,29 @@ # under the License. # module Elasticsearch -<%= ' '*(@namespace_depth) %>module API -<%- @module_namespace.each_with_index do |name, i| -%> +<%= ' '*(@spec.namespace_depth) %>module API +<%- @spec.module_namespace.each_with_index do |name, i| -%> <%= ' '*i %>module <%= module_name_helper(name) %> <%- end -%> -<%= ' '*(@namespace_depth+2) %>module Actions +<%= ' '*(@spec.namespace_depth+2) %>module Actions <%= ERB.new(File.new("./thor/templates/_documentation_top.erb").read, trim_mode: '-').result(binding) -%> <%# Method definition -%> -<%= ' '*(@namespace_depth+3) -%>def <%= @method_name %>(arguments = {}) -<%- if @endpoint_name == 'create' -%> - <%= ' '*(@namespace_depth+3) %>if arguments[:id] - <%= ' '*(@namespace_depth+3) %> index arguments.update op_type: 'create' - <%= ' '*(@namespace_depth+3) %>else - <%= ' '*(@namespace_depth+3) %> index arguments - <%= ' '*(@namespace_depth+3) %>end - <%= ' '*(@namespace_depth+2) %>end +<%= ' '*(@spec.namespace_depth+3) -%>def <%= @spec.method_name %>(arguments = {}) +<%- if @spec.endpoint_name == 'create' -%> + <%= ' '*(@spec.namespace_depth+3) %>if arguments[:id] + <%= ' '*(@spec.namespace_depth+3) %> index arguments.update op_type: 'create' + <%= ' '*(@spec.namespace_depth+3) %>else + <%= ' '*(@spec.namespace_depth+3) %> index arguments + <%= ' '*(@spec.namespace_depth+3) %>end + <%= ' '*(@spec.namespace_depth+2) %>end <%- else -%> - <%- if @method_name == 'get_field_mapping' %> + <%- if @spec.method_name == 'get_field_mapping' %> arguments = arguments.clone _fields = arguments.delete(:field) || arguments.delete(:fields) raise ArgumentError, "Required argument 'field' missing" unless _fields <%- else -%> - <%- @required_parts.each do |required| %><%# Arguments -%> - <%= ' '*(@namespace_depth+3) + "raise ArgumentError, \"Required argument '#{required}' missing\" unless arguments[:#{required}]" + "\n" -%> + <%- @spec.required_parts.each do |required| %><%# Arguments -%> + <%= ' '*(@spec.namespace_depth+3) + "raise ArgumentError, \"Required argument '#{required}' missing\" unless arguments[:#{required}]" + "\n" -%> <%- end -%> arguments = arguments.clone <%- end -%> @@ -50,10 +50,10 @@ module Elasticsearch <%- # Perform request -%> <%= ERB.new(File.new("./thor/templates/_perform_request.erb").read, trim_mode: '-').result(binding) %> <%- end -%> -<%- if @method_name.match?(/^exists\S*/) -%> - alias_method :<%= @method_name %>?, :<%= @method_name %> +<%- if @spec.method_name.match?(/^exists\S*/) -%> + alias_method :<%= @spec.method_name %>?, :<%= @spec.method_name %> <%- end -%> -<%- if @method_name == 'termvectors' %> +<%- if @spec.method_name == 'termvectors' %> # Deprecated: Use the plural version, {#termvectors} # @@ -62,9 +62,9 @@ module Elasticsearch end <%- end -%> -<%- @namespace_depth.downto(1) do |i| -%> +<%- @spec.namespace_depth.downto(1) do |i| -%> <%= ' '*(i-1) %>end -<%- end if @namespace_depth > 0 -%> +<%- end if @spec.namespace_depth > 0 -%> end end end From 8c6bba0a33220cca75a8db5e834f4b0dd0e89440 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Wed, 23 Aug 2023 17:25:48 +0200 Subject: [PATCH 016/540] Move spec class to utils directory --- elasticsearch-api/utils/endpoint_spec.rb | 189 ++++++++++++++++++ .../generator => }/endpoint_specifics.rb | 0 .../utils/thor/generate_source.rb | 172 +--------------- 3 files changed, 192 insertions(+), 169 deletions(-) create mode 100644 elasticsearch-api/utils/endpoint_spec.rb rename elasticsearch-api/utils/{thor/generator => }/endpoint_specifics.rb (100%) diff --git a/elasticsearch-api/utils/endpoint_spec.rb b/elasticsearch-api/utils/endpoint_spec.rb new file mode 100644 index 0000000000..5c4e85a57b --- /dev/null +++ b/elasticsearch-api/utils/endpoint_spec.rb @@ -0,0 +1,189 @@ +# 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. + +# encoding: UTF-8 + +module Elasticsearch + module API + class EndpointSpec + include EndpointSpecifics + + def initialize(filepath) + @path = Pathname(filepath) + json = MultiJson.load(File.read(@path)) + @spec = json.values.first + @endpoint_name = json.keys.first + + full_namespace = parse_full_namespace + @namespace_depth = full_namespace.size > 0 ? full_namespace.size - 1 : 0 + @module_namespace = full_namespace[0, namespace_depth] + @method_name = full_namespace.last + + @path_parts = parse_endpoint_parts(@spec) + @params = @spec['params'] || {} + @paths = @spec['url']['paths'].map { |b| b['path'] } if @spec['url'] + @http_method = parse_http_method(@spec) + @deprecation_note = @spec['url']['paths'].last&.[]('deprecated') + @http_path = parse_http_path(@paths) + @required_parts = parse_required_parts(@spec) + end + + attr_reader :module_namespace, + :method_name, + :endpoint_name, + :path, + :path_parts, + :params, + :deprecation_note, + :namespace_depth, + :http_path, + :required_parts, + :http_method, + :namespace_depth + + def body + @spec['body'] + end + + def documentation + @spec['documentation'] + end + + def stability + @spec['stability'] + end + + # Function that adds the listified h param code + def specific_params + super(@module_namespace.first, @method_name) + end + + private + + def parse_full_namespace + names = @endpoint_name.split('.') + # Return an array to expand 'ccr', 'ilm', 'ml' and 'slm' + names.map do |name| + name + .gsub(/^ml$/, 'machine_learning') + .gsub(/^ilm$/, 'index_lifecycle_management') + .gsub(/^ccr/, 'cross_cluster_replication') + .gsub(/^slm/, 'snapshot_lifecycle_management') + end + end + + def parse_endpoint_parts(spec) + parts = spec['url']['paths'].select do |a| + a.keys.include?('parts') + end.map do |path| + path&.[]('parts') + end + (parts.inject(&:merge) || []) + end + + def parse_http_method(spec) + return '_id ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @endpoint_name == 'index' + return '_name ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @method_name == 'create_service_token' + return post_and_get if @endpoint_name == 'count' + + default_method = spec['url']['paths'].map { |a| a['methods'] }.flatten.first + if spec['body'] && default_method == 'GET' + # When default method is GET and body is required, we should always use POST + if spec['body']['required'] + 'Elasticsearch::API::HTTP_POST' + else + post_and_get + end + else + "Elasticsearch::API::HTTP_#{default_method}" + end + end + + def parse_http_path(paths) + return "\"#{parse_path(paths.first)}\"" if paths.size == 1 + + result = '' + anchor_string = [] + paths.sort { |a, b| b.length <=> a.length }.each_with_index do |path, i| + var_string = extract_path_variables(path).map { |var| "_#{var}" }.join(' && ') + next if anchor_string.include? var_string + + anchor_string << var_string + result += if i.zero? + "if #{var_string}\n" + elsif (i == paths.size - 1) || var_string.empty? + "else\n" + else + "elsif #{var_string}\n" + end + result += "\"#{parse_path(path)}\"\n" + end + result += 'end' + result + end + + def parse_path(path) + path.gsub(/^\//, '') + .gsub(/\/$/, '') + .gsub('{', "\#{Utils.__listify(_") + .gsub('}', ')}') + end + + def path_variables + @paths.map do |path| + extract_path_variables(path) + end + end + + def parse_path_variables + @paths.map do |path| + extract_path_variables(path) + end + end + + # extract values that are in the {var} format: + def extract_path_variables(path) + path.scan(/{(\w+)}/).flatten + end + + # Find parts that are definitely required and should raise an error if + # they're not present + # + def parse_required_parts(spec) + required = [] + return required if @endpoint_name == 'tasks.get' + + required << 'body' if (spec['body'] && spec['body']['required']) + # Get required variables from paths: + req_variables = parse_path_variables.inject(:&) # find intersection + required << req_variables unless req_variables.empty? + required.flatten + end + + def post_and_get + # the METHOD is defined after doing arguments.delete(:body), so we need to check for `body` + <<~SRC + if body + Elasticsearch::API::HTTP_POST + else + Elasticsearch::API::HTTP_GET + end + SRC + end + end + end +end diff --git a/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb b/elasticsearch-api/utils/endpoint_specifics.rb similarity index 100% rename from elasticsearch-api/utils/thor/generator/endpoint_specifics.rb rename to elasticsearch-api/utils/endpoint_specifics.rb diff --git a/elasticsearch-api/utils/thor/generate_source.rb b/elasticsearch-api/utils/thor/generate_source.rb index 52a145d4ab..e9ac710b4d 100644 --- a/elasticsearch-api/utils/thor/generate_source.rb +++ b/elasticsearch-api/utils/thor/generate_source.rb @@ -23,7 +23,8 @@ require 'coderay' require 'pry' require_relative 'generator/files_helper' -require_relative 'generator/endpoint_specifics' +require_relative '../endpoint_specifics' +require_relative '../endpoint_spec' module Elasticsearch module API @@ -59,173 +60,6 @@ def generate print_tree if options[:verbose] end - class Spec - include EndpointSpecifics - - def initialize(filepath) - @path = Pathname(filepath) - json = MultiJson.load(File.read(@path)) - @spec = json.values.first - @endpoint_name = json.keys.first - - full_namespace = parse_full_namespace - @namespace_depth = full_namespace.size > 0 ? full_namespace.size - 1 : 0 - @module_namespace = full_namespace[0, namespace_depth] - @method_name = full_namespace.last - - @path_parts = parse_endpoint_parts(@spec) - @params = @spec['params'] || {} - @paths = @spec['url']['paths'].map { |b| b['path'] } if @spec['url'] - @http_method = parse_http_method(@spec) - @deprecation_note = @spec['url']['paths'].last&.[]('deprecated') - @http_path = parse_http_path(@paths) - @required_parts = parse_required_parts(@spec) - end - - attr_reader :module_namespace, - :method_name, - :endpoint_name, - :path, - :path_parts, - :params, - :deprecation_note, - :namespace_depth, - :http_path, - :required_parts, - :http_method, - :namespace_depth - - def body - @spec['body'] - end - - def documentation - @spec['documentation'] - end - - def stability - @spec['stability'] - end - - # Function that adds the listified h param code - def specific_params - super(@module_namespace.first, @method_name) - end - - private - - def parse_full_namespace - names = @endpoint_name.split('.') - # Return an array to expand 'ccr', 'ilm', 'ml' and 'slm' - names.map do |name| - name - .gsub(/^ml$/, 'machine_learning') - .gsub(/^ilm$/, 'index_lifecycle_management') - .gsub(/^ccr/, 'cross_cluster_replication') - .gsub(/^slm/, 'snapshot_lifecycle_management') - end - end - - def parse_endpoint_parts(spec) - parts = spec['url']['paths'].select do |a| - a.keys.include?('parts') - end.map do |path| - path&.[]('parts') - end - (parts.inject(&:merge) || []) - end - - def parse_http_method(spec) - return '_id ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @endpoint_name == 'index' - return '_name ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @method_name == 'create_service_token' - return post_and_get if @endpoint_name == 'count' - - default_method = spec['url']['paths'].map { |a| a['methods'] }.flatten.first - if spec['body'] && default_method == 'GET' - # When default method is GET and body is required, we should always use POST - if spec['body']['required'] - 'Elasticsearch::API::HTTP_POST' - else - post_and_get - end - else - "Elasticsearch::API::HTTP_#{default_method}" - end - end - - def parse_http_path(paths) - return "\"#{parse_path(paths.first)}\"" if paths.size == 1 - - result = '' - anchor_string = [] - paths.sort { |a, b| b.length <=> a.length }.each_with_index do |path, i| - var_string = extract_path_variables(path).map { |var| "_#{var}" }.join(' && ') - next if anchor_string.include? var_string - - anchor_string << var_string - result += if i.zero? - "if #{var_string}\n" - elsif (i == paths.size - 1) || var_string.empty? - "else\n" - else - "elsif #{var_string}\n" - end - result += "\"#{parse_path(path)}\"\n" - end - result += 'end' - result - end - - def parse_path(path) - path.gsub(/^\//, '') - .gsub(/\/$/, '') - .gsub('{', "\#{Utils.__listify(_") - .gsub('}', ')}') - end - - def path_variables - @paths.map do |path| - extract_path_variables(path) - end - end - - def parse_path_variables - @paths.map do |path| - extract_path_variables(path) - end - end - - # extract values that are in the {var} format: - def extract_path_variables(path) - path.scan(/{(\w+)}/).flatten - end - - # Find parts that are definitely required and should raise an error if - # they're not present - # - def parse_required_parts(spec) - required = [] - return required if @endpoint_name == 'tasks.get' - - required << 'body' if (spec['body'] && spec['body']['required']) - # Get required variables from paths: - req_variables = parse_path_variables.inject(:&) # find intersection - required << req_variables unless req_variables.empty? - required.flatten - end - - def post_and_get - # the METHOD is defined after doing arguments.delete(:body), so we need to check for `body` - <<~SRC - if body - Elasticsearch::API::HTTP_POST - else - Elasticsearch::API::HTTP_GET - end - SRC - end - end - private def generate_source @@ -233,7 +67,7 @@ def generate_source cleanup_directory!(output) FilesHelper.files.each do |filepath| - @spec = Spec.new(filepath) + @spec = EndpointSpec.new(filepath) say_status 'json', @spec.path, :yellow # Don't generate code for internal APIs: From f97f271caba7dffe7dbcf1cfefe5fa276641ab79 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 24 Aug 2023 14:03:33 +0200 Subject: [PATCH 017/540] Fix typo in top comment --- elasticsearch-api/utils/thor/templates/_documentation_top.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/utils/thor/templates/_documentation_top.erb b/elasticsearch-api/utils/thor/templates/_documentation_top.erb index 357db21749..3099dcb8f9 100644 --- a/elasticsearch-api/utils/thor/templates/_documentation_top.erb +++ b/elasticsearch-api/utils/thor/templates/_documentation_top.erb @@ -13,7 +13,7 @@ # 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 +# specific language governing permissions and limitations # under the License. %> <%- if @spec.documentation['description'] -%> From d8cb3fa0ba822a2ca9676886ea9fa4f65b470c9e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 24 Aug 2023 10:10:01 +0100 Subject: [PATCH 018/540] [CI] Tests JRuby in Buildkite --- .buildkite/pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index e547d216f6..b73370270d 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -16,6 +16,7 @@ steps: - "3.2" - "3.1" - "3.0" + - "jruby-9.3" transport: - "8.2" # Only run platinum once for the latest Ruby. You can use lots of combinations, check the From f7aa97cb222a745025199b0a8fe615cb41807e15 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 24 Aug 2023 10:23:40 +0100 Subject: [PATCH 019/540] [CI] Refactors Dockerfile to allow RUBY_SOURCE for docker image --- .buildkite/Dockerfile | 3 ++- .buildkite/pipeline.yml | 8 +++++++- .buildkite/run-client.sh | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.buildkite/Dockerfile b/.buildkite/Dockerfile index 3bf852d298..b6bb3c02a3 100644 --- a/.buildkite/Dockerfile +++ b/.buildkite/Dockerfile @@ -1,5 +1,6 @@ ARG RUBY_VERSION=${RUBY_VERSION:-3.1} -FROM ruby:$RUBY_VERSION +ARG RUBY_SOURCE=${RUBY_SOURCE:-ruby} +FROM $RUBY_SOURCE:$RUBY_VERSION # Default UID/GID to 1000 # it can be overridden at build time diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index b73370270d..9fee498393 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -7,6 +7,7 @@ steps: TEST_SUITE: "{{ matrix.suite }}" STACK_VERSION: 8.10.0-SNAPSHOT TRANSPORT_VERSION: "{{ matrix.transport }}" + RUBY_SOURCE: "{{ matrix.ruby_source }}" matrix: setup: suite: @@ -16,9 +17,10 @@ steps: - "3.2" - "3.1" - "3.0" - - "jruby-9.3" transport: - "8.2" + ruby_source: + - 'ruby' # Only run platinum once for the latest Ruby. You can use lots of combinations, check the # documentation on https://buildkite.com/docs/pipelines/build-matrix for more information. adjustments: @@ -42,6 +44,10 @@ steps: suite: "free" ruby: "3.2" transport: "main" + - with: + suite: 'free' + ruby: '9.3' + ruby_source: 'jruby' command: ./.buildkite/run-tests.sh # I'm publishing test results to HTML and JUnit in this directory and this directive makes them # available in the Artifacts tab of a build in Buildkite. diff --git a/.buildkite/run-client.sh b/.buildkite/run-client.sh index 85c4cc9a77..4f758a026a 100755 --- a/.buildkite/run-client.sh +++ b/.buildkite/run-client.sh @@ -15,6 +15,7 @@ docker build \ --tag elastic/elasticsearch-ruby \ --build-arg RUBY_VERSION=$RUBY_VERSION \ --build-arg TRANSPORT_VERSION=$TRANSPORT_VERSION \ + --build-arg RUBY_SOURCE=$RUBY_SOURCE \ . mkdir -p elasticsearch-api/tmp From d3fa6796c612912b458eb4cd74c6921429fc7ddb Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 24 Aug 2023 10:32:32 +0100 Subject: [PATCH 020/540] [CI] Fix byebug dependency for JRuby, change title --- .buildkite/pipeline.yml | 2 +- Gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 9fee498393..9f14dbd57e 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,5 +1,5 @@ steps: - - label: ":ruby: v{{ matrix.ruby }} :phone: Transport: {{ matrix.transport }} :elasticsearch: Suite: {{ matrix.suite }}" + - label: ":ruby: {{ matrix.ruby_source}}:{{ matrix.ruby }} :phone: Transport: {{ matrix.transport }} :elasticsearch: Suite: {{ matrix.suite }}" agents: provider: "gcp" env: diff --git a/Gemfile b/Gemfile index f8150c9b0c..745c7e626c 100644 --- a/Gemfile +++ b/Gemfile @@ -37,6 +37,6 @@ unless defined?(JRUBY_VERSION) || defined?(Rubinius) end group :development, :test do - gem 'byebug' + gem 'byebug' unless defined?(JRUBY_VERSION) gem 'rspec' end From 91f2b69df58aff76078cc3d35d762a73039899c5 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 24 Aug 2023 10:40:05 +0100 Subject: [PATCH 021/540] [CI] Install git in Dockerfile for jruby image --- .buildkite/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/Dockerfile b/.buildkite/Dockerfile index b6bb3c02a3..cbf3690b33 100644 --- a/.buildkite/Dockerfile +++ b/.buildkite/Dockerfile @@ -17,7 +17,7 @@ ARG TRANSPORT_VERSION=${TRANSPORT_VERSION:-8} # Install required tools RUN apt-get -q update \ - && apt-get -y install zip curl + && apt-get -y install zip curl git # Create user RUN groupadd --system -g ${BUILDER_GID} ${BUILDER_GROUP} \ From 65f5ef9ba3b7187a5743889bb57dd5bc29add823 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 24 Aug 2023 11:19:15 +0100 Subject: [PATCH 022/540] [API] Test Runner: Updates response method for YAML --- elasticsearch-api/api-spec-testing/test_file/task_group.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/api-spec-testing/test_file/task_group.rb b/elasticsearch-api/api-spec-testing/test_file/task_group.rb index c7e6e0c10c..a94578eb29 100644 --- a/elasticsearch-api/api-spec-testing/test_file/task_group.rb +++ b/elasticsearch-api/api-spec-testing/test_file/task_group.rb @@ -102,7 +102,7 @@ def run(client) def response @response ||= begin if do_actions.any? { |a| a.yaml_response? } - YAML.load(do_actions[-1].response) + YAML.load(do_actions[-1].response.body) else do_actions[-1].response end From c78f1a76e108c12d18177dd217f09a811842a0ce Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 24 Aug 2023 12:36:11 +0100 Subject: [PATCH 023/540] [CI] Updates pipeline.yml --- .buildkite/pipeline.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 9f14dbd57e..96c7aa744f 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -35,19 +35,23 @@ steps: - with: suite: "free" ruby: "3.2" + ruby_source: "ruby" transport: "8.0" - with: suite: "free" ruby: "3.2" + ruby_source: "ruby" transport: "8.1" - with: suite: "free" ruby: "3.2" + ruby_source: "ruby" transport: "main" - with: - suite: 'free' - ruby: '9.3' - ruby_source: 'jruby' + suite: "free" + ruby: "9.3" + ruby_source: "jruby" + transport: "8.2" command: ./.buildkite/run-tests.sh # I'm publishing test results to HTML and JUnit in this directory and this directive makes them # available in the Artifacts tab of a build in Buildkite. From c102100fbed8bfad78f29b2ec59dde3a6f3e5e99 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 25 Aug 2023 07:02:34 +0100 Subject: [PATCH 024/540] [CI] Updates STACK_VERSION to 8.11 in test matrices --- .buildkite/pipeline.yml | 2 +- .github/workflows/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 96c7aa744f..7fbe123fae 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -5,7 +5,7 @@ steps: env: RUBY_VERSION: "{{ matrix.ruby }}" TEST_SUITE: "{{ matrix.suite }}" - STACK_VERSION: 8.10.0-SNAPSHOT + STACK_VERSION: 8.11.0-SNAPSHOT TRANSPORT_VERSION: "{{ matrix.transport }}" RUBY_SOURCE: "{{ matrix.ruby_source }}" matrix: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 428a03e7e9..40355c72e8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 8.10.0-SNAPSHOT + stack-version: 8.11.0-SNAPSHOT security-enabled: false - uses: ruby/setup-ruby@v1 with: From 8fc8743ca74f688dbc8571f73d0b106234f76ec9 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Sat, 26 Aug 2023 06:02:02 +0000 Subject: [PATCH 025/540] [API] Adds experimental endpoint esql/query --- .../elasticsearch/api/actions/esql/query.rb | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb new file mode 100644 index 0000000000..6b43681fa8 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb @@ -0,0 +1,57 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Esql + module Actions + # Executes an ESQL request + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml + # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the csv format. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body Use the `query` element to start a query. Use `time_zone` to specify an execution time zone and 'columnar' to format the answer. (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html + # + def query(arguments = {}) + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = "_query" + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers) + ) + end + end + end + end +end From a145908f73e2822b98d9b3963b9a9e06580ff5c4 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 28 Aug 2023 11:05:16 +0100 Subject: [PATCH 026/540] [API] Promotes indices data lifecycle APIs from experimental to stable --- .../api/actions/indices/delete_data_lifecycle.rb | 4 ---- .../api/actions/indices/explain_data_lifecycle.rb | 4 ---- .../elasticsearch/api/actions/indices/get_data_lifecycle.rb | 4 ---- .../elasticsearch/api/actions/indices/put_data_lifecycle.rb | 4 ---- 4 files changed, 16 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb index 0aff6ea866..000327bafd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb @@ -23,10 +23,6 @@ module API module Indices module Actions # Deletes the data stream lifecycle of the selected data streams. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [List] :name A comma-separated list of data streams of which the data stream lifecycle will be deleted; use `*` to get all data streams # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb index b508521434..5e85f50dbc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb @@ -23,10 +23,6 @@ module API module Indices module Actions # Retrieves information about the index's current data stream lifecycle, such as any potential encountered error, time since creation etc. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :index The name of the index to explain # @option arguments [Boolean] :include_defaults indicates if the API should return the default values the system uses for the index's lifecycle diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb index 3d3e45314e..af3de3de97 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb @@ -23,10 +23,6 @@ module API module Indices module Actions # Returns the data stream lifecycle of the selected data streams. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [List] :name A comma-separated list of data streams to get; use `*` to get all data streams # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb index f0d851299c..b65a237553 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb @@ -23,10 +23,6 @@ module API module Indices module Actions # Updates the data stream lifecycle of the selected data streams. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [List] :name A comma-separated list of data streams whose lifecycle will be updated; use `*` to set the lifecycle to all data streams # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) From 2a7862f740f16332705873944df1f659d959c698 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 28 Aug 2023 14:21:31 +0100 Subject: [PATCH 027/540] [CI] Updates GitHub Actions --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 40355c72e8..202c677a68 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: ruby: [ '3.0', '3.1', '3.2', 'jruby-9.3', 'jruby-9.4' ] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Increase system limits run: | sudo swapoff -a From 3b9f510b678aa4202c187f481c91f41e575078e7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 29 Aug 2023 13:41:49 +0100 Subject: [PATCH 028/540] [CI] Temporarily skip tests failing on GitHub Actions --- .../spec/unit/elasticsearch_product_validation_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/spec/unit/elasticsearch_product_validation_spec.rb b/elasticsearch/spec/unit/elasticsearch_product_validation_spec.rb index 2b8c6e9856..b905a83cd7 100644 --- a/elasticsearch/spec/unit/elasticsearch_product_validation_spec.rb +++ b/elasticsearch/spec/unit/elasticsearch_product_validation_spec.rb @@ -18,7 +18,7 @@ require 'spec_helper' require 'webmock/rspec' -describe 'Elasticsearch: Validation' do +xdescribe 'Elasticsearch: Validation' do let(:host) { 'http://localhost:9200' } let(:count_request_stub) do stub_request(:get, "#{host}/_count") From 325448e635aa8b6fc653c5b81b5cd2a9348d2261 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 28 Aug 2023 07:22:47 +0100 Subject: [PATCH 029/540] [API] Test Runner: Refactor. Retry when there's a Net::ReadTimeout error --- .../api-spec-testing/test_file/action.rb | 140 ++++++++++-------- 1 file changed, 76 insertions(+), 64 deletions(-) diff --git a/elasticsearch-api/api-spec-testing/test_file/action.rb b/elasticsearch-api/api-spec-testing/test_file/action.rb index 7db913419d..4e8d3ea71a 100644 --- a/elasticsearch-api/api-spec-testing/test_file/action.rb +++ b/elasticsearch-api/api-spec-testing/test_file/action.rb @@ -37,6 +37,7 @@ class Action # @since 6.2.0 def initialize(definition) @definition = definition + @retries = 0 end # Execute the action. The method returns the client, in case the action created a new client @@ -66,71 +67,9 @@ def execute(client, test = nil) shadow_client.send(method) end end - _method = chain[-1] - case _method - when 'bulk' - arguments = prepare_arguments(args, test) - arguments[:body].map! do |item| - if item.is_a?(Hash) - item - elsif item.is_a?(String) - symbolize_keys(JSON.parse(item)) - end - end if arguments[:body].is_a? Array - @response = client.send(_method, arguments) - client - when 'headers' - headers = prepare_arguments(args, test) - host = client.transport.instance_variable_get('@hosts') - transport_options = client.transport.instance_variable_get('@options')&.dig(:transport_options) || {} - if ENV['QUIET'] == 'true' - # todo: create a method on Elasticsearch::Client that can clone the client with new options - Elasticsearch::Client.new( - host: host, - transport_options: transport_options.merge(headers: headers) - ) - else - Elasticsearch::Client.new( - host: host, - tracer: Logger.new($stdout), - transport_options: transport_options.merge(headers: headers) - ) - end - when 'catch', 'warnings', 'allowed_warnings', 'allowed_warnings_regex' - client - when 'put_trained_model_alias' - args.merge!('reassign' => true) unless args['reassign'] === false - @response = client.send(_method, prepare_arguments(args, test)) - client - when 'create' - begin - @response = client.send(_method, prepare_arguments(args, test)) - rescue Elastic::Transport::Transport::Errors::BadRequest => e - case e.message - when /resource_already_exists_exception/ - client.delete(index: args['index']) - when /failed to parse date field/ - body = args['body'] - time_series = body['settings']['index']['time_series'] - time_series.each { |k, v| time_series[k] = v.strftime("%FT%TZ") } - args['body'] = body - else - raise e - end - @response = client.send(_method, prepare_arguments(args, test)) - end - client - when 'update_user_profile_data', 'get_user_profile', 'enable_user_profile', 'disable_user_profile' - args.each do |key, value| - args[key] = value.gsub(value, test.cached_values[value.gsub('$', '')]) if value.match?(/^\$/) - end - @response = client.send(_method, prepare_arguments(args, test)) - client - else - @response = client.send(_method, prepare_arguments(args, test)) - client - end + + perform_action(_method, args, client, test) end end end @@ -188,6 +127,79 @@ def perform_internal(method, args, client, test) client end + def perform_action(_method, args, client, test) + case _method + when 'bulk' + arguments = prepare_arguments(args, test) + arguments[:body].map! do |item| + if item.is_a?(Hash) + item + elsif item.is_a?(String) + symbolize_keys(JSON.parse(item)) + end + end if arguments[:body].is_a? Array + @response = client.send(_method, arguments) + client + when 'headers' + headers = prepare_arguments(args, test) + host = client.transport.instance_variable_get('@hosts') + transport_options = client.transport.instance_variable_get('@options')&.dig(:transport_options) || {} + if ENV['QUIET'] == 'true' + # todo: create a method on Elasticsearch::Client that can clone the client with new options + Elasticsearch::Client.new( + host: host, + transport_options: transport_options.merge(headers: headers) + ) + else + Elasticsearch::Client.new( + host: host, + tracer: Logger.new($stdout), + transport_options: transport_options.merge(headers: headers) + ) + end + when 'catch', 'warnings', 'allowed_warnings', 'allowed_warnings_regex' + client + when 'put_trained_model_alias' + args.merge!('reassign' => true) unless args['reassign'] === false + @response = client.send(_method, prepare_arguments(args, test)) + client + when 'create' + begin + @response = client.send(_method, prepare_arguments(args, test)) + rescue Elastic::Transport::Transport::Errors::BadRequest => e + case e.message + when /resource_already_exists_exception/ + client.delete(index: args['index']) + when /failed to parse date field/ + body = args['body'] + time_series = body['settings']['index']['time_series'] + time_series.each { |k, v| time_series[k] = v.strftime("%FT%TZ") } + args['body'] = body + else + raise e + end + @response = client.send(_method, prepare_arguments(args, test)) + end + client + when 'update_user_profile_data', 'get_user_profile', 'enable_user_profile', 'disable_user_profile' + args.each do |key, value| + args[key] = value.gsub(value, test.cached_values[value.gsub('$', '')]) if value.match?(/^\$/) + end + @response = client.send(_method, prepare_arguments(args, test)) + client + else + @response = client.send(_method, prepare_arguments(args, test)) + client + end + rescue Elastic::Transport::Transport::Error => e + if e.message.match(/Net::ReadTimeout/) && @retries <= 5 + @retries += 1 + perform_action(method, args, client, test) + else + raise e + end + end + def prepare_arguments(args, test) symbolize_keys(args).tap do |args| if test From 5fed3b6cceb3ce9ffb5577d1b94a34483318da6b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 30 Aug 2023 10:49:18 +0100 Subject: [PATCH 030/540] [CI] Simplifies Dockerfile We don't need to create snapshots anymore, so removing unnecessary user configuration. --- .buildkite/Dockerfile | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/.buildkite/Dockerfile b/.buildkite/Dockerfile index cbf3690b33..f851f4369f 100644 --- a/.buildkite/Dockerfile +++ b/.buildkite/Dockerfile @@ -2,13 +2,6 @@ ARG RUBY_VERSION=${RUBY_VERSION:-3.1} ARG RUBY_SOURCE=${RUBY_SOURCE:-ruby} FROM $RUBY_SOURCE:$RUBY_VERSION -# Default UID/GID to 1000 -# it can be overridden at build time -ARG BUILDER_UID=1000 -ARG BUILDER_GID=1000 -ENV BUILDER_USER elastic -ENV BUILDER_GROUP elastic - ARG QUIET=${QUIET:-true} ARG CI=${CI:-false} ENV QUIET=$QUIET @@ -16,21 +9,9 @@ ENV CI=$CI ARG TRANSPORT_VERSION=${TRANSPORT_VERSION:-8} # Install required tools -RUN apt-get -q update \ - && apt-get -y install zip curl git - -# Create user -RUN groupadd --system -g ${BUILDER_GID} ${BUILDER_GROUP} \ - && useradd --system --shell /bin/bash -u ${BUILDER_UID} -g ${BUILDER_GROUP} -d /var/lib/elastic -m elastic 1>/dev/null 2>/dev/null \ - && mkdir -p /usr/src/app && touch /Gemfile.lock \ - && chown -R ${BUILDER_USER}:${BUILDER_GROUP} /usr/src/app /Gemfile.lock - -COPY --chown=$BUILDER_USER:$BUILDER_GROUP . . - +RUN apt-get -q update && apt-get -y install zip curl git WORKDIR /usr/src/app - -USER ${BUILDER_USER}:${BUILDER_GROUP} - +COPY . . RUN bundle install \ && bundle exec rake bundle:clean \ && rake bundle:install From e23b7522a19c81a6b71334bb49560b9a6d43d09e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 30 Aug 2023 10:58:25 +0100 Subject: [PATCH 031/540] [CI] Removes unnecessary script to create jenkins job --- .github/create_jenkins_job.rb | 52 ----------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 .github/create_jenkins_job.rb diff --git a/.github/create_jenkins_job.rb b/.github/create_jenkins_job.rb deleted file mode 100644 index 735d3b9dcf..0000000000 --- a/.github/create_jenkins_job.rb +++ /dev/null @@ -1,52 +0,0 @@ -# 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. -source_branch = ARGV[0] -target_branch = ARGV[1] - -def usage - <<~USAGE - - This script creates a new Jenkins Job in .ci/jobs. It takes two parameters: - - source branch: branch name for the job to use as a source - - target branch: branch name for the new job - In the new file, it is going to replace the source branch value with the target branch value and - create a new yml file based on that. - - E.g.: - $ #{__FILE__} 7.x 7.99 - This is going to use .ci/jobs/elastic+elasticsearch-ruby+7.x.yml as a source and create - .ci/jobs/elastic+elasticsearch-ruby+7.99.yml and replace all the ocurrences of '7.x' with '7.99' - in the new file. - USAGE -end - -unless source_branch && target_branch - puts usage - exit -end - -job_file = File.expand_path("../.ci/jobs/elastic+elasticsearch-ruby+#{source_branch}.yml", __dir__) -raise ArgumentError, "cannot find file #{job_file}" unless File.exist? job_file - -target_branch_file = File.expand_path("../.ci/jobs/elastic+elasticsearch-ruby+#{target_branch}.yml", __dir__) -target_branch_content = File.read(job_file).gsub(source_branch, target_branch) - -begin - File.open(target_branch_file, 'w') { |file| file.puts target_branch_content } -rescue StandardError => e - raise e -end From 42f126acb221402a4e8208adafd2090d9213be1f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 30 Aug 2023 10:59:03 +0100 Subject: [PATCH 032/540] [CI] Removes unified release GitHub Action --- .github/workflows/unified-release.yml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .github/workflows/unified-release.yml diff --git a/.github/workflows/unified-release.yml b/.github/workflows/unified-release.yml deleted file mode 100644 index 75de2ec33c..0000000000 --- a/.github/workflows/unified-release.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Unified Release - -on: - pull_request: - paths-ignore: - - 'README.md' - push: - paths-ignore: - - 'README.md' - branches: - - main - - master - - '[0-9]+.[0-9]+' - - '[0-9]+.x' - -jobs: - assemble: - name: Assemble - runs-on: ubuntu-latest - env: - stack-version: 8.10.0-SNAPSHOT - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Assemble ${{ env.STACK_VERSION }} - run: "./.ci/make.sh assemble ${{ env.stack-version }}" From 837ee264a79365ed1eef4b0bc641222846000041 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 31 Aug 2023 06:59:40 +0100 Subject: [PATCH 033/540] Revert "[CI] Temporarily skip tests failing on GitHub Actions" This reverts commit 3b9f510b678aa4202c187f481c91f41e575078e7. --- .../spec/unit/elasticsearch_product_validation_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/spec/unit/elasticsearch_product_validation_spec.rb b/elasticsearch/spec/unit/elasticsearch_product_validation_spec.rb index b905a83cd7..2b8c6e9856 100644 --- a/elasticsearch/spec/unit/elasticsearch_product_validation_spec.rb +++ b/elasticsearch/spec/unit/elasticsearch_product_validation_spec.rb @@ -18,7 +18,7 @@ require 'spec_helper' require 'webmock/rspec' -xdescribe 'Elasticsearch: Validation' do +describe 'Elasticsearch: Validation' do let(:host) { 'http://localhost:9200' } let(:count_request_stub) do stub_request(:get, "#{host}/_count") From 4a33adf61d9d438ea63418f2fa894689c3b9aefe Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 31 Aug 2023 08:36:34 +0100 Subject: [PATCH 034/540] [API] Adds ES|QL namespace and test --- elasticsearch-api/lib/elasticsearch/api.rb | 3 +- .../lib/elasticsearch/api/namespace/esql.rb | 36 +++++++++++++++++++ .../api/actions/esql/query_spec.rb | 34 ++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/esql.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/esql/query_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index b6c5ebdb86..a020f2bc78 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -84,7 +84,8 @@ def self.included(base) Elasticsearch::API::Synonyms, Elasticsearch::API::SynonymsSets, Elasticsearch::API::QueryRuleset, - Elasticsearch::API::SynonymRule + Elasticsearch::API::SynonymRule, + Elasticsearch::API::Esql end # The serializer class diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/esql.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/esql.rb new file mode 100644 index 0000000000..e41c6c7128 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/esql.rb @@ -0,0 +1,36 @@ +# 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. + +module Elasticsearch + module API + module Esql + module Actions; end + + # Client for the "esql" namespace (includes the {Esql::Actions} methods) + # + class EsqlClient + include Common::Client, Common::Client::Base, Esql::Actions + end + + # Proxy method for {EsqlClient}, available in the receiving object + # + def esql + @esql ||= EsqlClient.new(self) + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/esql/query_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/esql/query_spec.rb new file mode 100644 index 0000000000..0a28b94056 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/esql/query_spec.rb @@ -0,0 +1,34 @@ +# 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. + +require 'spec_helper' + +describe 'client.esql#query' do + let(:expected_args) do + [ + 'POST', + '_query', + {}, + {}, + {} + ] + end + + it 'performs the request' do + expect(client_double.esql.query(body: {})).to be_a Elasticsearch::API::Response + end +end From c05934c46df3890536713217646fac8b70dce261 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 31 Aug 2023 08:39:30 +0100 Subject: [PATCH 035/540] [API] Cleanup specs after synonym namespace refactor --- elasticsearch-api/lib/elasticsearch/api.rb | 2 -- .../api/namespace/synonym_rule.rb | 36 ------------------- .../api/namespace/synonyms_sets.rb | 36 ------------------- 3 files changed, 74 deletions(-) delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/synonym_rule.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/synonyms_sets.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index a020f2bc78..594c8251a3 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -82,9 +82,7 @@ def self.included(base) Elasticsearch::API::XPack, Elasticsearch::API::SearchApplication, Elasticsearch::API::Synonyms, - Elasticsearch::API::SynonymsSets, Elasticsearch::API::QueryRuleset, - Elasticsearch::API::SynonymRule, Elasticsearch::API::Esql end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/synonym_rule.rb deleted file mode 100644 index 4c672e4ae0..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/synonym_rule.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module SynonymRule - module Actions; end - - # Client for the "synonym_rule" namespace (includes the {SynonymRule::Actions} methods) - # - class SynonymRuleClient - include Common::Client, Common::Client::Base, SynonymRule::Actions - end - - # Proxy method for {SynonymRuleClient}, available in the receiving object - # - def synonym_rule - @synonym_rule ||= SynonymRuleClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/synonyms_sets.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/synonyms_sets.rb deleted file mode 100644 index 1cecdec750..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/synonyms_sets.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module SynonymsSets - module Actions; end - - # Client for the "synonyms_sets" namespace (includes the {SynonymsSets::Actions} methods) - # - class SynonymsSetsClient - include Common::Client, Common::Client::Base, SynonymsSets::Actions - end - - # Proxy method for {SynonymsSetsClient}, available in the receiving object - # - def synonyms_sets - @synonyms_sets ||= SynonymsSetsClient.new(self) - end - end - end -end From 5570fe79f5bc3984d540cbe8338b89e9319e5361 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 1 Sep 2023 08:45:34 +0100 Subject: [PATCH 036/540] [CI] Removes log formatter for RSpec in API --- elasticsearch-api/spec/rspec_formatter.rb | 31 ----------------------- elasticsearch-api/spec/spec_helper.rb | 4 --- 2 files changed, 35 deletions(-) delete mode 100644 elasticsearch-api/spec/rspec_formatter.rb diff --git a/elasticsearch-api/spec/rspec_formatter.rb b/elasticsearch-api/spec/rspec_formatter.rb deleted file mode 100644 index 644def111f..0000000000 --- a/elasticsearch-api/spec/rspec_formatter.rb +++ /dev/null @@ -1,31 +0,0 @@ -# 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. - -class RSpecCustomFormatter < RSpec::Core::Formatters::JsonFormatter - RSpec::Core::Formatters.register self - - LOGFILE = File.new("tmp/rspec-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}.log", 'w') - - def close(_notification) - @output_hash[:examples].map do |example| - regexp = /\S+\/\S+/ - filename = example[:full_description].match(/\S+\/\S+/)[0] - log ="#{filename} | #{example[:status]} | #{example[:run_time]} | #{example[:full_description]}\n" - File.write(LOGFILE, log, mode: 'a') - end - end -end diff --git a/elasticsearch-api/spec/spec_helper.rb b/elasticsearch-api/spec/spec_helper.rb index 99d6d350a6..32e2fa74ef 100644 --- a/elasticsearch-api/spec/spec_helper.rb +++ b/elasticsearch-api/spec/spec_helper.rb @@ -61,10 +61,6 @@ def self.included(context) config.add_formatter('documentation') config.add_formatter('RspecJunitFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}-junit.xml") config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}.html") - if ENV['BUILDKITE'] - require_relative "./rspec_formatter.rb" - config.add_formatter('RSpecCustomFormatter') - end config.color_mode = :on end From a8167fd3796ebc77e6965e018c2d8ee6c9904c00 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 6 Sep 2023 14:16:27 +0100 Subject: [PATCH 037/540] [DOCS] Updates successful guide examples --- .../0c7c40cd17985c3dd32aeaadbafc4fce.asciidoc | 18 +++++++++ .../0eae571e9e1c40a40cb4b1c9530a8987.asciidoc | 10 +++++ .../13917f7cfb6a382c293275ff71134ec4.asciidoc | 19 ++++++++++ .../24d66b2ebdf662d8b03e17214e65c825.asciidoc | 11 ++++++ .../29953082744b7a36e437b392a6391c81.asciidoc | 13 +++++++ .../3182f26c61fbe5cf89400804533d5ed2.asciidoc | 20 ++++++++++ .../3466cdc16374655c73c087fcbeb82ee8.asciidoc | 20 ++++++++++ .../3e6db3d80439c2c176dbd1bb1296b6cf.asciidoc | 12 ++++++ .../451b441c3311103d0d2bdbab771b26d2.asciidoc | 13 +++++++ .../48d9697a14dfe131325521f48a7adc84.asciidoc | 22 +++++++++++ .../52bc577a0d0cd42b46f33e0ef5124df8.asciidoc | 21 ++++++++++ .../5ca2f718f8b01684c983753bd8d92690.asciidoc | 27 +++++++++++++ .../7cc603d7e8373a01eae7bb0d18824632.asciidoc | 25 ++++++++++++ .../a0c64894f14d28b7e0c902add71d2e9a.asciidoc | 11 ++++++ .../a4709da258a667cae4199ec3a1e84b3b.asciidoc | 17 +++++++++ .../bdfb86cdfffb9d2ee6e3d399f00a57b0.asciidoc | 38 +++++++++++++++++++ .../c43fd2f25f78e6286fe9a5d08dc31446.asciidoc | 31 +++++++++++++++ .../cd976cf523f6352ac3429a410677b768.asciidoc | 16 ++++++++ .../cde19d110a58317610033ea3dcb0eb80.asciidoc | 21 ++++++++++ .../d270e64fcf017a887687fb030b0c1986.asciidoc | 20 ++++++++++ .../dbf93d02ab86a09929a21232b19709cc.asciidoc | 7 ++++ .../dfb1ce43b4f96dcb3c8dcc8370aa9965.asciidoc | 16 ++++++++ .../e88a057a13e191e4d5faa22edf2ae8ed.asciidoc | 8 ++++ .../f743225f1abcbc341e991a0e79ea89bc.asciidoc | 17 +++++++++ .../ff8317bbd60e9dfc6bf007028a18b531.asciidoc | 19 ++++++++++ 25 files changed, 452 insertions(+) create mode 100644 docs/examples/guide/0c7c40cd17985c3dd32aeaadbafc4fce.asciidoc create mode 100644 docs/examples/guide/0eae571e9e1c40a40cb4b1c9530a8987.asciidoc create mode 100644 docs/examples/guide/13917f7cfb6a382c293275ff71134ec4.asciidoc create mode 100644 docs/examples/guide/24d66b2ebdf662d8b03e17214e65c825.asciidoc create mode 100644 docs/examples/guide/29953082744b7a36e437b392a6391c81.asciidoc create mode 100644 docs/examples/guide/3182f26c61fbe5cf89400804533d5ed2.asciidoc create mode 100644 docs/examples/guide/3466cdc16374655c73c087fcbeb82ee8.asciidoc create mode 100644 docs/examples/guide/3e6db3d80439c2c176dbd1bb1296b6cf.asciidoc create mode 100644 docs/examples/guide/451b441c3311103d0d2bdbab771b26d2.asciidoc create mode 100644 docs/examples/guide/48d9697a14dfe131325521f48a7adc84.asciidoc create mode 100644 docs/examples/guide/52bc577a0d0cd42b46f33e0ef5124df8.asciidoc create mode 100644 docs/examples/guide/5ca2f718f8b01684c983753bd8d92690.asciidoc create mode 100644 docs/examples/guide/7cc603d7e8373a01eae7bb0d18824632.asciidoc create mode 100644 docs/examples/guide/a0c64894f14d28b7e0c902add71d2e9a.asciidoc create mode 100644 docs/examples/guide/a4709da258a667cae4199ec3a1e84b3b.asciidoc create mode 100644 docs/examples/guide/bdfb86cdfffb9d2ee6e3d399f00a57b0.asciidoc create mode 100644 docs/examples/guide/c43fd2f25f78e6286fe9a5d08dc31446.asciidoc create mode 100644 docs/examples/guide/cd976cf523f6352ac3429a410677b768.asciidoc create mode 100644 docs/examples/guide/cde19d110a58317610033ea3dcb0eb80.asciidoc create mode 100644 docs/examples/guide/d270e64fcf017a887687fb030b0c1986.asciidoc create mode 100644 docs/examples/guide/dbf93d02ab86a09929a21232b19709cc.asciidoc create mode 100644 docs/examples/guide/dfb1ce43b4f96dcb3c8dcc8370aa9965.asciidoc create mode 100644 docs/examples/guide/e88a057a13e191e4d5faa22edf2ae8ed.asciidoc create mode 100644 docs/examples/guide/f743225f1abcbc341e991a0e79ea89bc.asciidoc create mode 100644 docs/examples/guide/ff8317bbd60e9dfc6bf007028a18b531.asciidoc diff --git a/docs/examples/guide/0c7c40cd17985c3dd32aeaadbafc4fce.asciidoc b/docs/examples/guide/0c7c40cd17985c3dd32aeaadbafc4fce.asciidoc new file mode 100644 index 0000000000..272df3e322 --- /dev/null +++ b/docs/examples/guide/0c7c40cd17985c3dd32aeaadbafc4fce.asciidoc @@ -0,0 +1,18 @@ +[source, ruby] +---- +response = client.render_search_template( + body: { + source: { + query: { + match: { + message: '{{^name_exists}}Hello World{{/name_exists}}' + } + } + }, + params: { + name_exists: false + } + } +) +puts response +---- diff --git a/docs/examples/guide/0eae571e9e1c40a40cb4b1c9530a8987.asciidoc b/docs/examples/guide/0eae571e9e1c40a40cb4b1c9530a8987.asciidoc new file mode 100644 index 0000000000..de7c0517f8 --- /dev/null +++ b/docs/examples/guide/0eae571e9e1c40a40cb4b1c9530a8987.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.ilm.migrate_to_data_tiers( + body: { + legacy_template_to_delete: 'global-template', + node_attribute: 'custom_attribute_name' + } +) +puts response +---- diff --git a/docs/examples/guide/13917f7cfb6a382c293275ff71134ec4.asciidoc b/docs/examples/guide/13917f7cfb6a382c293275ff71134ec4.asciidoc new file mode 100644 index 0000000000..cac3d1e470 --- /dev/null +++ b/docs/examples/guide/13917f7cfb6a382c293275ff71134ec4.asciidoc @@ -0,0 +1,19 @@ +[source, ruby] +---- +response = client.render_search_template( + body: { + source: { + query: { + match: { + message: 'Hello {{#name_exists}}{{query_string}}{{/name_exists}}{{^name_exists}}World{{/name_exists}}' + } + } + }, + params: { + query_string: 'Kimchy', + name_exists: true + } + } +) +puts response +---- diff --git a/docs/examples/guide/24d66b2ebdf662d8b03e17214e65c825.asciidoc b/docs/examples/guide/24d66b2ebdf662d8b03e17214e65c825.asciidoc new file mode 100644 index 0000000000..b9f922889e --- /dev/null +++ b/docs/examples/guide/24d66b2ebdf662d8b03e17214e65c825.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.cluster.put_settings( + body: { + persistent: { + "xpack.profiling.templates.enabled": false + } + } +) +puts response +---- diff --git a/docs/examples/guide/29953082744b7a36e437b392a6391c81.asciidoc b/docs/examples/guide/29953082744b7a36e437b392a6391c81.asciidoc new file mode 100644 index 0000000000..d8b66a0146 --- /dev/null +++ b/docs/examples/guide/29953082744b7a36e437b392a6391c81.asciidoc @@ -0,0 +1,13 @@ +[source, ruby] +---- +response = client.render_search_template( + body: { + id: 'my-search-template', + params: { + from: 20, + size: 10 + } + } +) +puts response +---- diff --git a/docs/examples/guide/3182f26c61fbe5cf89400804533d5ed2.asciidoc b/docs/examples/guide/3182f26c61fbe5cf89400804533d5ed2.asciidoc new file mode 100644 index 0000000000..d2440332ca --- /dev/null +++ b/docs/examples/guide/3182f26c61fbe5cf89400804533d5ed2.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.render_search_template( + body: { + id: 'my-search-template', + params: { + query_string: 'My string', + text_fields: [ + { + user_name: 'John' + }, + { + user_name: 'kimchy' + } + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/3466cdc16374655c73c087fcbeb82ee8.asciidoc b/docs/examples/guide/3466cdc16374655c73c087fcbeb82ee8.asciidoc new file mode 100644 index 0000000000..64b681492b --- /dev/null +++ b/docs/examples/guide/3466cdc16374655c73c087fcbeb82ee8.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.put_script( + id: 'my-search-template', + body: { + script: { + lang: 'mustache', + source: { + query: { + "multi-match": { + query: '{{query_string}}', + fields: '[{{#text_fields}}{{user_name}}{{^last}},{{/last}}{{/text_fields}}]' + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/3e6db3d80439c2c176dbd1bb1296b6cf.asciidoc b/docs/examples/guide/3e6db3d80439c2c176dbd1bb1296b6cf.asciidoc new file mode 100644 index 0000000000..f08535c752 --- /dev/null +++ b/docs/examples/guide/3e6db3d80439c2c176dbd1bb1296b6cf.asciidoc @@ -0,0 +1,12 @@ +[source, ruby] +---- +response = client.render_search_template( + body: { + id: 'my-search-template', + params: { + query_string: 'hello world' + } + } +) +puts response +---- diff --git a/docs/examples/guide/451b441c3311103d0d2bdbab771b26d2.asciidoc b/docs/examples/guide/451b441c3311103d0d2bdbab771b26d2.asciidoc new file mode 100644 index 0000000000..b0001c15d6 --- /dev/null +++ b/docs/examples/guide/451b441c3311103d0d2bdbab771b26d2.asciidoc @@ -0,0 +1,13 @@ +[source, ruby] +---- +response = client.put_script( + id: 'my-search-template', + body: { + script: { + lang: 'mustache', + source: "\n {\n \"query\": {\n \"match\": {\n {{=( )=}}\n \"message\": \"(query_string)\"\n (={{ }}=)\n }\n }\n }\n " + } + } +) +puts response +---- diff --git a/docs/examples/guide/48d9697a14dfe131325521f48a7adc84.asciidoc b/docs/examples/guide/48d9697a14dfe131325521f48a7adc84.asciidoc new file mode 100644 index 0000000000..a67670c51d --- /dev/null +++ b/docs/examples/guide/48d9697a14dfe131325521f48a7adc84.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.render_search_template( + body: { + id: 'my-search-template', + params: { + query_string: 'My string', + text_fields: [ + { + user_name: 'John', + last: false + }, + { + user_name: 'kimchy', + last: true + } + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/52bc577a0d0cd42b46f33e0ef5124df8.asciidoc b/docs/examples/guide/52bc577a0d0cd42b46f33e0ef5124df8.asciidoc new file mode 100644 index 0000000000..ca06e55db9 --- /dev/null +++ b/docs/examples/guide/52bc577a0d0cd42b46f33e0ef5124df8.asciidoc @@ -0,0 +1,21 @@ +[source, ruby] +---- +response = client.put_script( + id: 'my-search-template', + body: { + script: { + lang: 'mustache', + source: { + query: { + match: { + message: '{{query_string}}' + } + }, + from: '{{from}}', + size: '{{size}}' + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/5ca2f718f8b01684c983753bd8d92690.asciidoc b/docs/examples/guide/5ca2f718f8b01684c983753bd8d92690.asciidoc new file mode 100644 index 0000000000..702f162398 --- /dev/null +++ b/docs/examples/guide/5ca2f718f8b01684c983753bd8d92690.asciidoc @@ -0,0 +1,27 @@ +[source, ruby] +---- +response = client.cluster.info( + target: '_all' +) +puts response + +response = client.cluster.info( + target: 'http' +) +puts response + +response = client.cluster.info( + target: 'ingest' +) +puts response + +response = client.cluster.info( + target: 'thread_pool' +) +puts response + +response = client.cluster.info( + target: 'http,ingest' +) +puts response +---- diff --git a/docs/examples/guide/7cc603d7e8373a01eae7bb0d18824632.asciidoc b/docs/examples/guide/7cc603d7e8373a01eae7bb0d18824632.asciidoc new file mode 100644 index 0000000000..dd14a79356 --- /dev/null +++ b/docs/examples/guide/7cc603d7e8373a01eae7bb0d18824632.asciidoc @@ -0,0 +1,25 @@ +[source, ruby] +---- +response = client.ingest.put_pipeline( + id: 'elser-v1-test', + body: { + processors: [ + { + inference: { + model_id: '.elser_model_1', + target_field: 'ml', + field_map: { + text: 'text_field' + }, + inference_config: { + text_expansion: { + results_field: 'tokens' + } + } + } + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/a0c64894f14d28b7e0c902add71d2e9a.asciidoc b/docs/examples/guide/a0c64894f14d28b7e0c902add71d2e9a.asciidoc new file mode 100644 index 0000000000..f392e61fd7 --- /dev/null +++ b/docs/examples/guide/a0c64894f14d28b7e0c902add71d2e9a.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.cluster.put_settings( + body: { + persistent: { + "xpack.profiling.templates.enabled": true + } + } +) +puts response +---- diff --git a/docs/examples/guide/a4709da258a667cae4199ec3a1e84b3b.asciidoc b/docs/examples/guide/a4709da258a667cae4199ec3a1e84b3b.asciidoc new file mode 100644 index 0000000000..0d64d9ebcd --- /dev/null +++ b/docs/examples/guide/a4709da258a667cae4199ec3a1e84b3b.asciidoc @@ -0,0 +1,17 @@ +[source, ruby] +---- +response = client.search( + index: 'my-index', + body: { + query: { + text_expansion: { + "ml.tokens": { + model_id: '.elser_model_1', + model_text: 'How to avoid muscle soreness after running?' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/bdfb86cdfffb9d2ee6e3d399f00a57b0.asciidoc b/docs/examples/guide/bdfb86cdfffb9d2ee6e3d399f00a57b0.asciidoc new file mode 100644 index 0000000000..7f1807e9dc --- /dev/null +++ b/docs/examples/guide/bdfb86cdfffb9d2ee6e3d399f00a57b0.asciidoc @@ -0,0 +1,38 @@ +[source, ruby] +---- +response = client.search( + index: 'test*', + filter_path: 'aggregations', + body: { + aggregations: { + ip: { + terms: { + field: 'ip' + }, + aggregations: { + tm: { + top_metrics: { + metrics: { + field: 'm' + }, + sort: { + s: 'desc' + }, + size: 1 + } + }, + having_tm: { + bucket_selector: { + buckets_path: { + top_m: 'tm[m]' + }, + script: 'params.top_m < 1000' + } + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/c43fd2f25f78e6286fe9a5d08dc31446.asciidoc b/docs/examples/guide/c43fd2f25f78e6286fe9a5d08dc31446.asciidoc new file mode 100644 index 0000000000..a3f43ef4ed --- /dev/null +++ b/docs/examples/guide/c43fd2f25f78e6286fe9a5d08dc31446.asciidoc @@ -0,0 +1,31 @@ +[source, ruby] +---- +response = client.search( + index: 'my-index', + body: { + query: { + bool: { + should: [ + { + text_expansion: { + "ml.token": { + model_text: 'How to avoid muscle soreness after running?', + model_id: '.elser_model_1', + boost: 1 + } + } + }, + { + query_string: { + query: 'toxins', + boost: 4 + } + } + ] + } + }, + min_score: 10 + } +) +puts response +---- diff --git a/docs/examples/guide/cd976cf523f6352ac3429a410677b768.asciidoc b/docs/examples/guide/cd976cf523f6352ac3429a410677b768.asciidoc new file mode 100644 index 0000000000..3d40739028 --- /dev/null +++ b/docs/examples/guide/cd976cf523f6352ac3429a410677b768.asciidoc @@ -0,0 +1,16 @@ +[source, ruby] +---- +response = client.search( + body: { + query: { + text_expansion: { + "": { + model_id: 'the model to produce the token weights', + model_text: 'the query string' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/cde19d110a58317610033ea3dcb0eb80.asciidoc b/docs/examples/guide/cde19d110a58317610033ea3dcb0eb80.asciidoc new file mode 100644 index 0000000000..876bde8b82 --- /dev/null +++ b/docs/examples/guide/cde19d110a58317610033ea3dcb0eb80.asciidoc @@ -0,0 +1,21 @@ +[source, ruby] +---- +response = client.render_search_template( + body: { + source: "\n {\n \"query\": {\n \"match\": {\n {{#query_message}}\n {{#query_string}}\n \"message\": \"Hello {{#first_name_section}}{{first_name}}{{/first_name_section}} {{#last_name_section}}{{last_name}}{{/last_name_section}}\"\n {{/query_string}}\n {{/query_message}}\n }\n }\n }\n ", + params: { + query_message: { + query_string: { + first_name_section: { + first_name: 'John' + }, + last_name_section: { + last_name: 'kimchy' + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/d270e64fcf017a887687fb030b0c1986.asciidoc b/docs/examples/guide/d270e64fcf017a887687fb030b0c1986.asciidoc new file mode 100644 index 0000000000..1d96f66248 --- /dev/null +++ b/docs/examples/guide/d270e64fcf017a887687fb030b0c1986.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.put_script( + id: 'my-search-template', + body: { + script: { + lang: 'mustache', + source: { + query: { + "multi-match": { + query: '{{query_string}}', + fields: '[{{#text_fields}}{{user_name}},{{/text_fields}}]' + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/dbf93d02ab86a09929a21232b19709cc.asciidoc b/docs/examples/guide/dbf93d02ab86a09929a21232b19709cc.asciidoc new file mode 100644 index 0000000000..6b1ec1c2cb --- /dev/null +++ b/docs/examples/guide/dbf93d02ab86a09929a21232b19709cc.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.ml.stop_trained_model_deployment( + model_id: 'my_model_for_search' +) +puts response +---- diff --git a/docs/examples/guide/dfb1ce43b4f96dcb3c8dcc8370aa9965.asciidoc b/docs/examples/guide/dfb1ce43b4f96dcb3c8dcc8370aa9965.asciidoc new file mode 100644 index 0000000000..229b5a9ad2 --- /dev/null +++ b/docs/examples/guide/dfb1ce43b4f96dcb3c8dcc8370aa9965.asciidoc @@ -0,0 +1,16 @@ +[source, ruby] +---- +response = client.reindex( + wait_for_completion: false, + body: { + source: { + index: 'test-data' + }, + dest: { + index: 'my-index', + pipeline: 'elser-v1-test' + } + } +) +puts response +---- diff --git a/docs/examples/guide/e88a057a13e191e4d5faa22edf2ae8ed.asciidoc b/docs/examples/guide/e88a057a13e191e4d5faa22edf2ae8ed.asciidoc new file mode 100644 index 0000000000..131a7fe7c7 --- /dev/null +++ b/docs/examples/guide/e88a057a13e191e4d5faa22edf2ae8ed.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.cluster.get_settings( + filter_path: '**.xpack.profiling.templates.enabled', + include_defaults: true +) +puts response +---- diff --git a/docs/examples/guide/f743225f1abcbc341e991a0e79ea89bc.asciidoc b/docs/examples/guide/f743225f1abcbc341e991a0e79ea89bc.asciidoc new file mode 100644 index 0000000000..0e23b1e41d --- /dev/null +++ b/docs/examples/guide/f743225f1abcbc341e991a0e79ea89bc.asciidoc @@ -0,0 +1,17 @@ +[source, ruby] +---- +response = client.search( + index: 'my-index', + body: { + query: { + text_expansion: { + "ml.tokens": { + model_id: '.elser_model_1', + model_text: 'How is the weather in Jamaica?' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/ff8317bbd60e9dfc6bf007028a18b531.asciidoc b/docs/examples/guide/ff8317bbd60e9dfc6bf007028a18b531.asciidoc new file mode 100644 index 0000000000..a4a65373f1 --- /dev/null +++ b/docs/examples/guide/ff8317bbd60e9dfc6bf007028a18b531.asciidoc @@ -0,0 +1,19 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'my-index', + body: { + mappings: { + properties: { + "ml.tokens": { + type: 'rank_features' + }, + text_field: { + type: 'text' + } + } + } + } +) +puts response +---- From 990348440fe2cef2f94420aa75dc84a886c773a0 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 7 Sep 2023 13:34:34 +0100 Subject: [PATCH 038/540] [API] Test Runner: Refactors test_file to support new version skip format for tests --- elasticsearch-api/api-spec-testing/test_file.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/api-spec-testing/test_file.rb b/elasticsearch-api/api-spec-testing/test_file.rb index a4e88119db..c610b918ff 100644 --- a/elasticsearch-api/api-spec-testing/test_file.rb +++ b/elasticsearch-api/api-spec-testing/test_file.rb @@ -76,10 +76,9 @@ def skip_entire_test_file?(file_name) def skip_version?(client, skip_definition) return true if skip_definition.fetch('version', '').include? 'all' - range_partition = /\s*-\s*/ return unless (versions = skip_definition['version']) - low, high = __parse_versions(versions.partition(range_partition)) + low, high = __parse_versions(versions) range = low..high begin server_version = client.info['version']['number'] @@ -90,7 +89,13 @@ def skip_version?(client, skip_definition) end def __parse_versions(versions) - versions = versions.split('-') if versions.is_a? String + if versions.count('-') == 2 + versions = versions.gsub(/\s/, '').gsub(/-/, '').split(',') + else + range_partition = /\s*-\s*/ + versions = versions.partition(range_partition) + versions = versions.split('-') if versions.is_a? String + end low = (['', nil].include? versions[0]) ? '0' : versions[0] high = (['', nil].include? versions[2]) ? '9999' : versions[2] From 6083cb2dffb326685f4faa5c2e7a1af2891a8815 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 11 Sep 2023 10:06:20 +0100 Subject: [PATCH 039/540] [DOCS] Updates release notes for 8.10 --- docs/release_notes/810.asciidoc | 51 +++++++++++++++++++++++++++++++ docs/release_notes/index.asciidoc | 2 ++ 2 files changed, 53 insertions(+) create mode 100644 docs/release_notes/810.asciidoc diff --git a/docs/release_notes/810.asciidoc b/docs/release_notes/810.asciidoc new file mode 100644 index 0000000000..c58f777d8e --- /dev/null +++ b/docs/release_notes/810.asciidoc @@ -0,0 +1,51 @@ +[[release_notes_8100]] +=== 8.10 Release notes + +[discrete] +[[release_notes_810_0]] +=== 8.10.0 Release notes + +[discrete] +=== Client +* Tested versions of Ruby for 8.10.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4. + +[discrete] +=== API + +[discrete] +==== New Experimental APIs, for internal use: +- `fleet.delete_secret` +- `fleet.get_secret` +- `fleet.post_secret` + +[discrete] +==== New stable APIs: +- `security.get_settings` - Retrieve settings for the security system indices +- `security.update_settings` - Update settings for the security system indices + +[discrete] +==== New Experimental API: +- `query_ruleset.list` List query rulesets. + +[discrete] +==== API Changes: +- `indices.reload_search_analyzers` - Adds parameter `resource` changed resource to reload analyzers from if applicable + +Promoted from Experimental to Beta: + +- `security.create_cross_cluster_api_key` +- `security.update_cross_cluster_api_key` + +[discrete] +==== Synonyms namespace update: + +All synonym related APIs have been moved to the `synonyms` namespace and some of the endpoints have been renamed, as well as their parameters: + +- `synonyms.delete` => `synonyms.delete_synonym` - requires `id`, the id of the synonyms set to be deleted. +- `synonyms.get` => `synonyms.get_synonym` - requires `id`, the name of the synonyms set to be retrieved. +- `synonyms_set.get_synonyms_sets` => `synonyms.get_synonyms_sets` +- `synonyms.put` => `synonyms.put_synonym` - requires `id` of the synonyms set to be created or updated. +- `synonym_rule.put` => `synonyms.put_synonym_rule` - Parameters changed to `set_id` (the id of the synonym set to be updated with the synonym rule) and `rule_id` (the id of the synonym rule to be updated or created). +- New Experimental API `synonyms.delete_synonym_rule` - Deletes a synonym rule in a synonym set +- New Experimental API `synonyms.get_synonym_rule` - Retrieves a synonym rule from a synonym set + diff --git a/docs/release_notes/index.asciidoc b/docs/release_notes/index.asciidoc index 50c38f3b57..43f7e8437f 100644 --- a/docs/release_notes/index.asciidoc +++ b/docs/release_notes/index.asciidoc @@ -3,6 +3,7 @@ [discrete] === 8.x +* <> * <> * <> * <> @@ -31,6 +32,7 @@ * <> * <> +include::810.asciidoc[] include::89.asciidoc[] include::88.asciidoc[] include::87.asciidoc[] From 9b2026c15a1b71e7372b7886b40ac0c39c8af264 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 11 Sep 2023 10:08:59 +0100 Subject: [PATCH 040/540] [DOCS] Updates CHANGELOG for 8.10.0 release --- CHANGELOG.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffac783793..8fcf6bfb2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,42 @@ *To see release notes for the `7.x` branch and older releases, see [CHANGELOG on the 7.17 branch](https://github.com/elastic/elasticsearch-ruby/blob/7.17/CHANGELOG.md).* +## 8.10.0 Release notes + +### Client +* Tested versions of Ruby for 8.10.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4. + +### API + +#### New Experimental APIs, for internal use: +- `fleet.delete_secret` +- `fleet.get_secret` +- `fleet.post_secret` + +#### New stable APIs: +- `security.get_settings` - Retrieve settings for the security system indices +- `security.update_settings` - Update settings for the security system indices + +#### New Experimental API: +- `query_ruleset.list` List query rulesets. + +#### API Changes: +- `indices.reload_search_analyzers` - Adds parameter `resource` changed resource to reload analyzers from if applicable + +Promoted from Experimental to Beta: +- `security.create_cross_cluster_api_key` +- `security.update_cross_cluster_api_key` + +#### Synonyms namespace update: + +All synonym related APIs have been moved to the `synonyms` namespace and some of the endpoints have been renamed, as well as their parameters: +- `synonyms.delete` => `synonyms.delete_synonym` - requires `id`, the id of the synonyms set to be deleted. +- `synonyms.get` => `synonyms.get_synonym` - requires `id`, the name of the synonyms set to be retrieved. +- `synonyms_set.get_synonyms_sets` => `synonyms.get_synonyms_sets` +- `synonyms.put` => `synonyms.put_synonym` - requires `id` of the synonyms set to be created or updated. +- `synonym_rule.put` => `synonyms.put_synonym_rule` - Parameters changed to `set_id` (the id of the synonym set to be updated with the synonym rule) and `rule_id` (the id of the synonym rule to be updated or created). +- New Experimental API `synonyms.delete_synonym_rule` - Deletes a synonym rule in a synonym set +- New Experimental API `synonyms.get_synonym_rule` - Retrieves a synonym rule from a synonym set + ## 8.9.0 Release notes ### Client From c5c7277299d1dc13a73f6637554444ec5237a2e8 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 11 Sep 2023 14:13:48 +0100 Subject: [PATCH 041/540] [API] Reimplement Tests - spatial/70_script_doc_values.yml manually This test is very flaky and I reimplemented it with refresh:true, to see if it remains stable. --- .../spatial/script_doc_values_spec.rb | 147 ++++++++++++++++++ .../spec/rest_api/skipped_tests_platinum.yml | 4 + 2 files changed, 151 insertions(+) create mode 100644 elasticsearch-api/spec/platinum/integration/spatial/script_doc_values_spec.rb diff --git a/elasticsearch-api/spec/platinum/integration/spatial/script_doc_values_spec.rb b/elasticsearch-api/spec/platinum/integration/spatial/script_doc_values_spec.rb new file mode 100644 index 0000000000..5061eb8427 --- /dev/null +++ b/elasticsearch-api/spec/platinum/integration/spatial/script_doc_values_spec.rb @@ -0,0 +1,147 @@ +# 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. + +require_relative '../platinum_helper' + +describe 'Spatial API' do + context 'script doc values tests' do + index = 'geospatial_test' + before(:all) do + ADMIN_CLIENT.indices.create( + index: index, + body: { + settings: { number_of_shards: 1}, + mappings: { properties: { geo_shape: { type: 'geo_shape' } } } + } + ) + ADMIN_CLIENT.index( + index: index, + id: '1', + body: { + geo_shape: 'POLYGON((24.04725 59.942,24.04825 59.94125,24.04875 59.94125,24.04875 59.94175,24.048 59.9425,24.0475 59.94275,24.0465 59.94225,24.046 59.94225,24.04575 59.9425,24.04525 59.94225,24.04725 59.942))' + }, + refresh: true + ) + ADMIN_CLIENT.indices.refresh + end + + after(:all) do + ADMIN_CLIENT.indices.delete(index: index) + end + + it 'centroid' do + response = ADMIN_CLIENT.search( + rest_total_hits_as_int: true, + body: { + script_fields: { centroid: { script: { source: "doc['geo_shape'].getCentroid()" } } } + } + ) + expect(response['hits']['hits'].first['fields']['centroid'].first['lat']).to eq 59.942043484188616 + expect(response['hits']['hits'].first['fields']['centroid'].first['lon']).to eq 24.047588920220733 + end + + it 'bounding box' do + response = ADMIN_CLIENT.search( + rest_total_hits_as_int: true, + body: { + script_fields: { bbox: { script: { source: "doc['geo_shape'].getBoundingBox()" } } } + } + ) + expect(response['hits']['hits'].first['fields']['bbox'].first['top_left']['lat']).to eq 59.942749994806945 + expect(response['hits']['hits'].first['fields']['bbox'].first['top_left']['lon']).to eq 24.045249950140715 + expect(response['hits']['hits'].first['fields']['bbox'].first['bottom_right']['lat']).to eq 59.94124996941537 + expect(response['hits']['hits'].first['fields']['bbox'].first['bottom_right']['lon']).to eq 24.048749981448054 + end + + it 'label position' do + response = ADMIN_CLIENT.search( + rest_total_hits_as_int: true, + body: { + script_fields: { label_position: { script: { source: "doc['geo_shape'].getLabelPosition()" } } } + } + ) + expect(response['hits']['hits'].first['fields']['label_position'].first['lat']).to eq 59.942043484188616 + expect(response['hits']['hits'].first['fields']['label_position'].first['lon']).to eq 24.047588920220733 + end + + it 'bounding box points' do + response = ADMIN_CLIENT.search( + rest_total_hits_as_int: true, + body: { + script_fields: { + topLeft: { script: { source: "doc['geo_shape'].getBoundingBox().topLeft()" } }, + bottomRight: { script: { source: "doc['geo_shape'].getBoundingBox().bottomRight()" } } + } + } + ) + expect(response['hits']['hits'].first['fields']['topLeft'].first['lat']).to eq 59.942749994806945 + expect(response['hits']['hits'].first['fields']['topLeft'].first['lon']).to eq 24.045249950140715 + expect(response['hits']['hits'].first['fields']['bottomRight'].first['lat']).to eq 59.94124996941537 + expect(response['hits']['hits'].first['fields']['bottomRight'].first['lon']).to eq 24.048749981448054 + end + + it 'dimensional type' do + response = ADMIN_CLIENT.search( + rest_total_hits_as_int: true, + body: { + script_fields: { type: { script: { source: "doc['geo_shape'].getDimensionalType()" } } } + } + ) + expect(response['hits']['hits'].first['fields']['type'].first).to eq 2 + end + + it 'geoshape value' do + response = ADMIN_CLIENT.search( + rest_total_hits_as_int: true, + body: { + script_fields: { type: { script: { source: "doc['geo_shape'].get(0)" } } } + } + ) + expect(response['hits']['hits'].first['fields']['type'].first).to eq '' + + response = ADMIN_CLIENT.search( + rest_total_hits_as_int: true, + body: { + script_fields: { type: { script: { source: "field('geo_shape').get(null)"} } } + } + ) + expect(response['hits']['hits'].first['fields']['type'].first).to eq '' + + response = ADMIN_CLIENT.search( + rest_total_hits_as_int: true, + body: { + script_fields: { type: { script: { source: "$('geo_shape', null)"} } } + } + ) + expect(response['hits']['hits'].first['fields']['type'].first).to eq '' + end + + it 'diagonal length' do + response = ADMIN_CLIENT.search( + rest_total_hits_as_int: true, + body: { + script_fields: { + width: { script: { source: "doc['geo_shape'].getMercatorWidth()" } }, + height: { script: { source: "doc['geo_shape'].getMercatorHeight()" } } + } + } + ) + expect(response['hits']['hits'].first['fields']['width'].first).to eq 389.62170283915475 + expect(response['hits']['hits'].first['fields']['height'].first).to eq 333.37976841442287 + end + end +end diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml index bc79ecbcaf..4943423364 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml @@ -105,3 +105,7 @@ - :file: 'api_key/60_admin_user.yml' :description: 'Test query api keys' + +- + :file: 'spatial/70_script_doc_values.yml' + :description: '*' From 98e7baf2be2c5aa4dd89edc163d21db80ad65bc3 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Wed, 13 Sep 2023 11:53:36 -0400 Subject: [PATCH 042/540] [DOCS] Fix `welcome-to-elastic` link --- docs/index-custom-title-page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index-custom-title-page.html b/docs/index-custom-title-page.html index e50a0351b4..e1f913c13e 100644 --- a/docs/index-custom-title-page.html +++ b/docs/index-custom-title-page.html @@ -153,7 +153,7 @@

- +

From 2b311b72f13e509f922591f7ed78539e82d612db Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 14 Sep 2023 06:02:31 +0000 Subject: [PATCH 043/540] [API] Adds inference APIs - inference - put_model - get_model - delete_model --- elasticsearch-api/lib/elasticsearch/api.rb | 3 +- .../api/actions/inference/delete_model.rb | 61 ++++++++++++++++++ .../api/actions/inference/get_model.rb | 61 ++++++++++++++++++ .../api/actions/inference/inference.rb | 62 +++++++++++++++++++ .../api/actions/inference/put_model.rb | 62 +++++++++++++++++++ .../elasticsearch/api/namespace/inference.rb | 36 +++++++++++ .../actions/inference/delete_model_spec.rb | 34 ++++++++++ .../api/actions/inference/get_model_spec.rb | 34 ++++++++++ .../api/actions/inference/inference_spec.rb | 34 ++++++++++ .../api/actions/inference/put_model_spec.rb | 34 ++++++++++ 10 files changed, 420 insertions(+), 1 deletion(-) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/inference.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index 594c8251a3..b7297ae73f 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -83,7 +83,8 @@ def self.included(base) Elasticsearch::API::SearchApplication, Elasticsearch::API::Synonyms, Elasticsearch::API::QueryRuleset, - Elasticsearch::API::Esql + Elasticsearch::API::Esql, + Elasticsearch::API::Inference end # The serializer class diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb new file mode 100644 index 0000000000..cf8f87b53c --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb @@ -0,0 +1,61 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Inference + module Actions + # Delete model in the Inference API + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :task_type The model task type + # @option arguments [String] :model_id The model Id + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/inference_delete_model.html + # + def delete_model(arguments = {}) + raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type] + raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _task_type = arguments.delete(:task_type) + + _model_id = arguments.delete(:model_id) + + method = Elasticsearch::API::HTTP_DELETE + path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_model_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb new file mode 100644 index 0000000000..a0f613c525 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb @@ -0,0 +1,61 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Inference + module Actions + # Get a model in the Inference API + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :task_type The model task type + # @option arguments [String] :model_id The model Id + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/inference_get_model.html + # + def get_model(arguments = {}) + raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type] + raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _task_type = arguments.delete(:task_type) + + _model_id = arguments.delete(:model_id) + + method = Elasticsearch::API::HTTP_GET + path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_model_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb new file mode 100644 index 0000000000..a6d2dd3b2d --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb @@ -0,0 +1,62 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Inference + module Actions + # Perform inference on a model + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :task_type The model task type + # @option arguments [String] :model_id The model Id + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The inference payload + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/inference.html + # + def inference(arguments = {}) + raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type] + raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _model_id = arguments.delete(:model_id) + + method = Elasticsearch::API::HTTP_POST + path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_model_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb new file mode 100644 index 0000000000..7cbc8c956a --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb @@ -0,0 +1,62 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Inference + module Actions + # Configure a model for use in the Inference API + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :task_type The model task type + # @option arguments [String] :model_id The model Id + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The model's task and service settings + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/inference_put_model.html + # + def put_model(arguments = {}) + raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type] + raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _model_id = arguments.delete(:model_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_model_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/inference.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/inference.rb new file mode 100644 index 0000000000..84b3983649 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/inference.rb @@ -0,0 +1,36 @@ +# 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. + +module Elasticsearch + module API + module Inference + module Actions; end + + # Client for the "inference" namespace (includes the {Inference::Actions} methods) + # + class InferenceClient + include Common::Client, Common::Client::Base, Inference::Actions + end + + # Proxy method for {InferenceClient}, available in the receiving object + # + def inference + @inference ||= InferenceClient.new(self) + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb new file mode 100644 index 0000000000..61751b2ce9 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb @@ -0,0 +1,34 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.delete_model' do + let(:expected_args) do + [ + 'DELETE', + '_inference/foo/bar', + {}, + nil, + {} + ] + end + + it 'performs the request' do + expect(client_double.inference.delete_model(task_type: 'foo', model_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb new file mode 100644 index 0000000000..9ba80518b7 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb @@ -0,0 +1,34 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.get_model' do + let(:expected_args) do + [ + 'GET', + '_inference/foo/bar', + {}, + nil, + {} + ] + end + + it 'performs the request' do + expect(client_double.inference.get_model(task_type: 'foo', model_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb new file mode 100644 index 0000000000..1273ea56ae --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb @@ -0,0 +1,34 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.inference' do + let(:expected_args) do + [ + 'POST', + '_inference/foo/bar', + {}, + nil, + {} + ] + end + + it 'performs the request' do + expect(client_double.inference.inference(task_type: 'foo', model_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb new file mode 100644 index 0000000000..5160834810 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb @@ -0,0 +1,34 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_model' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {} + ] + end + + it 'performs the request' do + expect(client_double.inference.put_model(task_type: 'foo', model_id: 'bar')).to be_a Elasticsearch::API::Response + end +end From 5841dc5082371e76f8a7637354aa42bc797a1f0e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 20 Sep 2023 06:02:54 +0000 Subject: [PATCH 044/540] [API] Updates source code documentation for templates --- .../elasticsearch/api/actions/indices/delete_index_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/delete_template.rb | 2 +- .../elasticsearch/api/actions/indices/exists_index_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/exists_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/get_index_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/get_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/put_index_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/put_template.rb | 2 +- .../api/actions/indices/simulate_index_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/simulate_template.rb | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb index 9f6072b96f..d4a4d0b6ca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-template.html # def delete_index_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb index 608efd6d4f..5fe53d7ad9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-template-v1.html # def delete_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb index 9f87f17404..f6be1e72f2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index-templates.html # def exists_index_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb index d9fbb5c235..899ff0cb15 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-template-exists-v1.html # def exists_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb index b5541104af..bf5dfe8232 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Boolean] :include_defaults Return all relevant default configurations for the index template (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template.html # def get_index_template(arguments = {}) arguments = arguments.clone diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb index 1e2c4a76ce..9ab05b689f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template-v1.html # def get_template(arguments = {}) arguments = arguments.clone diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb index da71539e38..6a0870ac45 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The template definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-template.html # def put_index_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb index cc08adb55f..51d589a41f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The template definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html # def put_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb index 60b1ff6373..a7d92ec69c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body New index template definition, which will be included in the simulation, as if it already exists in the system # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-simulate-index.html # def simulate_index_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb index c581f77ba0..fa13869430 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body New index template definition to be simulated, if no index template name is specified # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-simulate-template.html # def simulate_template(arguments = {}) arguments = arguments.clone From d68b46aee9cd2c6e673462a5482b1676ff0d55f5 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 26 Sep 2023 12:26:03 +0100 Subject: [PATCH 045/540] [DOCS] Updates generated docs --- .../033838729cfb5d1a28d04f69ee78d924.asciidoc | 41 +++++++++ .../05500e77aef581d92f6c605f7a48f7df.asciidoc | 36 ++++++++ .../1070e59ba144cdf309fd9b2591612b95.asciidoc | 21 +++++ .../134384b8c63cfbd8d762fb01757bb3f9.asciidoc | 21 +++++ .../14afe65afee3d43f27aaaa5b37f26a31.asciidoc | 16 ++++ .../1cadbcf2cfeb312f73b7f098291356ac.asciidoc | 10 +++ .../1cfa04e9654c1484e3d4c75bf439400a.asciidoc | 58 +++++++++++++ .../2081739da0c69de8af6f5bf9e94433e6.asciidoc | 10 +++ .../22cb99d4e6ba3101a2d9f59764a90877.asciidoc | 10 +++ .../25981b7b3d55b87e1484586d57b695b1.asciidoc | 12 +++ .../2ebcdd00ccbf26b4c8e6d9c80dfb3d55.asciidoc | 22 +++++ .../318e209cc4d6f306e65cb2f5598a50b1.asciidoc | 22 +++++ .../32a7acdfb7046966b28f394476c99126.asciidoc | 10 +++ .../33732208fc6e6fe1e8d278299681932e.asciidoc | 10 +++ .../3a64ae799cc03fadbb802794730c23da.asciidoc | 30 +++++++ .../435e0d6a7d86e074d572d9671b7b9676.asciidoc | 36 ++++++++ .../484e24d1ed1a154ba9753e6090d38d78.asciidoc | 16 ++++ .../515e1104d136082e826d1b32af011759.asciidoc | 22 +++++ .../529b975b7cedaac58dce9821956adc37.asciidoc | 84 +++++++++++++++++++ .../6e1ae8d6103e0b77f14fb0ea1bfb7ffa.asciidoc | 10 +++ .../6f5adbd55a3a2760e7fe9d32df18b1a1.asciidoc | 13 +++ .../6fbbf40cab0187f544ff7bca31d18d57.asciidoc | 58 +++++++++++++ .../6fd82baa17a48e09e3d2eed514af7f46.asciidoc | 68 +++++++++++++++ .../79e8bbbd6c440a21b0b4260c8cb1a61c.asciidoc | 10 +++ .../8206a7cc615ad93fec322513b8fdd4fd.asciidoc | 17 ++++ .../8b301122cbf42be6eafeda714a36559e.asciidoc | 25 ++++++ .../902cfd5aeec2f65b3adf55f5e38b21f0.asciidoc | 10 +++ .../909a032a9c1f7095b798444705b09ad6.asciidoc | 10 +++ .../92d343eb755971c44a939d0660bf5ac2.asciidoc | 22 +++++ .../93d7ba4130722cae04f9690e52a8f54f.asciidoc | 22 +++++ .../99b617a0a83fcfbe5755ccc724a4ce62.asciidoc | 19 +++++ .../a45d80a3fdba70c1b1ba493e51652c8a.asciidoc | 22 +++++ .../a4f259522b4dc10a0323aff58236c2c2.asciidoc | 18 ++++ .../a62833baf15f2c9ac094a9289e56a012.asciidoc | 11 +++ .../a73a9a6f19516b8ead63182a9ae5b540.asciidoc | 10 +++ .../a89052bcdfe40e604a98d12be6ae59d2.asciidoc | 10 +++ .../a8add749c3f41ad1308a45308df14103.asciidoc | 29 +++++++ .../ab1a989958c1d345a9dc3dd36ad90c27.asciidoc | 10 +++ .../b0d3f839237fabf8cdc2221734c668ad.asciidoc | 47 +++++++++++ .../b195068563b1dc0f721f5f8c8d172312.asciidoc | 10 +++ .../b3fffd96fdb118cd059b5f1d67d928de.asciidoc | 22 +++++ .../b504119238b44cddd3b5944da20a498d.asciidoc | 10 +++ .../c03ce952de42eae4b522cedc9fd3d14a.asciidoc | 10 +++ .../c23e32775340d7bc6f46820313014d8a.asciidoc | 14 ++++ .../c654b09be981be12fc7be0ba33f8652b.asciidoc | 68 +++++++++++++++ .../c6b8713bd49661d69d6b868f5b991d17.asciidoc | 17 ++++ .../c9afa715021f2e6450e72ac73271960c.asciidoc | 20 +++++ .../d8310e5606c61e7a6e64a90838b1a830.asciidoc | 43 ++++++++++ .../dea4ac54c63a10c62eccd7b7f6543b86.asciidoc | 23 +++++ .../df1336e768fb6fc1826a5afa30a57285.asciidoc | 14 ++++ .../dfdf82b8d99436582f150117695190b3.asciidoc | 20 +++++ .../e3f2f6ee3e312b8a90634827ae954d70.asciidoc | 34 ++++++++ .../e9fe3b53b5b6e1ff9566b5237c0fa513.asciidoc | 43 ++++++++++ .../ea020ea32d5cd35e577c61a120f92451.asciidoc | 32 +++++++ .../f5eed3f2e3558a238487bc85305b7a71.asciidoc | 10 +++ .../f9a315ea99bed0cf2f36be1d74eb3e4a.asciidoc | 10 +++ .../fb3505d976283fb7c7b9705a761e0dc2.asciidoc | 37 ++++++++ .../fc51fbc60b0e20aac83300a43ad90252.asciidoc | 34 ++++++++ 58 files changed, 1399 insertions(+) create mode 100644 docs/examples/guide/033838729cfb5d1a28d04f69ee78d924.asciidoc create mode 100644 docs/examples/guide/05500e77aef581d92f6c605f7a48f7df.asciidoc create mode 100644 docs/examples/guide/1070e59ba144cdf309fd9b2591612b95.asciidoc create mode 100644 docs/examples/guide/134384b8c63cfbd8d762fb01757bb3f9.asciidoc create mode 100644 docs/examples/guide/14afe65afee3d43f27aaaa5b37f26a31.asciidoc create mode 100644 docs/examples/guide/1cadbcf2cfeb312f73b7f098291356ac.asciidoc create mode 100644 docs/examples/guide/1cfa04e9654c1484e3d4c75bf439400a.asciidoc create mode 100644 docs/examples/guide/2081739da0c69de8af6f5bf9e94433e6.asciidoc create mode 100644 docs/examples/guide/22cb99d4e6ba3101a2d9f59764a90877.asciidoc create mode 100644 docs/examples/guide/25981b7b3d55b87e1484586d57b695b1.asciidoc create mode 100644 docs/examples/guide/2ebcdd00ccbf26b4c8e6d9c80dfb3d55.asciidoc create mode 100644 docs/examples/guide/318e209cc4d6f306e65cb2f5598a50b1.asciidoc create mode 100644 docs/examples/guide/32a7acdfb7046966b28f394476c99126.asciidoc create mode 100644 docs/examples/guide/33732208fc6e6fe1e8d278299681932e.asciidoc create mode 100644 docs/examples/guide/3a64ae799cc03fadbb802794730c23da.asciidoc create mode 100644 docs/examples/guide/435e0d6a7d86e074d572d9671b7b9676.asciidoc create mode 100644 docs/examples/guide/484e24d1ed1a154ba9753e6090d38d78.asciidoc create mode 100644 docs/examples/guide/515e1104d136082e826d1b32af011759.asciidoc create mode 100644 docs/examples/guide/529b975b7cedaac58dce9821956adc37.asciidoc create mode 100644 docs/examples/guide/6e1ae8d6103e0b77f14fb0ea1bfb7ffa.asciidoc create mode 100644 docs/examples/guide/6f5adbd55a3a2760e7fe9d32df18b1a1.asciidoc create mode 100644 docs/examples/guide/6fbbf40cab0187f544ff7bca31d18d57.asciidoc create mode 100644 docs/examples/guide/6fd82baa17a48e09e3d2eed514af7f46.asciidoc create mode 100644 docs/examples/guide/79e8bbbd6c440a21b0b4260c8cb1a61c.asciidoc create mode 100644 docs/examples/guide/8206a7cc615ad93fec322513b8fdd4fd.asciidoc create mode 100644 docs/examples/guide/8b301122cbf42be6eafeda714a36559e.asciidoc create mode 100644 docs/examples/guide/902cfd5aeec2f65b3adf55f5e38b21f0.asciidoc create mode 100644 docs/examples/guide/909a032a9c1f7095b798444705b09ad6.asciidoc create mode 100644 docs/examples/guide/92d343eb755971c44a939d0660bf5ac2.asciidoc create mode 100644 docs/examples/guide/93d7ba4130722cae04f9690e52a8f54f.asciidoc create mode 100644 docs/examples/guide/99b617a0a83fcfbe5755ccc724a4ce62.asciidoc create mode 100644 docs/examples/guide/a45d80a3fdba70c1b1ba493e51652c8a.asciidoc create mode 100644 docs/examples/guide/a4f259522b4dc10a0323aff58236c2c2.asciidoc create mode 100644 docs/examples/guide/a62833baf15f2c9ac094a9289e56a012.asciidoc create mode 100644 docs/examples/guide/a73a9a6f19516b8ead63182a9ae5b540.asciidoc create mode 100644 docs/examples/guide/a89052bcdfe40e604a98d12be6ae59d2.asciidoc create mode 100644 docs/examples/guide/a8add749c3f41ad1308a45308df14103.asciidoc create mode 100644 docs/examples/guide/ab1a989958c1d345a9dc3dd36ad90c27.asciidoc create mode 100644 docs/examples/guide/b0d3f839237fabf8cdc2221734c668ad.asciidoc create mode 100644 docs/examples/guide/b195068563b1dc0f721f5f8c8d172312.asciidoc create mode 100644 docs/examples/guide/b3fffd96fdb118cd059b5f1d67d928de.asciidoc create mode 100644 docs/examples/guide/b504119238b44cddd3b5944da20a498d.asciidoc create mode 100644 docs/examples/guide/c03ce952de42eae4b522cedc9fd3d14a.asciidoc create mode 100644 docs/examples/guide/c23e32775340d7bc6f46820313014d8a.asciidoc create mode 100644 docs/examples/guide/c654b09be981be12fc7be0ba33f8652b.asciidoc create mode 100644 docs/examples/guide/c6b8713bd49661d69d6b868f5b991d17.asciidoc create mode 100644 docs/examples/guide/c9afa715021f2e6450e72ac73271960c.asciidoc create mode 100644 docs/examples/guide/d8310e5606c61e7a6e64a90838b1a830.asciidoc create mode 100644 docs/examples/guide/dea4ac54c63a10c62eccd7b7f6543b86.asciidoc create mode 100644 docs/examples/guide/df1336e768fb6fc1826a5afa30a57285.asciidoc create mode 100644 docs/examples/guide/dfdf82b8d99436582f150117695190b3.asciidoc create mode 100644 docs/examples/guide/e3f2f6ee3e312b8a90634827ae954d70.asciidoc create mode 100644 docs/examples/guide/e9fe3b53b5b6e1ff9566b5237c0fa513.asciidoc create mode 100644 docs/examples/guide/ea020ea32d5cd35e577c61a120f92451.asciidoc create mode 100644 docs/examples/guide/f5eed3f2e3558a238487bc85305b7a71.asciidoc create mode 100644 docs/examples/guide/f9a315ea99bed0cf2f36be1d74eb3e4a.asciidoc create mode 100644 docs/examples/guide/fb3505d976283fb7c7b9705a761e0dc2.asciidoc create mode 100644 docs/examples/guide/fc51fbc60b0e20aac83300a43ad90252.asciidoc diff --git a/docs/examples/guide/033838729cfb5d1a28d04f69ee78d924.asciidoc b/docs/examples/guide/033838729cfb5d1a28d04f69ee78d924.asciidoc new file mode 100644 index 0000000000..9afab92f19 --- /dev/null +++ b/docs/examples/guide/033838729cfb5d1a28d04f69ee78d924.asciidoc @@ -0,0 +1,41 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'Polygon', + orientation: 'LEFT', + coordinates: [ + [ + [ + -177, + 10 + ], + [ + 176, + 15 + ], + [ + 172, + 0 + ], + [ + 176, + -15 + ], + [ + -177, + -10 + ], + [ + -177, + 10 + ] + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/05500e77aef581d92f6c605f7a48f7df.asciidoc b/docs/examples/guide/05500e77aef581d92f6c605f7a48f7df.asciidoc new file mode 100644 index 0000000000..08bd3515c9 --- /dev/null +++ b/docs/examples/guide/05500e77aef581d92f6c605f7a48f7df.asciidoc @@ -0,0 +1,36 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'polygon', + coordinates: [ + [ + [ + 1000, + -1001 + ], + [ + 1001, + -1001 + ], + [ + 1001, + -1000 + ], + [ + 1000, + -1000 + ], + [ + 1000, + -1001 + ] + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/1070e59ba144cdf309fd9b2591612b95.asciidoc b/docs/examples/guide/1070e59ba144cdf309fd9b2591612b95.asciidoc new file mode 100644 index 0000000000..d2d1d286e0 --- /dev/null +++ b/docs/examples/guide/1070e59ba144cdf309fd9b2591612b95.asciidoc @@ -0,0 +1,21 @@ +[source, ruby] +---- +response = client.index( + index: 'test', + id: 3, + body: { + test: 'test' + } +) +puts response + +response = client.index( + index: 'test', + id: 4, + refresh: false, + body: { + test: 'test' + } +) +puts response +---- diff --git a/docs/examples/guide/134384b8c63cfbd8d762fb01757bb3f9.asciidoc b/docs/examples/guide/134384b8c63cfbd8d762fb01757bb3f9.asciidoc new file mode 100644 index 0000000000..d5811e51c1 --- /dev/null +++ b/docs/examples/guide/134384b8c63cfbd8d762fb01757bb3f9.asciidoc @@ -0,0 +1,21 @@ +[source, ruby] +---- +response = client.index( + index: 'logs-debug', + body: { + date: '2019-12-12', + message: 'Starting up Elasticsearch', + level: 'debug' + } +) +puts response + +response = client.index( + index: 'logs-debug', + body: { + date: '2019-12-12', + message: 'Starting up Elasticsearch' + } +) +puts response +---- diff --git a/docs/examples/guide/14afe65afee3d43f27aaaa5b37f26a31.asciidoc b/docs/examples/guide/14afe65afee3d43f27aaaa5b37f26a31.asciidoc new file mode 100644 index 0000000000..5f446cbf10 --- /dev/null +++ b/docs/examples/guide/14afe65afee3d43f27aaaa5b37f26a31.asciidoc @@ -0,0 +1,16 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'Point', + coordinates: [ + -77.03653, + 38.897676 + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/1cadbcf2cfeb312f73b7f098291356ac.asciidoc b/docs/examples/guide/1cadbcf2cfeb312f73b7f098291356ac.asciidoc new file mode 100644 index 0000000000..034775dae3 --- /dev/null +++ b/docs/examples/guide/1cadbcf2cfeb312f73b7f098291356ac.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'MULTIPOINT (102.0 2.0, 103.0 2.0)' + } +) +puts response +---- diff --git a/docs/examples/guide/1cfa04e9654c1484e3d4c75bf439400a.asciidoc b/docs/examples/guide/1cfa04e9654c1484e3d4c75bf439400a.asciidoc new file mode 100644 index 0000000000..b12afda61e --- /dev/null +++ b/docs/examples/guide/1cfa04e9654c1484e3d4c75bf439400a.asciidoc @@ -0,0 +1,58 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'polygon', + coordinates: [ + [ + [ + 1000, + -1001 + ], + [ + 1001, + -1001 + ], + [ + 1001, + -1000 + ], + [ + 1000, + -1000 + ], + [ + 1000, + -1001 + ] + ], + [ + [ + 1000.2, + -1001.2 + ], + [ + 1000.8, + -1001.2 + ], + [ + 1000.8, + -1001.8 + ], + [ + 1000.2, + -1001.8 + ], + [ + 1000.2, + -1001.2 + ] + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/2081739da0c69de8af6f5bf9e94433e6.asciidoc b/docs/examples/guide/2081739da0c69de8af6f5bf9e94433e6.asciidoc new file mode 100644 index 0000000000..ca8445843c --- /dev/null +++ b/docs/examples/guide/2081739da0c69de8af6f5bf9e94433e6.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'MULTILINESTRING ((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0), (100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8))' + } +) +puts response +---- diff --git a/docs/examples/guide/22cb99d4e6ba3101a2d9f59764a90877.asciidoc b/docs/examples/guide/22cb99d4e6ba3101a2d9f59764a90877.asciidoc new file mode 100644 index 0000000000..0408e0fdf8 --- /dev/null +++ b/docs/examples/guide/22cb99d4e6ba3101a2d9f59764a90877.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'POINT (-77.03653 38.897676)' + } +) +puts response +---- diff --git a/docs/examples/guide/25981b7b3d55b87e1484586d57b695b1.asciidoc b/docs/examples/guide/25981b7b3d55b87e1484586d57b695b1.asciidoc new file mode 100644 index 0000000000..bb761bab2d --- /dev/null +++ b/docs/examples/guide/25981b7b3d55b87e1484586d57b695b1.asciidoc @@ -0,0 +1,12 @@ +[source, ruby] +---- +response = client.index( + index: 'products', + id: 1567, + body: { + product: 'r2d2', + details: 'A resourceful astromech droid' + } +) +puts response +---- diff --git a/docs/examples/guide/2ebcdd00ccbf26b4c8e6d9c80dfb3d55.asciidoc b/docs/examples/guide/2ebcdd00ccbf26b4c8e6d9c80dfb3d55.asciidoc new file mode 100644 index 0000000000..f6b8216d96 --- /dev/null +++ b/docs/examples/guide/2ebcdd00ccbf26b4c8e6d9c80dfb3d55.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'linestring', + coordinates: [ + [ + -377.03653, + 389.897676 + ], + [ + -377.009051, + 389.889939 + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/318e209cc4d6f306e65cb2f5598a50b1.asciidoc b/docs/examples/guide/318e209cc4d6f306e65cb2f5598a50b1.asciidoc new file mode 100644 index 0000000000..5a85aab9fa --- /dev/null +++ b/docs/examples/guide/318e209cc4d6f306e65cb2f5598a50b1.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'LineString', + coordinates: [ + [ + -77.03653, + 38.897676 + ], + [ + -77.009051, + 38.889939 + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/32a7acdfb7046966b28f394476c99126.asciidoc b/docs/examples/guide/32a7acdfb7046966b28f394476c99126.asciidoc new file mode 100644 index 0000000000..a6c171f4ad --- /dev/null +++ b/docs/examples/guide/32a7acdfb7046966b28f394476c99126.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'POINT (-377.03653 389.897676)' + } +) +puts response +---- diff --git a/docs/examples/guide/33732208fc6e6fe1e8d278299681932e.asciidoc b/docs/examples/guide/33732208fc6e6fe1e8d278299681932e.asciidoc new file mode 100644 index 0000000000..47d77f24bc --- /dev/null +++ b/docs/examples/guide/33732208fc6e6fe1e8d278299681932e.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'LINESTRING (-377.03653 389.897676, -377.009051 389.889939)' + } +) +puts response +---- diff --git a/docs/examples/guide/3a64ae799cc03fadbb802794730c23da.asciidoc b/docs/examples/guide/3a64ae799cc03fadbb802794730c23da.asciidoc new file mode 100644 index 0000000000..eeb701b7b9 --- /dev/null +++ b/docs/examples/guide/3a64ae799cc03fadbb802794730c23da.asciidoc @@ -0,0 +1,30 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'example_points', + body: { + mappings: { + properties: { + location: { + type: 'geo_point' + } + } + } + } +) +puts response + +response = client.index( + index: 'example_points', + id: 1, + refresh: true, + body: { + name: 'Wind & Wetter, Berlin, Germany', + location: [ + 13.400544, + 52.530286 + ] + } +) +puts response +---- diff --git a/docs/examples/guide/435e0d6a7d86e074d572d9671b7b9676.asciidoc b/docs/examples/guide/435e0d6a7d86e074d572d9671b7b9676.asciidoc new file mode 100644 index 0000000000..7599f6105f --- /dev/null +++ b/docs/examples/guide/435e0d6a7d86e074d572d9671b7b9676.asciidoc @@ -0,0 +1,36 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'Polygon', + coordinates: [ + [ + [ + 100, + 0 + ], + [ + 101, + 0 + ], + [ + 101, + 1 + ], + [ + 100, + 1 + ], + [ + 100, + 0 + ] + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/484e24d1ed1a154ba9753e6090d38d78.asciidoc b/docs/examples/guide/484e24d1ed1a154ba9753e6090d38d78.asciidoc new file mode 100644 index 0000000000..9732d8b09b --- /dev/null +++ b/docs/examples/guide/484e24d1ed1a154ba9753e6090d38d78.asciidoc @@ -0,0 +1,16 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'point', + coordinates: [ + -377.03653, + 389.897676 + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/515e1104d136082e826d1b32af011759.asciidoc b/docs/examples/guide/515e1104d136082e826d1b32af011759.asciidoc new file mode 100644 index 0000000000..8315b4829b --- /dev/null +++ b/docs/examples/guide/515e1104d136082e826d1b32af011759.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.index( + index: 'products', + id: 0, + refresh: true, + body: { + name: 'LED TV', + resellers: [ + { + reseller: 'companyA', + price: 350 + }, + { + reseller: 'companyB', + price: 500 + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/529b975b7cedaac58dce9821956adc37.asciidoc b/docs/examples/guide/529b975b7cedaac58dce9821956adc37.asciidoc new file mode 100644 index 0000000000..5afbbc21d5 --- /dev/null +++ b/docs/examples/guide/529b975b7cedaac58dce9821956adc37.asciidoc @@ -0,0 +1,84 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'MultiPolygon', + coordinates: [ + [ + [ + [ + 102, + 2 + ], + [ + 103, + 2 + ], + [ + 103, + 3 + ], + [ + 102, + 3 + ], + [ + 102, + 2 + ] + ] + ], + [ + [ + [ + 100, + 0 + ], + [ + 101, + 0 + ], + [ + 101, + 1 + ], + [ + 100, + 1 + ], + [ + 100, + 0 + ] + ], + [ + [ + 100.2, + 0.2 + ], + [ + 100.8, + 0.2 + ], + [ + 100.8, + 0.8 + ], + [ + 100.2, + 0.8 + ], + [ + 100.2, + 0.2 + ] + ] + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/6e1ae8d6103e0b77f14fb0ea1bfb7ffa.asciidoc b/docs/examples/guide/6e1ae8d6103e0b77f14fb0ea1bfb7ffa.asciidoc new file mode 100644 index 0000000000..b9e5cc79c0 --- /dev/null +++ b/docs/examples/guide/6e1ae8d6103e0b77f14fb0ea1bfb7ffa.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'GEOMETRYCOLLECTION (POINT (1000.0 100.0), LINESTRING (1001.0 100.0, 1002.0 100.0))' + } +) +puts response +---- diff --git a/docs/examples/guide/6f5adbd55a3a2760e7fe9d32df18b1a1.asciidoc b/docs/examples/guide/6f5adbd55a3a2760e7fe9d32df18b1a1.asciidoc new file mode 100644 index 0000000000..589c3faf80 --- /dev/null +++ b/docs/examples/guide/6f5adbd55a3a2760e7fe9d32df18b1a1.asciidoc @@ -0,0 +1,13 @@ +[source, ruby] +---- +response = client.index( + index: 'logs', + body: { + timestamp: '2015-05-17T18:12:07.613Z', + request: 'GET index.html', + status_code: 404, + message: 'Error: File not found' + } +) +puts response +---- diff --git a/docs/examples/guide/6fbbf40cab0187f544ff7bca31d18d57.asciidoc b/docs/examples/guide/6fbbf40cab0187f544ff7bca31d18d57.asciidoc new file mode 100644 index 0000000000..fce927f338 --- /dev/null +++ b/docs/examples/guide/6fbbf40cab0187f544ff7bca31d18d57.asciidoc @@ -0,0 +1,58 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'Polygon', + coordinates: [ + [ + [ + 100, + 0 + ], + [ + 101, + 0 + ], + [ + 101, + 1 + ], + [ + 100, + 1 + ], + [ + 100, + 0 + ] + ], + [ + [ + 100.2, + 0.2 + ], + [ + 100.8, + 0.2 + ], + [ + 100.8, + 0.8 + ], + [ + 100.2, + 0.8 + ], + [ + 100.2, + 0.2 + ] + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/6fd82baa17a48e09e3d2eed514af7f46.asciidoc b/docs/examples/guide/6fd82baa17a48e09e3d2eed514af7f46.asciidoc new file mode 100644 index 0000000000..1b94f68c05 --- /dev/null +++ b/docs/examples/guide/6fd82baa17a48e09e3d2eed514af7f46.asciidoc @@ -0,0 +1,68 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'MultiLineString', + coordinates: [ + [ + [ + 102, + 2 + ], + [ + 103, + 2 + ], + [ + 103, + 3 + ], + [ + 102, + 3 + ] + ], + [ + [ + 100, + 0 + ], + [ + 101, + 0 + ], + [ + 101, + 1 + ], + [ + 100, + 1 + ] + ], + [ + [ + 100.2, + 0.2 + ], + [ + 100.8, + 0.2 + ], + [ + 100.8, + 0.8 + ], + [ + 100.2, + 0.8 + ] + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/79e8bbbd6c440a21b0b4260c8cb1a61c.asciidoc b/docs/examples/guide/79e8bbbd6c440a21b0b4260c8cb1a61c.asciidoc new file mode 100644 index 0000000000..1a46160372 --- /dev/null +++ b/docs/examples/guide/79e8bbbd6c440a21b0b4260c8cb1a61c.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'LINESTRING (-77.03653 38.897676, -77.009051 38.889939)' + } +) +puts response +---- diff --git a/docs/examples/guide/8206a7cc615ad93fec322513b8fdd4fd.asciidoc b/docs/examples/guide/8206a7cc615ad93fec322513b8fdd4fd.asciidoc new file mode 100644 index 0000000000..20cd926790 --- /dev/null +++ b/docs/examples/guide/8206a7cc615ad93fec322513b8fdd4fd.asciidoc @@ -0,0 +1,17 @@ +[source, ruby] +---- +response = client.index( + index: 'job-candidates', + id: 2, + refresh: true, + body: { + name: 'Jason Response', + programming_languages: [ + 'java', + 'php' + ], + required_matches: 2 + } +) +puts response +---- diff --git a/docs/examples/guide/8b301122cbf42be6eafeda714a36559e.asciidoc b/docs/examples/guide/8b301122cbf42be6eafeda714a36559e.asciidoc new file mode 100644 index 0000000000..d12f890892 --- /dev/null +++ b/docs/examples/guide/8b301122cbf42be6eafeda714a36559e.asciidoc @@ -0,0 +1,25 @@ +[source, ruby] +---- +response = client.logstash.put_pipeline( + id: 'my_pipeline', + body: { + description: 'Sample pipeline for illustration purposes', + last_modified: '2021-01-02T02:50:51.250Z', + pipeline_metadata: { + type: 'logstash_pipeline', + version: '1' + }, + username: 'elastic', + pipeline: "input {}\n filter { grok {} }\n output {}", + pipeline_settings: { + "pipeline.workers": 1, + "pipeline.batch.size": 125, + "pipeline.batch.delay": 50, + "queue.type": 'memory', + "queue.max_bytes": '1gb', + "queue.checkpoint.writes": 1024 + } + } +) +puts response +---- diff --git a/docs/examples/guide/902cfd5aeec2f65b3adf55f5e38b21f0.asciidoc b/docs/examples/guide/902cfd5aeec2f65b3adf55f5e38b21f0.asciidoc new file mode 100644 index 0000000000..31de8448f8 --- /dev/null +++ b/docs/examples/guide/902cfd5aeec2f65b3adf55f5e38b21f0.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'kibana_sample_data_ecommerce2', + body: { + user: 'kimchy' + } +) +puts response +---- diff --git a/docs/examples/guide/909a032a9c1f7095b798444705b09ad6.asciidoc b/docs/examples/guide/909a032a9c1f7095b798444705b09ad6.asciidoc new file mode 100644 index 0000000000..48852d5949 --- /dev/null +++ b/docs/examples/guide/909a032a9c1f7095b798444705b09ad6.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'GEOMETRYCOLLECTION (POINT (100.0 0.0), LINESTRING (101.0 0.0, 102.0 1.0))' + } +) +puts response +---- diff --git a/docs/examples/guide/92d343eb755971c44a939d0660bf5ac2.asciidoc b/docs/examples/guide/92d343eb755971c44a939d0660bf5ac2.asciidoc new file mode 100644 index 0000000000..2810b67022 --- /dev/null +++ b/docs/examples/guide/92d343eb755971c44a939d0660bf5ac2.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.index( + index: 'test', + id: 1, + refresh: true, + body: { + test: 'test' + } +) +puts response + +response = client.index( + index: 'test', + id: 2, + refresh: true, + body: { + test: 'test' + } +) +puts response +---- diff --git a/docs/examples/guide/93d7ba4130722cae04f9690e52a8f54f.asciidoc b/docs/examples/guide/93d7ba4130722cae04f9690e52a8f54f.asciidoc new file mode 100644 index 0000000000..fc118e7869 --- /dev/null +++ b/docs/examples/guide/93d7ba4130722cae04f9690e52a8f54f.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'envelope', + coordinates: [ + [ + 100, + 1 + ], + [ + 101, + 0 + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/99b617a0a83fcfbe5755ccc724a4ce62.asciidoc b/docs/examples/guide/99b617a0a83fcfbe5755ccc724a4ce62.asciidoc new file mode 100644 index 0000000000..8970b060ad --- /dev/null +++ b/docs/examples/guide/99b617a0a83fcfbe5755ccc724a4ce62.asciidoc @@ -0,0 +1,19 @@ +[source, ruby] +---- +response = client.index( + index: 'place_path_category', + id: 1, + body: { + suggest: [ + "timmy's", + 'starbucks', + 'dunkin donuts' + ], + cat: [ + 'cafe', + 'food' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/a45d80a3fdba70c1b1ba493e51652c8a.asciidoc b/docs/examples/guide/a45d80a3fdba70c1b1ba493e51652c8a.asciidoc new file mode 100644 index 0000000000..823884c927 --- /dev/null +++ b/docs/examples/guide/a45d80a3fdba70c1b1ba493e51652c8a.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'multipoint', + coordinates: [ + [ + 1002, + 1002 + ], + [ + 1003, + 2000 + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/a4f259522b4dc10a0323aff58236c2c2.asciidoc b/docs/examples/guide/a4f259522b4dc10a0323aff58236c2c2.asciidoc new file mode 100644 index 0000000000..f72d60cf07 --- /dev/null +++ b/docs/examples/guide/a4f259522b4dc10a0323aff58236c2c2.asciidoc @@ -0,0 +1,18 @@ +[source, ruby] +---- +response = client.index( + index: 'music', + id: 1, + refresh: true, + body: { + suggest: { + input: [ + 'Nevermind', + 'Nirvana' + ], + weight: 34 + } + } +) +puts response +---- diff --git a/docs/examples/guide/a62833baf15f2c9ac094a9289e56a012.asciidoc b/docs/examples/guide/a62833baf15f2c9ac094a9289e56a012.asciidoc new file mode 100644 index 0000000000..721e75a76e --- /dev/null +++ b/docs/examples/guide/a62833baf15f2c9ac094a9289e56a012.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.index( + index: 'timeseries', + body: { + message: 'logged the request', + "@timestamp": '1591890611' + } +) +puts response +---- diff --git a/docs/examples/guide/a73a9a6f19516b8ead63182a9ae5b540.asciidoc b/docs/examples/guide/a73a9a6f19516b8ead63182a9ae5b540.asciidoc new file mode 100644 index 0000000000..4572bd40b9 --- /dev/null +++ b/docs/examples/guide/a73a9a6f19516b8ead63182a9ae5b540.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'MULTILINESTRING ((1002.0 200.0, 1003.0 200.0, 1003.0 300.0, 1002.0 300.0), (1000.0 100.0, 1001.0 100.0, 1001.0 100.0, 1000.0 100.0), (1000.2 0.2, 1000.8 100.2, 1000.8 100.8, 1000.2 100.8))' + } +) +puts response +---- diff --git a/docs/examples/guide/a89052bcdfe40e604a98d12be6ae59d2.asciidoc b/docs/examples/guide/a89052bcdfe40e604a98d12be6ae59d2.asciidoc new file mode 100644 index 0000000000..8e362dc364 --- /dev/null +++ b/docs/examples/guide/a89052bcdfe40e604a98d12be6ae59d2.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'BBOX (100.0, 102.0, 2.0, 0.0)' + } +) +puts response +---- diff --git a/docs/examples/guide/a8add749c3f41ad1308a45308df14103.asciidoc b/docs/examples/guide/a8add749c3f41ad1308a45308df14103.asciidoc new file mode 100644 index 0000000000..fc67c30409 --- /dev/null +++ b/docs/examples/guide/a8add749c3f41ad1308a45308df14103.asciidoc @@ -0,0 +1,29 @@ +[source, ruby] +---- +response = client.index( + index: 'sales', + id: 1, + refresh: true, + body: { + tags: [ + 'car', + 'auto' + ], + comments: [ + { + username: 'baddriver007', + comment: 'This car could have better brakes' + }, + { + username: 'dr_who', + comment: "Where's the autopilot? Can't find it" + }, + { + username: 'ilovemotorbikes', + comment: 'This car has two extra wheels' + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/ab1a989958c1d345a9dc3dd36ad90c27.asciidoc b/docs/examples/guide/ab1a989958c1d345a9dc3dd36ad90c27.asciidoc new file mode 100644 index 0000000000..8a9983834c --- /dev/null +++ b/docs/examples/guide/ab1a989958c1d345a9dc3dd36ad90c27.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'POLYGON ((1000.0 1000.0, 1001.0 1000.0, 1001.0 1001.0, 1000.0 1001.0, 1000.0 1000.0), (1000.2 1000.2, 1000.8 1000.2, 1000.8 1000.8, 1000.2 1000.8, 1000.2 1000.2))' + } +) +puts response +---- diff --git a/docs/examples/guide/b0d3f839237fabf8cdc2221734c668ad.asciidoc b/docs/examples/guide/b0d3f839237fabf8cdc2221734c668ad.asciidoc new file mode 100644 index 0000000000..cea45cab9b --- /dev/null +++ b/docs/examples/guide/b0d3f839237fabf8cdc2221734c668ad.asciidoc @@ -0,0 +1,47 @@ +[source, ruby] +---- +response = client.index( + index: 'items', + id: 1, + refresh: true, + body: { + name: 'chocolate', + production_date: '2018-02-01', + location: [ + -71.34, + 41.12 + ] + } +) +puts response + +response = client.index( + index: 'items', + id: 2, + refresh: true, + body: { + name: 'chocolate', + production_date: '2018-01-01', + location: [ + -71.3, + 41.15 + ] + } +) +puts response + +response = client.index( + index: 'items', + id: 3, + refresh: true, + body: { + name: 'chocolate', + production_date: '2017-12-01', + location: [ + -71.3, + 41.12 + ] + } +) +puts response +---- diff --git a/docs/examples/guide/b195068563b1dc0f721f5f8c8d172312.asciidoc b/docs/examples/guide/b195068563b1dc0f721f5f8c8d172312.asciidoc new file mode 100644 index 0000000000..70bfebbe9c --- /dev/null +++ b/docs/examples/guide/b195068563b1dc0f721f5f8c8d172312.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'MULTIPOINT (1002.0 2000.0, 1003.0 2000.0)' + } +) +puts response +---- diff --git a/docs/examples/guide/b3fffd96fdb118cd059b5f1d67d928de.asciidoc b/docs/examples/guide/b3fffd96fdb118cd059b5f1d67d928de.asciidoc new file mode 100644 index 0000000000..047e9266da --- /dev/null +++ b/docs/examples/guide/b3fffd96fdb118cd059b5f1d67d928de.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'MultiPoint', + coordinates: [ + [ + 102, + 2 + ], + [ + 103, + 2 + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/b504119238b44cddd3b5944da20a498d.asciidoc b/docs/examples/guide/b504119238b44cddd3b5944da20a498d.asciidoc new file mode 100644 index 0000000000..f85e58adbc --- /dev/null +++ b/docs/examples/guide/b504119238b44cddd3b5944da20a498d.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'POLYGON ((1000.0 -1001.0, 1001.0 -1001.0, 1001.0 -1000.0, 1000.0 -1000.0, 1000.0 -1001.0))' + } +) +puts response +---- diff --git a/docs/examples/guide/c03ce952de42eae4b522cedc9fd3d14a.asciidoc b/docs/examples/guide/c03ce952de42eae4b522cedc9fd3d14a.asciidoc new file mode 100644 index 0000000000..e01b21843c --- /dev/null +++ b/docs/examples/guide/c03ce952de42eae4b522cedc9fd3d14a.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2))' + } +) +puts response +---- diff --git a/docs/examples/guide/c23e32775340d7bc6f46820313014d8a.asciidoc b/docs/examples/guide/c23e32775340d7bc6f46820313014d8a.asciidoc new file mode 100644 index 0000000000..e805168775 --- /dev/null +++ b/docs/examples/guide/c23e32775340d7bc6f46820313014d8a.asciidoc @@ -0,0 +1,14 @@ +[source, ruby] +---- +response = client.index( + index: 'my_test_scores_2', + pipeline: 'my_test_scores_pipeline', + body: { + student: 'kimchy', + grad_year: '2099', + math_score: 1200, + verbal_score: 800 + } +) +puts response +---- diff --git a/docs/examples/guide/c654b09be981be12fc7be0ba33f8652b.asciidoc b/docs/examples/guide/c654b09be981be12fc7be0ba33f8652b.asciidoc new file mode 100644 index 0000000000..2dfe3a115a --- /dev/null +++ b/docs/examples/guide/c654b09be981be12fc7be0ba33f8652b.asciidoc @@ -0,0 +1,68 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'multilinestring', + coordinates: [ + [ + [ + 1002, + 200 + ], + [ + 1003, + 200 + ], + [ + 1003, + 300 + ], + [ + 1002, + 300 + ] + ], + [ + [ + 1000, + 100 + ], + [ + 1001, + 100 + ], + [ + 1001, + 100 + ], + [ + 1000, + 100 + ] + ], + [ + [ + 1000.2, + 100.2 + ], + [ + 1000.8, + 100.2 + ], + [ + 1000.8, + 100.8 + ], + [ + 1000.2, + 100.8 + ] + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/c6b8713bd49661d69d6b868f5b991d17.asciidoc b/docs/examples/guide/c6b8713bd49661d69d6b868f5b991d17.asciidoc new file mode 100644 index 0000000000..251b5f7aef --- /dev/null +++ b/docs/examples/guide/c6b8713bd49661d69d6b868f5b991d17.asciidoc @@ -0,0 +1,17 @@ +[source, ruby] +---- +response = client.index( + index: 'job-candidates', + id: 1, + refresh: true, + body: { + name: 'Jane Smith', + programming_languages: [ + 'c++', + 'java' + ], + required_matches: 2 + } +) +puts response +---- diff --git a/docs/examples/guide/c9afa715021f2e6450e72ac73271960c.asciidoc b/docs/examples/guide/c9afa715021f2e6450e72ac73271960c.asciidoc new file mode 100644 index 0000000000..28bfc03130 --- /dev/null +++ b/docs/examples/guide/c9afa715021f2e6450e72ac73271960c.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.index( + index: 'parent_example', + id: 1, + body: { + join: { + name: 'question' + }, + body: 'I have Windows 2003 server and i bought a new Windows 2008 server...', + title: 'Whats the best way to file transfer my site from server to a newer one?', + tags: [ + 'windows-server-2003', + 'windows-server-2008', + 'file-transfer' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/d8310e5606c61e7a6e64a90838b1a830.asciidoc b/docs/examples/guide/d8310e5606c61e7a6e64a90838b1a830.asciidoc new file mode 100644 index 0000000000..f884f49b3a --- /dev/null +++ b/docs/examples/guide/d8310e5606c61e7a6e64a90838b1a830.asciidoc @@ -0,0 +1,43 @@ +[source, ruby] +---- +response = client.index( + index: 'parent_example', + id: 2, + routing: 1, + body: { + join: { + name: 'answer', + parent: '1' + }, + owner: { + location: 'Norfolk, United Kingdom', + display_name: 'Sam', + id: 48 + }, + body: "Unfortunately you're pretty much limited to FTP...", + creation_date: '2009-05-04T13:45:37.030' + } +) +puts response + +response = client.index( + index: 'parent_example', + id: 3, + routing: 1, + refresh: true, + body: { + join: { + name: 'answer', + parent: '1' + }, + owner: { + location: 'Norfolk, United Kingdom', + display_name: 'Troll', + id: 49 + }, + body: 'Use Linux...', + creation_date: '2009-05-05T13:45:37.030' + } +) +puts response +---- diff --git a/docs/examples/guide/dea4ac54c63a10c62eccd7b7f6543b86.asciidoc b/docs/examples/guide/dea4ac54c63a10c62eccd7b7f6543b86.asciidoc new file mode 100644 index 0000000000..f2e1dfb22a --- /dev/null +++ b/docs/examples/guide/dea4ac54c63a10c62eccd7b7f6543b86.asciidoc @@ -0,0 +1,23 @@ +[source, ruby] +---- +response = client.index( + index: 'place', + id: 1, + body: { + suggest: { + input: [ + "timmy's", + 'starbucks', + 'dunkin donuts' + ], + contexts: { + place_type: [ + 'cafe', + 'food' + ] + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/df1336e768fb6fc1826a5afa30a57285.asciidoc b/docs/examples/guide/df1336e768fb6fc1826a5afa30a57285.asciidoc new file mode 100644 index 0000000000..35589a0a25 --- /dev/null +++ b/docs/examples/guide/df1336e768fb6fc1826a5afa30a57285.asciidoc @@ -0,0 +1,14 @@ +[source, ruby] +---- +response = client.index( + index: 'my-data-stream', + body: { + "@timestamp": '2099-03-08T11:06:07.000Z', + user: { + id: '8a4f500d' + }, + message: 'Login successful' + } +) +puts response +---- diff --git a/docs/examples/guide/dfdf82b8d99436582f150117695190b3.asciidoc b/docs/examples/guide/dfdf82b8d99436582f150117695190b3.asciidoc new file mode 100644 index 0000000000..d22bd4f8f9 --- /dev/null +++ b/docs/examples/guide/dfdf82b8d99436582f150117695190b3.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.index( + index: 'child_example', + id: 1, + body: { + join: { + name: 'question' + }, + body: 'I have Windows 2003 server and i bought a new Windows 2008 server...', + title: 'Whats the best way to file transfer my site from server to a newer one?', + tags: [ + 'windows-server-2003', + 'windows-server-2008', + 'file-transfer' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/e3f2f6ee3e312b8a90634827ae954d70.asciidoc b/docs/examples/guide/e3f2f6ee3e312b8a90634827ae954d70.asciidoc new file mode 100644 index 0000000000..5433a1f0cb --- /dev/null +++ b/docs/examples/guide/e3f2f6ee3e312b8a90634827ae954d70.asciidoc @@ -0,0 +1,34 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'GeometryCollection', + geometries: [ + { + type: 'Point', + coordinates: [ + 100, + 0 + ] + }, + { + type: 'LineString', + coordinates: [ + [ + 101, + 0 + ], + [ + 102, + 1 + ] + ] + } + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/e9fe3b53b5b6e1ff9566b5237c0fa513.asciidoc b/docs/examples/guide/e9fe3b53b5b6e1ff9566b5237c0fa513.asciidoc new file mode 100644 index 0000000000..f23e07bfc5 --- /dev/null +++ b/docs/examples/guide/e9fe3b53b5b6e1ff9566b5237c0fa513.asciidoc @@ -0,0 +1,43 @@ +[source, ruby] +---- +response = client.index( + index: 'child_example', + id: 2, + routing: 1, + body: { + join: { + name: 'answer', + parent: '1' + }, + owner: { + location: 'Norfolk, United Kingdom', + display_name: 'Sam', + id: 48 + }, + body: "Unfortunately you're pretty much limited to FTP...", + creation_date: '2009-05-04T13:45:37.030' + } +) +puts response + +response = client.index( + index: 'child_example', + id: 3, + routing: 1, + refresh: true, + body: { + join: { + name: 'answer', + parent: '1' + }, + owner: { + location: 'Norfolk, United Kingdom', + display_name: 'Troll', + id: 49 + }, + body: 'Use Linux...', + creation_date: '2009-05-05T13:45:37.030' + } +) +puts response +---- diff --git a/docs/examples/guide/ea020ea32d5cd35e577c61a120f92451.asciidoc b/docs/examples/guide/ea020ea32d5cd35e577c61a120f92451.asciidoc new file mode 100644 index 0000000000..0272c02798 --- /dev/null +++ b/docs/examples/guide/ea020ea32d5cd35e577c61a120f92451.asciidoc @@ -0,0 +1,32 @@ +[source, ruby] +---- +response = client.bulk( + index: 'my-data-stream', + body: [ + { + create: {} + }, + { + "@timestamp": '2099-05-06T16:21:15.000Z', + message: '192.0.2.42 - - [06/May/2099:16:21:15 +0000] "GET /images/bg.jpg HTTP/1.0" 200 24736' + }, + { + create: {} + }, + { + "@timestamp": '2099-05-06T16:25:42.000Z', + message: '192.0.2.255 - - [06/May/2099:16:25:42 +0000] "GET /favicon.ico HTTP/1.0" 200 3638' + } + ] +) +puts response + +response = client.index( + index: 'my-data-stream', + body: { + "@timestamp": '2099-05-06T16:21:15.000Z', + message: '192.0.2.42 - - [06/May/2099:16:21:15 +0000] "GET /images/bg.jpg HTTP/1.0" 200 24736' + } +) +puts response +---- diff --git a/docs/examples/guide/f5eed3f2e3558a238487bc85305b7a71.asciidoc b/docs/examples/guide/f5eed3f2e3558a238487bc85305b7a71.asciidoc new file mode 100644 index 0000000000..df847e9ade --- /dev/null +++ b/docs/examples/guide/f5eed3f2e3558a238487bc85305b7a71.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0))' + } +) +puts response +---- diff --git a/docs/examples/guide/f9a315ea99bed0cf2f36be1d74eb3e4a.asciidoc b/docs/examples/guide/f9a315ea99bed0cf2f36be1d74eb3e4a.asciidoc new file mode 100644 index 0000000000..27b502a47b --- /dev/null +++ b/docs/examples/guide/f9a315ea99bed0cf2f36be1d74eb3e4a.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: 'MULTIPOLYGON (((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0, 102.0 2.0)), ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))' + } +) +puts response +---- diff --git a/docs/examples/guide/fb3505d976283fb7c7b9705a761e0dc2.asciidoc b/docs/examples/guide/fb3505d976283fb7c7b9705a761e0dc2.asciidoc new file mode 100644 index 0000000000..b34a9e90c6 --- /dev/null +++ b/docs/examples/guide/fb3505d976283fb7c7b9705a761e0dc2.asciidoc @@ -0,0 +1,37 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'polygon', + orientation: 'clockwise', + coordinates: [ + [ + [ + 1000, + 1000 + ], + [ + 1000, + 1001 + ], + [ + 1001, + 1001 + ], + [ + 1001, + 1000 + ], + [ + 1000, + 1000 + ] + ] + ] + } + } +) +puts response +---- diff --git a/docs/examples/guide/fc51fbc60b0e20aac83300a43ad90252.asciidoc b/docs/examples/guide/fc51fbc60b0e20aac83300a43ad90252.asciidoc new file mode 100644 index 0000000000..d06eb139cc --- /dev/null +++ b/docs/examples/guide/fc51fbc60b0e20aac83300a43ad90252.asciidoc @@ -0,0 +1,34 @@ +[source, ruby] +---- +response = client.index( + index: 'example', + body: { + location: { + type: 'geometrycollection', + geometries: [ + { + type: 'point', + coordinates: [ + 1000, + 100 + ] + }, + { + type: 'linestring', + coordinates: [ + [ + 1001, + 100 + ], + [ + 1002, + 100 + ] + ] + } + ] + } + } +) +puts response +---- From 172dc146f1ffc895fd87fdd972e12d06f1454c75 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 26 Sep 2023 12:26:36 +0100 Subject: [PATCH 046/540] [DOCS] Accepts 201 as successful status in automatic docs generation --- rake_tasks/doc_generator.rake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rake_tasks/doc_generator.rake b/rake_tasks/doc_generator.rake index 810430253d..0089fd51e6 100644 --- a/rake_tasks/doc_generator.rake +++ b/rake_tasks/doc_generator.rake @@ -203,6 +203,9 @@ module TestDocs def self.response_successful(response) [true, false].include?(response) || - (response.is_a?(Elasticsearch::API::Response) && response.status == 200) + ( + response.is_a?(Elasticsearch::API::Response) && + [200, 201].include?(response.status) + ) end end From 1aa7fd9193fba5581addb4697ca4e2df43ffed67 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 26 Sep 2023 13:35:11 +0100 Subject: [PATCH 047/540] [DOCS] Updates generated docs with symbol => syntax --- .../0091fc75271b1fbbd4269622a4881e8b.asciidoc | 2 +- .../01c0e302f4fd5118faf5e34f4a010ebf.asciidoc | 2 +- .../0502284d4685c478eb68761f979f4303.asciidoc | 2 +- .../06d65e3505dcb306977185e8545cf4a8.asciidoc | 2 +- .../070cf72783cfe534a04f2f64e4016052.asciidoc | 4 ++-- .../083e514297c09e91211f0d168aef1b0b.asciidoc | 2 +- .../091200b658023db31dffc2f08a85a9cc.asciidoc | 2 +- .../0957bbd535f58c97b12ffba90813d64c.asciidoc | 2 +- .../09a478fe32a7b7d814083ffa5297bcdf.asciidoc | 2 +- .../09bdf9a7e22733d668476724042a406c.asciidoc | 2 +- .../0a3003fa5af850e415634b50b1029859.asciidoc | 2 +- .../0a84c5b7c0793be745b13eaf13e94422.asciidoc | 2 +- .../0ac5ec27c129b9541a6ddad6aeea1276.asciidoc | 2 +- .../0ac9e7dd7e4acba51888256326ed5ffe.asciidoc | 2 +- .../0cf29da4b9f0503bd1a79bdc883aadbc.asciidoc | 2 +- .../0e83f140237d75469a428ff403564bb5.asciidoc | 8 ++++---- .../0f2e5e006b663a88ee99b130ab1b4844.asciidoc | 2 +- .../0f3a78296825d507dda6771f7ceb9d61.asciidoc | 2 +- .../11e8d6e14686efabb8634b6522c05cb5.asciidoc | 2 +- .../1295f51b9e5d4ba9987b02478146b50b.asciidoc | 6 +++--- .../1302e24b0476e0e9af7a2c890edf9f62.asciidoc | 2 +- .../13cc51ca3a783cdbb1f1d353eaedbf23.asciidoc | 2 +- .../13d90ba227131aefbf4fcfd5992e662a.asciidoc | 6 +++--- .../154d703732daf5c5fcd0122e6a50213f.asciidoc | 4 ++-- .../156bc64c94f9f3334fbce25165d2286a.asciidoc | 4 ++-- .../17e6f3fac556f08a78f7a876e71acb89.asciidoc | 2 +- .../17fb298fb1e47f7d946a772d68f4e2df.asciidoc | 2 +- .../1b5c8d6e61930a308008b5b1ace2aa07.asciidoc | 2 +- .../1c5a5a8c0bdc3c577f560157bd4e2313.asciidoc | 2 +- .../1cb3b45335ab1b9697c358104d44ea39.asciidoc | 2 +- .../1cd3b9d65576a9212eef898eb3105758.asciidoc | 2 +- .../1d918e206ad8dab916e59183da24d9ec.asciidoc | 2 +- .../1eb9c6ecb827ca69f7b17f7d2a26eae9.asciidoc | 2 +- .../1f507659757e2844cefced25848540a0.asciidoc | 2 +- .../1f6a190fa1aade1fb66680388f184ef9.asciidoc | 2 +- .../2051ffe025550ab6645bfd525eaed3c4.asciidoc | 2 +- .../21d0ab6e420bfe7a1639db6af5b2e9c0.asciidoc | 2 +- .../2224143c45dfc83a2d10b98cd4f94bb5.asciidoc | 2 +- .../2238ac4170275f6cfc2af49c3f014cbc.asciidoc | 2 +- .../23af230e824f48b9cd56a4cf973d788c.asciidoc | 16 ++++++++-------- .../24ad3c234f69f55a3fbe2d488e70178a.asciidoc | 2 +- .../24d66b2ebdf662d8b03e17214e65c825.asciidoc | 2 +- .../25d40d3049e57e2bb70c2c5b88bd7b87.asciidoc | 2 +- .../27384266370152add76471dd0332a2f1.asciidoc | 2 +- .../279e2b29261971999923fdc658bba8ff.asciidoc | 2 +- .../28ac880057135e46b3b00c7f3976538c.asciidoc | 2 +- .../28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc | 2 +- .../2a91e1fb8ad93a188fa9d77ec01bc431.asciidoc | 2 +- .../2b23a0e5fc29fa57da48c50b41909951.asciidoc | 2 +- .../2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc | 4 ++-- .../2c3dff44904d3d73ff47f1afe89c7f86.asciidoc | 2 +- .../2da48241cfc21d2c57dc970845470bda.asciidoc | 10 +++++----- .../2e796e5ca59768d4426abbf9a049db3e.asciidoc | 2 +- .../2f4a55dfeba8851b306ef9c1b216ef54.asciidoc | 2 +- .../2f67db5e4d6c958258c3d70fb2d0b1c8.asciidoc | 2 +- .../2fa45d74ba9933188c4728f8a9e5372c.asciidoc | 6 +++--- .../32123981430e5a8b34fe14314fc48429.asciidoc | 2 +- .../32de5dd306bd014d67053d2f175defcd.asciidoc | 2 +- .../34d51c54b62e9a160c0ddacc10134bb0.asciidoc | 2 +- .../362dfccdb6f7933b22c909542e0b4e0a.asciidoc | 2 +- .../377af0ea9b19c113f224d8150890b41b.asciidoc | 8 ++++---- .../39ce44333d28ed2b833722d3e3cb06f3.asciidoc | 6 +++--- .../3a2953fd81d65118a776c87a81530e15.asciidoc | 2 +- .../3af10fde8138d9d95df127d39d9a0ed2.asciidoc | 2 +- .../3c09ca91057216125ed0e3856a91ff95.asciidoc | 2 +- .../3c65cb58e131ef46f4dd081683b970ac.asciidoc | 2 +- .../3c7621a81fa982b79f040a6d2611530e.asciidoc | 4 ++-- .../3da35090e093c2d83c3b7d0d83bcb4ae.asciidoc | 2 +- .../3e278e6c193b4c17dbdc70670e15d78c.asciidoc | 2 +- .../3ed39eb60fbfafb70f7825b8d103bf17.asciidoc | 2 +- .../3fb2f41ad229a31ad3ae408cc50cbed5.asciidoc | 2 +- .../4053de806dfd9172167999ce098107c4.asciidoc | 2 +- .../416a3ba11232d3c078c1c31340cf356f.asciidoc | 2 +- .../4207219a892339e8f3abe0df8723dd27.asciidoc | 2 +- .../43854be6aae61edbea5f9ab988cb4ce5.asciidoc | 2 +- .../4435b654994b575ba181ea679871c78c.asciidoc | 2 +- .../445f8a6ef75fb43da52990b3a9063c78.asciidoc | 2 +- .../4498b9d3b0c77e1b9ef6664ff5963ce2.asciidoc | 2 +- .../44da736ce0e1587c1e7c45eee606ead7.asciidoc | 2 +- .../455029c3d66306ad5d48f6dbddaf7324.asciidoc | 4 ++-- .../45c6e54a9c9e08623af96752b4bde346.asciidoc | 2 +- .../45ef5156dbd2d3fd4fd22b8d99f7aad4.asciidoc | 2 +- .../4670dd81a9865e07ae74ae8b0266e384.asciidoc | 2 +- .../4824a823a830a2a5d990eacfd783ac22.asciidoc | 4 ++-- .../4a7510a9c0468303658383c00796dad2.asciidoc | 2 +- .../4aa510f34a0358fecc8d764dd099b843.asciidoc | 6 +++--- .../4ae494d1e62231e832fc0436b04e2014.asciidoc | 2 +- .../4af15c4f26ddefb9c350e7a246a66a15.asciidoc | 2 +- .../4bba59cf745ac7b996bf90308bc26957.asciidoc | 2 +- .../4bfcb2861f1d572bd0d66acd66deab0b.asciidoc | 2 +- .../4f621ab694f62ddb89e0684a9e76c4d1.asciidoc | 2 +- .../50522d3d5b3d055f712ad737e3d1707a.asciidoc | 2 +- .../518fcf1dc1edd7dba0864accf71b49f4.asciidoc | 2 +- .../51f6cb682424e110f289af79c106f4c7.asciidoc | 2 +- .../53aa8b21e2b1c4d48960343711296704.asciidoc | 2 +- .../53bb7f0e3429861aadb8dd3d588085cd.asciidoc | 2 +- .../548b85bd9e6e7d33e36133953869449b.asciidoc | 2 +- .../55096381f811388fafd8e244dd2402c8.asciidoc | 2 +- .../5553cf7a02c22f616cd994747f2dd5a5.asciidoc | 4 ++-- .../55838e0b21c4f4da2dc8aaec045a6d5f.asciidoc | 2 +- .../565908b03edff1d6e6e7cdfb92177faf.asciidoc | 2 +- .../578808065fee8691355b8f25c35782cd.asciidoc | 2 +- .../58f72be60c25752d7899a35fc60fe6eb.asciidoc | 2 +- .../591bf50bb5ad3134006efe5c3f46d7a6.asciidoc | 2 +- .../5969c446688c8b326acc80276573e9d2.asciidoc | 8 ++++---- .../5a7f05ab1d05b4eef5ff327168517165.asciidoc | 2 +- .../5e2f7097eb299de553d0fa0087d70a59.asciidoc | 4 ++-- .../6352e846bb83725ae6d853aa64d8697d.asciidoc | 2 +- .../640da6dd719a34975b5627dfa5fcdd55.asciidoc | 2 +- .../640e4f2c2d29f9851320a70927bd7a6c.asciidoc | 2 +- .../64622409407316d2d47094e692d9b516.asciidoc | 2 +- .../657cf67bbc48f3b8c7fa15e275a5ef72.asciidoc | 2 +- .../6856f7c6a732ab55ca71c1ee2ec2bbad.asciidoc | 4 ++-- .../698e0a2b67ba7842caa801d9ef46ebe3.asciidoc | 2 +- .../69d9b8fd364596aa37eae6864d8a6d89.asciidoc | 2 +- .../6a3a578ce37fb2c63ccfab7f75db9bae.asciidoc | 4 ++-- .../6aa2941855d13f365f70aa8767ecb137.asciidoc | 2 +- .../6af9dc1c3240aa8e623ff3622bcb1b48.asciidoc | 2 +- .../6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc | 4 ++-- .../6c72f6791ba9223943f7556c5bfaa728.asciidoc | 2 +- .../6cd083045bf06e80b83889a939a18451.asciidoc | 10 +++++----- .../6cf3307c00f464c46475e352e067d714.asciidoc | 2 +- .../6ea062455229151e311869a81ee40252.asciidoc | 6 +++--- .../6f2208e90810ea6da751fe25fcf456ec.asciidoc | 4 ++-- .../7067a498bb6c788854a26443a64b843a.asciidoc | 4 ++-- .../711443504b69d0d296e717c716a223e2.asciidoc | 4 ++-- .../73250f845738c428246a3ade66a8f54c.asciidoc | 2 +- .../73be1f93d789264e5b972ddb5991bc66.asciidoc | 2 +- .../73ebc89cb32adb389ae16bb088d7c7e6.asciidoc | 2 +- .../7456ef459d510d66ba4492cc9fbdc6c6.asciidoc | 2 +- .../747a4b5001423938d7d05399d28f1995.asciidoc | 2 +- .../75c347b181112d2c4538c01ade903afe.asciidoc | 2 +- .../76c167d8ab305cb43b594f140c902dfe.asciidoc | 6 +++--- .../790c49fe2ec638e5e8db51a9236bba35.asciidoc | 2 +- .../79feb4a0c0a21b7015a52f9736cd4683.asciidoc | 2 +- .../7b3e913368e96eaa6e22e0d03c81310e.asciidoc | 2 +- .../7b7a828c21c856a3cbc41fd2f85108bf.asciidoc | 2 +- .../7fe9f0a583e079f7fc6fd64d12b6e9e5.asciidoc | 2 +- .../81612c2537386e031b7eb604f6756a71.asciidoc | 2 +- .../8194f1fae6aa72ab91ea559daad932d4.asciidoc | 2 +- .../819e00cc6547d925d80090b94e0650d7.asciidoc | 2 +- .../820f689eaaef15fc07abd1073fa880f8.asciidoc | 2 +- .../844928da2ff9a1394af5347a5e2e4f78.asciidoc | 10 +++++----- .../84f3e8524f6ff80e870c03ab71551538.asciidoc | 2 +- .../85519a614ae18c998986d46bbad82b76.asciidoc | 4 ++-- .../8582e918a6275472d2eba2e95f1dbe77.asciidoc | 18 +++++++++--------- .../863253bf0ab7d227ff72a0a384f4de8c.asciidoc | 2 +- .../867f7d43a78066731ead2e223960fc07.asciidoc | 2 +- .../8703f3b1b3895543abc36e2a7a0013d3.asciidoc | 4 ++-- .../87416e6a1ca2da324dbed6deb05303eb.asciidoc | 4 ++-- .../88b19973b970adf9b73fca82017d4951.asciidoc | 2 +- .../8b301122cbf42be6eafeda714a36559e.asciidoc | 12 ++++++------ .../8b7956a2b88fd798a895d3466d671b58.asciidoc | 4 ++-- .../8d421c5bec38eecce4679b219cacc9db.asciidoc | 2 +- .../8d7193902a353872740a3324c60c5001.asciidoc | 4 ++-- .../8e286a205a1f84f888a6d99f2620c80e.asciidoc | 2 +- .../8f0c5c81cdb902c136db821947ee70a1.asciidoc | 2 +- .../9501e6c8e95c21838653ea15b9b7ed5f.asciidoc | 2 +- .../956cb470258024af964cd2dabbaf7c7c.asciidoc | 4 ++-- .../95c03bdef4faf6bef039c986f4cb3aba.asciidoc | 2 +- .../96b9289c3c4c6b135ab3386562c4ee8d.asciidoc | 2 +- .../97f5df84efec655f479fad78bc392d4d.asciidoc | 2 +- .../983fbb78e57e8fe98db38cf2d217e943.asciidoc | 2 +- .../991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc | 4 ++-- .../998651b98e152add530084a631a4ab5a.asciidoc | 2 +- .../9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc | 4 ++-- .../9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc | 4 ++-- .../9beb260834f8cfb240f6308950dbb9c2.asciidoc | 2 +- .../9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc | 2 +- .../9f22a0920cc763eefa233ced963d9624.asciidoc | 2 +- .../9feff356f302ea4915347ab71cc4887a.asciidoc | 2 +- .../a0497157fdefecd04e597edb800a1a95.asciidoc | 2 +- .../a0c64894f14d28b7e0c902add71d2e9a.asciidoc | 2 +- .../a0d53dcb3df938fc0a01d248571a41e4.asciidoc | 2 +- .../a1f70bc71b763b58206814c40a7440e7.asciidoc | 2 +- .../a425fcab60f603504becee7d001f0a4b.asciidoc | 2 +- .../a4709da258a667cae4199ec3a1e84b3b.asciidoc | 2 +- .../a735081e715d385b4d471eea0f2b57da.asciidoc | 2 +- .../a810da963d3b28d79dcd17be829bb271.asciidoc | 2 +- .../a941fd568f2e20e13df909ab24506073.asciidoc | 2 +- .../a9554396506888e392a1aee0ca28e6fc.asciidoc | 2 +- .../a99bf70ae38bdf1c6f350140b25e0422.asciidoc | 2 +- .../aaba346e0becdf12db13658296e0b8a1.asciidoc | 4 ++-- .../ac73895ca1882cd1ac65b1facfbb5c63.asciidoc | 2 +- .../ac85e05c0bf2fd5099fbcb9c492f447e.asciidoc | 2 +- .../aee4734ee63dbbbd12a21ee886f7a829.asciidoc | 2 +- .../b10668cc742e666fe0eb6a53fd38a93e.asciidoc | 2 +- .../b1f7cb4157b13368373383abd7d2b8cb.asciidoc | 6 +++--- .../b2652b1763a5fd31e95c983869b433bd.asciidoc | 4 ++-- .../b2e4f3257c0e0aa3311f7270034bbc42.asciidoc | 4 ++-- .../b4d1fc887e40885cdf6ac2d01487cb76.asciidoc | 2 +- .../b557f114e21dbc6f531d4e7621a08e8f.asciidoc | 2 +- .../b583bf8d3a2f49d633aa2cfed5606418.asciidoc | 2 +- .../b58b17975bbce307b2ccce5051a449e8.asciidoc | 2 +- .../b638e11d6a8a084290f8934d224abd52.asciidoc | 2 +- .../b67fa8c560dd10a8e6f226048cd21562.asciidoc | 4 ++-- .../b724f547c5d67e95bbc0a9920e47033c.asciidoc | 2 +- .../b7a9f60b3646efe3834ca8381f8aa560.asciidoc | 2 +- .../bd298b11933605c641626750c981d70b.asciidoc | 6 +++--- .../bd7330af2609bdd8aa10958f5e640b93.asciidoc | 2 +- .../bd93b6f99ed785cf7520370a4cf6b834.asciidoc | 2 +- .../beba2a9795c8a13653e1edf64eec4357.asciidoc | 4 ++-- .../c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc | 2 +- .../c147de68fd6da032ad4a3c1bf626f5d6.asciidoc | 2 +- .../c43fd2f25f78e6286fe9a5d08dc31446.asciidoc | 2 +- .../c639036b87d02fb864e27c4ca29ef833.asciidoc | 2 +- .../c6b365c7da97d7e50f36820a7d36f548.asciidoc | 2 +- .../c6d5e3b6ff9c665ec5344a4bfa7add80.asciidoc | 4 ++-- .../c8210f23c10d0642f24c1e43faa4deda.asciidoc | 2 +- .../c9d9a1d751f20f6197c825cb4378fe9f.asciidoc | 2 +- .../ca06db2aa4747910278f96315f7be94b.asciidoc | 2 +- .../ca08e511e5907d258081b10a1a9f0072.asciidoc | 4 ++-- .../cafed0e2c2b1d1574eb4a5ecd514a97a.asciidoc | 2 +- .../cb0c3223fd45148497df73adfba2e9ce.asciidoc | 2 +- .../cc7f1c74ede6810e2c9db19256d6b653.asciidoc | 2 +- .../cdd7127681254f4d614cc075f9e6fbcf.asciidoc | 2 +- .../cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc | 2 +- .../ce247fc08371e1b30cb52195e521c076.asciidoc | 2 +- .../ce899fcf55da72fc32e623d1ad88b301.asciidoc | 2 +- .../cf23f18761df33f08bc6f6d1875496fd.asciidoc | 2 +- .../cf5dab4334783ca9b8942eab68fb7174.asciidoc | 2 +- .../d01d309b0257d6fbca6d0941adeb3256.asciidoc | 4 ++-- .../d0546f047359b85a7e98207dc8de896a.asciidoc | 2 +- .../d05b2a37106fce0ebbd41e2fd6bd26c2.asciidoc | 4 ++-- .../d13c7cdfc976e0c7b70737cd6a7becb8.asciidoc | 2 +- .../d4fb482a51d67a1af48e429af6019a46.asciidoc | 4 ++-- .../d64d509440afbed7cefd04b6898962eb.asciidoc | 2 +- .../d66e2b4d1931bf88c72e74670156e43f.asciidoc | 2 +- .../d690a6af462c70a783625a323e11c72c.asciidoc | 2 +- .../d6c3659339ef4f2d47425e09eccbf939.asciidoc | 6 +++--- .../d70f55cd29cdb2dcd775ffa9e23ff393.asciidoc | 2 +- .../d979f934af0992fb8c8596beff80b638.asciidoc | 2 +- .../da3cecc36a7313385d32c7f52ccfb7e3.asciidoc | 2 +- .../daae2e6acebc84e537764f4ba07f2e6e.asciidoc | 2 +- .../dad2d4add751fde5c39475ca709cc14b.asciidoc | 2 +- .../dc3b7603e7d688106acb804059af7834.asciidoc | 2 +- .../dd360e1cf42ad897e2ab9e785a45466f.asciidoc | 4 ++-- .../de139866a220124360e5e27d1a736ea4.asciidoc | 4 ++-- .../de876505acc75d371d1f6f484c449197.asciidoc | 2 +- .../dead0682932ea6ec33c1197017bcb209.asciidoc | 2 +- .../df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc | 2 +- .../dfb20907cfc5ac520ea3b1dba5f00811.asciidoc | 2 +- .../e12f2d2ddca387630e7855a6db952da2.asciidoc | 2 +- .../e20037f66bf54bcac7d10f536f031f34.asciidoc | 2 +- .../e26c96978096ccc592849cca9db67ffc.asciidoc | 2 +- .../e2b4867a9f72bda87ebaa3608d3fba4c.asciidoc | 2 +- .../e317a8380dfbc76c4e7f23d0997b3518.asciidoc | 2 +- .../e3b3a8ae12ab947ad3ba96eb228402ca.asciidoc | 2 +- .../e46c83db1580e14be844079cd008f518.asciidoc | 2 +- .../e58833449d01379df20ad06dc28144d8.asciidoc | 2 +- .../e5901f48eb8a419b878fc2cb815d8691.asciidoc | 2 +- .../e5f8f83df37ab2296dc4bfed95d7aba7.asciidoc | 2 +- .../e608cd0c034f6c245ea87f425e09ce2f.asciidoc | 2 +- .../e6369e7cef82d881af593d5526bf79bd.asciidoc | 2 +- .../e642be44a62a89cf4afb2db28220c9a9.asciidoc | 4 ++-- .../e84e23232c7ecc8d6377ec2c16a60269.asciidoc | 2 +- .../e93ff228ab3e63738e1c83fdfb7424b9.asciidoc | 2 +- .../e9f9e184499a793828233e536fac0487.asciidoc | 2 +- .../ea5b4d2d87fd4e040afad18903c44869.asciidoc | 2 +- .../eada8af6588584ac88f1e5b15f4a5c2a.asciidoc | 4 ++-- .../eae8931d01b3b878dd0c45214121e662.asciidoc | 2 +- .../eaf6a846ded090fd6ac48269ad2b328b.asciidoc | 4 ++-- .../ec8f176ebf436d5719bdeca4a9ea8220.asciidoc | 2 +- .../ed27843eff311f3011b679e97e6fda50.asciidoc | 2 +- .../ed5c3b45e8de912faba44507d827eb93.asciidoc | 2 +- .../ed688d86eeaa4d7969acb0f574eb917f.asciidoc | 2 +- .../edae616e1244babf6032aecc6aaaf836.asciidoc | 2 +- .../eec051555c8050d017d3fe38ea59e3a0.asciidoc | 2 +- .../ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc | 2 +- .../eff8ecaed1ed084909c64450fc363a20.asciidoc | 2 +- .../f0bfc8d7ab4eb94ea5fdf2e087d8cf5b.asciidoc | 2 +- .../f1dc6f69453867ffafe86e998dd464d9.asciidoc | 2 +- .../f2f1cae094855a45fd8f73478bec8e70.asciidoc | 2 +- .../f3594de7ef39ab09b0bb12c1e76bfe6b.asciidoc | 4 ++-- .../f495f9c99916a05e3b28166d31955fad.asciidoc | 2 +- .../f4dc1286d0a2f8d1fde64fbf12fd9f8d.asciidoc | 16 ++++++++-------- .../f58969ac405db85f439c5940d014964b.asciidoc | 2 +- .../f589cb2b789b4a16ed78183f2349a735.asciidoc | 4 ++-- .../f5cbbb60ca26867a5d2da625a68a6e65.asciidoc | 8 ++++---- .../f743225f1abcbc341e991a0e79ea89bc.asciidoc | 2 +- .../f8a0010753b1ff563dc42d703902d2fa.asciidoc | 2 +- .../f98687271e1bec031cc34d05d8f4b60b.asciidoc | 2 +- .../fbb38243221c8fb311660616e3add9ce.asciidoc | 2 +- .../fbc5ab85b908480bf944b55da0a43488.asciidoc | 2 +- .../fbdad6620eb645f5f1f02e3673604d01.asciidoc | 2 +- .../ff05842419968a2141bde0371ac2f6f4.asciidoc | 2 +- .../ff8317bbd60e9dfc6bf007028a18b531.asciidoc | 2 +- 287 files changed, 399 insertions(+), 399 deletions(-) diff --git a/docs/examples/guide/0091fc75271b1fbbd4269622a4881e8b.asciidoc b/docs/examples/guide/0091fc75271b1fbbd4269622a4881e8b.asciidoc index ece3af94cb..5a97c4fcb7 100644 --- a/docs/examples/guide/0091fc75271b1fbbd4269622a4881e8b.asciidoc +++ b/docs/examples/guide/0091fc75271b1fbbd4269622a4881e8b.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { match: { - "http.clientip": '40.135.0.0' + 'http.clientip' => '40.135.0.0' } }, fields: [ diff --git a/docs/examples/guide/01c0e302f4fd5118faf5e34f4a010ebf.asciidoc b/docs/examples/guide/01c0e302f4fd5118faf5e34f4a010ebf.asciidoc index d021935d69..eba384ee21 100644 --- a/docs/examples/guide/01c0e302f4fd5118faf5e34f4a010ebf.asciidoc +++ b/docs/examples/guide/01c0e302f4fd5118faf5e34f4a010ebf.asciidoc @@ -4,7 +4,7 @@ response = client.indices.put_settings( index: 'my_source_index', body: { settings: { - "index.blocks.write": true + 'index.blocks.write' => true } } ) diff --git a/docs/examples/guide/0502284d4685c478eb68761f979f4303.asciidoc b/docs/examples/guide/0502284d4685c478eb68761f979f4303.asciidoc index 9e21512aee..3a918f0cf8 100644 --- a/docs/examples/guide/0502284d4685c478eb68761f979f4303.asciidoc +++ b/docs/examples/guide/0502284d4685c478eb68761f979f4303.asciidoc @@ -8,7 +8,7 @@ response = client.ml.evaluate_data_frame( filter: [ { term: { - "ml.is_training": false + 'ml.is_training' => false } } ] diff --git a/docs/examples/guide/06d65e3505dcb306977185e8545cf4a8.asciidoc b/docs/examples/guide/06d65e3505dcb306977185e8545cf4a8.asciidoc index e6935f0668..8ea30df5e7 100644 --- a/docs/examples/guide/06d65e3505dcb306977185e8545cf4a8.asciidoc +++ b/docs/examples/guide/06d65e3505dcb306977185e8545cf4a8.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.routing.allocation.total_shards_per_node": 400 + 'cluster.routing.allocation.total_shards_per_node' => 400 } } ) diff --git a/docs/examples/guide/070cf72783cfe534a04f2f64e4016052.asciidoc b/docs/examples/guide/070cf72783cfe534a04f2f64e4016052.asciidoc index d5d2d06587..c9cd446c1f 100644 --- a/docs/examples/guide/070cf72783cfe534a04f2f64e4016052.asciidoc +++ b/docs/examples/guide/070cf72783cfe534a04f2f64e4016052.asciidoc @@ -15,8 +15,8 @@ response = client.index( id: 'metric_1', body: { time: '100ms', - "time.min": '10ms', - "time.max": '900ms' + 'time.min' => '10ms', + 'time.max' => '900ms' } ) puts response diff --git a/docs/examples/guide/083e514297c09e91211f0d168aef1b0b.asciidoc b/docs/examples/guide/083e514297c09e91211f0d168aef1b0b.asciidoc index c2a75d4461..12732cfa40 100644 --- a/docs/examples/guide/083e514297c09e91211f0d168aef1b0b.asciidoc +++ b/docs/examples/guide/083e514297c09e91211f0d168aef1b0b.asciidoc @@ -5,7 +5,7 @@ response = client.update_by_query( body: { query: { match: { - "event.sequence": '97' + 'event.sequence' => '97' } }, script: { diff --git a/docs/examples/guide/091200b658023db31dffc2f08a85a9cc.asciidoc b/docs/examples/guide/091200b658023db31dffc2f08a85a9cc.asciidoc index ab4f18e035..2978aa101a 100644 --- a/docs/examples/guide/091200b658023db31dffc2f08a85a9cc.asciidoc +++ b/docs/examples/guide/091200b658023db31dffc2f08a85a9cc.asciidoc @@ -4,7 +4,7 @@ response = client.indices.put_settings( index: 'my-index-000001', body: { index: { - "routing.allocation.total_shards_per_node": -1 + 'routing.allocation.total_shards_per_node' => -1 } } ) diff --git a/docs/examples/guide/0957bbd535f58c97b12ffba90813d64c.asciidoc b/docs/examples/guide/0957bbd535f58c97b12ffba90813d64c.asciidoc index 0378daa07e..f5c1386805 100644 --- a/docs/examples/guide/0957bbd535f58c97b12ffba90813d64c.asciidoc +++ b/docs/examples/guide/0957bbd535f58c97b12ffba90813d64c.asciidoc @@ -4,7 +4,7 @@ response = client.indices.create( index: 'analyze_sample', body: { settings: { - "index.analyze.max_token_count": 20_000 + 'index.analyze.max_token_count' => 20_000 } } ) diff --git a/docs/examples/guide/09a478fe32a7b7d814083ffa5297bcdf.asciidoc b/docs/examples/guide/09a478fe32a7b7d814083ffa5297bcdf.asciidoc index 6829a3b96c..9b1e738eab 100644 --- a/docs/examples/guide/09a478fe32a7b7d814083ffa5297bcdf.asciidoc +++ b/docs/examples/guide/09a478fe32a7b7d814083ffa5297bcdf.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { fuzzy: { - "user.id": { + 'user.id' => { value: 'ki' } } diff --git a/docs/examples/guide/09bdf9a7e22733d668476724042a406c.asciidoc b/docs/examples/guide/09bdf9a7e22733d668476724042a406c.asciidoc index 062b985eee..b4cb5b0eba 100644 --- a/docs/examples/guide/09bdf9a7e22733d668476724042a406c.asciidoc +++ b/docs/examples/guide/09bdf9a7e22733d668476724042a406c.asciidoc @@ -11,7 +11,7 @@ response = client.indices.put_index_template( settings: { number_of_shards: 1, number_of_replicas: 1, - "index.lifecycle.name": 'timeseries_policy' + 'index.lifecycle.name' => 'timeseries_policy' } } } diff --git a/docs/examples/guide/0a3003fa5af850e415634b50b1029859.asciidoc b/docs/examples/guide/0a3003fa5af850e415634b50b1029859.asciidoc index 014354e582..90fe82158f 100644 --- a/docs/examples/guide/0a3003fa5af850e415634b50b1029859.asciidoc +++ b/docs/examples/guide/0a3003fa5af850e415634b50b1029859.asciidoc @@ -6,7 +6,7 @@ response = client.search( body: { query: { match: { - "event.sequence": '97' + 'event.sequence' => '97' } } } diff --git a/docs/examples/guide/0a84c5b7c0793be745b13eaf13e94422.asciidoc b/docs/examples/guide/0a84c5b7c0793be745b13eaf13e94422.asciidoc index 4a2f27239d..ebbfac8bd3 100644 --- a/docs/examples/guide/0a84c5b7c0793be745b13eaf13e94422.asciidoc +++ b/docs/examples/guide/0a84c5b7c0793be745b13eaf13e94422.asciidoc @@ -4,7 +4,7 @@ response = client.indices.put_settings( index: 'my-index-000001', body: { index: { - "routing.allocation.total_shards_per_node": '2' + 'routing.allocation.total_shards_per_node' => '2' } } ) diff --git a/docs/examples/guide/0ac5ec27c129b9541a6ddad6aeea1276.asciidoc b/docs/examples/guide/0ac5ec27c129b9541a6ddad6aeea1276.asciidoc index bf807e3171..fa698393f1 100644 --- a/docs/examples/guide/0ac5ec27c129b9541a6ddad6aeea1276.asciidoc +++ b/docs/examples/guide/0ac5ec27c129b9541a6ddad6aeea1276.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { fuzzy: { - "user.id": { + 'user.id' => { value: 'ki', fuzziness: 'AUTO', max_expansions: 50, diff --git a/docs/examples/guide/0ac9e7dd7e4acba51888256326ed5ffe.asciidoc b/docs/examples/guide/0ac9e7dd7e4acba51888256326ed5ffe.asciidoc index 5cc10e6545..06e9740778 100644 --- a/docs/examples/guide/0ac9e7dd7e4acba51888256326ed5ffe.asciidoc +++ b/docs/examples/guide/0ac9e7dd7e4acba51888256326ed5ffe.asciidoc @@ -6,7 +6,7 @@ response = client.search( track_total_hits: true, query: { match: { - "user.id": 'elkbee' + 'user.id' => 'elkbee' } } } diff --git a/docs/examples/guide/0cf29da4b9f0503bd1a79bdc883aadbc.asciidoc b/docs/examples/guide/0cf29da4b9f0503bd1a79bdc883aadbc.asciidoc index f962665195..642fe40df3 100644 --- a/docs/examples/guide/0cf29da4b9f0503bd1a79bdc883aadbc.asciidoc +++ b/docs/examples/guide/0cf29da4b9f0503bd1a79bdc883aadbc.asciidoc @@ -5,7 +5,7 @@ response = client.search( size: 0, body: { runtime_mappings: { - "grade.corrected": { + 'grade.corrected' => { type: 'double', script: { source: "emit(Math.min(100, doc['grade'].value * params.correction))", diff --git a/docs/examples/guide/0e83f140237d75469a428ff403564bb5.asciidoc b/docs/examples/guide/0e83f140237d75469a428ff403564bb5.asciidoc index de32e24924..e81db18aed 100644 --- a/docs/examples/guide/0e83f140237d75469a428ff403564bb5.asciidoc +++ b/docs/examples/guide/0e83f140237d75469a428ff403564bb5.asciidoc @@ -3,10 +3,10 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.routing.allocation.disk.watermark.low": '100gb', - "cluster.routing.allocation.disk.watermark.high": '50gb', - "cluster.routing.allocation.disk.watermark.flood_stage": '10gb', - "cluster.info.update.interval": '1m' + 'cluster.routing.allocation.disk.watermark.low' => '100gb', + 'cluster.routing.allocation.disk.watermark.high' => '50gb', + 'cluster.routing.allocation.disk.watermark.flood_stage' => '10gb', + 'cluster.info.update.interval' => '1m' } } ) diff --git a/docs/examples/guide/0f2e5e006b663a88ee99b130ab1b4844.asciidoc b/docs/examples/guide/0f2e5e006b663a88ee99b130ab1b4844.asciidoc index 2145ec81bf..f2fe2c785b 100644 --- a/docs/examples/guide/0f2e5e006b663a88ee99b130ab1b4844.asciidoc +++ b/docs/examples/guide/0f2e5e006b663a88ee99b130ab1b4844.asciidoc @@ -5,7 +5,7 @@ response = client.search( sort: [ { _geo_distance: { - "pin.location": [ + 'pin.location' => [ [ -70, 40 diff --git a/docs/examples/guide/0f3a78296825d507dda6771f7ceb9d61.asciidoc b/docs/examples/guide/0f3a78296825d507dda6771f7ceb9d61.asciidoc index f60ab0aad9..421f3f3b1f 100644 --- a/docs/examples/guide/0f3a78296825d507dda6771f7ceb9d61.asciidoc +++ b/docs/examples/guide/0f3a78296825d507dda6771f7ceb9d61.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.routing.allocation.exclude._ip": '10.0.0.1' + 'cluster.routing.allocation.exclude._ip' => '10.0.0.1' } } ) diff --git a/docs/examples/guide/11e8d6e14686efabb8634b6522c05cb5.asciidoc b/docs/examples/guide/11e8d6e14686efabb8634b6522c05cb5.asciidoc index 55e6e14846..e7a9a68f0d 100644 --- a/docs/examples/guide/11e8d6e14686efabb8634b6522c05cb5.asciidoc +++ b/docs/examples/guide/11e8d6e14686efabb8634b6522c05cb5.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, highlight: { diff --git a/docs/examples/guide/1295f51b9e5d4ba9987b02478146b50b.asciidoc b/docs/examples/guide/1295f51b9e5d4ba9987b02478146b50b.asciidoc index 4fdef9f756..b544c7f2f3 100644 --- a/docs/examples/guide/1295f51b9e5d4ba9987b02478146b50b.asciidoc +++ b/docs/examples/guide/1295f51b9e5d4ba9987b02478146b50b.asciidoc @@ -2,7 +2,7 @@ ---- response = client.indices.put_settings( body: { - "index.max_result_window": 5000 + 'index.max_result_window' => 5000 } ) puts response @@ -10,8 +10,8 @@ puts response response = client.cluster.put_settings( body: { persistent: { - "search.max_buckets": 20_000, - "search.allow_expensive_queries": false + 'search.max_buckets' => 20_000, + 'search.allow_expensive_queries' => false } } ) diff --git a/docs/examples/guide/1302e24b0476e0e9af7a2c890edf9f62.asciidoc b/docs/examples/guide/1302e24b0476e0e9af7a2c890edf9f62.asciidoc index 996cd4e105..367c24ff6c 100644 --- a/docs/examples/guide/1302e24b0476e0e9af7a2c890edf9f62.asciidoc +++ b/docs/examples/guide/1302e24b0476e0e9af7a2c890edf9f62.asciidoc @@ -6,7 +6,7 @@ response = client.search( track_total_hits: false, query: { match: { - "user.id": 'elkbee' + 'user.id' => 'elkbee' } } } diff --git a/docs/examples/guide/13cc51ca3a783cdbb1f1d353eaedbf23.asciidoc b/docs/examples/guide/13cc51ca3a783cdbb1f1d353eaedbf23.asciidoc index 44f54dc09e..4c2688cead 100644 --- a/docs/examples/guide/13cc51ca3a783cdbb1f1d353eaedbf23.asciidoc +++ b/docs/examples/guide/13cc51ca3a783cdbb1f1d353eaedbf23.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "logger.org.elasticsearch.xpack.security.authc": 'debug' + 'logger.org.elasticsearch.xpack.security.authc' => 'debug' } } ) diff --git a/docs/examples/guide/13d90ba227131aefbf4fcfd5992e662a.asciidoc b/docs/examples/guide/13d90ba227131aefbf4fcfd5992e662a.asciidoc index fa36a229f4..5f5919e2a7 100644 --- a/docs/examples/guide/13d90ba227131aefbf4fcfd5992e662a.asciidoc +++ b/docs/examples/guide/13d90ba227131aefbf4fcfd5992e662a.asciidoc @@ -7,7 +7,7 @@ response = client.search( should: [ { match: { - "name.first": { + 'name.first' => { query: 'shay', _name: 'first' } @@ -15,7 +15,7 @@ response = client.search( }, { match: { - "name.last": { + 'name.last' => { query: 'banon', _name: 'last' } @@ -24,7 +24,7 @@ response = client.search( ], filter: { terms: { - "name.last": [ + 'name.last' => [ 'banon', 'kimchy' ], diff --git a/docs/examples/guide/154d703732daf5c5fcd0122e6a50213f.asciidoc b/docs/examples/guide/154d703732daf5c5fcd0122e6a50213f.asciidoc index 7f90b03bb1..c148862c88 100644 --- a/docs/examples/guide/154d703732daf5c5fcd0122e6a50213f.asciidoc +++ b/docs/examples/guide/154d703732daf5c5fcd0122e6a50213f.asciidoc @@ -4,10 +4,10 @@ response = client.indices.put_mapping( index: 'my-index-000001', body: { runtime: { - "measures.start": { + 'measures.start' => { type: 'long' }, - "measures.end": { + 'measures.end' => { type: 'long' } } diff --git a/docs/examples/guide/156bc64c94f9f3334fbce25165d2286a.asciidoc b/docs/examples/guide/156bc64c94f9f3334fbce25165d2286a.asciidoc index a56a0baf72..cb0e371518 100644 --- a/docs/examples/guide/156bc64c94f9f3334fbce25165d2286a.asciidoc +++ b/docs/examples/guide/156bc64c94f9f3334fbce25165d2286a.asciidoc @@ -5,8 +5,8 @@ response = client.indices.create( body: { settings: { index: { - "sort.field": 'date', - "sort.order": 'desc' + 'sort.field' => 'date', + 'sort.order' => 'desc' } }, mappings: { diff --git a/docs/examples/guide/17e6f3fac556f08a78f7a876e71acb89.asciidoc b/docs/examples/guide/17e6f3fac556f08a78f7a876e71acb89.asciidoc index 419b4f0d93..914ab1e5ae 100644 --- a/docs/examples/guide/17e6f3fac556f08a78f7a876e71acb89.asciidoc +++ b/docs/examples/guide/17e6f3fac556f08a78f7a876e71acb89.asciidoc @@ -4,7 +4,7 @@ response = client.indices.put_settings( index: '_all', body: { settings: { - "index.unassigned.node_left.delayed_timeout": '5m' + 'index.unassigned.node_left.delayed_timeout' => '5m' } } ) diff --git a/docs/examples/guide/17fb298fb1e47f7d946a772d68f4e2df.asciidoc b/docs/examples/guide/17fb298fb1e47f7d946a772d68f4e2df.asciidoc index c068872aba..b036ff9e74 100644 --- a/docs/examples/guide/17fb298fb1e47f7d946a772d68f4e2df.asciidoc +++ b/docs/examples/guide/17fb298fb1e47f7d946a772d68f4e2df.asciidoc @@ -5,7 +5,7 @@ response = client.delete_by_query( body: { query: { match: { - "user.id": 'vlb44hny' + 'user.id' => 'vlb44hny' } } } diff --git a/docs/examples/guide/1b5c8d6e61930a308008b5b1ace2aa07.asciidoc b/docs/examples/guide/1b5c8d6e61930a308008b5b1ace2aa07.asciidoc index 6b69e350c7..6630104c85 100644 --- a/docs/examples/guide/1b5c8d6e61930a308008b5b1ace2aa07.asciidoc +++ b/docs/examples/guide/1b5c8d6e61930a308008b5b1ace2aa07.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { match: { - "manager.name": 'Alice White' + 'manager.name' => 'Alice White' } }, aggregations: { diff --git a/docs/examples/guide/1c5a5a8c0bdc3c577f560157bd4e2313.asciidoc b/docs/examples/guide/1c5a5a8c0bdc3c577f560157bd4e2313.asciidoc index d021935d69..eba384ee21 100644 --- a/docs/examples/guide/1c5a5a8c0bdc3c577f560157bd4e2313.asciidoc +++ b/docs/examples/guide/1c5a5a8c0bdc3c577f560157bd4e2313.asciidoc @@ -4,7 +4,7 @@ response = client.indices.put_settings( index: 'my_source_index', body: { settings: { - "index.blocks.write": true + 'index.blocks.write' => true } } ) diff --git a/docs/examples/guide/1cb3b45335ab1b9697c358104d44ea39.asciidoc b/docs/examples/guide/1cb3b45335ab1b9697c358104d44ea39.asciidoc index fba8ebd60d..431f740523 100644 --- a/docs/examples/guide/1cb3b45335ab1b9697c358104d44ea39.asciidoc +++ b/docs/examples/guide/1cb3b45335ab1b9697c358104d44ea39.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "xpack.security.transport.filter.enabled": false + 'xpack.security.transport.filter.enabled' => false } } ) diff --git a/docs/examples/guide/1cd3b9d65576a9212eef898eb3105758.asciidoc b/docs/examples/guide/1cd3b9d65576a9212eef898eb3105758.asciidoc index 56c6f0b69e..76116fcedb 100644 --- a/docs/examples/guide/1cd3b9d65576a9212eef898eb3105758.asciidoc +++ b/docs/examples/guide/1cd3b9d65576a9212eef898eb3105758.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.routing.allocation.enable": 'primaries' + 'cluster.routing.allocation.enable' => 'primaries' } } ) diff --git a/docs/examples/guide/1d918e206ad8dab916e59183da24d9ec.asciidoc b/docs/examples/guide/1d918e206ad8dab916e59183da24d9ec.asciidoc index 0adff674d0..aa554fcd02 100644 --- a/docs/examples/guide/1d918e206ad8dab916e59183da24d9ec.asciidoc +++ b/docs/examples/guide/1d918e206ad8dab916e59183da24d9ec.asciidoc @@ -3,7 +3,7 @@ response = client.indices.put_settings( index: '.watches', body: { - "index.routing.allocation.include.role": 'watcher' + 'index.routing.allocation.include.role' => 'watcher' } ) puts response diff --git a/docs/examples/guide/1eb9c6ecb827ca69f7b17f7d2a26eae9.asciidoc b/docs/examples/guide/1eb9c6ecb827ca69f7b17f7d2a26eae9.asciidoc index c4ccf60c50..a40eec98d0 100644 --- a/docs/examples/guide/1eb9c6ecb827ca69f7b17f7d2a26eae9.asciidoc +++ b/docs/examples/guide/1eb9c6ecb827ca69f7b17f7d2a26eae9.asciidoc @@ -5,7 +5,7 @@ response = client.render_search_template( source: { query: { term: { - "url.full": '{{#url}}{{host}}/{{page}}{{/url}}' + 'url.full' => '{{#url}}{{host}}/{{page}}{{/url}}' } } }, diff --git a/docs/examples/guide/1f507659757e2844cefced25848540a0.asciidoc b/docs/examples/guide/1f507659757e2844cefced25848540a0.asciidoc index 360c711dde..4681d24d98 100644 --- a/docs/examples/guide/1f507659757e2844cefced25848540a0.asciidoc +++ b/docs/examples/guide/1f507659757e2844cefced25848540a0.asciidoc @@ -11,7 +11,7 @@ response = client.search( filter: { geo_distance: { distance: '12km', - "pin.location": [ + 'pin.location' => [ -70, 40 ] diff --git a/docs/examples/guide/1f6a190fa1aade1fb66680388f184ef9.asciidoc b/docs/examples/guide/1f6a190fa1aade1fb66680388f184ef9.asciidoc index e7ba65255b..4ab0f74b92 100644 --- a/docs/examples/guide/1f6a190fa1aade1fb66680388f184ef9.asciidoc +++ b/docs/examples/guide/1f6a190fa1aade1fb66680388f184ef9.asciidoc @@ -7,7 +7,7 @@ response = client.indices.validate_query( body: { query: { match: { - "user.id": { + 'user.id' => { query: 'kimchy', fuzziness: 'auto' } diff --git a/docs/examples/guide/2051ffe025550ab6645bfd525eaed3c4.asciidoc b/docs/examples/guide/2051ffe025550ab6645bfd525eaed3c4.asciidoc index ca39b7d159..237e9d305f 100644 --- a/docs/examples/guide/2051ffe025550ab6645bfd525eaed3c4.asciidoc +++ b/docs/examples/guide/2051ffe025550ab6645bfd525eaed3c4.asciidoc @@ -10,7 +10,7 @@ response = client.search( }, filter: { geo_bounding_box: { - "pin.location": { + 'pin.location' => { top_left: 'POINT (-74.1 40.73)', bottom_right: 'POINT (-71.12 40.01)' } diff --git a/docs/examples/guide/21d0ab6e420bfe7a1639db6af5b2e9c0.asciidoc b/docs/examples/guide/21d0ab6e420bfe7a1639db6af5b2e9c0.asciidoc index a54d1256d5..649fd51ca7 100644 --- a/docs/examples/guide/21d0ab6e420bfe7a1639db6af5b2e9c0.asciidoc +++ b/docs/examples/guide/21d0ab6e420bfe7a1639db6af5b2e9c0.asciidoc @@ -6,7 +6,7 @@ response = client.search( body: { size: 0, runtime_mappings: { - "rating.out_of_ten": { + 'rating.out_of_ten' => { type: 'long', script: { source: "emit(doc['rating'].value * params.scaleFactor)", diff --git a/docs/examples/guide/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc b/docs/examples/guide/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc index 0a349c4918..6b26b2063b 100644 --- a/docs/examples/guide/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc +++ b/docs/examples/guide/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc @@ -11,7 +11,7 @@ response = client.search( path: 'comments', query: { term: { - "comments.author": 'nik9000' + 'comments.author' => 'nik9000' } } } diff --git a/docs/examples/guide/2238ac4170275f6cfc2af49c3f014cbc.asciidoc b/docs/examples/guide/2238ac4170275f6cfc2af49c3f014cbc.asciidoc index 23fd8144ab..b56b0daa0e 100644 --- a/docs/examples/guide/2238ac4170275f6cfc2af49c3f014cbc.asciidoc +++ b/docs/examples/guide/2238ac4170275f6cfc2af49c3f014cbc.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { size: 0, runtime_mappings: { - "grade.corrected": { + 'grade.corrected' => { type: 'double', script: { source: "emit(Math.min(100, doc['grade'].value * params.correction))", diff --git a/docs/examples/guide/23af230e824f48b9cd56a4cf973d788c.asciidoc b/docs/examples/guide/23af230e824f48b9cd56a4cf973d788c.asciidoc index affb5c4321..58424f15be 100644 --- a/docs/examples/guide/23af230e824f48b9cd56a4cf973d788c.asciidoc +++ b/docs/examples/guide/23af230e824f48b9cd56a4cf973d788c.asciidoc @@ -3,14 +3,14 @@ response = client.indices.put_settings( index: 'my-index-000001', body: { - "index.search.slowlog.threshold.query.warn": '10s', - "index.search.slowlog.threshold.query.info": '5s', - "index.search.slowlog.threshold.query.debug": '2s', - "index.search.slowlog.threshold.query.trace": '500ms', - "index.search.slowlog.threshold.fetch.warn": '1s', - "index.search.slowlog.threshold.fetch.info": '800ms', - "index.search.slowlog.threshold.fetch.debug": '500ms', - "index.search.slowlog.threshold.fetch.trace": '200ms' + 'index.search.slowlog.threshold.query.warn' => '10s', + 'index.search.slowlog.threshold.query.info' => '5s', + 'index.search.slowlog.threshold.query.debug' => '2s', + 'index.search.slowlog.threshold.query.trace' => '500ms', + 'index.search.slowlog.threshold.fetch.warn' => '1s', + 'index.search.slowlog.threshold.fetch.info' => '800ms', + 'index.search.slowlog.threshold.fetch.debug' => '500ms', + 'index.search.slowlog.threshold.fetch.trace' => '200ms' } ) puts response diff --git a/docs/examples/guide/24ad3c234f69f55a3fbe2d488e70178a.asciidoc b/docs/examples/guide/24ad3c234f69f55a3fbe2d488e70178a.asciidoc index 2a69b8cb1a..938c15b190 100644 --- a/docs/examples/guide/24ad3c234f69f55a3fbe2d488e70178a.asciidoc +++ b/docs/examples/guide/24ad3c234f69f55a3fbe2d488e70178a.asciidoc @@ -5,7 +5,7 @@ response = client.ml.evaluate_data_frame( index: 'student_performance_mathematics_reg', query: { term: { - "ml.is_training": { + 'ml.is_training' => { value: true } } diff --git a/docs/examples/guide/24d66b2ebdf662d8b03e17214e65c825.asciidoc b/docs/examples/guide/24d66b2ebdf662d8b03e17214e65c825.asciidoc index b9f922889e..e9e2c858ea 100644 --- a/docs/examples/guide/24d66b2ebdf662d8b03e17214e65c825.asciidoc +++ b/docs/examples/guide/24d66b2ebdf662d8b03e17214e65c825.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "xpack.profiling.templates.enabled": false + 'xpack.profiling.templates.enabled' => false } } ) diff --git a/docs/examples/guide/25d40d3049e57e2bb70c2c5b88bd7b87.asciidoc b/docs/examples/guide/25d40d3049e57e2bb70c2c5b88bd7b87.asciidoc index bd388c74e1..0f12f3a9aa 100644 --- a/docs/examples/guide/25d40d3049e57e2bb70c2c5b88bd7b87.asciidoc +++ b/docs/examples/guide/25d40d3049e57e2bb70c2c5b88bd7b87.asciidoc @@ -4,7 +4,7 @@ response = client.indices.put_settings( index: '_all', body: { settings: { - "index.unassigned.node_left.delayed_timeout": '0' + 'index.unassigned.node_left.delayed_timeout' => '0' } } ) diff --git a/docs/examples/guide/27384266370152add76471dd0332a2f1.asciidoc b/docs/examples/guide/27384266370152add76471dd0332a2f1.asciidoc index 81861484c5..ea187447aa 100644 --- a/docs/examples/guide/27384266370152add76471dd0332a2f1.asciidoc +++ b/docs/examples/guide/27384266370152add76471dd0332a2f1.asciidoc @@ -7,7 +7,7 @@ response = client.transform.update_transform( index: 'kibana_sample_data_ecommerce', query: { term: { - "geoip.continent_name": { + 'geoip.continent_name' => { value: 'Asia' } } diff --git a/docs/examples/guide/279e2b29261971999923fdc658bba8ff.asciidoc b/docs/examples/guide/279e2b29261971999923fdc658bba8ff.asciidoc index 71610c2706..81c0dc4380 100644 --- a/docs/examples/guide/279e2b29261971999923fdc658bba8ff.asciidoc +++ b/docs/examples/guide/279e2b29261971999923fdc658bba8ff.asciidoc @@ -13,7 +13,7 @@ response = client.search( }, query: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/28ac880057135e46b3b00c7f3976538c.asciidoc b/docs/examples/guide/28ac880057135e46b3b00c7f3976538c.asciidoc index 13d5773085..4f5df5b79b 100644 --- a/docs/examples/guide/28ac880057135e46b3b00c7f3976538c.asciidoc +++ b/docs/examples/guide/28ac880057135e46b3b00c7f3976538c.asciidoc @@ -3,7 +3,7 @@ response = client.indices.put_settings( index: 'test', body: { - "index.routing.allocation.include._ip": '192.168.2.*' + 'index.routing.allocation.include._ip' => '192.168.2.*' } ) puts response diff --git a/docs/examples/guide/28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc b/docs/examples/guide/28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc index f72bfd4ab7..4d8f4bffb2 100644 --- a/docs/examples/guide/28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc +++ b/docs/examples/guide/28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { regexp: { - "user.id": { + 'user.id' => { value: 'k.*y', flags: 'ALL', case_insensitive: true, diff --git a/docs/examples/guide/2a91e1fb8ad93a188fa9d77ec01bc431.asciidoc b/docs/examples/guide/2a91e1fb8ad93a188fa9d77ec01bc431.asciidoc index f8943ea937..a7b1406e87 100644 --- a/docs/examples/guide/2a91e1fb8ad93a188fa9d77ec01bc431.asciidoc +++ b/docs/examples/guide/2a91e1fb8ad93a188fa9d77ec01bc431.asciidoc @@ -42,7 +42,7 @@ response = client.search( path: 'comments', query: { match: { - "comments.number": 2 + 'comments.number' => 2 } }, inner_hits: {} diff --git a/docs/examples/guide/2b23a0e5fc29fa57da48c50b41909951.asciidoc b/docs/examples/guide/2b23a0e5fc29fa57da48c50b41909951.asciidoc index f61445c101..a414e5a245 100644 --- a/docs/examples/guide/2b23a0e5fc29fa57da48c50b41909951.asciidoc +++ b/docs/examples/guide/2b23a0e5fc29fa57da48c50b41909951.asciidoc @@ -14,7 +14,7 @@ response = client.search( span_field_masking: { query: { span_term: { - "text.stems": 'fox' + 'text.stems' => 'fox' } }, field: 'text' diff --git a/docs/examples/guide/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc b/docs/examples/guide/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc index da108df215..54e4427c94 100644 --- a/docs/examples/guide/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc +++ b/docs/examples/guide/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc @@ -3,8 +3,8 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.indices.close.enable": false, - "indices.recovery.max_bytes_per_sec": '50mb' + 'cluster.indices.close.enable' => false, + 'indices.recovery.max_bytes_per_sec' => '50mb' }, transient: { "*": nil diff --git a/docs/examples/guide/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc b/docs/examples/guide/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc index 9f4bfc6f90..18e0ef3c06 100644 --- a/docs/examples/guide/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc +++ b/docs/examples/guide/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc @@ -5,7 +5,7 @@ response = client.update_by_query( body: { query: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, max_docs: 1 diff --git a/docs/examples/guide/2da48241cfc21d2c57dc970845470bda.asciidoc b/docs/examples/guide/2da48241cfc21d2c57dc970845470bda.asciidoc index 54e0e3e418..89f6a74419 100644 --- a/docs/examples/guide/2da48241cfc21d2c57dc970845470bda.asciidoc +++ b/docs/examples/guide/2da48241cfc21d2c57dc970845470bda.asciidoc @@ -19,9 +19,9 @@ response = client.index( index: 'my-index-000001', id: 'metric_1', body: { - "metrics.time": 100, - "metrics.time.min": 10, - "metrics.time.max": 900 + 'metrics.time' => 100, + 'metrics.time.min' => 10, + 'metrics.time.max' => 900 } ) puts response @@ -32,8 +32,8 @@ response = client.index( body: { metrics: { time: 100, - "time.min": 10, - "time.max": 900 + 'time.min' => 10, + 'time.max' => 900 } } ) diff --git a/docs/examples/guide/2e796e5ca59768d4426abbf9a049db3e.asciidoc b/docs/examples/guide/2e796e5ca59768d4426abbf9a049db3e.asciidoc index 797f96de6a..c83ca430f7 100644 --- a/docs/examples/guide/2e796e5ca59768d4426abbf9a049db3e.asciidoc +++ b/docs/examples/guide/2e796e5ca59768d4426abbf9a049db3e.asciidoc @@ -5,7 +5,7 @@ response = client.indices.split( target: 'my_target_index', body: { settings: { - "index.number_of_shards": 2 + 'index.number_of_shards' => 2 } } ) diff --git a/docs/examples/guide/2f4a55dfeba8851b306ef9c1b216ef54.asciidoc b/docs/examples/guide/2f4a55dfeba8851b306ef9c1b216ef54.asciidoc index da26a701e8..a0314d9bd2 100644 --- a/docs/examples/guide/2f4a55dfeba8851b306ef9c1b216ef54.asciidoc +++ b/docs/examples/guide/2f4a55dfeba8851b306ef9c1b216ef54.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { term: { - "labels.release": 'v1.3.0' + 'labels.release' => 'v1.3.0' } } } diff --git a/docs/examples/guide/2f67db5e4d6c958258c3d70fb2d0b1c8.asciidoc b/docs/examples/guide/2f67db5e4d6c958258c3d70fb2d0b1c8.asciidoc index a0a7aba7cb..1e58a61ba4 100644 --- a/docs/examples/guide/2f67db5e4d6c958258c3d70fb2d0b1c8.asciidoc +++ b/docs/examples/guide/2f67db5e4d6c958258c3d70fb2d0b1c8.asciidoc @@ -3,7 +3,7 @@ response = client.indices.put_settings( index: 'my-index-000001', body: { - "index.merge.policy.max_merge_at_once_explicit": nil + 'index.merge.policy.max_merge_at_once_explicit' => nil } ) puts response diff --git a/docs/examples/guide/2fa45d74ba9933188c4728f8a9e5372c.asciidoc b/docs/examples/guide/2fa45d74ba9933188c4728f8a9e5372c.asciidoc index 2ab87edf47..d45f7c2a0b 100644 --- a/docs/examples/guide/2fa45d74ba9933188c4728f8a9e5372c.asciidoc +++ b/docs/examples/guide/2fa45d74ba9933188c4728f8a9e5372c.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "action.auto_create_index": 'my-index-000001,index10,-index1*,+ind*' + 'action.auto_create_index' => 'my-index-000001,index10,-index1*,+ind*' } } ) @@ -12,7 +12,7 @@ puts response response = client.cluster.put_settings( body: { persistent: { - "action.auto_create_index": 'false' + 'action.auto_create_index' => 'false' } } ) @@ -21,7 +21,7 @@ puts response response = client.cluster.put_settings( body: { persistent: { - "action.auto_create_index": 'true' + 'action.auto_create_index' => 'true' } } ) diff --git a/docs/examples/guide/32123981430e5a8b34fe14314fc48429.asciidoc b/docs/examples/guide/32123981430e5a8b34fe14314fc48429.asciidoc index 358af7b653..c280bf0245 100644 --- a/docs/examples/guide/32123981430e5a8b34fe14314fc48429.asciidoc +++ b/docs/examples/guide/32123981430e5a8b34fe14314fc48429.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/32de5dd306bd014d67053d2f175defcd.asciidoc b/docs/examples/guide/32de5dd306bd014d67053d2f175defcd.asciidoc index bdcfeff455..9639af9996 100644 --- a/docs/examples/guide/32de5dd306bd014d67053d2f175defcd.asciidoc +++ b/docs/examples/guide/32de5dd306bd014d67053d2f175defcd.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "logger.org.elasticsearch.xpack.security.authc.saml": 'debug' + 'logger.org.elasticsearch.xpack.security.authc.saml' => 'debug' } } ) diff --git a/docs/examples/guide/34d51c54b62e9a160c0ddacc10134bb0.asciidoc b/docs/examples/guide/34d51c54b62e9a160c0ddacc10134bb0.asciidoc index 6377f0f014..235589b2ca 100644 --- a/docs/examples/guide/34d51c54b62e9a160c0ddacc10134bb0.asciidoc +++ b/docs/examples/guide/34d51c54b62e9a160c0ddacc10134bb0.asciidoc @@ -6,7 +6,7 @@ response = client.search( span_first: { match: { span_term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, end: 3 diff --git a/docs/examples/guide/362dfccdb6f7933b22c909542e0b4e0a.asciidoc b/docs/examples/guide/362dfccdb6f7933b22c909542e0b4e0a.asciidoc index 65ba88d31a..6fc6004a03 100644 --- a/docs/examples/guide/362dfccdb6f7933b22c909542e0b4e0a.asciidoc +++ b/docs/examples/guide/362dfccdb6f7933b22c909542e0b4e0a.asciidoc @@ -5,7 +5,7 @@ response = client.update_by_query( body: { query: { match: { - "user.id": 'l7gk7f82' + 'user.id' => 'l7gk7f82' } }, script: { diff --git a/docs/examples/guide/377af0ea9b19c113f224d8150890b41b.asciidoc b/docs/examples/guide/377af0ea9b19c113f224d8150890b41b.asciidoc index 383aaf0032..cf052c9bc5 100644 --- a/docs/examples/guide/377af0ea9b19c113f224d8150890b41b.asciidoc +++ b/docs/examples/guide/377af0ea9b19c113f224d8150890b41b.asciidoc @@ -7,7 +7,7 @@ response = client.search( filter: [ { term: { - "event.outcome": 'failure' + 'event.outcome' => 'failure' } }, { @@ -20,7 +20,7 @@ response = client.search( }, { term: { - "service.name": { + 'service.name' => { value: 'frontend-node' } } @@ -37,7 +37,7 @@ response = client.search( must_not: [ { term: { - "event.outcome": 'failure' + 'event.outcome' => 'failure' } } ], @@ -52,7 +52,7 @@ response = client.search( }, { term: { - "service.name": { + 'service.name' => { value: 'frontend-node' } } diff --git a/docs/examples/guide/39ce44333d28ed2b833722d3e3cb06f3.asciidoc b/docs/examples/guide/39ce44333d28ed2b833722d3e3cb06f3.asciidoc index 781a12134d..c176e1e0ea 100644 --- a/docs/examples/guide/39ce44333d28ed2b833722d3e3cb06f3.asciidoc +++ b/docs/examples/guide/39ce44333d28ed2b833722d3e3cb06f3.asciidoc @@ -8,7 +8,7 @@ response = client.search( should: [ { match: { - "name.first": { + 'name.first' => { query: 'shay', _name: 'first' } @@ -16,7 +16,7 @@ response = client.search( }, { match: { - "name.last": { + 'name.last' => { query: 'banon', _name: 'last' } @@ -25,7 +25,7 @@ response = client.search( ], filter: { terms: { - "name.last": [ + 'name.last' => [ 'banon', 'kimchy' ], diff --git a/docs/examples/guide/3a2953fd81d65118a776c87a81530e15.asciidoc b/docs/examples/guide/3a2953fd81d65118a776c87a81530e15.asciidoc index 53a66bc9f3..9e22c4ef00 100644 --- a/docs/examples/guide/3a2953fd81d65118a776c87a81530e15.asciidoc +++ b/docs/examples/guide/3a2953fd81d65118a776c87a81530e15.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, highlight: { diff --git a/docs/examples/guide/3af10fde8138d9d95df127d39d9a0ed2.asciidoc b/docs/examples/guide/3af10fde8138d9d95df127d39d9a0ed2.asciidoc index 220c95b658..d210a4ddb9 100644 --- a/docs/examples/guide/3af10fde8138d9d95df127d39d9a0ed2.asciidoc +++ b/docs/examples/guide/3af10fde8138d9d95df127d39d9a0ed2.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.max_shards_per_node": nil + 'cluster.max_shards_per_node' => nil } } ) diff --git a/docs/examples/guide/3c09ca91057216125ed0e3856a91ff95.asciidoc b/docs/examples/guide/3c09ca91057216125ed0e3856a91ff95.asciidoc index 0fed35d95d..fccfbc1f18 100644 --- a/docs/examples/guide/3c09ca91057216125ed0e3856a91ff95.asciidoc +++ b/docs/examples/guide/3c09ca91057216125ed0e3856a91ff95.asciidoc @@ -14,7 +14,7 @@ response = client.indices.put_index_template( number_of_replicas: 0, number_of_shards: 2 }, - "index.lifecycle.name": 'datastream_policy' + 'index.lifecycle.name' => 'datastream_policy' }, mappings: { properties: { diff --git a/docs/examples/guide/3c65cb58e131ef46f4dd081683b970ac.asciidoc b/docs/examples/guide/3c65cb58e131ef46f4dd081683b970ac.asciidoc index 492cae3168..5245ec03a8 100644 --- a/docs/examples/guide/3c65cb58e131ef46f4dd081683b970ac.asciidoc +++ b/docs/examples/guide/3c65cb58e131ef46f4dd081683b970ac.asciidoc @@ -11,7 +11,7 @@ response = client.search( filter: { geo_distance: { distance: '200km', - "pin.location": { + 'pin.location' => { lat: 40, lon: -70 } diff --git a/docs/examples/guide/3c7621a81fa982b79f040a6d2611530e.asciidoc b/docs/examples/guide/3c7621a81fa982b79f040a6d2611530e.asciidoc index 907746d154..957167898f 100644 --- a/docs/examples/guide/3c7621a81fa982b79f040a6d2611530e.asciidoc +++ b/docs/examples/guide/3c7621a81fa982b79f040a6d2611530e.asciidoc @@ -5,7 +5,7 @@ response = client.cluster.put_component_template( body: { template: { settings: { - "index.number_of_shards": 2 + 'index.number_of_shards' => 2 } } } @@ -17,7 +17,7 @@ response = client.cluster.put_component_template( body: { template: { settings: { - "index.number_of_replicas": 0 + 'index.number_of_replicas' => 0 }, mappings: { properties: { diff --git a/docs/examples/guide/3da35090e093c2d83c3b7d0d83bcb4ae.asciidoc b/docs/examples/guide/3da35090e093c2d83c3b7d0d83bcb4ae.asciidoc index 795cd59958..f0e63d9178 100644 --- a/docs/examples/guide/3da35090e093c2d83c3b7d0d83bcb4ae.asciidoc +++ b/docs/examples/guide/3da35090e093c2d83c3b7d0d83bcb4ae.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.routing.allocation.exclude._name": 'target-node-name' + 'cluster.routing.allocation.exclude._name' => 'target-node-name' } } ) diff --git a/docs/examples/guide/3e278e6c193b4c17dbdc70670e15d78c.asciidoc b/docs/examples/guide/3e278e6c193b4c17dbdc70670e15d78c.asciidoc index c34882e1b8..cf8694d9f2 100644 --- a/docs/examples/guide/3e278e6c193b4c17dbdc70670e15d78c.asciidoc +++ b/docs/examples/guide/3e278e6c193b4c17dbdc70670e15d78c.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, highlight: { diff --git a/docs/examples/guide/3ed39eb60fbfafb70f7825b8d103bf17.asciidoc b/docs/examples/guide/3ed39eb60fbfafb70f7825b8d103bf17.asciidoc index b7681145db..1676fd538e 100644 --- a/docs/examples/guide/3ed39eb60fbfafb70f7825b8d103bf17.asciidoc +++ b/docs/examples/guide/3ed39eb60fbfafb70f7825b8d103bf17.asciidoc @@ -11,7 +11,7 @@ response = client.search( filter: { geo_distance: { distance: '200km', - "pin.location": { + 'pin.location' => { lat: 40, lon: -70 } diff --git a/docs/examples/guide/3fb2f41ad229a31ad3ae408cc50cbed5.asciidoc b/docs/examples/guide/3fb2f41ad229a31ad3ae408cc50cbed5.asciidoc index b42cd912db..6e3527fee3 100644 --- a/docs/examples/guide/3fb2f41ad229a31ad3ae408cc50cbed5.asciidoc +++ b/docs/examples/guide/3fb2f41ad229a31ad3ae408cc50cbed5.asciidoc @@ -6,7 +6,7 @@ response = client.search( timeout: '2s', query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/4053de806dfd9172167999ce098107c4.asciidoc b/docs/examples/guide/4053de806dfd9172167999ce098107c4.asciidoc index a62f9aa2f6..32fab044ee 100644 --- a/docs/examples/guide/4053de806dfd9172167999ce098107c4.asciidoc +++ b/docs/examples/guide/4053de806dfd9172167999ce098107c4.asciidoc @@ -6,7 +6,7 @@ response = client.search( constant_score: { filter: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, boost: 1.2 diff --git a/docs/examples/guide/416a3ba11232d3c078c1c31340cf356f.asciidoc b/docs/examples/guide/416a3ba11232d3c078c1c31340cf356f.asciidoc index cf39499999..3861cb273c 100644 --- a/docs/examples/guide/416a3ba11232d3c078c1c31340cf356f.asciidoc +++ b/docs/examples/guide/416a3ba11232d3c078c1c31340cf356f.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, highlight: { diff --git a/docs/examples/guide/4207219a892339e8f3abe0df8723dd27.asciidoc b/docs/examples/guide/4207219a892339e8f3abe0df8723dd27.asciidoc index 94da51c2a4..0a4f6fda0e 100644 --- a/docs/examples/guide/4207219a892339e8f3abe0df8723dd27.asciidoc +++ b/docs/examples/guide/4207219a892339e8f3abe0df8723dd27.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.metadata.administrator": 'sysadmin@example.com' + 'cluster.metadata.administrator' => 'sysadmin@example.com' } } ) diff --git a/docs/examples/guide/43854be6aae61edbea5f9ab988cb4ce5.asciidoc b/docs/examples/guide/43854be6aae61edbea5f9ab988cb4ce5.asciidoc index 59f9be4c4a..d870920056 100644 --- a/docs/examples/guide/43854be6aae61edbea5f9ab988cb4ce5.asciidoc +++ b/docs/examples/guide/43854be6aae61edbea5f9ab988cb4ce5.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "xpack.security.transport.filter.allow": '172.16.0.0/24' + 'xpack.security.transport.filter.allow' => '172.16.0.0/24' } } ) diff --git a/docs/examples/guide/4435b654994b575ba181ea679871c78c.asciidoc b/docs/examples/guide/4435b654994b575ba181ea679871c78c.asciidoc index 7a0544f0c0..b39662fadc 100644 --- a/docs/examples/guide/4435b654994b575ba181ea679871c78c.asciidoc +++ b/docs/examples/guide/4435b654994b575ba181ea679871c78c.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/445f8a6ef75fb43da52990b3a9063c78.asciidoc b/docs/examples/guide/445f8a6ef75fb43da52990b3a9063c78.asciidoc index eae08a7cb1..1a881320d7 100644 --- a/docs/examples/guide/445f8a6ef75fb43da52990b3a9063c78.asciidoc +++ b/docs/examples/guide/445f8a6ef75fb43da52990b3a9063c78.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { match: { - "http.responses": '304' + 'http.responses' => '304' } }, fields: [ diff --git a/docs/examples/guide/4498b9d3b0c77e1b9ef6664ff5963ce2.asciidoc b/docs/examples/guide/4498b9d3b0c77e1b9ef6664ff5963ce2.asciidoc index fb9853e7b4..d28fe1e8ef 100644 --- a/docs/examples/guide/4498b9d3b0c77e1b9ef6664ff5963ce2.asciidoc +++ b/docs/examples/guide/4498b9d3b0c77e1b9ef6664ff5963ce2.asciidoc @@ -4,7 +4,7 @@ response = client.indices.create( index: 'my-index-000001', body: { settings: { - "index.requests.cache.enable": false + 'index.requests.cache.enable' => false } } ) diff --git a/docs/examples/guide/44da736ce0e1587c1e7c45eee606ead7.asciidoc b/docs/examples/guide/44da736ce0e1587c1e7c45eee606ead7.asciidoc index 32c75fb132..275b20b224 100644 --- a/docs/examples/guide/44da736ce0e1587c1e7c45eee606ead7.asciidoc +++ b/docs/examples/guide/44da736ce0e1587c1e7c45eee606ead7.asciidoc @@ -9,7 +9,7 @@ response = client.update_by_query( }, query: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/455029c3d66306ad5d48f6dbddaf7324.asciidoc b/docs/examples/guide/455029c3d66306ad5d48f6dbddaf7324.asciidoc index 8128f01e2b..e662f4c869 100644 --- a/docs/examples/guide/455029c3d66306ad5d48f6dbddaf7324.asciidoc +++ b/docs/examples/guide/455029c3d66306ad5d48f6dbddaf7324.asciidoc @@ -19,7 +19,7 @@ response = client.index( id: 1, refresh: true, body: { - "network.name": 'net-1', + 'network.name' => 'net-1', latency_histo: { values: [ 0.1, @@ -45,7 +45,7 @@ response = client.index( id: 2, refresh: true, body: { - "network.name": 'net-2', + 'network.name' => 'net-2', latency_histo: { values: [ 0.1, diff --git a/docs/examples/guide/45c6e54a9c9e08623af96752b4bde346.asciidoc b/docs/examples/guide/45c6e54a9c9e08623af96752b4bde346.asciidoc index 5ebec85d11..7305b24a17 100644 --- a/docs/examples/guide/45c6e54a9c9e08623af96752b4bde346.asciidoc +++ b/docs/examples/guide/45c6e54a9c9e08623af96752b4bde346.asciidoc @@ -11,7 +11,7 @@ response = client.search( filter: { geo_distance: { distance: '12km', - "pin.location": 'POINT (-70 40)' + 'pin.location' => 'POINT (-70 40)' } } } diff --git a/docs/examples/guide/45ef5156dbd2d3fd4fd22b8d99f7aad4.asciidoc b/docs/examples/guide/45ef5156dbd2d3fd4fd22b8d99f7aad4.asciidoc index f894cb224b..2296b26fd4 100644 --- a/docs/examples/guide/45ef5156dbd2d3fd4fd22b8d99f7aad4.asciidoc +++ b/docs/examples/guide/45ef5156dbd2d3fd4fd22b8d99f7aad4.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.routing.allocation.enable": nil + 'cluster.routing.allocation.enable' => nil } } ) diff --git a/docs/examples/guide/4670dd81a9865e07ae74ae8b0266e384.asciidoc b/docs/examples/guide/4670dd81a9865e07ae74ae8b0266e384.asciidoc index 5491959e6c..002b08a594 100644 --- a/docs/examples/guide/4670dd81a9865e07ae74ae8b0266e384.asciidoc +++ b/docs/examples/guide/4670dd81a9865e07ae74ae8b0266e384.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { size: 0, runtime_mappings: { - "startup_time_before.adjusted": { + 'startup_time_before.adjusted' => { type: 'long', script: { source: "emit(doc['startup_time_before'].value - params.adjustment)", diff --git a/docs/examples/guide/4824a823a830a2a5d990eacfd783ac22.asciidoc b/docs/examples/guide/4824a823a830a2a5d990eacfd783ac22.asciidoc index 411b6232c2..a4ee8c04c5 100644 --- a/docs/examples/guide/4824a823a830a2a5d990eacfd783ac22.asciidoc +++ b/docs/examples/guide/4824a823a830a2a5d990eacfd783ac22.asciidoc @@ -9,7 +9,7 @@ response = client.delete_by_query( }, query: { range: { - "http.response.bytes": { + 'http.response.bytes' => { lt: 2_000_000 } } @@ -27,7 +27,7 @@ response = client.delete_by_query( }, query: { range: { - "http.response.bytes": { + 'http.response.bytes' => { lt: 2_000_000 } } diff --git a/docs/examples/guide/4a7510a9c0468303658383c00796dad2.asciidoc b/docs/examples/guide/4a7510a9c0468303658383c00796dad2.asciidoc index bca4de8242..e230d141be 100644 --- a/docs/examples/guide/4a7510a9c0468303658383c00796dad2.asciidoc +++ b/docs/examples/guide/4a7510a9c0468303658383c00796dad2.asciidoc @@ -4,7 +4,7 @@ response = client.indices.create( index: 'my-index-000001', body: { settings: { - "index.mapping.ignore_malformed": true + 'index.mapping.ignore_malformed' => true }, mappings: { properties: { diff --git a/docs/examples/guide/4aa510f34a0358fecc8d764dd099b843.asciidoc b/docs/examples/guide/4aa510f34a0358fecc8d764dd099b843.asciidoc index 1c40f583bc..ee021d671f 100644 --- a/docs/examples/guide/4aa510f34a0358fecc8d764dd099b843.asciidoc +++ b/docs/examples/guide/4aa510f34a0358fecc8d764dd099b843.asciidoc @@ -4,9 +4,9 @@ response = client.indices.put_settings( index: 'my_source_index', body: { settings: { - "index.number_of_replicas": 0, - "index.routing.allocation.require._name": 'shrink_node_name', - "index.blocks.write": true + 'index.number_of_replicas' => 0, + 'index.routing.allocation.require._name' => 'shrink_node_name', + 'index.blocks.write' => true } } ) diff --git a/docs/examples/guide/4ae494d1e62231e832fc0436b04e2014.asciidoc b/docs/examples/guide/4ae494d1e62231e832fc0436b04e2014.asciidoc index 376524b79a..ebb5e33834 100644 --- a/docs/examples/guide/4ae494d1e62231e832fc0436b04e2014.asciidoc +++ b/docs/examples/guide/4ae494d1e62231e832fc0436b04e2014.asciidoc @@ -12,7 +12,7 @@ response = client.indices.validate_query( }, filter: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/4af15c4f26ddefb9c350e7a246a66a15.asciidoc b/docs/examples/guide/4af15c4f26ddefb9c350e7a246a66a15.asciidoc index ab1a7d764a..93fe623517 100644 --- a/docs/examples/guide/4af15c4f26ddefb9c350e7a246a66a15.asciidoc +++ b/docs/examples/guide/4af15c4f26ddefb9c350e7a246a66a15.asciidoc @@ -9,7 +9,7 @@ response = client.search( terms: { field: 'ip', order: { - "tm.m": 'desc' + 'tm.m' => 'desc' } }, aggregations: { diff --git a/docs/examples/guide/4bba59cf745ac7b996bf90308bc26957.asciidoc b/docs/examples/guide/4bba59cf745ac7b996bf90308bc26957.asciidoc index 9e38458a93..96d1027978 100644 --- a/docs/examples/guide/4bba59cf745ac7b996bf90308bc26957.asciidoc +++ b/docs/examples/guide/4bba59cf745ac7b996bf90308bc26957.asciidoc @@ -12,7 +12,7 @@ response = client.search( }, filter: { term: { - "file_path.tree": '/User/alice' + 'file_path.tree' => '/User/alice' } } } diff --git a/docs/examples/guide/4bfcb2861f1d572bd0d66acd66deab0b.asciidoc b/docs/examples/guide/4bfcb2861f1d572bd0d66acd66deab0b.asciidoc index 9bd102d9a6..7a13e0c476 100644 --- a/docs/examples/guide/4bfcb2861f1d572bd0d66acd66deab0b.asciidoc +++ b/docs/examples/guide/4bfcb2861f1d572bd0d66acd66deab0b.asciidoc @@ -5,7 +5,7 @@ response = client.ml.update_datafeed( body: { query: { term: { - "geo.src": 'US' + 'geo.src' => 'US' } } } diff --git a/docs/examples/guide/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc b/docs/examples/guide/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc index 9bc86e7a99..1db79c8d16 100644 --- a/docs/examples/guide/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc +++ b/docs/examples/guide/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, highlight: { diff --git a/docs/examples/guide/50522d3d5b3d055f712ad737e3d1707a.asciidoc b/docs/examples/guide/50522d3d5b3d055f712ad737e3d1707a.asciidoc index d764ff26ac..be4556d408 100644 --- a/docs/examples/guide/50522d3d5b3d055f712ad737e3d1707a.asciidoc +++ b/docs/examples/guide/50522d3d5b3d055f712ad737e3d1707a.asciidoc @@ -43,7 +43,7 @@ response = client.search( body: { query: { term: { - "name.length": 3 + 'name.length' => 3 } } } diff --git a/docs/examples/guide/518fcf1dc1edd7dba0864accf71b49f4.asciidoc b/docs/examples/guide/518fcf1dc1edd7dba0864accf71b49f4.asciidoc index c1eb983975..e6c12a28bf 100644 --- a/docs/examples/guide/518fcf1dc1edd7dba0864accf71b49f4.asciidoc +++ b/docs/examples/guide/518fcf1dc1edd7dba0864accf71b49f4.asciidoc @@ -6,7 +6,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/51f6cb682424e110f289af79c106f4c7.asciidoc b/docs/examples/guide/51f6cb682424e110f289af79c106f4c7.asciidoc index 55af6a0920..447372ca01 100644 --- a/docs/examples/guide/51f6cb682424e110f289af79c106f4c7.asciidoc +++ b/docs/examples/guide/51f6cb682424e110f289af79c106f4c7.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.max_shards_per_node.frozen": 3200 + 'cluster.max_shards_per_node.frozen' => 3200 } } ) diff --git a/docs/examples/guide/53aa8b21e2b1c4d48960343711296704.asciidoc b/docs/examples/guide/53aa8b21e2b1c4d48960343711296704.asciidoc index 4b7b3ae5dd..553658d9ff 100644 --- a/docs/examples/guide/53aa8b21e2b1c4d48960343711296704.asciidoc +++ b/docs/examples/guide/53aa8b21e2b1c4d48960343711296704.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { regexp: { - "my_field.keyword": 'a\\\\.*' + 'my_field.keyword' => 'a\\\\.*' } } } diff --git a/docs/examples/guide/53bb7f0e3429861aadb8dd3d588085cd.asciidoc b/docs/examples/guide/53bb7f0e3429861aadb8dd3d588085cd.asciidoc index 582810af28..f7ac8c0224 100644 --- a/docs/examples/guide/53bb7f0e3429861aadb8dd3d588085cd.asciidoc +++ b/docs/examples/guide/53bb7f0e3429861aadb8dd3d588085cd.asciidoc @@ -6,7 +6,7 @@ response = client.search( seq_no_primary_term: true, query: { match: { - "user.id": 'yWIumJd7' + 'user.id' => 'yWIumJd7' } } } diff --git a/docs/examples/guide/548b85bd9e6e7d33e36133953869449b.asciidoc b/docs/examples/guide/548b85bd9e6e7d33e36133953869449b.asciidoc index ed37c12a9d..72e7f48701 100644 --- a/docs/examples/guide/548b85bd9e6e7d33e36133953869449b.asciidoc +++ b/docs/examples/guide/548b85bd9e6e7d33e36133953869449b.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "xpack.monitoring.collection.enabled": false + 'xpack.monitoring.collection.enabled' => false } } ) diff --git a/docs/examples/guide/55096381f811388fafd8e244dd2402c8.asciidoc b/docs/examples/guide/55096381f811388fafd8e244dd2402c8.asciidoc index f149619242..24cdefa4b9 100644 --- a/docs/examples/guide/55096381f811388fafd8e244dd2402c8.asciidoc +++ b/docs/examples/guide/55096381f811388fafd8e244dd2402c8.asciidoc @@ -4,7 +4,7 @@ response = client.indices.rollover( alias: 'my-alias', body: { settings: { - "index.number_of_shards": 2 + 'index.number_of_shards' => 2 } } ) diff --git a/docs/examples/guide/5553cf7a02c22f616cd994747f2dd5a5.asciidoc b/docs/examples/guide/5553cf7a02c22f616cd994747f2dd5a5.asciidoc index c1da504695..33b7049e45 100644 --- a/docs/examples/guide/5553cf7a02c22f616cd994747f2dd5a5.asciidoc +++ b/docs/examples/guide/5553cf7a02c22f616cd994747f2dd5a5.asciidoc @@ -8,12 +8,12 @@ response = client.search( must: [ { match: { - "user.first": 'Alice' + 'user.first' => 'Alice' } }, { match: { - "user.last": 'Smith' + 'user.last' => 'Smith' } } ] diff --git a/docs/examples/guide/55838e0b21c4f4da2dc8aaec045a6d5f.asciidoc b/docs/examples/guide/55838e0b21c4f4da2dc8aaec045a6d5f.asciidoc index 90db32e316..207a8224ef 100644 --- a/docs/examples/guide/55838e0b21c4f4da2dc8aaec045a6d5f.asciidoc +++ b/docs/examples/guide/55838e0b21c4f4da2dc8aaec045a6d5f.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { size: 0, runtime_mappings: { - "load_time.seconds": { + 'load_time.seconds' => { type: 'long', script: { source: "emit(doc['load_time'].value / params.timeUnit)", diff --git a/docs/examples/guide/565908b03edff1d6e6e7cdfb92177faf.asciidoc b/docs/examples/guide/565908b03edff1d6e6e7cdfb92177faf.asciidoc index 1695e59451..8ec58ed61f 100644 --- a/docs/examples/guide/565908b03edff1d6e6e7cdfb92177faf.asciidoc +++ b/docs/examples/guide/565908b03edff1d6e6e7cdfb92177faf.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { size: 0, runtime_mappings: { - "grade.weighted": { + 'grade.weighted' => { type: 'double', script: "\n emit(doc['grade'].value * doc['weight'].value)\n " } diff --git a/docs/examples/guide/578808065fee8691355b8f25c35782cd.asciidoc b/docs/examples/guide/578808065fee8691355b8f25c35782cd.asciidoc index b309f98009..e21912fc6c 100644 --- a/docs/examples/guide/578808065fee8691355b8f25c35782cd.asciidoc +++ b/docs/examples/guide/578808065fee8691355b8f25c35782cd.asciidoc @@ -7,7 +7,7 @@ response = client.search( profile: true, query: { term: { - "user.id": { + 'user.id' => { value: 'elkbee' } } diff --git a/docs/examples/guide/58f72be60c25752d7899a35fc60fe6eb.asciidoc b/docs/examples/guide/58f72be60c25752d7899a35fc60fe6eb.asciidoc index 139a5b7834..51ecd22796 100644 --- a/docs/examples/guide/58f72be60c25752d7899a35fc60fe6eb.asciidoc +++ b/docs/examples/guide/58f72be60c25752d7899a35fc60fe6eb.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "logger.org.elasticsearch.indices.recovery": 'DEBUG' + 'logger.org.elasticsearch.indices.recovery' => 'DEBUG' } } ) diff --git a/docs/examples/guide/591bf50bb5ad3134006efe5c3f46d7a6.asciidoc b/docs/examples/guide/591bf50bb5ad3134006efe5c3f46d7a6.asciidoc index 8c5d54139a..c1bc8bab2a 100644 --- a/docs/examples/guide/591bf50bb5ad3134006efe5c3f46d7a6.asciidoc +++ b/docs/examples/guide/591bf50bb5ad3134006efe5c3f46d7a6.asciidoc @@ -15,7 +15,7 @@ response = client.cluster.put_settings( seeds: [ '127.0.0.1:9301' ], - "transport.compress": true, + 'transport.compress' => true, skip_unavailable: true }, cluster_three: { diff --git a/docs/examples/guide/5969c446688c8b326acc80276573e9d2.asciidoc b/docs/examples/guide/5969c446688c8b326acc80276573e9d2.asciidoc index 86384c4346..d67f8fc3d7 100644 --- a/docs/examples/guide/5969c446688c8b326acc80276573e9d2.asciidoc +++ b/docs/examples/guide/5969c446688c8b326acc80276573e9d2.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, highlight: { @@ -19,13 +19,13 @@ response = client.search( '' ] }, - "blog.title": { + 'blog.title' => { number_of_fragments: 0 }, - "blog.author": { + 'blog.author' => { number_of_fragments: 0 }, - "blog.comment": { + 'blog.comment' => { number_of_fragments: 5, order: 'score' } diff --git a/docs/examples/guide/5a7f05ab1d05b4eef5ff327168517165.asciidoc b/docs/examples/guide/5a7f05ab1d05b4eef5ff327168517165.asciidoc index 331127e9da..9f8c918a2c 100644 --- a/docs/examples/guide/5a7f05ab1d05b4eef5ff327168517165.asciidoc +++ b/docs/examples/guide/5a7f05ab1d05b4eef5ff327168517165.asciidoc @@ -6,7 +6,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/5e2f7097eb299de553d0fa0087d70a59.asciidoc b/docs/examples/guide/5e2f7097eb299de553d0fa0087d70a59.asciidoc index 0f08126e84..becbee211e 100644 --- a/docs/examples/guide/5e2f7097eb299de553d0fa0087d70a59.asciidoc +++ b/docs/examples/guide/5e2f7097eb299de553d0fa0087d70a59.asciidoc @@ -5,11 +5,11 @@ response = client.indices.create( body: { settings: { index: { - "sort.field": [ + 'sort.field' => [ 'username', 'timestamp' ], - "sort.order": [ + 'sort.order' => [ 'asc', 'desc' ] diff --git a/docs/examples/guide/6352e846bb83725ae6d853aa64d8697d.asciidoc b/docs/examples/guide/6352e846bb83725ae6d853aa64d8697d.asciidoc index ce4386f972..faf528cbcc 100644 --- a/docs/examples/guide/6352e846bb83725ae6d853aa64d8697d.asciidoc +++ b/docs/examples/guide/6352e846bb83725ae6d853aa64d8697d.asciidoc @@ -11,7 +11,7 @@ response = client.search( filter: { geo_distance: { distance: '12km', - "pin.location": { + 'pin.location' => { lat: 40, lon: -70 } diff --git a/docs/examples/guide/640da6dd719a34975b5627dfa5fcdd55.asciidoc b/docs/examples/guide/640da6dd719a34975b5627dfa5fcdd55.asciidoc index 87610fa161..ceb997d653 100644 --- a/docs/examples/guide/640da6dd719a34975b5627dfa5fcdd55.asciidoc +++ b/docs/examples/guide/640da6dd719a34975b5627dfa5fcdd55.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "xpack.monitoring.collection.enabled": true + 'xpack.monitoring.collection.enabled' => true } } ) diff --git a/docs/examples/guide/640e4f2c2d29f9851320a70927bd7a6c.asciidoc b/docs/examples/guide/640e4f2c2d29f9851320a70927bd7a6c.asciidoc index 59e12dc8bc..ade82466df 100644 --- a/docs/examples/guide/640e4f2c2d29f9851320a70927bd7a6c.asciidoc +++ b/docs/examples/guide/640e4f2c2d29f9851320a70927bd7a6c.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "indices.lifecycle.poll_interval": nil + 'indices.lifecycle.poll_interval' => nil } } ) diff --git a/docs/examples/guide/64622409407316d2d47094e692d9b516.asciidoc b/docs/examples/guide/64622409407316d2d47094e692d9b516.asciidoc index 7a2a276282..f258e13d73 100644 --- a/docs/examples/guide/64622409407316d2d47094e692d9b516.asciidoc +++ b/docs/examples/guide/64622409407316d2d47094e692d9b516.asciidoc @@ -5,7 +5,7 @@ response = client.ml.evaluate_data_frame( index: 'student_performance_mathematics_reg', query: { term: { - "ml.is_training": { + 'ml.is_training' => { value: false } } diff --git a/docs/examples/guide/657cf67bbc48f3b8c7fa15e275a5ef72.asciidoc b/docs/examples/guide/657cf67bbc48f3b8c7fa15e275a5ef72.asciidoc index c0677f3cf4..c19003cff0 100644 --- a/docs/examples/guide/657cf67bbc48f3b8c7fa15e275a5ef72.asciidoc +++ b/docs/examples/guide/657cf67bbc48f3b8c7fa15e275a5ef72.asciidoc @@ -6,7 +6,7 @@ response = client.cluster.put_component_template( template: { mappings: { properties: { - "host.name": { + 'host.name' => { type: 'keyword' } } diff --git a/docs/examples/guide/6856f7c6a732ab55ca71c1ee2ec2bbad.asciidoc b/docs/examples/guide/6856f7c6a732ab55ca71c1ee2ec2bbad.asciidoc index 38fd9ee855..7d703f6c47 100644 --- a/docs/examples/guide/6856f7c6a732ab55ca71c1ee2ec2bbad.asciidoc +++ b/docs/examples/guide/6856f7c6a732ab55ca71c1ee2ec2bbad.asciidoc @@ -19,7 +19,7 @@ response = client.index( id: 1, refresh: true, body: { - "network.name": 'net-1', + 'network.name' => 'net-1', latency_histo: { values: [ 0.1, @@ -45,7 +45,7 @@ response = client.index( id: 2, refresh: true, body: { - "network.name": 'net-2', + 'network.name' => 'net-2', latency_histo: { values: [ 0.1, diff --git a/docs/examples/guide/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc b/docs/examples/guide/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc index 6c7b87e34c..8122a10ef3 100644 --- a/docs/examples/guide/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc +++ b/docs/examples/guide/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, highlight: { diff --git a/docs/examples/guide/69d9b8fd364596aa37eae6864d8a6d89.asciidoc b/docs/examples/guide/69d9b8fd364596aa37eae6864d8a6d89.asciidoc index 9d6669c3d0..6e4b5cb2d9 100644 --- a/docs/examples/guide/69d9b8fd364596aa37eae6864d8a6d89.asciidoc +++ b/docs/examples/guide/69d9b8fd364596aa37eae6864d8a6d89.asciidoc @@ -6,7 +6,7 @@ response = client.search( body: { sort: [ { - "result.execution_time": 'desc' + 'result.execution_time' => 'desc' } ] } diff --git a/docs/examples/guide/6a3a578ce37fb2c63ccfab7f75db9bae.asciidoc b/docs/examples/guide/6a3a578ce37fb2c63ccfab7f75db9bae.asciidoc index fadbfec9dc..f3a30d6ace 100644 --- a/docs/examples/guide/6a3a578ce37fb2c63ccfab7f75db9bae.asciidoc +++ b/docs/examples/guide/6a3a578ce37fb2c63ccfab7f75db9bae.asciidoc @@ -3,8 +3,8 @@ response = client.cluster.put_settings( body: { persistent: { - "ingest.geoip.downloader.enabled": false, - "indices.lifecycle.history_index_enabled": false + 'ingest.geoip.downloader.enabled' => false, + 'indices.lifecycle.history_index_enabled' => false } } ) diff --git a/docs/examples/guide/6aa2941855d13f365f70aa8767ecb137.asciidoc b/docs/examples/guide/6aa2941855d13f365f70aa8767ecb137.asciidoc index 444945ae1a..735e95268d 100644 --- a/docs/examples/guide/6aa2941855d13f365f70aa8767ecb137.asciidoc +++ b/docs/examples/guide/6aa2941855d13f365f70aa8767ecb137.asciidoc @@ -46,7 +46,7 @@ response = client.search( } }, sort: { - "city.raw": 'asc' + 'city.raw' => 'asc' }, aggregations: { "Cities": { diff --git a/docs/examples/guide/6af9dc1c3240aa8e623ff3622bcb1b48.asciidoc b/docs/examples/guide/6af9dc1c3240aa8e623ff3622bcb1b48.asciidoc index fae4bd7ec7..24cec3e577 100644 --- a/docs/examples/guide/6af9dc1c3240aa8e623ff3622bcb1b48.asciidoc +++ b/docs/examples/guide/6af9dc1c3240aa8e623ff3622bcb1b48.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.routing.allocation.exclude._ip": '192.168.2.*' + 'cluster.routing.allocation.exclude._ip' => '192.168.2.*' } } ) diff --git a/docs/examples/guide/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc b/docs/examples/guide/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc index e5d610f46c..cb4d64e948 100644 --- a/docs/examples/guide/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc +++ b/docs/examples/guide/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc @@ -12,12 +12,12 @@ response = client.search( }, { match: { - "title.original": 'quick brown fox' + 'title.original' => 'quick brown fox' } }, { match: { - "title.shingles": 'quick brown fox' + 'title.shingles' => 'quick brown fox' } } ] diff --git a/docs/examples/guide/6c72f6791ba9223943f7556c5bfaa728.asciidoc b/docs/examples/guide/6c72f6791ba9223943f7556c5bfaa728.asciidoc index 4a22713d9e..5cb5c17ec4 100644 --- a/docs/examples/guide/6c72f6791ba9223943f7556c5bfaa728.asciidoc +++ b/docs/examples/guide/6c72f6791ba9223943f7556c5bfaa728.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, fields: [ diff --git a/docs/examples/guide/6cd083045bf06e80b83889a939a18451.asciidoc b/docs/examples/guide/6cd083045bf06e80b83889a939a18451.asciidoc index 26d04bf588..4e3c9675a1 100644 --- a/docs/examples/guide/6cd083045bf06e80b83889a939a18451.asciidoc +++ b/docs/examples/guide/6cd083045bf06e80b83889a939a18451.asciidoc @@ -44,12 +44,12 @@ response = client.search( must: [ { match: { - "user.first": 'Alice' + 'user.first' => 'Alice' } }, { match: { - "user.last": 'Smith' + 'user.last' => 'Smith' } } ] @@ -72,12 +72,12 @@ response = client.search( must: [ { match: { - "user.first": 'Alice' + 'user.first' => 'Alice' } }, { match: { - "user.last": 'White' + 'user.last' => 'White' } } ] @@ -86,7 +86,7 @@ response = client.search( inner_hits: { highlight: { fields: { - "user.first": {} + 'user.first' => {} } } } diff --git a/docs/examples/guide/6cf3307c00f464c46475e352e067d714.asciidoc b/docs/examples/guide/6cf3307c00f464c46475e352e067d714.asciidoc index d6910c7aa2..97ada0749d 100644 --- a/docs/examples/guide/6cf3307c00f464c46475e352e067d714.asciidoc +++ b/docs/examples/guide/6cf3307c00f464c46475e352e067d714.asciidoc @@ -10,7 +10,7 @@ response = client.search( }, filter: { geo_bounding_box: { - "pin.location": { + 'pin.location' => { top_left: { lat: 40.73, lon: -74.1 diff --git a/docs/examples/guide/6ea062455229151e311869a81ee40252.asciidoc b/docs/examples/guide/6ea062455229151e311869a81ee40252.asciidoc index ad44163eb6..c597c84956 100644 --- a/docs/examples/guide/6ea062455229151e311869a81ee40252.asciidoc +++ b/docs/examples/guide/6ea062455229151e311869a81ee40252.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } @@ -16,7 +16,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } @@ -28,7 +28,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/6f2208e90810ea6da751fe25fcf456ec.asciidoc b/docs/examples/guide/6f2208e90810ea6da751fe25fcf456ec.asciidoc index b16b009d0c..5ad0bc57e0 100644 --- a/docs/examples/guide/6f2208e90810ea6da751fe25fcf456ec.asciidoc +++ b/docs/examples/guide/6f2208e90810ea6da751fe25fcf456ec.asciidoc @@ -4,7 +4,7 @@ response = client.index( index: 'metrics_index', id: 1, body: { - "network.name": 'net-1', + 'network.name' => 'net-1', latency_histo: { values: [ 1, @@ -29,7 +29,7 @@ response = client.index( index: 'metrics_index', id: 2, body: { - "network.name": 'net-2', + 'network.name' => 'net-2', latency_histo: { values: [ 1, diff --git a/docs/examples/guide/7067a498bb6c788854a26443a64b843a.asciidoc b/docs/examples/guide/7067a498bb6c788854a26443a64b843a.asciidoc index 668aae3272..fc0773bed3 100644 --- a/docs/examples/guide/7067a498bb6c788854a26443a64b843a.asciidoc +++ b/docs/examples/guide/7067a498bb6c788854a26443a64b843a.asciidoc @@ -3,7 +3,7 @@ response = client.search( body: { runtime_mappings: { - "amount.signed": { + 'amount.signed' => { type: 'double', script: "\n double amount = doc['amount'].value;\n if (doc['type'].value == 'expense') {\n amount *= -1;\n }\n emit(amount);\n " } @@ -12,7 +12,7 @@ response = client.search( bool: { filter: { range: { - "amount.signed": { + 'amount.signed' => { lt: 10 } } diff --git a/docs/examples/guide/711443504b69d0d296e717c716a223e2.asciidoc b/docs/examples/guide/711443504b69d0d296e717c716a223e2.asciidoc index 9cc3a1c9b2..fbab109146 100644 --- a/docs/examples/guide/711443504b69d0d296e717c716a223e2.asciidoc +++ b/docs/examples/guide/711443504b69d0d296e717c716a223e2.asciidoc @@ -14,12 +14,12 @@ response = client.search( must: [ { match: { - "driver.vehicle.make": 'Powell Motors' + 'driver.vehicle.make' => 'Powell Motors' } }, { match: { - "driver.vehicle.model": 'Canyonero' + 'driver.vehicle.model' => 'Canyonero' } } ] diff --git a/docs/examples/guide/73250f845738c428246a3ade66a8f54c.asciidoc b/docs/examples/guide/73250f845738c428246a3ade66a8f54c.asciidoc index 08acec51c1..78d1509e59 100644 --- a/docs/examples/guide/73250f845738c428246a3ade66a8f54c.asciidoc +++ b/docs/examples/guide/73250f845738c428246a3ade66a8f54c.asciidoc @@ -29,7 +29,7 @@ response = client.search( body: { size: 0, runtime_mappings: { - "weight.combined": { + 'weight.combined' => { type: 'double', script: "\n double s = 0;\n for (double w : doc['weight']) {\n s += w;\n }\n emit(s);\n " } diff --git a/docs/examples/guide/73be1f93d789264e5b972ddb5991bc66.asciidoc b/docs/examples/guide/73be1f93d789264e5b972ddb5991bc66.asciidoc index 97a5797419..ddaf86b2a1 100644 --- a/docs/examples/guide/73be1f93d789264e5b972ddb5991bc66.asciidoc +++ b/docs/examples/guide/73be1f93d789264e5b972ddb5991bc66.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "logger.org.elasticsearch.discovery": 'DEBUG' + 'logger.org.elasticsearch.discovery' => 'DEBUG' } } ) diff --git a/docs/examples/guide/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc b/docs/examples/guide/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc index f894cb224b..2296b26fd4 100644 --- a/docs/examples/guide/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc +++ b/docs/examples/guide/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.routing.allocation.enable": nil + 'cluster.routing.allocation.enable' => nil } } ) diff --git a/docs/examples/guide/7456ef459d510d66ba4492cc9fbdc6c6.asciidoc b/docs/examples/guide/7456ef459d510d66ba4492cc9fbdc6c6.asciidoc index 2913c0d787..7f77edf783 100644 --- a/docs/examples/guide/7456ef459d510d66ba4492cc9fbdc6c6.asciidoc +++ b/docs/examples/guide/7456ef459d510d66ba4492cc9fbdc6c6.asciidoc @@ -9,7 +9,7 @@ response = client.cluster.put_settings( mode: nil, seeds: nil, skip_unavailable: nil, - "transport.compress": nil + 'transport.compress' => nil } } } diff --git a/docs/examples/guide/747a4b5001423938d7d05399d28f1995.asciidoc b/docs/examples/guide/747a4b5001423938d7d05399d28f1995.asciidoc index f1a516a9e3..a388fcf38a 100644 --- a/docs/examples/guide/747a4b5001423938d7d05399d28f1995.asciidoc +++ b/docs/examples/guide/747a4b5001423938d7d05399d28f1995.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "indices.lifecycle.poll_interval": '1m' + 'indices.lifecycle.poll_interval' => '1m' } } ) diff --git a/docs/examples/guide/75c347b181112d2c4538c01ade903afe.asciidoc b/docs/examples/guide/75c347b181112d2c4538c01ade903afe.asciidoc index 210ad8e32c..87a6ce8cf2 100644 --- a/docs/examples/guide/75c347b181112d2c4538c01ade903afe.asciidoc +++ b/docs/examples/guide/75c347b181112d2c4538c01ade903afe.asciidoc @@ -6,7 +6,7 @@ response = client.indices.validate_query( body: { query: { match: { - "user.id": { + 'user.id' => { query: 'kimchy', fuzziness: 'auto' } diff --git a/docs/examples/guide/76c167d8ab305cb43b594f140c902dfe.asciidoc b/docs/examples/guide/76c167d8ab305cb43b594f140c902dfe.asciidoc index 645b18d17d..1096e55f6b 100644 --- a/docs/examples/guide/76c167d8ab305cb43b594f140c902dfe.asciidoc +++ b/docs/examples/guide/76c167d8ab305cb43b594f140c902dfe.asciidoc @@ -5,9 +5,9 @@ response = client.indices.shrink( target: 'my_target_index', body: { settings: { - "index.number_of_replicas": 1, - "index.number_of_shards": 1, - "index.codec": 'best_compression' + 'index.number_of_replicas' => 1, + 'index.number_of_shards' => 1, + 'index.codec' => 'best_compression' }, aliases: { my_search_indices: {} diff --git a/docs/examples/guide/790c49fe2ec638e5e8db51a9236bba35.asciidoc b/docs/examples/guide/790c49fe2ec638e5e8db51a9236bba35.asciidoc index 3a498a77b6..ea327204d5 100644 --- a/docs/examples/guide/790c49fe2ec638e5e8db51a9236bba35.asciidoc +++ b/docs/examples/guide/790c49fe2ec638e5e8db51a9236bba35.asciidoc @@ -10,7 +10,7 @@ response = client.search( }, filter: { geo_bounding_box: { - "pin.location": { + 'pin.location' => { top_left: { lat: 40.73, lon: -74.1 diff --git a/docs/examples/guide/79feb4a0c0a21b7015a52f9736cd4683.asciidoc b/docs/examples/guide/79feb4a0c0a21b7015a52f9736cd4683.asciidoc index 31807ef9ce..5aa84331b4 100644 --- a/docs/examples/guide/79feb4a0c0a21b7015a52f9736cd4683.asciidoc +++ b/docs/examples/guide/79feb4a0c0a21b7015a52f9736cd4683.asciidoc @@ -58,7 +58,7 @@ response = client.search( path: 'comments.votes', query: { match: { - "comments.votes.voter": 'kimchy' + 'comments.votes.voter' => 'kimchy' } }, inner_hits: {} diff --git a/docs/examples/guide/7b3e913368e96eaa6e22e0d03c81310e.asciidoc b/docs/examples/guide/7b3e913368e96eaa6e22e0d03c81310e.asciidoc index c8ce52a6ab..fea4b10462 100644 --- a/docs/examples/guide/7b3e913368e96eaa6e22e0d03c81310e.asciidoc +++ b/docs/examples/guide/7b3e913368e96eaa6e22e0d03c81310e.asciidoc @@ -4,7 +4,7 @@ response = client.indices.create( index: 'my-index-000001', body: { settings: { - "index.store.type": 'hybridfs' + 'index.store.type' => 'hybridfs' } } ) diff --git a/docs/examples/guide/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc b/docs/examples/guide/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc index ae39efe336..bfe7b4214e 100644 --- a/docs/examples/guide/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc +++ b/docs/examples/guide/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc @@ -10,7 +10,7 @@ response = client.search( body: { query: { range: { - "http.response.bytes": { + 'http.response.bytes' => { lt: 2_000_000 } } diff --git a/docs/examples/guide/7fe9f0a583e079f7fc6fd64d12b6e9e5.asciidoc b/docs/examples/guide/7fe9f0a583e079f7fc6fd64d12b6e9e5.asciidoc index 0b4e314432..22721e0621 100644 --- a/docs/examples/guide/7fe9f0a583e079f7fc6fd64d12b6e9e5.asciidoc +++ b/docs/examples/guide/7fe9f0a583e079f7fc6fd64d12b6e9e5.asciidoc @@ -5,7 +5,7 @@ response = client.search( size: 0, body: { runtime_mappings: { - "price.weighted": { + 'price.weighted' => { type: 'double', script: "\n double price = doc['price'].value;\n if (doc['promoted'].value) {\n price *= 0.8;\n }\n emit(price);\n " } diff --git a/docs/examples/guide/81612c2537386e031b7eb604f6756a71.asciidoc b/docs/examples/guide/81612c2537386e031b7eb604f6756a71.asciidoc index 8824a16df7..4db274b124 100644 --- a/docs/examples/guide/81612c2537386e031b7eb604f6756a71.asciidoc +++ b/docs/examples/guide/81612c2537386e031b7eb604f6756a71.asciidoc @@ -5,7 +5,7 @@ response = client.indices.clone( target: 'my_target_index', body: { settings: { - "index.number_of_shards": 5 + 'index.number_of_shards' => 5 }, aliases: { my_search_indices: {} diff --git a/docs/examples/guide/8194f1fae6aa72ab91ea559daad932d4.asciidoc b/docs/examples/guide/8194f1fae6aa72ab91ea559daad932d4.asciidoc index aa8bd31262..7b23195fec 100644 --- a/docs/examples/guide/8194f1fae6aa72ab91ea559daad932d4.asciidoc +++ b/docs/examples/guide/8194f1fae6aa72ab91ea559daad932d4.asciidoc @@ -6,7 +6,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/819e00cc6547d925d80090b94e0650d7.asciidoc b/docs/examples/guide/819e00cc6547d925d80090b94e0650d7.asciidoc index 2ebb8a7559..85d352a923 100644 --- a/docs/examples/guide/819e00cc6547d925d80090b94e0650d7.asciidoc +++ b/docs/examples/guide/819e00cc6547d925d80090b94e0650d7.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, _source: [ diff --git a/docs/examples/guide/820f689eaaef15fc07abd1073fa880f8.asciidoc b/docs/examples/guide/820f689eaaef15fc07abd1073fa880f8.asciidoc index 610639a4b6..3a68cccb2f 100644 --- a/docs/examples/guide/820f689eaaef15fc07abd1073fa880f8.asciidoc +++ b/docs/examples/guide/820f689eaaef15fc07abd1073fa880f8.asciidoc @@ -6,7 +6,7 @@ response = client.search( size: 20, query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/844928da2ff9a1394af5347a5e2e4f78.asciidoc b/docs/examples/guide/844928da2ff9a1394af5347a5e2e4f78.asciidoc index 213478f0d9..43ed7d73c0 100644 --- a/docs/examples/guide/844928da2ff9a1394af5347a5e2e4f78.asciidoc +++ b/docs/examples/guide/844928da2ff9a1394af5347a5e2e4f78.asciidoc @@ -3,11 +3,11 @@ response = client.indices.put_settings( index: 'my-index-000001', body: { - "index.indexing.slowlog.threshold.index.warn": '10s', - "index.indexing.slowlog.threshold.index.info": '5s', - "index.indexing.slowlog.threshold.index.debug": '2s', - "index.indexing.slowlog.threshold.index.trace": '500ms', - "index.indexing.slowlog.source": '1000' + 'index.indexing.slowlog.threshold.index.warn' => '10s', + 'index.indexing.slowlog.threshold.index.info' => '5s', + 'index.indexing.slowlog.threshold.index.debug' => '2s', + 'index.indexing.slowlog.threshold.index.trace' => '500ms', + 'index.indexing.slowlog.source' => '1000' } ) puts response diff --git a/docs/examples/guide/84f3e8524f6ff80e870c03ab71551538.asciidoc b/docs/examples/guide/84f3e8524f6ff80e870c03ab71551538.asciidoc index 12e721f93c..48a97dd3c2 100644 --- a/docs/examples/guide/84f3e8524f6ff80e870c03ab71551538.asciidoc +++ b/docs/examples/guide/84f3e8524f6ff80e870c03ab71551538.asciidoc @@ -6,7 +6,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/85519a614ae18c998986d46bbad82b76.asciidoc b/docs/examples/guide/85519a614ae18c998986d46bbad82b76.asciidoc index c4dff197e6..6a687a5c7a 100644 --- a/docs/examples/guide/85519a614ae18c998986d46bbad82b76.asciidoc +++ b/docs/examples/guide/85519a614ae18c998986d46bbad82b76.asciidoc @@ -10,8 +10,8 @@ response = client.indices.put_index_template( settings: { number_of_shards: 1, number_of_replicas: 1, - "index.lifecycle.name": 'my_policy', - "index.lifecycle.rollover_alias": 'test-alias' + 'index.lifecycle.name' => 'my_policy', + 'index.lifecycle.rollover_alias' => 'test-alias' } } } diff --git a/docs/examples/guide/8582e918a6275472d2eba2e95f1dbe77.asciidoc b/docs/examples/guide/8582e918a6275472d2eba2e95f1dbe77.asciidoc index ea1b4705f6..d9c5bd0e03 100644 --- a/docs/examples/guide/8582e918a6275472d2eba2e95f1dbe77.asciidoc +++ b/docs/examples/guide/8582e918a6275472d2eba2e95f1dbe77.asciidoc @@ -3,14 +3,14 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.routing.allocation.disk.watermark.low": '90%', - "cluster.routing.allocation.disk.watermark.low.max_headroom": '100GB', - "cluster.routing.allocation.disk.watermark.high": '95%', - "cluster.routing.allocation.disk.watermark.high.max_headroom": '20GB', - "cluster.routing.allocation.disk.watermark.flood_stage": '97%', - "cluster.routing.allocation.disk.watermark.flood_stage.max_headroom": '5GB', - "cluster.routing.allocation.disk.watermark.flood_stage.frozen": '97%', - "cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom": '5GB' + 'cluster.routing.allocation.disk.watermark.low' => '90%', + 'cluster.routing.allocation.disk.watermark.low.max_headroom' => '100GB', + 'cluster.routing.allocation.disk.watermark.high' => '95%', + 'cluster.routing.allocation.disk.watermark.high.max_headroom' => '20GB', + 'cluster.routing.allocation.disk.watermark.flood_stage' => '97%', + 'cluster.routing.allocation.disk.watermark.flood_stage.max_headroom' => '5GB', + 'cluster.routing.allocation.disk.watermark.flood_stage.frozen' => '97%', + 'cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom' => '5GB' } } ) @@ -20,7 +20,7 @@ response = client.indices.put_settings( index: '*', expand_wildcards: 'all', body: { - "index.blocks.read_only_allow_delete": nil + 'index.blocks.read_only_allow_delete' => nil } ) puts response diff --git a/docs/examples/guide/863253bf0ab7d227ff72a0a384f4de8c.asciidoc b/docs/examples/guide/863253bf0ab7d227ff72a0a384f4de8c.asciidoc index 59e12dc8bc..ade82466df 100644 --- a/docs/examples/guide/863253bf0ab7d227ff72a0a384f4de8c.asciidoc +++ b/docs/examples/guide/863253bf0ab7d227ff72a0a384f4de8c.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "indices.lifecycle.poll_interval": nil + 'indices.lifecycle.poll_interval' => nil } } ) diff --git a/docs/examples/guide/867f7d43a78066731ead2e223960fc07.asciidoc b/docs/examples/guide/867f7d43a78066731ead2e223960fc07.asciidoc index 7e90c71357..83c0726045 100644 --- a/docs/examples/guide/867f7d43a78066731ead2e223960fc07.asciidoc +++ b/docs/examples/guide/867f7d43a78066731ead2e223960fc07.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "action.destructive_requires_name": false + 'action.destructive_requires_name' => false } } ) diff --git a/docs/examples/guide/8703f3b1b3895543abc36e2a7a0013d3.asciidoc b/docs/examples/guide/8703f3b1b3895543abc36e2a7a0013d3.asciidoc index df27435751..420db430b5 100644 --- a/docs/examples/guide/8703f3b1b3895543abc36e2a7a0013d3.asciidoc +++ b/docs/examples/guide/8703f3b1b3895543abc36e2a7a0013d3.asciidoc @@ -14,7 +14,7 @@ response = client.indices.create( index: 'index_3', body: { settings: { - "index.priority": 10 + 'index.priority' => 10 } } ) @@ -24,7 +24,7 @@ response = client.indices.create( index: 'index_4', body: { settings: { - "index.priority": 5 + 'index.priority' => 5 } } ) diff --git a/docs/examples/guide/87416e6a1ca2da324dbed6deb05303eb.asciidoc b/docs/examples/guide/87416e6a1ca2da324dbed6deb05303eb.asciidoc index 7c7389a3f0..6f14013326 100644 --- a/docs/examples/guide/87416e6a1ca2da324dbed6deb05303eb.asciidoc +++ b/docs/examples/guide/87416e6a1ca2da324dbed6deb05303eb.asciidoc @@ -5,7 +5,7 @@ response = client.index( id: 1, refresh: true, body: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } ) puts response @@ -21,7 +21,7 @@ response = client.count( body: { query: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/88b19973b970adf9b73fca82017d4951.asciidoc b/docs/examples/guide/88b19973b970adf9b73fca82017d4951.asciidoc index deb1b100fd..280dfb3ffa 100644 --- a/docs/examples/guide/88b19973b970adf9b73fca82017d4951.asciidoc +++ b/docs/examples/guide/88b19973b970adf9b73fca82017d4951.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/8b301122cbf42be6eafeda714a36559e.asciidoc b/docs/examples/guide/8b301122cbf42be6eafeda714a36559e.asciidoc index d12f890892..ad59d2c541 100644 --- a/docs/examples/guide/8b301122cbf42be6eafeda714a36559e.asciidoc +++ b/docs/examples/guide/8b301122cbf42be6eafeda714a36559e.asciidoc @@ -12,12 +12,12 @@ response = client.logstash.put_pipeline( username: 'elastic', pipeline: "input {}\n filter { grok {} }\n output {}", pipeline_settings: { - "pipeline.workers": 1, - "pipeline.batch.size": 125, - "pipeline.batch.delay": 50, - "queue.type": 'memory', - "queue.max_bytes": '1gb', - "queue.checkpoint.writes": 1024 + 'pipeline.workers' => 1, + 'pipeline.batch.size' => 125, + 'pipeline.batch.delay' => 50, + 'queue.type' => 'memory', + 'queue.max_bytes' => '1gb', + 'queue.checkpoint.writes' => 1024 } } ) diff --git a/docs/examples/guide/8b7956a2b88fd798a895d3466d671b58.asciidoc b/docs/examples/guide/8b7956a2b88fd798a895d3466d671b58.asciidoc index d7c32d6de8..031541c239 100644 --- a/docs/examples/guide/8b7956a2b88fd798a895d3466d671b58.asciidoc +++ b/docs/examples/guide/8b7956a2b88fd798a895d3466d671b58.asciidoc @@ -3,8 +3,8 @@ response = client.cluster.put_settings( body: { persistent: { - "http.tracer.include": '*', - "http.tracer.exclude": '' + 'http.tracer.include' => '*', + 'http.tracer.exclude' => '' } } ) diff --git a/docs/examples/guide/8d421c5bec38eecce4679b219cacc9db.asciidoc b/docs/examples/guide/8d421c5bec38eecce4679b219cacc9db.asciidoc index 43956146fa..b89963631f 100644 --- a/docs/examples/guide/8d421c5bec38eecce4679b219cacc9db.asciidoc +++ b/docs/examples/guide/8d421c5bec38eecce4679b219cacc9db.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { size: 0, runtime_mappings: { - "load_time.seconds": { + 'load_time.seconds' => { type: 'long', script: { source: "emit(doc['load_time'].value / params.timeUnit)", diff --git a/docs/examples/guide/8d7193902a353872740a3324c60c5001.asciidoc b/docs/examples/guide/8d7193902a353872740a3324c60c5001.asciidoc index bfd706f083..4d7923342e 100644 --- a/docs/examples/guide/8d7193902a353872740a3324c60c5001.asciidoc +++ b/docs/examples/guide/8d7193902a353872740a3324c60c5001.asciidoc @@ -5,8 +5,8 @@ response = client.indices.create( body: { settings: { index: { - "sort.field": 'timestamp', - "sort.order": 'desc' + 'sort.field' => 'timestamp', + 'sort.order' => 'desc' } }, mappings: { diff --git a/docs/examples/guide/8e286a205a1f84f888a6d99f2620c80e.asciidoc b/docs/examples/guide/8e286a205a1f84f888a6d99f2620c80e.asciidoc index 2d08ee5400..59b020a4a3 100644 --- a/docs/examples/guide/8e286a205a1f84f888a6d99f2620c80e.asciidoc +++ b/docs/examples/guide/8e286a205a1f84f888a6d99f2620c80e.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "logger.org.elasticsearch.deprecation": 'OFF' + 'logger.org.elasticsearch.deprecation' => 'OFF' } } ) diff --git a/docs/examples/guide/8f0c5c81cdb902c136db821947ee70a1.asciidoc b/docs/examples/guide/8f0c5c81cdb902c136db821947ee70a1.asciidoc index 9d8c1a9970..29f8328a5c 100644 --- a/docs/examples/guide/8f0c5c81cdb902c136db821947ee70a1.asciidoc +++ b/docs/examples/guide/8f0c5c81cdb902c136db821947ee70a1.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { size: 0, runtime_mappings: { - "price.adjusted": { + 'price.adjusted' => { type: 'double', script: "\n double price = doc['price'].value;\n if (doc['promoted'].value) {\n price *= 0.8;\n }\n emit(price);\n " } diff --git a/docs/examples/guide/9501e6c8e95c21838653ea15b9b7ed5f.asciidoc b/docs/examples/guide/9501e6c8e95c21838653ea15b9b7ed5f.asciidoc index 24760e7df4..b8bf89c539 100644 --- a/docs/examples/guide/9501e6c8e95c21838653ea15b9b7ed5f.asciidoc +++ b/docs/examples/guide/9501e6c8e95c21838653ea15b9b7ed5f.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { term: { - "query.extraction_result": 'failed' + 'query.extraction_result' => 'failed' } } } diff --git a/docs/examples/guide/956cb470258024af964cd2dabbaf7c7c.asciidoc b/docs/examples/guide/956cb470258024af964cd2dabbaf7c7c.asciidoc index 81c880d75c..97b8b27b64 100644 --- a/docs/examples/guide/956cb470258024af964cd2dabbaf7c7c.asciidoc +++ b/docs/examples/guide/956cb470258024af964cd2dabbaf7c7c.asciidoc @@ -3,8 +3,8 @@ response = client.indices.put_settings( index: 'my-index', body: { - "index.routing.allocation.require.data": nil, - "index.routing.allocation.include._tier_preference": 'data_warm,data_hot' + 'index.routing.allocation.require.data' => nil, + 'index.routing.allocation.include._tier_preference' => 'data_warm,data_hot' } ) puts response diff --git a/docs/examples/guide/95c03bdef4faf6bef039c986f4cb3aba.asciidoc b/docs/examples/guide/95c03bdef4faf6bef039c986f4cb3aba.asciidoc index 907339e3e7..89264f02cf 100644 --- a/docs/examples/guide/95c03bdef4faf6bef039c986f4cb3aba.asciidoc +++ b/docs/examples/guide/95c03bdef4faf6bef039c986f4cb3aba.asciidoc @@ -6,7 +6,7 @@ response = client.search( body: { query: { match: { - "result.condition.met": true + 'result.condition.met' => true } } } diff --git a/docs/examples/guide/96b9289c3c4c6b135ab3386562c4ee8d.asciidoc b/docs/examples/guide/96b9289c3c4c6b135ab3386562c4ee8d.asciidoc index c22ee2bed1..7f7016e5c3 100644 --- a/docs/examples/guide/96b9289c3c4c6b135ab3386562c4ee8d.asciidoc +++ b/docs/examples/guide/96b9289c3c4c6b135ab3386562c4ee8d.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.max_shards_per_node": 1200 + 'cluster.max_shards_per_node' => 1200 } } ) diff --git a/docs/examples/guide/97f5df84efec655f479fad78bc392d4d.asciidoc b/docs/examples/guide/97f5df84efec655f479fad78bc392d4d.asciidoc index f3a35a8297..e8d52a980f 100644 --- a/docs/examples/guide/97f5df84efec655f479fad78bc392d4d.asciidoc +++ b/docs/examples/guide/97f5df84efec655f479fad78bc392d4d.asciidoc @@ -6,7 +6,7 @@ response = client.search( profile: true, query: { term: { - "user.id": { + 'user.id' => { value: 'elkbee' } } diff --git a/docs/examples/guide/983fbb78e57e8fe98db38cf2d217e943.asciidoc b/docs/examples/guide/983fbb78e57e8fe98db38cf2d217e943.asciidoc index 2cb4aca699..41a31c1d5d 100644 --- a/docs/examples/guide/983fbb78e57e8fe98db38cf2d217e943.asciidoc +++ b/docs/examples/guide/983fbb78e57e8fe98db38cf2d217e943.asciidoc @@ -42,7 +42,7 @@ response = client.search( path: 'comments', query: { match: { - "comments.text": 'words' + 'comments.text' => 'words' } }, inner_hits: { diff --git a/docs/examples/guide/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc b/docs/examples/guide/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc index 12202c8fb0..90467c2fbc 100644 --- a/docs/examples/guide/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc +++ b/docs/examples/guide/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc @@ -4,13 +4,13 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, highlight: { fields: { body: {}, - "blog.title": { + 'blog.title' => { number_of_fragments: 0 } } diff --git a/docs/examples/guide/998651b98e152add530084a631a4ab5a.asciidoc b/docs/examples/guide/998651b98e152add530084a631a4ab5a.asciidoc index f1a516a9e3..a388fcf38a 100644 --- a/docs/examples/guide/998651b98e152add530084a631a4ab5a.asciidoc +++ b/docs/examples/guide/998651b98e152add530084a631a4ab5a.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "indices.lifecycle.poll_interval": '1m' + 'indices.lifecycle.poll_interval' => '1m' } } ) diff --git a/docs/examples/guide/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc b/docs/examples/guide/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc index 73bd4a608f..70760c333e 100644 --- a/docs/examples/guide/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc +++ b/docs/examples/guide/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc @@ -5,7 +5,7 @@ response = client.index( id: 1, refresh: true, body: { - "system.cpu.idle.pct": 0.908 + 'system.cpu.idle.pct' => 0.908 } ) puts response @@ -15,7 +15,7 @@ response = client.index( id: 1, refresh: true, body: { - "system.cpu.idle.pct": 0.105 + 'system.cpu.idle.pct' => 0.105 } ) puts response diff --git a/docs/examples/guide/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc b/docs/examples/guide/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc index 8d62dee41a..f0162ba4a2 100644 --- a/docs/examples/guide/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc +++ b/docs/examples/guide/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc @@ -9,12 +9,12 @@ response = client.search( must: [ { match: { - "result.condition.met": true + 'result.condition.met' => true } }, { range: { - "result.execution_time": { + 'result.execution_time' => { from: 'now-10s' } } diff --git a/docs/examples/guide/9beb260834f8cfb240f6308950dbb9c2.asciidoc b/docs/examples/guide/9beb260834f8cfb240f6308950dbb9c2.asciidoc index 94679c0064..0bc4d3a406 100644 --- a/docs/examples/guide/9beb260834f8cfb240f6308950dbb9c2.asciidoc +++ b/docs/examples/guide/9beb260834f8cfb240f6308950dbb9c2.asciidoc @@ -5,7 +5,7 @@ response = client.search( sort: [ { _geo_distance: { - "pin.location": 'drm3btev3e86', + 'pin.location' => 'drm3btev3e86', order: 'asc', unit: 'km' } diff --git a/docs/examples/guide/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc b/docs/examples/guide/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc index 5b60e24e06..cce1d3cf75 100644 --- a/docs/examples/guide/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc +++ b/docs/examples/guide/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc @@ -7,7 +7,7 @@ response = client.delete_by_query( body: { query: { range: { - "http.response.bytes": { + 'http.response.bytes' => { lt: 2_000_000 } } diff --git a/docs/examples/guide/9f22a0920cc763eefa233ced963d9624.asciidoc b/docs/examples/guide/9f22a0920cc763eefa233ced963d9624.asciidoc index a3af576f72..fe31c4fb37 100644 --- a/docs/examples/guide/9f22a0920cc763eefa233ced963d9624.asciidoc +++ b/docs/examples/guide/9f22a0920cc763eefa233ced963d9624.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { span_term: { - "user.id": { + 'user.id' => { term: 'kimchy', boost: 2 } diff --git a/docs/examples/guide/9feff356f302ea4915347ab71cc4887a.asciidoc b/docs/examples/guide/9feff356f302ea4915347ab71cc4887a.asciidoc index b48d9b2e4e..b8df274c04 100644 --- a/docs/examples/guide/9feff356f302ea4915347ab71cc4887a.asciidoc +++ b/docs/examples/guide/9feff356f302ea4915347ab71cc4887a.asciidoc @@ -11,7 +11,7 @@ response = client.indices.simulate_template( priority: 10, template: { settings: { - "index.number_of_replicas": 1 + 'index.number_of_replicas' => 1 } } } diff --git a/docs/examples/guide/a0497157fdefecd04e597edb800a1a95.asciidoc b/docs/examples/guide/a0497157fdefecd04e597edb800a1a95.asciidoc index 408abd5f8c..35c9f3782d 100644 --- a/docs/examples/guide/a0497157fdefecd04e597edb800a1a95.asciidoc +++ b/docs/examples/guide/a0497157fdefecd04e597edb800a1a95.asciidoc @@ -5,7 +5,7 @@ response = client.search( _source: 'obj.*', query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/a0c64894f14d28b7e0c902add71d2e9a.asciidoc b/docs/examples/guide/a0c64894f14d28b7e0c902add71d2e9a.asciidoc index f392e61fd7..9af8726e17 100644 --- a/docs/examples/guide/a0c64894f14d28b7e0c902add71d2e9a.asciidoc +++ b/docs/examples/guide/a0c64894f14d28b7e0c902add71d2e9a.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "xpack.profiling.templates.enabled": true + 'xpack.profiling.templates.enabled' => true } } ) diff --git a/docs/examples/guide/a0d53dcb3df938fc0a01d248571a41e4.asciidoc b/docs/examples/guide/a0d53dcb3df938fc0a01d248571a41e4.asciidoc index a881ef5a09..a01190e805 100644 --- a/docs/examples/guide/a0d53dcb3df938fc0a01d248571a41e4.asciidoc +++ b/docs/examples/guide/a0d53dcb3df938fc0a01d248571a41e4.asciidoc @@ -3,7 +3,7 @@ response = client.search( body: { runtime_mappings: { - "price.discounted": { + 'price.discounted' => { type: 'double', script: "\n double price = doc['price'].value;\n if (doc['product'].value == 'mad max') {\n price *= 0.8;\n }\n emit(price);\n " } diff --git a/docs/examples/guide/a1f70bc71b763b58206814c40a7440e7.asciidoc b/docs/examples/guide/a1f70bc71b763b58206814c40a7440e7.asciidoc index e6c9b5e937..273dbddda4 100644 --- a/docs/examples/guide/a1f70bc71b763b58206814c40a7440e7.asciidoc +++ b/docs/examples/guide/a1f70bc71b763b58206814c40a7440e7.asciidoc @@ -2,7 +2,7 @@ ---- response = client.watcher.update_settings( body: { - "index.auto_expand_replicas": '0-4' + 'index.auto_expand_replicas' => '0-4' } ) puts response diff --git a/docs/examples/guide/a425fcab60f603504becee7d001f0a4b.asciidoc b/docs/examples/guide/a425fcab60f603504becee7d001f0a4b.asciidoc index ee51e07015..c2fe7ecb23 100644 --- a/docs/examples/guide/a425fcab60f603504becee7d001f0a4b.asciidoc +++ b/docs/examples/guide/a425fcab60f603504becee7d001f0a4b.asciidoc @@ -3,7 +3,7 @@ response = client.indices.put_settings( index: 'index_4', body: { - "index.priority": 1 + 'index.priority' => 1 } ) puts response diff --git a/docs/examples/guide/a4709da258a667cae4199ec3a1e84b3b.asciidoc b/docs/examples/guide/a4709da258a667cae4199ec3a1e84b3b.asciidoc index 0d64d9ebcd..101d944eb4 100644 --- a/docs/examples/guide/a4709da258a667cae4199ec3a1e84b3b.asciidoc +++ b/docs/examples/guide/a4709da258a667cae4199ec3a1e84b3b.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { text_expansion: { - "ml.tokens": { + 'ml.tokens' => { model_id: '.elser_model_1', model_text: 'How to avoid muscle soreness after running?' } diff --git a/docs/examples/guide/a735081e715d385b4d471eea0f2b57da.asciidoc b/docs/examples/guide/a735081e715d385b4d471eea0f2b57da.asciidoc index eab23a6161..a53ca0b4b8 100644 --- a/docs/examples/guide/a735081e715d385b4d471eea0f2b57da.asciidoc +++ b/docs/examples/guide/a735081e715d385b4d471eea0f2b57da.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "slm.retention_schedule": '0 30 1 * * ?' + 'slm.retention_schedule' => '0 30 1 * * ?' } } ) diff --git a/docs/examples/guide/a810da963d3b28d79dcd17be829bb271.asciidoc b/docs/examples/guide/a810da963d3b28d79dcd17be829bb271.asciidoc index 54a70e04c0..41aab2f2eb 100644 --- a/docs/examples/guide/a810da963d3b28d79dcd17be829bb271.asciidoc +++ b/docs/examples/guide/a810da963d3b28d79dcd17be829bb271.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, docvalue_fields: [ diff --git a/docs/examples/guide/a941fd568f2e20e13df909ab24506073.asciidoc b/docs/examples/guide/a941fd568f2e20e13df909ab24506073.asciidoc index cbbb572709..f8027fdd08 100644 --- a/docs/examples/guide/a941fd568f2e20e13df909ab24506073.asciidoc +++ b/docs/examples/guide/a941fd568f2e20e13df909ab24506073.asciidoc @@ -6,7 +6,7 @@ puts response response = client.cluster.put_settings( body: { persistent: { - "xpack.monitoring.collection.enabled": false + 'xpack.monitoring.collection.enabled' => false } } ) diff --git a/docs/examples/guide/a9554396506888e392a1aee0ca28e6fc.asciidoc b/docs/examples/guide/a9554396506888e392a1aee0ca28e6fc.asciidoc index 195cfb4f69..9c77b62780 100644 --- a/docs/examples/guide/a9554396506888e392a1aee0ca28e6fc.asciidoc +++ b/docs/examples/guide/a9554396506888e392a1aee0ca28e6fc.asciidoc @@ -20,7 +20,7 @@ response = client.indices.update_aliases( }, { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } ] diff --git a/docs/examples/guide/a99bf70ae38bdf1c6f350140b25e0422.asciidoc b/docs/examples/guide/a99bf70ae38bdf1c6f350140b25e0422.asciidoc index 6f09d3d3bc..270145cd97 100644 --- a/docs/examples/guide/a99bf70ae38bdf1c6f350140b25e0422.asciidoc +++ b/docs/examples/guide/a99bf70ae38bdf1c6f350140b25e0422.asciidoc @@ -6,7 +6,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/aaba346e0becdf12db13658296e0b8a1.asciidoc b/docs/examples/guide/aaba346e0becdf12db13658296e0b8a1.asciidoc index ae00732886..d085b8a838 100644 --- a/docs/examples/guide/aaba346e0becdf12db13658296e0b8a1.asciidoc +++ b/docs/examples/guide/aaba346e0becdf12db13658296e0b8a1.asciidoc @@ -4,8 +4,8 @@ response = client.indices.create( index: 'my-index-000001', body: { settings: { - "index.number_of_shards": 2, - "index.lifecycle.name": 'shrink-index' + 'index.number_of_shards' => 2, + 'index.lifecycle.name' => 'shrink-index' } } ) diff --git a/docs/examples/guide/ac73895ca1882cd1ac65b1facfbb5c63.asciidoc b/docs/examples/guide/ac73895ca1882cd1ac65b1facfbb5c63.asciidoc index e2a8588ade..33b2a00167 100644 --- a/docs/examples/guide/ac73895ca1882cd1ac65b1facfbb5c63.asciidoc +++ b/docs/examples/guide/ac73895ca1882cd1ac65b1facfbb5c63.asciidoc @@ -5,7 +5,7 @@ response = client.delete_by_query( body: { query: { match: { - "user.id": 'elkbee' + 'user.id' => 'elkbee' } } } diff --git a/docs/examples/guide/ac85e05c0bf2fd5099fbcb9c492f447e.asciidoc b/docs/examples/guide/ac85e05c0bf2fd5099fbcb9c492f447e.asciidoc index f3f73f378f..7b7834d1f7 100644 --- a/docs/examples/guide/ac85e05c0bf2fd5099fbcb9c492f447e.asciidoc +++ b/docs/examples/guide/ac85e05c0bf2fd5099fbcb9c492f447e.asciidoc @@ -4,7 +4,7 @@ response = client.cluster.put_settings( flat_settings: true, body: { transient: { - "indices.recovery.max_bytes_per_sec": '20mb' + 'indices.recovery.max_bytes_per_sec' => '20mb' } } ) diff --git a/docs/examples/guide/aee4734ee63dbbbd12a21ee886f7a829.asciidoc b/docs/examples/guide/aee4734ee63dbbbd12a21ee886f7a829.asciidoc index add8e9257a..ea7e8a865b 100644 --- a/docs/examples/guide/aee4734ee63dbbbd12a21ee886f7a829.asciidoc +++ b/docs/examples/guide/aee4734ee63dbbbd12a21ee886f7a829.asciidoc @@ -5,7 +5,7 @@ response = client.search( sort: [ { _geo_distance: { - "pin.location": [ + 'pin.location' => [ -70, 40 ], diff --git a/docs/examples/guide/b10668cc742e666fe0eb6a53fd38a93e.asciidoc b/docs/examples/guide/b10668cc742e666fe0eb6a53fd38a93e.asciidoc index 092bfb4a27..a20b6ae3ca 100644 --- a/docs/examples/guide/b10668cc742e666fe0eb6a53fd38a93e.asciidoc +++ b/docs/examples/guide/b10668cc742e666fe0eb6a53fd38a93e.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { wildcard: { - "user.id": { + 'user.id' => { value: 'ki*y', boost: 1, rewrite: 'constant_score' diff --git a/docs/examples/guide/b1f7cb4157b13368373383abd7d2b8cb.asciidoc b/docs/examples/guide/b1f7cb4157b13368373383abd7d2b8cb.asciidoc index 1b11ed339e..43a4205f66 100644 --- a/docs/examples/guide/b1f7cb4157b13368373383abd7d2b8cb.asciidoc +++ b/docs/examples/guide/b1f7cb4157b13368373383abd7d2b8cb.asciidoc @@ -6,11 +6,11 @@ response = client.cluster.put_settings( cluster: { remote: { cluster_two: { - "transport.compress": false + 'transport.compress' => false }, cluster_three: { - "transport.compress": true, - "transport.ping_schedule": '60s' + 'transport.compress' => true, + 'transport.ping_schedule' => '60s' } } } diff --git a/docs/examples/guide/b2652b1763a5fd31e95c983869b433bd.asciidoc b/docs/examples/guide/b2652b1763a5fd31e95c983869b433bd.asciidoc index fb327d8967..884fb4084f 100644 --- a/docs/examples/guide/b2652b1763a5fd31e95c983869b433bd.asciidoc +++ b/docs/examples/guide/b2652b1763a5fd31e95c983869b433bd.asciidoc @@ -4,7 +4,7 @@ response = client.index( index: 'metrics_index', id: 1, body: { - "network.name": 'net-1', + 'network.name' => 'net-1', latency_histo: { values: [ 0.1, @@ -29,7 +29,7 @@ response = client.index( index: 'metrics_index', id: 2, body: { - "network.name": 'net-2', + 'network.name' => 'net-2', latency_histo: { values: [ 0.1, diff --git a/docs/examples/guide/b2e4f3257c0e0aa3311f7270034bbc42.asciidoc b/docs/examples/guide/b2e4f3257c0e0aa3311f7270034bbc42.asciidoc index 18e11dd68a..f933bdc4b6 100644 --- a/docs/examples/guide/b2e4f3257c0e0aa3311f7270034bbc42.asciidoc +++ b/docs/examples/guide/b2e4f3257c0e0aa3311f7270034bbc42.asciidoc @@ -3,8 +3,8 @@ response = client.indices.put_settings( index: 'my-index', body: { - "index.routing.allocation.require.data": nil, - "index.routing.allocation.include._tier_preference": 'data_hot' + 'index.routing.allocation.require.data' => nil, + 'index.routing.allocation.include._tier_preference' => 'data_hot' } ) puts response diff --git a/docs/examples/guide/b4d1fc887e40885cdf6ac2d01487cb76.asciidoc b/docs/examples/guide/b4d1fc887e40885cdf6ac2d01487cb76.asciidoc index d707ea61c8..dcf7020036 100644 --- a/docs/examples/guide/b4d1fc887e40885cdf6ac2d01487cb76.asciidoc +++ b/docs/examples/guide/b4d1fc887e40885cdf6ac2d01487cb76.asciidoc @@ -6,7 +6,7 @@ response = client.search( span_multi: { match: { prefix: { - "user.id": { + 'user.id' => { value: 'ki', boost: 1.08 } diff --git a/docs/examples/guide/b557f114e21dbc6f531d4e7621a08e8f.asciidoc b/docs/examples/guide/b557f114e21dbc6f531d4e7621a08e8f.asciidoc index cfea3caa37..39e3185163 100644 --- a/docs/examples/guide/b557f114e21dbc6f531d4e7621a08e8f.asciidoc +++ b/docs/examples/guide/b557f114e21dbc6f531d4e7621a08e8f.asciidoc @@ -44,7 +44,7 @@ response = client.search( body: { query: { match: { - "meta.other.foo": 'one' + 'meta.other.foo' => 'one' } } } diff --git a/docs/examples/guide/b583bf8d3a2f49d633aa2cfed5606418.asciidoc b/docs/examples/guide/b583bf8d3a2f49d633aa2cfed5606418.asciidoc index c28dcdd1d6..295a10de52 100644 --- a/docs/examples/guide/b583bf8d3a2f49d633aa2cfed5606418.asciidoc +++ b/docs/examples/guide/b583bf8d3a2f49d633aa2cfed5606418.asciidoc @@ -12,7 +12,7 @@ response = client.cluster.put_component_template( "alias2": { filter: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, routing: 'shard-1' diff --git a/docs/examples/guide/b58b17975bbce307b2ccce5051a449e8.asciidoc b/docs/examples/guide/b58b17975bbce307b2ccce5051a449e8.asciidoc index 7a008b052c..bda784836c 100644 --- a/docs/examples/guide/b58b17975bbce307b2ccce5051a449e8.asciidoc +++ b/docs/examples/guide/b58b17975bbce307b2ccce5051a449e8.asciidoc @@ -7,7 +7,7 @@ response = client.search( body: { query: { range: { - "http.response.bytes": { + 'http.response.bytes' => { lt: 2_000_000 } } diff --git a/docs/examples/guide/b638e11d6a8a084290f8934d224abd52.asciidoc b/docs/examples/guide/b638e11d6a8a084290f8934d224abd52.asciidoc index 87c0e6cb06..eba6cdec04 100644 --- a/docs/examples/guide/b638e11d6a8a084290f8934d224abd52.asciidoc +++ b/docs/examples/guide/b638e11d6a8a084290f8934d224abd52.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.max_shards_per_node.frozen": nil + 'cluster.max_shards_per_node.frozen' => nil } } ) diff --git a/docs/examples/guide/b67fa8c560dd10a8e6f226048cd21562.asciidoc b/docs/examples/guide/b67fa8c560dd10a8e6f226048cd21562.asciidoc index ee517ec29d..abfb71a3f5 100644 --- a/docs/examples/guide/b67fa8c560dd10a8e6f226048cd21562.asciidoc +++ b/docs/examples/guide/b67fa8c560dd10a8e6f226048cd21562.asciidoc @@ -7,12 +7,12 @@ response = client.render_search_template( clauses: [ { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, { term: { - "url.domain": 'example.com' + 'url.domain' => 'example.com' } } ] diff --git a/docs/examples/guide/b724f547c5d67e95bbc0a9920e47033c.asciidoc b/docs/examples/guide/b724f547c5d67e95bbc0a9920e47033c.asciidoc index 716647e93a..aebebd604f 100644 --- a/docs/examples/guide/b724f547c5d67e95bbc0a9920e47033c.asciidoc +++ b/docs/examples/guide/b724f547c5d67e95bbc0a9920e47033c.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { term: { - "file_path.tree": '/User/alice/photos/2017/05/16' + 'file_path.tree' => '/User/alice/photos/2017/05/16' } } } diff --git a/docs/examples/guide/b7a9f60b3646efe3834ca8381f8aa560.asciidoc b/docs/examples/guide/b7a9f60b3646efe3834ca8381f8aa560.asciidoc index 875fedeb33..3fdf15b9d7 100644 --- a/docs/examples/guide/b7a9f60b3646efe3834ca8381f8aa560.asciidoc +++ b/docs/examples/guide/b7a9f60b3646efe3834ca8381f8aa560.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "logger.org.elasticsearch.discovery": nil + 'logger.org.elasticsearch.discovery' => nil } } ) diff --git a/docs/examples/guide/bd298b11933605c641626750c981d70b.asciidoc b/docs/examples/guide/bd298b11933605c641626750c981d70b.asciidoc index 183f842042..4ed3cdee10 100644 --- a/docs/examples/guide/bd298b11933605c641626750c981d70b.asciidoc +++ b/docs/examples/guide/bd298b11933605c641626750c981d70b.asciidoc @@ -5,7 +5,7 @@ response = client.cluster.put_component_template( body: { template: { settings: { - "index.number_of_shards": 2 + 'index.number_of_shards' => 2 } } } @@ -17,7 +17,7 @@ response = client.cluster.put_component_template( body: { template: { settings: { - "index.number_of_replicas": 0 + 'index.number_of_replicas' => 0 }, mappings: { properties: { @@ -38,7 +38,7 @@ response = client.indices.simulate_template( ], template: { settings: { - "index.number_of_shards": 3 + 'index.number_of_shards' => 3 } }, composed_of: [ diff --git a/docs/examples/guide/bd7330af2609bdd8aa10958f5e640b93.asciidoc b/docs/examples/guide/bd7330af2609bdd8aa10958f5e640b93.asciidoc index 13b52877d5..558b714bc6 100644 --- a/docs/examples/guide/bd7330af2609bdd8aa10958f5e640b93.asciidoc +++ b/docs/examples/guide/bd7330af2609bdd8aa10958f5e640b93.asciidoc @@ -7,7 +7,7 @@ response = client.index( body: { query: { match: { - "my_field.suffix": 'xyz' + 'my_field.suffix' => 'xyz' } } } diff --git a/docs/examples/guide/bd93b6f99ed785cf7520370a4cf6b834.asciidoc b/docs/examples/guide/bd93b6f99ed785cf7520370a4cf6b834.asciidoc index fd38aef22a..96a04d2919 100644 --- a/docs/examples/guide/bd93b6f99ed785cf7520370a4cf6b834.asciidoc +++ b/docs/examples/guide/bd93b6f99ed785cf7520370a4cf6b834.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, _source: [ diff --git a/docs/examples/guide/beba2a9795c8a13653e1edf64eec4357.asciidoc b/docs/examples/guide/beba2a9795c8a13653e1edf64eec4357.asciidoc index 92894faa71..66ed47d74b 100644 --- a/docs/examples/guide/beba2a9795c8a13653e1edf64eec4357.asciidoc +++ b/docs/examples/guide/beba2a9795c8a13653e1edf64eec4357.asciidoc @@ -3,8 +3,8 @@ response = client.indices.put_settings( index: 'test', body: { - "index.routing.allocation.require.size": 'big', - "index.routing.allocation.require.rack": 'rack1' + 'index.routing.allocation.require.size' => 'big', + 'index.routing.allocation.require.rack' => 'rack1' } ) puts response diff --git a/docs/examples/guide/c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc b/docs/examples/guide/c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc index 17f1c2f485..f5256a99aa 100644 --- a/docs/examples/guide/c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc +++ b/docs/examples/guide/c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { term: { - "user.id": { + 'user.id' => { value: 'kimchy', boost: 1 } diff --git a/docs/examples/guide/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc b/docs/examples/guide/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc index d546052bea..bec37a16f4 100644 --- a/docs/examples/guide/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc +++ b/docs/examples/guide/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, highlight: { diff --git a/docs/examples/guide/c43fd2f25f78e6286fe9a5d08dc31446.asciidoc b/docs/examples/guide/c43fd2f25f78e6286fe9a5d08dc31446.asciidoc index a3f43ef4ed..0401ea5dd1 100644 --- a/docs/examples/guide/c43fd2f25f78e6286fe9a5d08dc31446.asciidoc +++ b/docs/examples/guide/c43fd2f25f78e6286fe9a5d08dc31446.asciidoc @@ -8,7 +8,7 @@ response = client.search( should: [ { text_expansion: { - "ml.token": { + 'ml.token' => { model_text: 'How to avoid muscle soreness after running?', model_id: '.elser_model_1', boost: 1 diff --git a/docs/examples/guide/c639036b87d02fb864e27c4ca29ef833.asciidoc b/docs/examples/guide/c639036b87d02fb864e27c4ca29ef833.asciidoc index 70085a418a..c219c225be 100644 --- a/docs/examples/guide/c639036b87d02fb864e27c4ca29ef833.asciidoc +++ b/docs/examples/guide/c639036b87d02fb864e27c4ca29ef833.asciidoc @@ -10,7 +10,7 @@ response = client.search( } }, runtime_mappings: { - "tags.hash": { + 'tags.hash' => { type: 'long', script: "emit(doc['tags'].hashCode())" } diff --git a/docs/examples/guide/c6b365c7da97d7e50f36820a7d36f548.asciidoc b/docs/examples/guide/c6b365c7da97d7e50f36820a7d36f548.asciidoc index cef43b446e..5e88cc78b4 100644 --- a/docs/examples/guide/c6b365c7da97d7e50f36820a7d36f548.asciidoc +++ b/docs/examples/guide/c6b365c7da97d7e50f36820a7d36f548.asciidoc @@ -3,7 +3,7 @@ response = client.indices.put_settings( index: 'my_index,my_other_index', body: { - "index.number_of_replicas": 1 + 'index.number_of_replicas' => 1 } ) puts response diff --git a/docs/examples/guide/c6d5e3b6ff9c665ec5344a4bfa7add80.asciidoc b/docs/examples/guide/c6d5e3b6ff9c665ec5344a4bfa7add80.asciidoc index dca0ac8dda..7ae0b33dbd 100644 --- a/docs/examples/guide/c6d5e3b6ff9c665ec5344a4bfa7add80.asciidoc +++ b/docs/examples/guide/c6d5e3b6ff9c665ec5344a4bfa7add80.asciidoc @@ -3,8 +3,8 @@ response = client.cluster.put_settings( body: { persistent: { - "transport.tracer.include": '*', - "transport.tracer.exclude": 'internal:coordination/fault_detection/*' + 'transport.tracer.include' => '*', + 'transport.tracer.exclude' => 'internal:coordination/fault_detection/*' } } ) diff --git a/docs/examples/guide/c8210f23c10d0642f24c1e43faa4deda.asciidoc b/docs/examples/guide/c8210f23c10d0642f24c1e43faa4deda.asciidoc index 92183050c9..b2bd798c45 100644 --- a/docs/examples/guide/c8210f23c10d0642f24c1e43faa4deda.asciidoc +++ b/docs/examples/guide/c8210f23c10d0642f24c1e43faa4deda.asciidoc @@ -29,7 +29,7 @@ response = client.cluster.put_component_template( body: { template: { settings: { - "index.lifecycle.name": 'my-lifecycle-policy' + 'index.lifecycle.name' => 'my-lifecycle-policy' } }, _meta: { diff --git a/docs/examples/guide/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc b/docs/examples/guide/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc index c3d3086e7e..9ce4d41e18 100644 --- a/docs/examples/guide/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc +++ b/docs/examples/guide/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { terms: { - "user.id": [ + 'user.id' => [ 'kimchy', 'elkbee' ], diff --git a/docs/examples/guide/ca06db2aa4747910278f96315f7be94b.asciidoc b/docs/examples/guide/ca06db2aa4747910278f96315f7be94b.asciidoc index 57dbb4e978..2af4363f12 100644 --- a/docs/examples/guide/ca06db2aa4747910278f96315f7be94b.asciidoc +++ b/docs/examples/guide/ca06db2aa4747910278f96315f7be94b.asciidoc @@ -10,7 +10,7 @@ response = client.search( }, filter: { geo_bounding_box: { - "pin.location": { + 'pin.location' => { top: 40.73, left: -74.1, bottom: 40.01, diff --git a/docs/examples/guide/ca08e511e5907d258081b10a1a9f0072.asciidoc b/docs/examples/guide/ca08e511e5907d258081b10a1a9f0072.asciidoc index 75e97033a2..f03c7172ea 100644 --- a/docs/examples/guide/ca08e511e5907d258081b10a1a9f0072.asciidoc +++ b/docs/examples/guide/ca08e511e5907d258081b10a1a9f0072.asciidoc @@ -17,10 +17,10 @@ response = client.indices.put_index_template( } }, settings: { - "sort.field": [ + 'sort.field' => [ '@timestamp' ], - "sort.order": [ + 'sort.order' => [ 'desc' ] } diff --git a/docs/examples/guide/cafed0e2c2b1d1574eb4a5ecd514a97a.asciidoc b/docs/examples/guide/cafed0e2c2b1d1574eb4a5ecd514a97a.asciidoc index b1e32fee6c..0558bde6e6 100644 --- a/docs/examples/guide/cafed0e2c2b1d1574eb4a5ecd514a97a.asciidoc +++ b/docs/examples/guide/cafed0e2c2b1d1574eb4a5ecd514a97a.asciidoc @@ -5,7 +5,7 @@ response = client.indices.split( target: 'split-my-index-000001', body: { settings: { - "index.number_of_shards": 2 + 'index.number_of_shards' => 2 } } ) diff --git a/docs/examples/guide/cb0c3223fd45148497df73adfba2e9ce.asciidoc b/docs/examples/guide/cb0c3223fd45148497df73adfba2e9ce.asciidoc index 035249c0ae..93e5d03d8b 100644 --- a/docs/examples/guide/cb0c3223fd45148497df73adfba2e9ce.asciidoc +++ b/docs/examples/guide/cb0c3223fd45148497df73adfba2e9ce.asciidoc @@ -6,7 +6,7 @@ response = client.reindex( index: 'my-index-000001', query: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } }, diff --git a/docs/examples/guide/cc7f1c74ede6810e2c9db19256d6b653.asciidoc b/docs/examples/guide/cc7f1c74ede6810e2c9db19256d6b653.asciidoc index 18a0c7c26b..f34d61a238 100644 --- a/docs/examples/guide/cc7f1c74ede6810e2c9db19256d6b653.asciidoc +++ b/docs/examples/guide/cc7f1c74ede6810e2c9db19256d6b653.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { match: { - "http.response": '304' + 'http.response' => '304' } }, fields: [ diff --git a/docs/examples/guide/cdd7127681254f4d614cc075f9e6fbcf.asciidoc b/docs/examples/guide/cdd7127681254f4d614cc075f9e6fbcf.asciidoc index 31dec0f24d..bda041005b 100644 --- a/docs/examples/guide/cdd7127681254f4d614cc075f9e6fbcf.asciidoc +++ b/docs/examples/guide/cdd7127681254f4d614cc075f9e6fbcf.asciidoc @@ -5,7 +5,7 @@ response = client.delete_by_query( body: { query: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, max_docs: 1 diff --git a/docs/examples/guide/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc b/docs/examples/guide/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc index e40927b7a6..0d75f56638 100644 --- a/docs/examples/guide/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc +++ b/docs/examples/guide/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc @@ -2,7 +2,7 @@ ---- response = client.indices.put_settings( body: { - "index.number_of_replicas": 1 + 'index.number_of_replicas' => 1 } ) puts response diff --git a/docs/examples/guide/ce247fc08371e1b30cb52195e521c076.asciidoc b/docs/examples/guide/ce247fc08371e1b30cb52195e521c076.asciidoc index a32269b6ad..c17bca3e37 100644 --- a/docs/examples/guide/ce247fc08371e1b30cb52195e521c076.asciidoc +++ b/docs/examples/guide/ce247fc08371e1b30cb52195e521c076.asciidoc @@ -10,7 +10,7 @@ response = client.search( }, filter: { geo_bounding_box: { - "pin.location": { + 'pin.location' => { top_left: [ -74.1, 40.73 diff --git a/docs/examples/guide/ce899fcf55da72fc32e623d1ad88b301.asciidoc b/docs/examples/guide/ce899fcf55da72fc32e623d1ad88b301.asciidoc index d417e621e7..ec7f7a3277 100644 --- a/docs/examples/guide/ce899fcf55da72fc32e623d1ad88b301.asciidoc +++ b/docs/examples/guide/ce899fcf55da72fc32e623d1ad88b301.asciidoc @@ -6,7 +6,7 @@ response = client.cluster.put_component_template( template: { mappings: { properties: { - "host.ip": { + 'host.ip' => { type: 'ip' } } diff --git a/docs/examples/guide/cf23f18761df33f08bc6f6d1875496fd.asciidoc b/docs/examples/guide/cf23f18761df33f08bc6f6d1875496fd.asciidoc index 1c957c940e..b9b4ca57f2 100644 --- a/docs/examples/guide/cf23f18761df33f08bc6f6d1875496fd.asciidoc +++ b/docs/examples/guide/cf23f18761df33f08bc6f6d1875496fd.asciidoc @@ -4,7 +4,7 @@ response = client.indices.put_settings( index: 'my-index-000001', body: { index: { - "routing.allocation.total_shards_per_node": 5 + 'routing.allocation.total_shards_per_node' => 5 } } ) diff --git a/docs/examples/guide/cf5dab4334783ca9b8942eab68fb7174.asciidoc b/docs/examples/guide/cf5dab4334783ca9b8942eab68fb7174.asciidoc index 19097edf50..32d9fb404e 100644 --- a/docs/examples/guide/cf5dab4334783ca9b8942eab68fb7174.asciidoc +++ b/docs/examples/guide/cf5dab4334783ca9b8942eab68fb7174.asciidoc @@ -21,7 +21,7 @@ response = client.search( filter: [ { term: { - "resellers.reseller": 'companyB' + 'resellers.reseller' => 'companyB' } } ] diff --git a/docs/examples/guide/d01d309b0257d6fbca6d0941adeb3256.asciidoc b/docs/examples/guide/d01d309b0257d6fbca6d0941adeb3256.asciidoc index 01291a575b..cc7e5bed9b 100644 --- a/docs/examples/guide/d01d309b0257d6fbca6d0941adeb3256.asciidoc +++ b/docs/examples/guide/d01d309b0257d6fbca6d0941adeb3256.asciidoc @@ -5,7 +5,7 @@ response = client.cluster.put_component_template( body: { template: { settings: { - "index.number_of_shards": 2 + 'index.number_of_shards' => 2 } } } @@ -17,7 +17,7 @@ response = client.cluster.put_component_template( body: { template: { settings: { - "index.number_of_replicas": 0 + 'index.number_of_replicas' => 0 }, mappings: { properties: { diff --git a/docs/examples/guide/d0546f047359b85a7e98207dc8de896a.asciidoc b/docs/examples/guide/d0546f047359b85a7e98207dc8de896a.asciidoc index 36ccdf84ed..9ff4eb92b0 100644 --- a/docs/examples/guide/d0546f047359b85a7e98207dc8de896a.asciidoc +++ b/docs/examples/guide/d0546f047359b85a7e98207dc8de896a.asciidoc @@ -4,7 +4,7 @@ response = client.indices.create( index: 'my-index-000001', body: { settings: { - "index.mapping.coerce": false + 'index.mapping.coerce' => false }, mappings: { properties: { diff --git a/docs/examples/guide/d05b2a37106fce0ebbd41e2fd6bd26c2.asciidoc b/docs/examples/guide/d05b2a37106fce0ebbd41e2fd6bd26c2.asciidoc index 77be78daea..87b32cf62b 100644 --- a/docs/examples/guide/d05b2a37106fce0ebbd41e2fd6bd26c2.asciidoc +++ b/docs/examples/guide/d05b2a37106fce0ebbd41e2fd6bd26c2.asciidoc @@ -19,7 +19,7 @@ response = client.index( id: 1, refresh: true, body: { - "network.name": 'net-1', + 'network.name' => 'net-1', latency_histo: { values: [ 0.1, @@ -45,7 +45,7 @@ response = client.index( id: 2, refresh: true, body: { - "network.name": 'net-2', + 'network.name' => 'net-2', latency_histo: { values: [ 0.1, diff --git a/docs/examples/guide/d13c7cdfc976e0c7b70737cd6a7becb8.asciidoc b/docs/examples/guide/d13c7cdfc976e0c7b70737cd6a7becb8.asciidoc index ce6ccb35c9..1e33001007 100644 --- a/docs/examples/guide/d13c7cdfc976e0c7b70737cd6a7becb8.asciidoc +++ b/docs/examples/guide/d13c7cdfc976e0c7b70737cd6a7becb8.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { size: 0, runtime_mappings: { - "price.adjusted": { + 'price.adjusted' => { type: 'double', script: { source: "emit(doc['price'].value * params.adjustment)", diff --git a/docs/examples/guide/d4fb482a51d67a1af48e429af6019a46.asciidoc b/docs/examples/guide/d4fb482a51d67a1af48e429af6019a46.asciidoc index 53575aee58..494d3b6379 100644 --- a/docs/examples/guide/d4fb482a51d67a1af48e429af6019a46.asciidoc +++ b/docs/examples/guide/d4fb482a51d67a1af48e429af6019a46.asciidoc @@ -5,11 +5,11 @@ response = client.indices.create( body: { settings: { index: { - "sort.field": [ + 'sort.field' => [ 'username', 'date' ], - "sort.order": [ + 'sort.order' => [ 'asc', 'desc' ] diff --git a/docs/examples/guide/d64d509440afbed7cefd04b6898962eb.asciidoc b/docs/examples/guide/d64d509440afbed7cefd04b6898962eb.asciidoc index 34fc1e51ab..bb5de5d801 100644 --- a/docs/examples/guide/d64d509440afbed7cefd04b6898962eb.asciidoc +++ b/docs/examples/guide/d64d509440afbed7cefd04b6898962eb.asciidoc @@ -11,7 +11,7 @@ response = client.search( filter: { geo_distance: { distance: '200km', - "pin.location": { + 'pin.location' => { lat: 40, lon: -70 } diff --git a/docs/examples/guide/d66e2b4d1931bf88c72e74670156e43f.asciidoc b/docs/examples/guide/d66e2b4d1931bf88c72e74670156e43f.asciidoc index 1da82c4aae..d1654a1502 100644 --- a/docs/examples/guide/d66e2b4d1931bf88c72e74670156e43f.asciidoc +++ b/docs/examples/guide/d66e2b4d1931bf88c72e74670156e43f.asciidoc @@ -6,7 +6,7 @@ response = client.search( track_total_hits: 100, query: { match: { - "user.id": 'elkbee' + 'user.id' => 'elkbee' } } } diff --git a/docs/examples/guide/d690a6af462c70a783625a323e11c72c.asciidoc b/docs/examples/guide/d690a6af462c70a783625a323e11c72c.asciidoc index 33f926266d..6f092450de 100644 --- a/docs/examples/guide/d690a6af462c70a783625a323e11c72c.asciidoc +++ b/docs/examples/guide/d690a6af462c70a783625a323e11c72c.asciidoc @@ -6,7 +6,7 @@ response = client.indices.create( settings: { number_of_shards: 1, number_of_replicas: 1, - "index.lifecycle.name": 'my_policy' + 'index.lifecycle.name' => 'my_policy' } } ) diff --git a/docs/examples/guide/d6c3659339ef4f2d47425e09eccbf939.asciidoc b/docs/examples/guide/d6c3659339ef4f2d47425e09eccbf939.asciidoc index 5b41e27968..d40515d969 100644 --- a/docs/examples/guide/d6c3659339ef4f2d47425e09eccbf939.asciidoc +++ b/docs/examples/guide/d6c3659339ef4f2d47425e09eccbf939.asciidoc @@ -5,9 +5,9 @@ response = client.cluster.put_component_template( body: { template: { settings: { - "index.lifecycle.name": 'my-lifecycle-policy', - "index.look_ahead_time": '3h', - "index.codec": 'best_compression' + 'index.lifecycle.name' => 'my-lifecycle-policy', + 'index.look_ahead_time' => '3h', + 'index.codec' => 'best_compression' } }, _meta: { diff --git a/docs/examples/guide/d70f55cd29cdb2dcd775ffa9e23ff393.asciidoc b/docs/examples/guide/d70f55cd29cdb2dcd775ffa9e23ff393.asciidoc index 34cbaf1a1f..6bc65c851e 100644 --- a/docs/examples/guide/d70f55cd29cdb2dcd775ffa9e23ff393.asciidoc +++ b/docs/examples/guide/d70f55cd29cdb2dcd775ffa9e23ff393.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { size: 0, runtime_mappings: { - "price.adjusted": { + 'price.adjusted' => { type: 'double', script: "\n double price = doc['price'].value;\n if (doc['promoted'].value) {\n price *= 0.8;\n }\n emit(price);\n " } diff --git a/docs/examples/guide/d979f934af0992fb8c8596beff80b638.asciidoc b/docs/examples/guide/d979f934af0992fb8c8596beff80b638.asciidoc index e55d8f876e..40a467c6f4 100644 --- a/docs/examples/guide/d979f934af0992fb8c8596beff80b638.asciidoc +++ b/docs/examples/guide/d979f934af0992fb8c8596beff80b638.asciidoc @@ -8,7 +8,7 @@ response = client.search( ], query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/da3cecc36a7313385d32c7f52ccfb7e3.asciidoc b/docs/examples/guide/da3cecc36a7313385d32c7f52ccfb7e3.asciidoc index b109d0c582..e60211e765 100644 --- a/docs/examples/guide/da3cecc36a7313385d32c7f52ccfb7e3.asciidoc +++ b/docs/examples/guide/da3cecc36a7313385d32c7f52ccfb7e3.asciidoc @@ -5,7 +5,7 @@ response = client.search( size: 0, body: { runtime_mappings: { - "date.day_of_week": { + 'date.day_of_week' => { type: 'keyword', script: "emit(doc['date'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ROOT))" } diff --git a/docs/examples/guide/daae2e6acebc84e537764f4ba07f2e6e.asciidoc b/docs/examples/guide/daae2e6acebc84e537764f4ba07f2e6e.asciidoc index b543b2e8fa..24b505387e 100644 --- a/docs/examples/guide/daae2e6acebc84e537764f4ba07f2e6e.asciidoc +++ b/docs/examples/guide/daae2e6acebc84e537764f4ba07f2e6e.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.routing.allocation.exclude._name": nil + 'cluster.routing.allocation.exclude._name' => nil } } ) diff --git a/docs/examples/guide/dad2d4add751fde5c39475ca709cc14b.asciidoc b/docs/examples/guide/dad2d4add751fde5c39475ca709cc14b.asciidoc index d737e103ad..334da4cdc6 100644 --- a/docs/examples/guide/dad2d4add751fde5c39475ca709cc14b.asciidoc +++ b/docs/examples/guide/dad2d4add751fde5c39475ca709cc14b.asciidoc @@ -3,7 +3,7 @@ response = client.indices.put_settings( index: 'test', body: { - "index.routing.allocation.include.size": 'big,medium' + 'index.routing.allocation.include.size' => 'big,medium' } ) puts response diff --git a/docs/examples/guide/dc3b7603e7d688106acb804059af7834.asciidoc b/docs/examples/guide/dc3b7603e7d688106acb804059af7834.asciidoc index e661864ba6..4dd54b03c4 100644 --- a/docs/examples/guide/dc3b7603e7d688106acb804059af7834.asciidoc +++ b/docs/examples/guide/dc3b7603e7d688106acb804059af7834.asciidoc @@ -5,7 +5,7 @@ response = client.search( _source: false, query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/dd360e1cf42ad897e2ab9e785a45466f.asciidoc b/docs/examples/guide/dd360e1cf42ad897e2ab9e785a45466f.asciidoc index 506a2c936a..f630058b3d 100644 --- a/docs/examples/guide/dd360e1cf42ad897e2ab9e785a45466f.asciidoc +++ b/docs/examples/guide/dd360e1cf42ad897e2ab9e785a45466f.asciidoc @@ -9,8 +9,8 @@ response = client.indices.put_index_template( data_stream: {}, template: { settings: { - "index.mode": 'time_series', - "index.routing_path": [ + 'index.mode' => 'time_series', + 'index.routing_path' => [ 'sensor_id', 'location' ] diff --git a/docs/examples/guide/de139866a220124360e5e27d1a736ea4.asciidoc b/docs/examples/guide/de139866a220124360e5e27d1a736ea4.asciidoc index 2f51e4ec7b..20620e085a 100644 --- a/docs/examples/guide/de139866a220124360e5e27d1a736ea4.asciidoc +++ b/docs/examples/guide/de139866a220124360e5e27d1a736ea4.asciidoc @@ -9,14 +9,14 @@ response = client.search( }, sort: [ { - "offer.price": { + 'offer.price' => { mode: 'avg', order: 'asc', nested: { path: 'offer', filter: { term: { - "offer.color": 'blue' + 'offer.color' => 'blue' } } } diff --git a/docs/examples/guide/de876505acc75d371d1f6f484c449197.asciidoc b/docs/examples/guide/de876505acc75d371d1f6f484c449197.asciidoc index f903a15c84..3556e3f30a 100644 --- a/docs/examples/guide/de876505acc75d371d1f6f484c449197.asciidoc +++ b/docs/examples/guide/de876505acc75d371d1f6f484c449197.asciidoc @@ -4,7 +4,7 @@ response = client.indices.create( index: 'test', body: { settings: { - "index.write.wait_for_active_shards": '2' + 'index.write.wait_for_active_shards' => '2' } } ) diff --git a/docs/examples/guide/dead0682932ea6ec33c1197017bcb209.asciidoc b/docs/examples/guide/dead0682932ea6ec33c1197017bcb209.asciidoc index 6531303512..7a005bd91f 100644 --- a/docs/examples/guide/dead0682932ea6ec33c1197017bcb209.asciidoc +++ b/docs/examples/guide/dead0682932ea6ec33c1197017bcb209.asciidoc @@ -10,7 +10,7 @@ response = client.search( }, filter: { geo_bounding_box: { - "pin.location": { + 'pin.location' => { top_left: 'dr5r9ydj2y73', bottom_right: 'drj7teegpus6' } diff --git a/docs/examples/guide/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc b/docs/examples/guide/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc index 07ba02d610..d6d23c72a5 100644 --- a/docs/examples/guide/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc +++ b/docs/examples/guide/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc @@ -70,7 +70,7 @@ response = client.search( must_not: [ { term: { - "comments.author": 'nik9000' + 'comments.author' => 'nik9000' } } ] diff --git a/docs/examples/guide/dfb20907cfc5ac520ea3b1dba5f00811.asciidoc b/docs/examples/guide/dfb20907cfc5ac520ea3b1dba5f00811.asciidoc index 398466cb62..8f789c07f9 100644 --- a/docs/examples/guide/dfb20907cfc5ac520ea3b1dba5f00811.asciidoc +++ b/docs/examples/guide/dfb20907cfc5ac520ea3b1dba5f00811.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { sort: [ { - "result.execution_time": 'desc' + 'result.execution_time' => 'desc' } ] } diff --git a/docs/examples/guide/e12f2d2ddca387630e7855a6db952da2.asciidoc b/docs/examples/guide/e12f2d2ddca387630e7855a6db952da2.asciidoc index 8b5749d783..2147370c2b 100644 --- a/docs/examples/guide/e12f2d2ddca387630e7855a6db952da2.asciidoc +++ b/docs/examples/guide/e12f2d2ddca387630e7855a6db952da2.asciidoc @@ -4,7 +4,7 @@ response = client.search( index: 'sales', body: { runtime_mappings: { - "price.euros": { + 'price.euros' => { type: 'double', script: { source: "\n emit(doc['price'].value * params.conversion_rate)\n ", diff --git a/docs/examples/guide/e20037f66bf54bcac7d10f536f031f34.asciidoc b/docs/examples/guide/e20037f66bf54bcac7d10f536f031f34.asciidoc index 5d1dbb4af0..b811337269 100644 --- a/docs/examples/guide/e20037f66bf54bcac7d10f536f031f34.asciidoc +++ b/docs/examples/guide/e20037f66bf54bcac7d10f536f031f34.asciidoc @@ -3,7 +3,7 @@ response = client.indices.put_settings( index: 'my-index-000001', body: { - "index.blocks.read_only_allow_delete": nil + 'index.blocks.read_only_allow_delete' => nil } ) puts response diff --git a/docs/examples/guide/e26c96978096ccc592849cca9db67ffc.asciidoc b/docs/examples/guide/e26c96978096ccc592849cca9db67ffc.asciidoc index b4834f26cd..4e09f775fd 100644 --- a/docs/examples/guide/e26c96978096ccc592849cca9db67ffc.asciidoc +++ b/docs/examples/guide/e26c96978096ccc592849cca9db67ffc.asciidoc @@ -3,7 +3,7 @@ response = client.indices.put_settings( index: 'my-index-000001', body: { - "index.requests.cache.enable": true + 'index.requests.cache.enable' => true } ) puts response diff --git a/docs/examples/guide/e2b4867a9f72bda87ebaa3608d3fba4c.asciidoc b/docs/examples/guide/e2b4867a9f72bda87ebaa3608d3fba4c.asciidoc index d7e2a305e8..f384a25852 100644 --- a/docs/examples/guide/e2b4867a9f72bda87ebaa3608d3fba4c.asciidoc +++ b/docs/examples/guide/e2b4867a9f72bda87ebaa3608d3fba4c.asciidoc @@ -5,7 +5,7 @@ response = client.render_search_template( source: { query: { range: { - "user.effective.date": { + 'user.effective.date' => { gte: '{{date.min}}', lte: '{{date.max}}', format: "{{#join delimiter='||'}}date.formats{{/join delimiter='||'}}" diff --git a/docs/examples/guide/e317a8380dfbc76c4e7f23d0997b3518.asciidoc b/docs/examples/guide/e317a8380dfbc76c4e7f23d0997b3518.asciidoc index e341b0699f..36a1537d7e 100644 --- a/docs/examples/guide/e317a8380dfbc76c4e7f23d0997b3518.asciidoc +++ b/docs/examples/guide/e317a8380dfbc76c4e7f23d0997b3518.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "action.destructive_requires_name": nil + 'action.destructive_requires_name' => nil } } ) diff --git a/docs/examples/guide/e3b3a8ae12ab947ad3ba96eb228402ca.asciidoc b/docs/examples/guide/e3b3a8ae12ab947ad3ba96eb228402ca.asciidoc index 318a0c17b4..269fc6f98d 100644 --- a/docs/examples/guide/e3b3a8ae12ab947ad3ba96eb228402ca.asciidoc +++ b/docs/examples/guide/e3b3a8ae12ab947ad3ba96eb228402ca.asciidoc @@ -4,7 +4,7 @@ response = client.indices.create( index: 'my-index-000001', body: { settings: { - "index.store.preload": [ + 'index.store.preload' => [ 'nvd', 'dvd' ] diff --git a/docs/examples/guide/e46c83db1580e14be844079cd008f518.asciidoc b/docs/examples/guide/e46c83db1580e14be844079cd008f518.asciidoc index 05ba05553d..363ef500ed 100644 --- a/docs/examples/guide/e46c83db1580e14be844079cd008f518.asciidoc +++ b/docs/examples/guide/e46c83db1580e14be844079cd008f518.asciidoc @@ -4,7 +4,7 @@ response = client.indices.put_settings( index: 'my-index-000001', body: { index: { - "routing.allocation.enable": 'all' + 'routing.allocation.enable' => 'all' } } ) diff --git a/docs/examples/guide/e58833449d01379df20ad06dc28144d8.asciidoc b/docs/examples/guide/e58833449d01379df20ad06dc28144d8.asciidoc index 014470ce4e..54247101db 100644 --- a/docs/examples/guide/e58833449d01379df20ad06dc28144d8.asciidoc +++ b/docs/examples/guide/e58833449d01379df20ad06dc28144d8.asciidoc @@ -6,7 +6,7 @@ response = client.update_by_query( body: { query: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/e5901f48eb8a419b878fc2cb815d8691.asciidoc b/docs/examples/guide/e5901f48eb8a419b878fc2cb815d8691.asciidoc index a06dc93c02..f0edf74839 100644 --- a/docs/examples/guide/e5901f48eb8a419b878fc2cb815d8691.asciidoc +++ b/docs/examples/guide/e5901f48eb8a419b878fc2cb815d8691.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "indices.recovery.max_bytes_per_sec": '50mb' + 'indices.recovery.max_bytes_per_sec' => '50mb' } } ) diff --git a/docs/examples/guide/e5f8f83df37ab2296dc4bfed95d7aba7.asciidoc b/docs/examples/guide/e5f8f83df37ab2296dc4bfed95d7aba7.asciidoc index 0680ade6eb..a152187d74 100644 --- a/docs/examples/guide/e5f8f83df37ab2296dc4bfed95d7aba7.asciidoc +++ b/docs/examples/guide/e5f8f83df37ab2296dc4bfed95d7aba7.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.routing.allocation.enable": 'all' + 'cluster.routing.allocation.enable' => 'all' } } ) diff --git a/docs/examples/guide/e608cd0c034f6c245ea87f425e09ce2f.asciidoc b/docs/examples/guide/e608cd0c034f6c245ea87f425e09ce2f.asciidoc index 0ed07fc4fd..3a0410df15 100644 --- a/docs/examples/guide/e608cd0c034f6c245ea87f425e09ce2f.asciidoc +++ b/docs/examples/guide/e608cd0c034f6c245ea87f425e09ce2f.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { span_term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/e6369e7cef82d881af593d5526bf79bd.asciidoc b/docs/examples/guide/e6369e7cef82d881af593d5526bf79bd.asciidoc index d36b6d2cd9..e4b2122a1c 100644 --- a/docs/examples/guide/e6369e7cef82d881af593d5526bf79bd.asciidoc +++ b/docs/examples/guide/e6369e7cef82d881af593d5526bf79bd.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { span_term: { - "user.id": { + 'user.id' => { value: 'kimchy', boost: 2 } diff --git a/docs/examples/guide/e642be44a62a89cf4afb2db28220c9a9.asciidoc b/docs/examples/guide/e642be44a62a89cf4afb2db28220c9a9.asciidoc index 0165a3d888..33cd07e9f1 100644 --- a/docs/examples/guide/e642be44a62a89cf4afb2db28220c9a9.asciidoc +++ b/docs/examples/guide/e642be44a62a89cf4afb2db28220c9a9.asciidoc @@ -3,8 +3,8 @@ response = client.cluster.put_settings( body: { persistent: { - "ingest.geoip.downloader.enabled": true, - "indices.lifecycle.history_index_enabled": true + 'ingest.geoip.downloader.enabled' => true, + 'indices.lifecycle.history_index_enabled' => true } } ) diff --git a/docs/examples/guide/e84e23232c7ecc8d6377ec2c16a60269.asciidoc b/docs/examples/guide/e84e23232c7ecc8d6377ec2c16a60269.asciidoc index b9822ec31a..d39c1ff733 100644 --- a/docs/examples/guide/e84e23232c7ecc8d6377ec2c16a60269.asciidoc +++ b/docs/examples/guide/e84e23232c7ecc8d6377ec2c16a60269.asciidoc @@ -8,7 +8,7 @@ response = client.indices.create( "alias_2": { filter: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, routing: 'shard-1' diff --git a/docs/examples/guide/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc b/docs/examples/guide/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc index f2ffb37a61..f023deb367 100644 --- a/docs/examples/guide/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc +++ b/docs/examples/guide/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { match: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, highlight: { diff --git a/docs/examples/guide/e9f9e184499a793828233e536fac0487.asciidoc b/docs/examples/guide/e9f9e184499a793828233e536fac0487.asciidoc index 784bccba50..42f4734bc8 100644 --- a/docs/examples/guide/e9f9e184499a793828233e536fac0487.asciidoc +++ b/docs/examples/guide/e9f9e184499a793828233e536fac0487.asciidoc @@ -6,7 +6,7 @@ response = client.delete_by_query( body: { query: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/ea5b4d2d87fd4e040afad18903c44869.asciidoc b/docs/examples/guide/ea5b4d2d87fd4e040afad18903c44869.asciidoc index f2a7b0aa61..539183aca3 100644 --- a/docs/examples/guide/ea5b4d2d87fd4e040afad18903c44869.asciidoc +++ b/docs/examples/guide/ea5b4d2d87fd4e040afad18903c44869.asciidoc @@ -10,7 +10,7 @@ response = client.search( }, filter: { geo_bounding_box: { - "pin.location": { + 'pin.location' => { top_left: { lat: 40.73, lon: -74.1 diff --git a/docs/examples/guide/eada8af6588584ac88f1e5b15f4a5c2a.asciidoc b/docs/examples/guide/eada8af6588584ac88f1e5b15f4a5c2a.asciidoc index 58225bddb1..4676c691d0 100644 --- a/docs/examples/guide/eada8af6588584ac88f1e5b15f4a5c2a.asciidoc +++ b/docs/examples/guide/eada8af6588584ac88f1e5b15f4a5c2a.asciidoc @@ -4,7 +4,7 @@ response = client.index( index: 'metrics_index', id: 1, body: { - "network.name": 'net-1', + 'network.name' => 'net-1', latency_histo: { values: [ 0.1, @@ -29,7 +29,7 @@ response = client.index( index: 'metrics_index', id: 2, body: { - "network.name": 'net-2', + 'network.name' => 'net-2', latency_histo: { values: [ 0.1, diff --git a/docs/examples/guide/eae8931d01b3b878dd0c45214121e662.asciidoc b/docs/examples/guide/eae8931d01b3b878dd0c45214121e662.asciidoc index 59b9d4be99..f4205e60b5 100644 --- a/docs/examples/guide/eae8931d01b3b878dd0c45214121e662.asciidoc +++ b/docs/examples/guide/eae8931d01b3b878dd0c45214121e662.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { geo_bounding_box: { - "pin.location": { + 'pin.location' => { top_left: 'dr', bottom_right: 'dr' } diff --git a/docs/examples/guide/eaf6a846ded090fd6ac48269ad2b328b.asciidoc b/docs/examples/guide/eaf6a846ded090fd6ac48269ad2b328b.asciidoc index 9d9c63282c..3ad6059478 100644 --- a/docs/examples/guide/eaf6a846ded090fd6ac48269ad2b328b.asciidoc +++ b/docs/examples/guide/eaf6a846ded090fd6ac48269ad2b328b.asciidoc @@ -4,8 +4,8 @@ response = client.indices.create( index: 'my-index-000001', body: { settings: { - "index.lifecycle.name": 'my_policy', - "index.lifecycle.rollover_alias": 'my_data' + 'index.lifecycle.name' => 'my_policy', + 'index.lifecycle.rollover_alias' => 'my_data' }, aliases: { my_data: { diff --git a/docs/examples/guide/ec8f176ebf436d5719bdeca4a9ea8220.asciidoc b/docs/examples/guide/ec8f176ebf436d5719bdeca4a9ea8220.asciidoc index 9667d8df43..5879a26fe4 100644 --- a/docs/examples/guide/ec8f176ebf436d5719bdeca4a9ea8220.asciidoc +++ b/docs/examples/guide/ec8f176ebf436d5719bdeca4a9ea8220.asciidoc @@ -4,7 +4,7 @@ response = client.search( index: 'products', body: { runtime_mappings: { - "genre.length": { + 'genre.length' => { type: 'long', script: "emit(doc['genre'].value.length())" } diff --git a/docs/examples/guide/ed27843eff311f3011b679e97e6fda50.asciidoc b/docs/examples/guide/ed27843eff311f3011b679e97e6fda50.asciidoc index a8d4cfeed9..d6a5dfbef3 100644 --- a/docs/examples/guide/ed27843eff311f3011b679e97e6fda50.asciidoc +++ b/docs/examples/guide/ed27843eff311f3011b679e97e6fda50.asciidoc @@ -6,7 +6,7 @@ response = client.snapshot.restore( body: { indices: 'my-index,logs-my_app-default', index_settings: { - "index.number_of_replicas": 1 + 'index.number_of_replicas' => 1 } } ) diff --git a/docs/examples/guide/ed5c3b45e8de912faba44507d827eb93.asciidoc b/docs/examples/guide/ed5c3b45e8de912faba44507d827eb93.asciidoc index 7d011217ed..9e142c5eed 100644 --- a/docs/examples/guide/ed5c3b45e8de912faba44507d827eb93.asciidoc +++ b/docs/examples/guide/ed5c3b45e8de912faba44507d827eb93.asciidoc @@ -5,7 +5,7 @@ response = client.search( sort: [ { _geo_distance: { - "pin.location": 'POINT (-70 40)', + 'pin.location' => 'POINT (-70 40)', order: 'asc', unit: 'km' } diff --git a/docs/examples/guide/ed688d86eeaa4d7969acb0f574eb917f.asciidoc b/docs/examples/guide/ed688d86eeaa4d7969acb0f574eb917f.asciidoc index f94c422b2f..54461f57f8 100644 --- a/docs/examples/guide/ed688d86eeaa4d7969acb0f574eb917f.asciidoc +++ b/docs/examples/guide/ed688d86eeaa4d7969acb0f574eb917f.asciidoc @@ -7,7 +7,7 @@ response = client.index( body: { query: { term: { - "my_field.prefix": 'abc' + 'my_field.prefix' => 'abc' } } } diff --git a/docs/examples/guide/edae616e1244babf6032aecc6aaaf836.asciidoc b/docs/examples/guide/edae616e1244babf6032aecc6aaaf836.asciidoc index 9ce770113e..5deea04c70 100644 --- a/docs/examples/guide/edae616e1244babf6032aecc6aaaf836.asciidoc +++ b/docs/examples/guide/edae616e1244babf6032aecc6aaaf836.asciidoc @@ -5,7 +5,7 @@ response = client.search( sort: [ { _geo_distance: { - "pin.location": { + 'pin.location' => { lat: 40, lon: -70 }, diff --git a/docs/examples/guide/eec051555c8050d017d3fe38ea59e3a0.asciidoc b/docs/examples/guide/eec051555c8050d017d3fe38ea59e3a0.asciidoc index 949429f35a..af7b7ab1fd 100644 --- a/docs/examples/guide/eec051555c8050d017d3fe38ea59e3a0.asciidoc +++ b/docs/examples/guide/eec051555c8050d017d3fe38ea59e3a0.asciidoc @@ -7,7 +7,7 @@ response = client.search( body: { query: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } } } diff --git a/docs/examples/guide/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc b/docs/examples/guide/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc index 0726354399..9772ac2d70 100644 --- a/docs/examples/guide/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc +++ b/docs/examples/guide/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc @@ -5,7 +5,7 @@ response = client.search( size: 0, body: { runtime_mappings: { - "date.promoted_is_tomorrow": { + 'date.promoted_is_tomorrow' => { type: 'date', script: "\n long date = doc['date'].value.toInstant().toEpochMilli();\n if (doc['promoted'].value) {\n date += 86400;\n }\n emit(date);\n " } diff --git a/docs/examples/guide/eff8ecaed1ed084909c64450fc363a20.asciidoc b/docs/examples/guide/eff8ecaed1ed084909c64450fc363a20.asciidoc index 2fa0dd9338..c94a451c56 100644 --- a/docs/examples/guide/eff8ecaed1ed084909c64450fc363a20.asciidoc +++ b/docs/examples/guide/eff8ecaed1ed084909c64450fc363a20.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { transient: { - "indices.recovery.max_bytes_per_sec": nil + 'indices.recovery.max_bytes_per_sec' => nil } } ) diff --git a/docs/examples/guide/f0bfc8d7ab4eb94ea5fdf2e087d8cf5b.asciidoc b/docs/examples/guide/f0bfc8d7ab4eb94ea5fdf2e087d8cf5b.asciidoc index fb8f3858ae..8f6f3a714e 100644 --- a/docs/examples/guide/f0bfc8d7ab4eb94ea5fdf2e087d8cf5b.asciidoc +++ b/docs/examples/guide/f0bfc8d7ab4eb94ea5fdf2e087d8cf5b.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { size: 0, runtime_mappings: { - "load_time.seconds": { + 'load_time.seconds' => { type: 'long', script: { source: "emit(doc['load_time'].value / params.timeUnit)", diff --git a/docs/examples/guide/f1dc6f69453867ffafe86e998dd464d9.asciidoc b/docs/examples/guide/f1dc6f69453867ffafe86e998dd464d9.asciidoc index 2327c2afcc..bee9cbda7a 100644 --- a/docs/examples/guide/f1dc6f69453867ffafe86e998dd464d9.asciidoc +++ b/docs/examples/guide/f1dc6f69453867ffafe86e998dd464d9.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { term: { - "file_path.tree_reversed": { + 'file_path.tree_reversed' => { value: 'my_photo1.jpg' } } diff --git a/docs/examples/guide/f2f1cae094855a45fd8f73478bec8e70.asciidoc b/docs/examples/guide/f2f1cae094855a45fd8f73478bec8e70.asciidoc index ade2dc038c..89a0e615a0 100644 --- a/docs/examples/guide/f2f1cae094855a45fd8f73478bec8e70.asciidoc +++ b/docs/examples/guide/f2f1cae094855a45fd8f73478bec8e70.asciidoc @@ -5,7 +5,7 @@ response = client.indices.split( target: 'my_target_index', body: { settings: { - "index.number_of_shards": 5 + 'index.number_of_shards' => 5 }, aliases: { my_search_indices: {} diff --git a/docs/examples/guide/f3594de7ef39ab09b0bb12c1e76bfe6b.asciidoc b/docs/examples/guide/f3594de7ef39ab09b0bb12c1e76bfe6b.asciidoc index 930f69aee4..48e2320a07 100644 --- a/docs/examples/guide/f3594de7ef39ab09b0bb12c1e76bfe6b.asciidoc +++ b/docs/examples/guide/f3594de7ef39ab09b0bb12c1e76bfe6b.asciidoc @@ -5,8 +5,8 @@ response = client.indices.shrink( target: 'my_target_index', body: { settings: { - "index.routing.allocation.require._name": nil, - "index.blocks.write": nil + 'index.routing.allocation.require._name' => nil, + 'index.blocks.write' => nil } } ) diff --git a/docs/examples/guide/f495f9c99916a05e3b28166d31955fad.asciidoc b/docs/examples/guide/f495f9c99916a05e3b28166d31955fad.asciidoc index 0131bd7c19..5be84ab8b9 100644 --- a/docs/examples/guide/f495f9c99916a05e3b28166d31955fad.asciidoc +++ b/docs/examples/guide/f495f9c99916a05e3b28166d31955fad.asciidoc @@ -7,7 +7,7 @@ response = client.search( terms: { field: 'genre', order: { - "playback_stats.max": 'desc' + 'playback_stats.max' => 'desc' } }, aggregations: { diff --git a/docs/examples/guide/f4dc1286d0a2f8d1fde64fbf12fd9f8d.asciidoc b/docs/examples/guide/f4dc1286d0a2f8d1fde64fbf12fd9f8d.asciidoc index 19ce104e1d..60df29c193 100644 --- a/docs/examples/guide/f4dc1286d0a2f8d1fde64fbf12fd9f8d.asciidoc +++ b/docs/examples/guide/f4dc1286d0a2f8d1fde64fbf12fd9f8d.asciidoc @@ -3,14 +3,14 @@ response = client.cluster.put_settings( body: { persistent: { - "cluster.routing.allocation.disk.watermark.low": nil, - "cluster.routing.allocation.disk.watermark.low.max_headroom": nil, - "cluster.routing.allocation.disk.watermark.high": nil, - "cluster.routing.allocation.disk.watermark.high.max_headroom": nil, - "cluster.routing.allocation.disk.watermark.flood_stage": nil, - "cluster.routing.allocation.disk.watermark.flood_stage.max_headroom": nil, - "cluster.routing.allocation.disk.watermark.flood_stage.frozen": nil, - "cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom": nil + 'cluster.routing.allocation.disk.watermark.low' => nil, + 'cluster.routing.allocation.disk.watermark.low.max_headroom' => nil, + 'cluster.routing.allocation.disk.watermark.high' => nil, + 'cluster.routing.allocation.disk.watermark.high.max_headroom' => nil, + 'cluster.routing.allocation.disk.watermark.flood_stage' => nil, + 'cluster.routing.allocation.disk.watermark.flood_stage.max_headroom' => nil, + 'cluster.routing.allocation.disk.watermark.flood_stage.frozen' => nil, + 'cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom' => nil } } ) diff --git a/docs/examples/guide/f58969ac405db85f439c5940d014964b.asciidoc b/docs/examples/guide/f58969ac405db85f439c5940d014964b.asciidoc index d7c2e9884c..ee94af29bf 100644 --- a/docs/examples/guide/f58969ac405db85f439c5940d014964b.asciidoc +++ b/docs/examples/guide/f58969ac405db85f439c5940d014964b.asciidoc @@ -10,7 +10,7 @@ response = client.search( }, filter: { geo_bounding_box: { - "pin.location": { + 'pin.location' => { wkt: 'BBOX (-74.1, -71.12, 40.73, 40.01)' } } diff --git a/docs/examples/guide/f589cb2b789b4a16ed78183f2349a735.asciidoc b/docs/examples/guide/f589cb2b789b4a16ed78183f2349a735.asciidoc index f6e259cf0f..bbe6840e4d 100644 --- a/docs/examples/guide/f589cb2b789b4a16ed78183f2349a735.asciidoc +++ b/docs/examples/guide/f589cb2b789b4a16ed78183f2349a735.asciidoc @@ -4,7 +4,7 @@ response = client.index( index: 'metrics_index', id: 1, body: { - "network.name": 'net-1', + 'network.name' => 'net-1', latency_histo: { values: [ 1, @@ -29,7 +29,7 @@ response = client.index( index: 'metrics_index', id: 2, body: { - "network.name": 'net-2', + 'network.name' => 'net-2', latency_histo: { values: [ 1, diff --git a/docs/examples/guide/f5cbbb60ca26867a5d2da625a68a6e65.asciidoc b/docs/examples/guide/f5cbbb60ca26867a5d2da625a68a6e65.asciidoc index e47ed136d9..c236b7b5b2 100644 --- a/docs/examples/guide/f5cbbb60ca26867a5d2da625a68a6e65.asciidoc +++ b/docs/examples/guide/f5cbbb60ca26867a5d2da625a68a6e65.asciidoc @@ -5,7 +5,7 @@ response = client.indices.create( body: { mappings: { properties: { - "total_quantity.sum": { + 'total_quantity.sum' => { type: 'double' }, total_quantity: { @@ -14,16 +14,16 @@ response = client.indices.create( taxless_total_price: { type: 'object' }, - "taxless_total_price.sum": { + 'taxless_total_price.sum' => { type: 'double' }, - "order_id.cardinality": { + 'order_id.cardinality' => { type: 'long' }, customer_id: { type: 'keyword' }, - "total_quantity.max": { + 'total_quantity.max' => { type: 'integer' }, order_id: { diff --git a/docs/examples/guide/f743225f1abcbc341e991a0e79ea89bc.asciidoc b/docs/examples/guide/f743225f1abcbc341e991a0e79ea89bc.asciidoc index 0e23b1e41d..6ea9c7ce50 100644 --- a/docs/examples/guide/f743225f1abcbc341e991a0e79ea89bc.asciidoc +++ b/docs/examples/guide/f743225f1abcbc341e991a0e79ea89bc.asciidoc @@ -5,7 +5,7 @@ response = client.search( body: { query: { text_expansion: { - "ml.tokens": { + 'ml.tokens' => { model_id: '.elser_model_1', model_text: 'How is the weather in Jamaica?' } diff --git a/docs/examples/guide/f8a0010753b1ff563dc42d703902d2fa.asciidoc b/docs/examples/guide/f8a0010753b1ff563dc42d703902d2fa.asciidoc index 1f7a47ac05..dbb596c2ea 100644 --- a/docs/examples/guide/f8a0010753b1ff563dc42d703902d2fa.asciidoc +++ b/docs/examples/guide/f8a0010753b1ff563dc42d703902d2fa.asciidoc @@ -6,7 +6,7 @@ response = client.search( bool: { must: { term: { - "user.id": 'kimchy' + 'user.id' => 'kimchy' } }, filter: { diff --git a/docs/examples/guide/f98687271e1bec031cc34d05d8f4b60b.asciidoc b/docs/examples/guide/f98687271e1bec031cc34d05d8f4b60b.asciidoc index 19583a02a5..1582fcda8a 100644 --- a/docs/examples/guide/f98687271e1bec031cc34d05d8f4b60b.asciidoc +++ b/docs/examples/guide/f98687271e1bec031cc34d05d8f4b60b.asciidoc @@ -6,7 +6,7 @@ response = client.search( span_multi: { match: { prefix: { - "user.id": { + 'user.id' => { value: 'ki' } } diff --git a/docs/examples/guide/fbb38243221c8fb311660616e3add9ce.asciidoc b/docs/examples/guide/fbb38243221c8fb311660616e3add9ce.asciidoc index 3c44141223..5aacb82f9b 100644 --- a/docs/examples/guide/fbb38243221c8fb311660616e3add9ce.asciidoc +++ b/docs/examples/guide/fbb38243221c8fb311660616e3add9ce.asciidoc @@ -5,7 +5,7 @@ response = client.search( sort: [ { _geo_distance: { - "pin.location": [ + 'pin.location' => [ -70, 40 ], diff --git a/docs/examples/guide/fbc5ab85b908480bf944b55da0a43488.asciidoc b/docs/examples/guide/fbc5ab85b908480bf944b55da0a43488.asciidoc index 40ba63b33a..82a6ad3ed4 100644 --- a/docs/examples/guide/fbc5ab85b908480bf944b55da0a43488.asciidoc +++ b/docs/examples/guide/fbc5ab85b908480bf944b55da0a43488.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { prefix: { - "user.id": { + 'user.id' => { value: 'ki' } } diff --git a/docs/examples/guide/fbdad6620eb645f5f1f02e3673604d01.asciidoc b/docs/examples/guide/fbdad6620eb645f5f1f02e3673604d01.asciidoc index 0aa76aa993..0e93f5ecf9 100644 --- a/docs/examples/guide/fbdad6620eb645f5f1f02e3673604d01.asciidoc +++ b/docs/examples/guide/fbdad6620eb645f5f1f02e3673604d01.asciidoc @@ -11,7 +11,7 @@ response = client.search( filter: { geo_distance: { distance: '12km', - "pin.location": 'drm3btev3e86' + 'pin.location' => 'drm3btev3e86' } } } diff --git a/docs/examples/guide/ff05842419968a2141bde0371ac2f6f4.asciidoc b/docs/examples/guide/ff05842419968a2141bde0371ac2f6f4.asciidoc index db282b0b7f..ab78aab9e4 100644 --- a/docs/examples/guide/ff05842419968a2141bde0371ac2f6f4.asciidoc +++ b/docs/examples/guide/ff05842419968a2141bde0371ac2f6f4.asciidoc @@ -5,7 +5,7 @@ response = client.render_search_template( source: { query: { match: { - "user.group.emails": '{{#join}}emails{{/join}}' + 'user.group.emails' => '{{#join}}emails{{/join}}' } } }, diff --git a/docs/examples/guide/ff8317bbd60e9dfc6bf007028a18b531.asciidoc b/docs/examples/guide/ff8317bbd60e9dfc6bf007028a18b531.asciidoc index a4a65373f1..710642034d 100644 --- a/docs/examples/guide/ff8317bbd60e9dfc6bf007028a18b531.asciidoc +++ b/docs/examples/guide/ff8317bbd60e9dfc6bf007028a18b531.asciidoc @@ -5,7 +5,7 @@ response = client.indices.create( body: { mappings: { properties: { - "ml.tokens": { + 'ml.tokens' => { type: 'rank_features' }, text_field: { From a90972f2c3360ec75fd97b8892e15eb09987afd5 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 26 Sep 2023 13:35:32 +0100 Subject: [PATCH 048/540] [DOCS] Updates code generator for keys with dot in name, use => --- rake_tasks/doc_generator.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/rake_tasks/doc_generator.rake b/rake_tasks/doc_generator.rake index 0089fd51e6..49a4e1937d 100644 --- a/rake_tasks/doc_generator.rake +++ b/rake_tasks/doc_generator.rake @@ -134,6 +134,7 @@ namespace :docs do 'body: ' + JSON.pretty_generate(body) .gsub(/\"([a-z_]+)\":/,'\\1: ') # Use Ruby 2 hash syntax + .gsub(/"([a-z_.]+\.[a-z_]+)+":/, '"\\1" =>') .gsub('aggs', 'aggregations') # Replace 'aggs' with 'aggregations' for consistency end From 2735a021f7b2c3dd015233d286cdd61ccdf3fbc6 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 26 Sep 2023 13:36:26 +0100 Subject: [PATCH 049/540] [DOCS] Adds new generated docs with latest fix and OK status --- .../0b913fb9e010d877c0be015519cfddc6.asciidoc | 39 +++++++++++++++++++ .../274feaaa727e0ddf61b3c0f093182839.asciidoc | 24 ++++++++++++ .../5276a831513623e43ed567eb52b6dba9.asciidoc | 15 +++++++ .../850bfd0a00d32475a54ac7f87fb4cc4d.asciidoc | 25 ++++++++++++ .../cc28a3dafcd5056f2a3ec07f6fda5091.asciidoc | 24 ++++++++++++ 5 files changed, 127 insertions(+) create mode 100644 docs/examples/guide/0b913fb9e010d877c0be015519cfddc6.asciidoc create mode 100644 docs/examples/guide/274feaaa727e0ddf61b3c0f093182839.asciidoc create mode 100644 docs/examples/guide/5276a831513623e43ed567eb52b6dba9.asciidoc create mode 100644 docs/examples/guide/850bfd0a00d32475a54ac7f87fb4cc4d.asciidoc create mode 100644 docs/examples/guide/cc28a3dafcd5056f2a3ec07f6fda5091.asciidoc diff --git a/docs/examples/guide/0b913fb9e010d877c0be015519cfddc6.asciidoc b/docs/examples/guide/0b913fb9e010d877c0be015519cfddc6.asciidoc new file mode 100644 index 0000000000..89567134c6 --- /dev/null +++ b/docs/examples/guide/0b913fb9e010d877c0be015519cfddc6.asciidoc @@ -0,0 +1,39 @@ +[source, ruby] +---- +response = client.index( + index: 'my-index-000001', + body: { + "@timestamp": '2019-05-18T15:57:27.541Z', + ip: '225.44.217.191', + extension: 'jpg', + response: '200', + geo: { + coordinates: { + lat: 38.53146222, + lon: -121.7864906 + } + }, + url: 'https://media-for-the-masses.theacademyofperformingartsandscience.org/uploads/charles-fullerton.jpg' + } +) +puts response + +response = client.index( + index: 'my-index-000002', + body: { + "@timestamp": '2019-05-20T03:44:20.844Z', + ip: '198.247.165.49', + extension: 'php', + response: '200', + geo: { + coordinates: { + lat: 37.13189556, + lon: -76.4929875 + } + }, + memory: 241_720, + url: 'https://theacademyofperformingartsandscience.org/people/type:astronauts/name:laurel-b-clark/profile' + } +) +puts response +---- diff --git a/docs/examples/guide/274feaaa727e0ddf61b3c0f093182839.asciidoc b/docs/examples/guide/274feaaa727e0ddf61b3c0f093182839.asciidoc new file mode 100644 index 0000000000..7108c73033 --- /dev/null +++ b/docs/examples/guide/274feaaa727e0ddf61b3c0f093182839.asciidoc @@ -0,0 +1,24 @@ +[source, ruby] +---- +response = client.search( + index: 'my-index-000001', + body: { + runtime_mappings: { + duration: { + type: 'long', + script: { + source: "\n emit(doc['measures.end'].value - doc['measures.start'].value);\n " + } + } + }, + aggregations: { + duration_stats: { + stats: { + field: 'duration' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/5276a831513623e43ed567eb52b6dba9.asciidoc b/docs/examples/guide/5276a831513623e43ed567eb52b6dba9.asciidoc new file mode 100644 index 0000000000..a903a37bc9 --- /dev/null +++ b/docs/examples/guide/5276a831513623e43ed567eb52b6dba9.asciidoc @@ -0,0 +1,15 @@ +[source, ruby] +---- +response = client.index( + index: 'my-index-000001', + routing: 'my-routing-value', + body: { + "@timestamp": '2099-11-15T13:12:00', + message: 'GET /search HTTP/1.1 200 1070000', + user: { + id: 'kimchy' + } + } +) +puts response +---- diff --git a/docs/examples/guide/850bfd0a00d32475a54ac7f87fb4cc4d.asciidoc b/docs/examples/guide/850bfd0a00d32475a54ac7f87fb4cc4d.asciidoc new file mode 100644 index 0000000000..c1f28b57bb --- /dev/null +++ b/docs/examples/guide/850bfd0a00d32475a54ac7f87fb4cc4d.asciidoc @@ -0,0 +1,25 @@ +[source, ruby] +---- +response = client.search( + index: 'my-index-000001', + body: { + runtime_mappings: { + 'measures.voltage' => { + type: 'double', + script: { + source: "if (doc['model_number.keyword'].value.equals('HG537PU'))\n {emit(1.7 * params._source['measures']['voltage']);}\n else{emit(params._source['measures']['voltage']);}" + } + } + }, + query: { + match: { + model_number: 'HG537PU' + } + }, + fields: [ + 'measures.voltage' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/cc28a3dafcd5056f2a3ec07f6fda5091.asciidoc b/docs/examples/guide/cc28a3dafcd5056f2a3ec07f6fda5091.asciidoc new file mode 100644 index 0000000000..430772d14d --- /dev/null +++ b/docs/examples/guide/cc28a3dafcd5056f2a3ec07f6fda5091.asciidoc @@ -0,0 +1,24 @@ +[source, ruby] +---- +response = client.search( + index: 'my-index-000001', + body: { + runtime_mappings: { + day_of_week: { + type: 'keyword', + script: { + source: "emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ROOT))" + } + } + }, + aggregations: { + day_of_week: { + terms: { + field: 'day_of_week' + } + } + } + } +) +puts response +---- From 28ded2b22b42f22bf6b35b105cff0be2ed626fb8 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Fri, 25 Aug 2023 13:03:05 +0200 Subject: [PATCH 050/540] Add request opts to perform_request method args --- .../lib/elasticsearch/api/namespace/common.rb | 4 ++-- elasticsearch-api/utils/endpoint_spec.rb | 8 +++++++- elasticsearch-api/utils/endpoint_specifics.rb | 2 +- elasticsearch-api/utils/thor/generate_source.rb | 1 - .../utils/thor/templates/_perform_request.erb | 10 +++++----- elasticsearch-api/utils/thor/templates/method.erb | 9 +++++++++ 6 files changed, 24 insertions(+), 10 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb index 06cac3f73a..4178b6b093 100644 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb @@ -34,8 +34,8 @@ def initialize(client) # Delegates the `perform_request` method to the wrapped client # - def perform_request(method, path, params={}, body=nil, headers=nil) - client.perform_request method, path, params, body, headers + def perform_request(method, path, params={}, body=nil, headers=nil, request_opts={}) + client.perform_request method, path, params, body, headers, request_opts end end diff --git a/elasticsearch-api/utils/endpoint_spec.rb b/elasticsearch-api/utils/endpoint_spec.rb index 5c4e85a57b..3d4a618ee9 100644 --- a/elasticsearch-api/utils/endpoint_spec.rb +++ b/elasticsearch-api/utils/endpoint_spec.rb @@ -17,6 +17,8 @@ # encoding: UTF-8 +require_relative 'endpoint_specifics' + module Elasticsearch module API class EndpointSpec @@ -36,6 +38,8 @@ def initialize(filepath) @path_parts = parse_endpoint_parts(@spec) @params = @spec['params'] || {} @paths = @spec['url']['paths'].map { |b| b['path'] } if @spec['url'] + @path_params = path_variables.flatten.uniq.collect(&:to_sym) + @perform_request_opts = { endpoint: @endpoint_name } @http_method = parse_http_method(@spec) @deprecation_note = @spec['url']['paths'].last&.[]('deprecated') @http_path = parse_http_path(@paths) @@ -53,7 +57,9 @@ def initialize(filepath) :http_path, :required_parts, :http_method, - :namespace_depth + :namespace_depth, + :path_params, + :perform_request_opts def body @spec['body'] diff --git a/elasticsearch-api/utils/endpoint_specifics.rb b/elasticsearch-api/utils/endpoint_specifics.rb index a3a3a79522..acda999e46 100644 --- a/elasticsearch-api/utils/endpoint_specifics.rb +++ b/elasticsearch-api/utils/endpoint_specifics.rb @@ -84,7 +84,7 @@ def module_name_helper(name) def ping_perform_request <<~SRC begin - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false rescue Exception => e if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not\s*Found|404|ConnectionFailed/i false diff --git a/elasticsearch-api/utils/thor/generate_source.rb b/elasticsearch-api/utils/thor/generate_source.rb index e9ac710b4d..e0db8a6bc7 100644 --- a/elasticsearch-api/utils/thor/generate_source.rb +++ b/elasticsearch-api/utils/thor/generate_source.rb @@ -23,7 +23,6 @@ require 'coderay' require 'pry' require_relative 'generator/files_helper' -require_relative '../endpoint_specifics' require_relative '../endpoint_spec' module Elasticsearch diff --git a/elasticsearch-api/utils/thor/templates/_perform_request.erb b/elasticsearch-api/utils/thor/templates/_perform_request.erb index 3b0095c0ea..fcb6bb4f03 100644 --- a/elasticsearch-api/utils/thor/templates/_perform_request.erb +++ b/elasticsearch-api/utils/thor/templates/_perform_request.erb @@ -20,30 +20,30 @@ <%= self.send("#{@spec.method_name}_body_helper".to_s) %> headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, request_opts) ) <%- elsif @spec.method_name == 'ping' -%> <%= ping_perform_request %> <%- else -%> <%- if needs_ignore_404?(@spec.endpoint_name) %> Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false end <%- elsif needs_complex_ignore_404?(@spec.endpoint_name) -%> if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end <%- else -%> Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) <%- end -%> <%- end -%> diff --git a/elasticsearch-api/utils/thor/templates/method.erb b/elasticsearch-api/utils/thor/templates/method.erb index af6e820fb2..60ca691745 100644 --- a/elasticsearch-api/utils/thor/templates/method.erb +++ b/elasticsearch-api/utils/thor/templates/method.erb @@ -24,6 +24,15 @@ module Elasticsearch <%= ERB.new(File.new("./thor/templates/_documentation_top.erb").read, trim_mode: '-').result(binding) -%> <%# Method definition -%> <%= ' '*(@spec.namespace_depth+3) -%>def <%= @spec.method_name %>(arguments = {}) +request_opts = <%= @spec.perform_request_opts %> +<%- unless @spec.path_params.empty? %> + defined_params =<%= @spec.path_params %>.inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? +<%- end %> +<%- %> <%- if @spec.endpoint_name == 'create' -%> <%= ' '*(@spec.namespace_depth+3) %>if arguments[:id] <%= ' '*(@spec.namespace_depth+3) %> index arguments.update op_type: 'create' From 9bfaebceed5b8b15429fc6d188f119ead430d1f0 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Fri, 25 Aug 2023 16:19:57 +0200 Subject: [PATCH 051/540] Update method template to handle create endpoint forwarding to index --- elasticsearch-api/utils/endpoint_spec.rb | 1 - elasticsearch-api/utils/thor/templates/method.erb | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/utils/endpoint_spec.rb b/elasticsearch-api/utils/endpoint_spec.rb index 3d4a618ee9..748c2252a0 100644 --- a/elasticsearch-api/utils/endpoint_spec.rb +++ b/elasticsearch-api/utils/endpoint_spec.rb @@ -39,7 +39,6 @@ def initialize(filepath) @params = @spec['params'] || {} @paths = @spec['url']['paths'].map { |b| b['path'] } if @spec['url'] @path_params = path_variables.flatten.uniq.collect(&:to_sym) - @perform_request_opts = { endpoint: @endpoint_name } @http_method = parse_http_method(@spec) @deprecation_note = @spec['url']['paths'].last&.[]('deprecated') @http_path = parse_http_path(@paths) diff --git a/elasticsearch-api/utils/thor/templates/method.erb b/elasticsearch-api/utils/thor/templates/method.erb index 60ca691745..0cada63f2b 100644 --- a/elasticsearch-api/utils/thor/templates/method.erb +++ b/elasticsearch-api/utils/thor/templates/method.erb @@ -24,7 +24,7 @@ module Elasticsearch <%= ERB.new(File.new("./thor/templates/_documentation_top.erb").read, trim_mode: '-').result(binding) -%> <%# Method definition -%> <%= ' '*(@spec.namespace_depth+3) -%>def <%= @spec.method_name %>(arguments = {}) -request_opts = <%= @spec.perform_request_opts %> + request_opts = { endpoint: arguments[:endpoint] || "<%= @spec.endpoint_name %>" } <%- unless @spec.path_params.empty? %> defined_params =<%= @spec.path_params %>.inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) @@ -34,6 +34,7 @@ request_opts = <%= @spec.perform_request_opts %> <%- end %> <%- %> <%- if @spec.endpoint_name == 'create' -%> + <%= ' '*(@spec.namespace_depth+3) %>arguments.update endpoint: 'create' <%= ' '*(@spec.namespace_depth+3) %>if arguments[:id] <%= ' '*(@spec.namespace_depth+3) %> index arguments.update op_type: 'create' <%= ' '*(@spec.namespace_depth+3) %>else From 41e58fc046cce6517aa1d1d25152a74be393bf3c Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Fri, 25 Aug 2023 16:20:49 +0200 Subject: [PATCH 052/540] Add unit test for perform request args --- .../elasticsearch/api/perform_request_spec.rb | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb new file mode 100644 index 0000000000..87976f47ec --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.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. + +require 'spec_helper' +require 'elastic-transport' +require_relative '../../../utils/endpoint_spec' +require_relative '../../../utils/thor/generator/files_helper' + +describe 'Perform request args' do + Elasticsearch::API::FilesHelper.files.each do |filepath| + spec = Elasticsearch::API::EndpointSpec.new(filepath) + next if spec.module_namespace.flatten.first == '_internal' + + # These are the path parts defined by the user in the method argument + defined_path_parts = spec.path_params.inject({}) do |params, part| + params.merge(part => 'testing') + end + + # These are the required params, we must pass them to the method even when testing + required_params = spec.required_parts.inject({}) do |params, part| + params.merge(part.to_sym => 'testing') + end + + let(:client_double) do + Class.new { include Elasticsearch::API }.new.tap do |client| + expect(client).to receive(:perform_request) do |_, _, _, _, _, request_params| + # Check that the expected hash is passed to the perform_request method + expect(request_params).to eq(expected_perform_request_params) + end.and_return(response_double) + end + end + + let(:response_double) do + double('response', status: 200, body: {}, headers: {}) + end + + context("'#{spec.endpoint_name}'") do + # The expected hash passed to perform_request contains the endpoint name and any defined path parts + let(:expected_perform_request_params) do + if defined_path_parts.empty? + { endpoint: spec.endpoint_name } + else + { endpoint: spec.endpoint_name, defined_params: defined_path_parts} + end + end + + if spec.path_parts.empty? + it "passes the endpoint id to the request" do + if spec.module_namespace.empty? + client_double.send(spec.method_name, required_params) + else + client_double.send(spec.module_namespace[0]).send(spec.method_name, required_params) + end + end + else + it "passes params to the request with the endpoint id: #{spec.path_parts.keys}" do + if spec.module_namespace.empty? + client_double.send(spec.method_name, required_params.merge(defined_path_parts)) + else + client_double.send( + spec.module_namespace[0]).send(spec.method_name, required_params.merge(defined_path_parts) + ) + end + end + end + end + end +end From 9fc7217da809f85e7bf4854134c92fe09dec7c49 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Wed, 30 Aug 2023 13:01:29 +0200 Subject: [PATCH 053/540] Update elasticsearch unit tests for additional perform_request arg --- elasticsearch/spec/unit/headers_spec.rb | 2 +- elasticsearch/spec/unit/opaque_id_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticsearch/spec/unit/headers_spec.rb b/elasticsearch/spec/unit/headers_spec.rb index 7d6fde7798..48a072b2fc 100644 --- a/elasticsearch/spec/unit/headers_spec.rb +++ b/elasticsearch/spec/unit/headers_spec.rb @@ -26,7 +26,7 @@ allow(client).to receive(:perform_request) { OpenStruct.new(body: '') } expect { client.search(headers: headers) }.not_to raise_error expect(client).to have_received(:perform_request) - .with('GET', '_search', {}, nil, headers) + .with('GET', '_search', {}, nil, headers, { endpoint: 'search' }) end end diff --git a/elasticsearch/spec/unit/opaque_id_spec.rb b/elasticsearch/spec/unit/opaque_id_spec.rb index 39c3f06104..1798898b2f 100644 --- a/elasticsearch/spec/unit/opaque_id_spec.rb +++ b/elasticsearch/spec/unit/opaque_id_spec.rb @@ -29,7 +29,7 @@ it 'uses x-opaque-id on a request' do client.search(opaque_id: '12345') expect(transport).to have_received(:perform_request) - .with('GET', '_search', {}, nil, { 'X-Opaque-Id' => '12345' }) + .with('GET', '_search', {}, nil, { 'X-Opaque-Id' => '12345' }, { endpoint: 'search' }) end end @@ -42,7 +42,7 @@ it 'uses x-opaque-id on a request' do expect { client.search(opaque_id: '12345') }.not_to raise_error expect(transport).to have_received(:perform_request) - .with('GET', '_search', {}, nil, { 'X-Opaque-Id' => 'elastic_cloud12345' }) + .with('GET', '_search', {}, nil, { 'X-Opaque-Id' => 'elastic_cloud12345' }, { endpoint: 'search' }) end end end From 574687e073c2b1c422436e78bf0d45fc018ac559 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Wed, 30 Aug 2023 13:15:39 +0200 Subject: [PATCH 054/540] Update cat specs --- .../api/actions/cat/aliases_spec.rb | 3 +- .../api/actions/cat/allocation_spec.rb | 3 +- .../actions/cat/component_templates_spec.rb | 32 +++++++++++++------ .../api/actions/cat/count_spec.rb | 3 +- .../api/actions/cat/fielddata_spec.rb | 6 ++-- .../api/actions/cat/health_spec.rb | 3 +- .../api/actions/cat/help_spec.rb | 3 +- .../api/actions/cat/indices_spec.rb | 3 +- .../api/actions/cat/master_spec.rb | 3 +- .../api/actions/cat/nodeattrs_spec.rb | 3 +- .../api/actions/cat/nodes_spec.rb | 3 +- .../api/actions/cat/pending_tasks_spec.rb | 3 +- .../api/actions/cat/plugins_spec.rb | 3 +- .../api/actions/cat/recovery_spec.rb | 3 +- .../api/actions/cat/repositories_spec.rb | 3 +- .../api/actions/cat/segments_spec.rb | 14 +++++++- .../api/actions/cat/shards_spec.rb | 3 +- .../api/actions/cat/snapshot_spec.rb | 3 +- .../api/actions/cat/tasks_spec.rb | 3 +- .../api/actions/cat/templates_spec.rb | 3 +- .../api/actions/cat/thread_pool_spec.rb | 3 +- 21 files changed, 75 insertions(+), 31 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb index 934e4d3aa0..4524b24363 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb @@ -25,7 +25,8 @@ '_cat/aliases', {}, nil, - {} + {}, + { endpoint: 'cat.aliases' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb index ee5db7275e..81fd6cd1ea 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb @@ -25,7 +25,8 @@ '_cat/allocation', {}, nil, - {} + {}, + { endpoint: 'cat.allocation' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb index eb03af9102..1e3b559771 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb @@ -18,19 +18,20 @@ require 'spec_helper' describe 'client.cat#component_templates' do - let(:expected_args) do - [ - 'GET', - url, - {}, - nil, - {} - ] - end - context 'without a name' do let(:url) { '_cat/component_templates' } + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { endpoint: 'cat.component_templates' } + ] + end + it 'performs the request' do expect(client_double.cat.component_templates).to be_a Elasticsearch::API::Response end @@ -39,6 +40,17 @@ context 'with a name' do let(:url) { '_cat/component_templates/foo' } + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { name: 'foo' }, endpoint: 'cat.component_templates' } + ] + end + it 'performs the request' do expect(client_double.cat.component_templates(name: 'foo')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb index e1c335032a..5db1051797 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb @@ -25,7 +25,8 @@ '_cat/count', {}, nil, - {} + {}, + { endpoint: 'cat.count' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb index 051622921d..30784474b3 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb @@ -25,7 +25,8 @@ '_cat/fielddata', {}, nil, - {} + {}, + { endpoint: 'cat.fielddata' } ] end @@ -41,7 +42,8 @@ '_cat/fielddata/foo,bar', {}, nil, - {} + {}, + { defined_params: { fields: ['foo', 'bar'] }, endpoint: 'cat.fielddata' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb index 32afd710f2..dfbfbfb634 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb @@ -25,7 +25,8 @@ '_cat/health', {}, nil, - {} + {}, + { endpoint: 'cat.health' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb index eccfa32c29..5cff6878aa 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb @@ -25,7 +25,8 @@ '_cat', {}, nil, - {} + {}, + { endpoint: 'cat.help' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb index 823ec1f8fa..71663d555e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb @@ -25,7 +25,8 @@ '_cat/indices', {}, nil, - {} + {}, + { endpoint: 'cat.indices' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb index 906c67fe05..5902ac355b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb @@ -25,7 +25,8 @@ '_cat/master', {}, nil, - {} + {}, + { endpoint: 'cat.master' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb index b7caa40ea9..b950e602d8 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb @@ -25,7 +25,8 @@ '_cat/nodeattrs', {}, nil, - {} + {}, + { endpoint: 'cat.nodeattrs' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb index 8c21eeb698..05a05cf75e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb @@ -25,7 +25,8 @@ '_cat/nodes', {}, nil, - {} + {}, + { endpoint: 'cat.nodes' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb index f61e07ba34..e855aeb32e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb @@ -25,7 +25,8 @@ '_cat/pending_tasks', {}, nil, - {} + {}, + { endpoint: 'cat.pending_tasks' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb index 186b3a4903..92e7fdf96d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb @@ -25,7 +25,8 @@ '_cat/plugins', {}, nil, - {} + {}, + { endpoint: 'cat.plugins' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb index c2b08ba799..d9170dbd99 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb @@ -25,7 +25,8 @@ '_cat/recovery', {}, nil, - {} + {}, + { endpoint: 'cat.recovery' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb index ac22e49eef..cccc304b44 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb @@ -25,7 +25,8 @@ '_cat/repositories', {}, nil, - {} + {}, + { endpoint: 'cat.repositories'} ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb index f85fd7e623..5e0d3c3ce1 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb @@ -25,7 +25,8 @@ url, {}, nil, - {} + {}, + { endpoint: 'cat.segments' } ] end @@ -42,6 +43,17 @@ '_cat/segments/foo' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { index: 'foo' }, endpoint: 'cat.segments' } + ] + end + it 'performs the request' do expect(client_double.cat.segments(index: 'foo')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb index acad84f522..a362502706 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb @@ -25,7 +25,8 @@ '_cat/shards', {}, nil, - {} + {}, + { endpoint: 'cat.shards' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb index 476fe1c3e3..59ee655f37 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb @@ -25,7 +25,8 @@ '_cat/snapshots/foo', {}, nil, - {} + {}, + { defined_params: { repository: 'foo' }, endpoint: 'cat.snapshots' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb index 5d64e3747b..174bac7439 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb @@ -25,7 +25,8 @@ '_cat/tasks', {}, nil, - {} + {}, + { endpoint: 'cat.tasks' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb index 102031870a..ad900bb2f6 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb @@ -25,7 +25,8 @@ '_cat/templates', {}, nil, - {} + {}, + { endpoint: 'cat.templates' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb index 7ff9f7c374..16e2ed1493 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb @@ -25,7 +25,8 @@ '_cat/thread_pool', {}, nil, - {} + {}, + { endpoint: 'cat.thread_pool' } ] end From 942b03a73564ab3b59074b1bceec4e73a4903317 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Wed, 30 Aug 2023 13:21:08 +0200 Subject: [PATCH 055/540] Update cluster specs --- .../api/actions/cluster/allocation_explain_spec.rb | 3 ++- .../api/actions/cluster/get_settings_spec.rb | 3 ++- .../elasticsearch/api/actions/cluster/health_spec.rb | 9 ++++++--- .../spec/elasticsearch/api/actions/cluster/info_spec.rb | 3 ++- .../api/actions/cluster/pending_tasks_spec.rb | 3 ++- .../api/actions/cluster/put_settings_spec.rb | 3 ++- .../api/actions/cluster/remote_info_spec.rb | 3 ++- .../elasticsearch/api/actions/cluster/reroute_spec.rb | 6 ++++-- .../spec/elasticsearch/api/actions/cluster/state_spec.rb | 6 ++++-- .../spec/elasticsearch/api/actions/cluster/stats_spec.rb | 3 ++- 10 files changed, 28 insertions(+), 14 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb index 778d53514b..3577130b2c 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb @@ -25,7 +25,8 @@ '_cluster/allocation/explain', {}, nil, - {} + {}, + { endpoint: 'cluster.allocation_explain' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb index 9bf2aca291..6a9434546e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb @@ -25,7 +25,8 @@ '_cluster/settings', {}, nil, - {} + {}, + { endpoint: 'cluster.get_settings' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/health_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/health_spec.rb index 3ce3b6160b..8461ba018d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/health_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/health_spec.rb @@ -25,7 +25,8 @@ '_cluster/health', {}, nil, - {} + {}, + { endpoint: 'cluster.health' } ] end @@ -41,7 +42,8 @@ '_cluster/health', { level: 'indices' }, nil, - {} + {}, + { endpoint: 'cluster.health' } ] end @@ -58,7 +60,8 @@ '_cluster/health/foo', {}, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'cluster.health' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/info_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/info_spec.rb index 13d0124eb6..d2db5331c0 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/info_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/info_spec.rb @@ -25,7 +25,8 @@ '_info/foo', {}, nil, - {} + {}, + { defined_params: { target: 'foo' }, endpoint: 'cluster.info' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb index c4e6017633..bb939ca9d0 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb @@ -25,7 +25,8 @@ '_cluster/pending_tasks', {}, nil, - {} + {}, + { endpoint: 'cluster.pending_tasks' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb index e4671204c3..469d911b89 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb @@ -25,7 +25,8 @@ '_cluster/settings', {}, {}, - {} + {}, + { endpoint: 'cluster.put_settings' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb index b3618a29da..1f5cc20bbc 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb @@ -25,7 +25,8 @@ '_remote/info', {}, nil, - {} + {}, + { endpoint: 'cluster.remote_info' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/reroute_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/reroute_spec.rb index 2cf0388cbd..49848ce103 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/reroute_spec.rb @@ -25,7 +25,8 @@ '_cluster/reroute', {}, {}, - {} + {}, + { endpoint: 'cluster.reroute' } ] end @@ -41,7 +42,8 @@ '_cluster/reroute', {}, { commands: [ move: { index: 'myindex', shard: 0 }] }, - {} + {}, + { endpoint: 'cluster.reroute' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/state_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/state_spec.rb index 1f1852d621..9a62a4fc65 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/state_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/state_spec.rb @@ -25,7 +25,8 @@ '_cluster/state', {}, nil, - {} + {}, + { endpoint: 'cluster.state' } ] end @@ -41,7 +42,8 @@ '_cluster/state/foo,bar', {}, nil, - {} + {}, + { defined_params: { metric: ['foo', 'bar']}, endpoint: 'cluster.state' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/stats_spec.rb index b695f849eb..c18fde3abf 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/stats_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cluster/stats_spec.rb @@ -25,7 +25,8 @@ '_cluster/stats', {}, nil, - {} + {}, + { endpoint: 'cluster.stats' } ] end From dd59285df0ef7d41c2fe3e2a37d0f2f6fc71df6a Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Wed, 30 Aug 2023 13:23:19 +0200 Subject: [PATCH 056/540] Update dangling_indices specs --- .../actions/dangling_indices/delete_dangling_indices_spec.rb | 3 ++- .../actions/dangling_indices/import_dangling_indices_spec.rb | 3 ++- .../api/actions/dangling_indices/list_dangling_indices_spec.rb | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/delete_dangling_indices_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/delete_dangling_indices_spec.rb index 4aaa50e897..95a25c958e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/delete_dangling_indices_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/delete_dangling_indices_spec.rb @@ -24,7 +24,8 @@ '_dangling/foo', {}, nil, - {} + {}, + { defined_params: { index_uuid:'foo' }, endpoint: 'dangling_indices.delete_dangling_index' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/import_dangling_indices_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/import_dangling_indices_spec.rb index 7b46f5c17d..86f1da1fb5 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/import_dangling_indices_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/import_dangling_indices_spec.rb @@ -24,7 +24,8 @@ '_dangling/foo', {}, nil, - {} + {}, + { defined_params: { index_uuid:'foo' }, endpoint: 'dangling_indices.import_dangling_index' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/list_dangling_indices_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/list_dangling_indices_spec.rb index 82f6d896ab..105fbc8fa5 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/list_dangling_indices_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/list_dangling_indices_spec.rb @@ -24,7 +24,8 @@ '_dangling', {}, nil, - {} + {}, + { endpoint: 'dangling_indices.list_dangling_indices' } ] end From 9b3328e634b8b0c6726e8c450308df8e99404523 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 31 Aug 2023 13:04:33 +0200 Subject: [PATCH 057/540] Update data_frame specs --- .../api/actions/data_frame/update_data_frame_transform_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/data_frame/update_data_frame_transform_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/data_frame/update_data_frame_transform_spec.rb index 53e4d4ac4e..ee03bc00ca 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/data_frame/update_data_frame_transform_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/data_frame/update_data_frame_transform_spec.rb @@ -25,7 +25,8 @@ '_transform/foo/_update', params, {}, - {} + {}, + { defined_params: { transform_id: 'foo'}, endpoint: 'transform.update_transform' } ] end From 4a4ec0804da835670d8761c98cf4703f8b5f2382 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 31 Aug 2023 13:10:03 +0200 Subject: [PATCH 058/540] Update features specs --- .../elasticsearch/api/actions/features/get_features_spec.rb | 3 ++- .../elasticsearch/api/actions/features/reset_features_spec.rb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/features/get_features_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/features/get_features_spec.rb index d83ce6c00e..1fd5529b9e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/features/get_features_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/features/get_features_spec.rb @@ -24,7 +24,8 @@ '_features', {}, nil, - {} + {}, + { endpoint: 'features.get_features' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/features/reset_features_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/features/reset_features_spec.rb index e3be261c34..950b568f1f 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/features/reset_features_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/features/reset_features_spec.rb @@ -24,7 +24,8 @@ '_features/_reset', {}, nil, - {} + {}, + { endpoint: 'features.reset_features' } ] end From 07e28be12a9ff5c777ad657fca4049d909c5b402 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 31 Aug 2023 13:12:08 +0200 Subject: [PATCH 059/540] Update fleet specs --- .../elasticsearch/api/actions/fleet/global_checkpoints_spec.rb | 3 ++- .../spec/elasticsearch/api/actions/fleet/msearch_spec.rb | 3 ++- .../spec/elasticsearch/api/actions/fleet/search_spec.rb | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/fleet/global_checkpoints_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/fleet/global_checkpoints_spec.rb index d5eb4de812..0f934ad019 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/fleet/global_checkpoints_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/fleet/global_checkpoints_spec.rb @@ -24,7 +24,8 @@ 'foo/_fleet/global_checkpoints', {}, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'fleet.global_checkpoints' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/fleet/msearch_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/fleet/msearch_spec.rb index 2ac7177a9b..af44de93e8 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/fleet/msearch_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/fleet/msearch_spec.rb @@ -24,7 +24,8 @@ '_fleet/_fleet_msearch', {}, {}, - { 'Content-Type' => 'application/x-ndjson' } + { 'Content-Type' => 'application/x-ndjson' }, + { endpoint: 'fleet.msearch' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/fleet/search_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/fleet/search_spec.rb index 45e0b8b4a3..6f49db20b4 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/fleet/search_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/fleet/search_spec.rb @@ -24,7 +24,8 @@ 'foo/_fleet/_fleet_search', {}, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'fleet.search' } ] end From 2f00b63f7ab78e3ec09203e35278e1a927e9b0df Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 31 Aug 2023 13:12:58 +0200 Subject: [PATCH 060/540] Update index_lifecycle_management specs --- .../index_lifecycle_management/migrate_to_data_tiers_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers_spec.rb index e1bc703ea1..83d20814a1 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers_spec.rb @@ -24,7 +24,8 @@ '_ilm/migrate_to_data_tiers', {}, nil, - {} + {}, + { endpoint: 'ilm.migrate_to_data_tiers' } ] end From 1fef5af7671fd4d895b19b7e54586cec0e937e2d Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 10:08:10 +0200 Subject: [PATCH 061/540] Update indices specs --- .../api/actions/indices/add_block_spec.rb | 4 +- .../api/actions/indices/analyze_spec.rb | 14 +++- .../api/actions/indices/clear_cache_spec.rb | 25 ++++++- .../api/actions/indices/clone_spec.rb | 4 +- .../api/actions/indices/close_spec.rb | 14 +++- .../api/actions/indices/create_spec.rb | 14 +++- .../indices/data_streams_stats_spec.rb | 14 +++- .../api/actions/indices/delete_alias_spec.rb | 16 ++++- .../indices/delete_data_lifecycle_spec.rb | 3 +- .../api/actions/indices/delete_spec.rb | 25 ++++++- .../actions/indices/delete_template_spec.rb | 14 +++- .../api/actions/indices/disk_usage_spec.rb | 3 +- .../api/actions/indices/exists_alias_spec.rb | 27 ++++++- .../api/actions/indices/exists_spec.rb | 25 ++++++- .../actions/indices/exists_template_spec.rb | 14 +++- .../indices/explain_data_lifecycle_spec.rb | 4 +- .../actions/indices/field_usage_stats_spec.rb | 3 +- .../api/actions/indices/flush_spec.rb | 47 ++++++++++++- .../api/actions/indices/forcemerge_spec.rb | 3 +- .../api/actions/indices/get_alias_spec.rb | 26 ++++++- .../indices/get_data_lifecycle_spec.rb | 3 +- .../actions/indices/get_field_mapping_spec.rb | 14 +++- .../api/actions/indices/get_mapping_spec.rb | 36 +++++++++- .../api/actions/indices/get_settings_spec.rb | 36 +++++++++- .../api/actions/indices/get_spec.rb | 3 +- .../api/actions/indices/open_spec.rb | 14 +++- .../api/actions/indices/put_alias_spec.rb | 28 +++++++- .../indices/put_data_lifecycle_spec.rb | 3 +- .../api/actions/indices/put_mapping_spec.rb | 25 ++++++- .../api/actions/indices/put_settings_spec.rb | 47 ++++++++++++- .../api/actions/indices/put_template_spec.rb | 14 +++- .../api/actions/indices/recovery_spec.rb | 3 +- .../api/actions/indices/refresh_spec.rb | 47 ++++++++++++- .../api/actions/indices/rollover_spec.rb | 14 +++- .../api/actions/indices/segments_spec.rb | 47 ++++++++++++- .../api/actions/indices/shard_stores_spec.rb | 3 +- .../api/actions/indices/shrink_spec.rb | 4 +- .../api/actions/indices/split_spec.rb | 4 +- .../api/actions/indices/stats_spec.rb | 69 +++++++++++++++++- .../api/actions/indices/unfreeze_spec.rb | 14 +++- .../actions/indices/update_aliases_spec.rb | 3 +- .../actions/indices/validate_query_spec.rb | 70 ++++++++++++++++++- 42 files changed, 758 insertions(+), 42 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/add_block_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/add_block_spec.rb index 8373010f3a..efbbe1aa39 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/add_block_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/add_block_spec.rb @@ -24,7 +24,9 @@ url, {}, nil, - {} + {}, + { defined_params: { block: 'test_block', index: 'test_index' }, + endpoint: 'indices.add_block'} ] end let(:url) { "#{index}/_block/#{block}"} diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/analyze_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/analyze_spec.rb index d45de49ba5..c23218b8b7 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/analyze_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/analyze_spec.rb @@ -24,7 +24,8 @@ url, params, body, - {} + {}, + { endpoint: 'indices.analyze' } ] end let(:method) { 'GET' } @@ -50,6 +51,17 @@ 'foo/_analyze' end + let(:expected_args) do + [ + method, + url, + params, + body, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.analyze' } + ] + end + it 'performs the request' do expect(client_double.indices.analyze(index: 'foo')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb index 580f7f6996..c5797ef680 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { endpoint: 'indices.clear_cache' } ] end @@ -47,6 +48,17 @@ 'foo/_cache/clear' end + let(:expected_args) do + [ + 'POST', + url, + params, + nil, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.clear_cache' } + ] + end + it 'performs the request' do expect(client_double.indices.clear_cache(index: 'foo')).to be_a Elasticsearch::API::Response end @@ -69,6 +81,17 @@ 'foo%5Ebar/_cache/clear' end + let(:expected_args) do + [ + 'POST', + url, + params, + nil, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.clear_cache' } + ] + end + let(:params) do { } end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/clone_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/clone_spec.rb index 853f0810e2..ab080402ca 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/clone_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/clone_spec.rb @@ -25,7 +25,9 @@ url, params, body, - {} + {}, + { defined_params: { index: 'my_source_index', target: 'my_target_index' }, + endpoint: 'indices.clone' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/close_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/close_spec.rb index 300ad0c0e9..a0f4b2f837 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/close_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/close_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.close' } ] end @@ -78,6 +79,17 @@ 'foo%5Ebar/_close' end + let(:expected_args) do + [ + 'POST', + url, + params, + nil, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.close' } + ] + end + it 'performs the request' do expect(client_double.indices.close(index: 'foo^bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/create_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/create_spec.rb index ea11591bc5..719b493ef9 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/create_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/create_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.create' } ] end @@ -78,6 +79,17 @@ 'foo%5Ebar' end + let(:expected_args) do + [ + 'PUT', + url, + params, + nil, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.create' } + ] + end + it 'performs the request' do expect(client_double.indices.create(index: 'foo^bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/data_streams_stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/data_streams_stats_spec.rb index 25fae874e6..c3f271556d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/data_streams_stats_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/data_streams_stats_spec.rb @@ -24,7 +24,8 @@ url, params, nil, - {} + {}, + { endpoint: 'indices.data_streams_stats' } ] end @@ -51,6 +52,17 @@ '_data_stream/foo/_stats' end + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { defined_params: { name: 'foo' }, endpoint: 'indices.data_streams_stats' } + ] + end + it 'performs the request' do expect(client_double.indices.data_streams_stats(name: 'foo')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb index 3291a6f22c..fec80ef9d7 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb @@ -25,7 +25,9 @@ url, params, nil, - {} + {}, + { defined_params: { index: 'foo', name: 'bar'}, + endpoint: 'indices.delete_alias' } ] end @@ -76,6 +78,18 @@ 'foo%5Ebar/_aliases/bar%2Fbam' end + let(:expected_args) do + [ + 'DELETE', + url, + params, + nil, + {}, + { defined_params: { index: 'foo^bar', name: 'bar/bam'}, + endpoint: 'indices.delete_alias' } + ] + end + it 'performs the request' do expect(client_double.indices.delete_alias(index: 'foo^bar', name: 'bar/bam')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_data_lifecycle_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_data_lifecycle_spec.rb index 8c31a867f3..f8476c97b4 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_data_lifecycle_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_data_lifecycle_spec.rb @@ -24,7 +24,8 @@ '_data_stream/foo/_lifecycle', {}, nil, - {} + {}, + { defined_params: { name: 'foo' }, endpoint: 'indices.delete_data_lifecycle' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_spec.rb index 9025baba79..fd7742515b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.delete' } ] end @@ -47,6 +48,17 @@ 'foo,bar' end + let(:expected_args) do + [ + 'DELETE', + url, + params, + nil, + {}, + { defined_params: { index: ['foo', 'bar'] }, endpoint: 'indices.delete' } + ] + end + it 'performs the request' do expect(client_double.indices.delete(index: ['foo', 'bar'])).to be_a Elasticsearch::API::Response end @@ -69,6 +81,17 @@ 'foo%5Ebar' end + let(:expected_args) do + [ + 'DELETE', + url, + params, + nil, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.delete' } + ] + end + it 'performs the request' do expect(client_double.indices.delete(index: 'foo^bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_template_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_template_spec.rb index d616c7fc4e..5949ff43d2 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_template_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { name: 'foo' }, endpoint: 'indices.delete_template' } ] end @@ -47,6 +48,17 @@ '_template/foo%5Ebar' end + let(:expected_args) do + [ + 'DELETE', + url, + params, + nil, + {}, + { defined_params: { name: 'foo^bar' }, endpoint: 'indices.delete_template' } + ] + end + it 'performs the request' do expect(client_double.indices.delete_template(name: 'foo^bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/disk_usage_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/disk_usage_spec.rb index c674ab4a2f..e1001a8ff0 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/disk_usage_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/disk_usage_spec.rb @@ -24,7 +24,8 @@ "#{index}/_disk_usage", {}, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.disk_usage' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb index 6683ea8f2d..e1707a5413 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { name: 'foo'}, endpoint: 'indices.exists_alias' } ] end @@ -51,6 +52,18 @@ 'foo,bar/_alias/bam' end + let(:expected_args) do + [ + 'HEAD', + url, + params, + nil, + {}, + { defined_params: { index: ['foo', 'bar'], name: 'bam'}, + endpoint: 'indices.exists_alias' } + ] + end + it 'performs the request' do expect(client_double.indices.exists_alias(index: ['foo','bar'], name: 'bam')).to eq(true) end @@ -62,6 +75,18 @@ 'foo%5Ebar/_alias/bar%2Fbam' end + let(:expected_args) do + [ + 'HEAD', + url, + params, + nil, + {}, + { defined_params: { index: 'foo^bar', name: 'bar/bam'}, + endpoint: 'indices.exists_alias' } + ] + end + it 'performs the request' do expect(client_double.indices.exists_alias(index: 'foo^bar', name: 'bar/bam')).to eq(true) end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_spec.rb index 2637686c4f..9a1f635dee 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.exists' } ] end @@ -51,6 +52,17 @@ 'foo,bar' end + let(:expected_args) do + [ + 'HEAD', + url, + params, + nil, + {}, + { defined_params: { index: ['foo','bar'] }, endpoint: 'indices.exists' } + ] + end + it 'performs the request' do expect(client_double.indices.exists(index: ['foo','bar'])).to eq(true) end @@ -62,6 +74,17 @@ 'foo%5Ebar' end + let(:expected_args) do + [ + 'HEAD', + url, + params, + nil, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.exists' } + ] + end + it 'performs the request' do expect(client_double.indices.exists(index: 'foo^bar')).to eq(true) end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_template_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_template_spec.rb index 19eda3b383..0048f7ca24 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_template_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { name: 'foo' }, endpoint: 'indices.exists_template' } ] end @@ -47,6 +48,17 @@ '_template/bar%2Fbam' end + let(:expected_args) do + [ + 'HEAD', + url, + params, + nil, + {}, + { defined_params: { name: 'bar/bam' }, endpoint: 'indices.exists_template' } + ] + end + it 'performs the request' do expect(client_double.indices.exists_template(name: 'bar/bam')).to eq(true) end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/explain_data_lifecycle_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/explain_data_lifecycle_spec.rb index 06ff6b0362..9b072557d2 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/explain_data_lifecycle_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/explain_data_lifecycle_spec.rb @@ -24,7 +24,9 @@ 'foo/_lifecycle/explain', {}, nil, - {} + {}, + { defined_params: { index: 'foo' }, + endpoint: 'indices.explain_data_lifecycle' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb index 970811655e..cf84578807 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb @@ -24,7 +24,8 @@ 'foo/_field_usage_stats', {}, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.field_usage_stats' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/flush_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/flush_spec.rb index ce21e4b98a..3f81b40628 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/flush_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/flush_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { endpoint: 'indices.flush' } ] end @@ -47,6 +48,17 @@ 'foo/_flush' end + let(:expected_args) do + [ + 'POST', + url, + params, + nil, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.flush' } + ] + end + it 'performs the request' do expect(client_double.indices.flush(index: 'foo')).to be_a Elasticsearch::API::Response end @@ -58,6 +70,17 @@ 'foo,bar/_flush' end + let(:expected_args) do + [ + 'POST', + url, + params, + nil, + {}, + { defined_params: { index: ['foo','bar'] }, endpoint: 'indices.flush' } + ] + end + it 'performs the request' do expect(client_double.indices.flush(index: ['foo','bar'])).to be_a Elasticsearch::API::Response end @@ -69,6 +92,17 @@ 'foo%5Ebar/_flush' end + let(:expected_args) do + [ + 'POST', + url, + params, + nil, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.flush' } + ] + end + it 'performs the request' do expect(client_double.indices.flush(index: 'foo^bar')).to be_a Elasticsearch::API::Response end @@ -80,6 +114,17 @@ 'foo/_flush' end + let(:expected_args) do + [ + 'POST', + url, + params, + nil, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.flush' } + ] + end + let(:params) do { ignore_unavailable: true } end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb index 574d63d229..e64284e9b4 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb @@ -25,7 +25,8 @@ '_forcemerge', {}, nil, - {} + {}, + { endpoint: 'indices.forcemerge' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_alias_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_alias_spec.rb index 7d99384beb..b1000df66f 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_alias_spec.rb @@ -25,7 +25,8 @@ url, {}, nil, - {} + {}, + { defined_params: { name: 'foo' }, endpoint: 'indices.get_alias' } ] end @@ -43,6 +44,18 @@ 'foo,bar/_alias/bam' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { index: ['foo', 'bar'], name: 'bam' }, endpoint: 'indices.get_alias' } + ] + end + + it 'performs the request' do expect(client_double.indices.get_alias(index: ['foo','bar'], name: 'bam')).to be_a Elasticsearch::API::Response end @@ -54,6 +67,17 @@ 'foo%5Ebar/_alias/bar%2Fbam' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { index: 'foo^bar', name: 'bar/bam' }, endpoint: 'indices.get_alias' } + ] + end + it 'performs the request' do expect(client_double.indices.get_alias(index: 'foo^bar', name: 'bar/bam')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_data_lifecycle_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_data_lifecycle_spec.rb index d61c6274d1..5912ddfa10 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_data_lifecycle_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_data_lifecycle_spec.rb @@ -24,7 +24,8 @@ '_data_stream/foo/_lifecycle', {}, nil, - {} + {}, + { defined_params: { name: 'foo' }, endpoint: 'indices.get_data_lifecycle' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb index 7687fb8319..cd12bf16bc 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb @@ -25,7 +25,8 @@ url, {}, nil, - {} + {}, + { endpoint: 'indices.get_field_mapping' } ] end @@ -43,6 +44,17 @@ 'foo/_mapping/field/bam' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.get_field_mapping' } + ] + end + it 'performs the request' do expect(client_double.indices.get_field_mapping(index: 'foo', field: 'bam')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb index 20f95460ef..5a6f018d9d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb @@ -24,7 +24,8 @@ url, {}, nil, - {} + {}, + { endpoint: 'indices.get_mapping' } ] end @@ -41,6 +42,17 @@ 'foo/_mapping' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.get_mapping' } + ] + end + it 'performs the request' do expect(client_double.indices.get_mapping(index: 'foo')).to be_a Elasticsearch::API::Response end @@ -51,6 +63,17 @@ 'foo,bar/_mapping' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { index: ['foo', 'bar'] }, endpoint: 'indices.get_mapping' } + ] + end + it 'performs the request' do expect(client_double.indices.get_mapping(index: ['foo', 'bar'])).to be_a Elasticsearch::API::Response end @@ -61,6 +84,17 @@ 'foo%5Ebar/_mapping' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.get_mapping' } + ] + end + it 'performs the request' do expect(client_double.indices.get_mapping(index: 'foo^bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_settings_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_settings_spec.rb index c603a589c0..9d6bb92f22 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_settings_spec.rb @@ -25,7 +25,8 @@ url, {}, nil, - {} + {}, + { endpoint: 'indices.get_settings' } ] end @@ -43,6 +44,17 @@ 'foo/_settings' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.get_settings' } + ] + end + it 'performs the request' do expect(client_double.indices.get_settings(index: 'foo')).to be_a Elasticsearch::API::Response end @@ -54,6 +66,17 @@ 'foo/_settings/foo.bar' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { index: 'foo', name: 'foo.bar' }, endpoint: 'indices.get_settings' } + ] + end + it 'performs the request' do expect(client_double.indices.get_settings(index: 'foo', name: 'foo.bar')).to be_a Elasticsearch::API::Response end @@ -65,6 +88,17 @@ 'foo%5Ebar/_settings' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.get_settings' } + ] + end + it 'performs the request' do expect(client_double.indices.get_settings(index: 'foo^bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_spec.rb index f22b538982..8d38d465a2 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.get' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/open_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/open_spec.rb index a620efa0e4..3b3412a2b6 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/open_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/open_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.open' } ] end @@ -58,6 +59,17 @@ 'foo%5Ebar/_open' end + let(:expected_args) do + [ + 'POST', + url, + params, + nil, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.open' } + ] + end + it 'performs the request' do expect(client_double.indices.open(index: 'foo^bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_alias_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_alias_spec.rb index 9cda71ae2b..12a1f71dd2 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_alias_spec.rb @@ -25,7 +25,9 @@ url, {}, body, - {} + {}, + { defined_params: { index: 'foo', name: 'bar' }, + endpoint: 'indices.put_alias' } ] end @@ -71,6 +73,18 @@ 'foo,bar/_aliases/bam' end + let(:expected_args) do + [ + 'PUT', + url, + {}, + body, + {}, + { defined_params: { index: ['foo','bar'], name: 'bam' }, + endpoint: 'indices.put_alias' } + ] + end + it 'performs the request' do expect(client_double.indices.put_alias(index: ['foo','bar'], name: 'bam')).to be_a Elasticsearch::API::Response end @@ -82,6 +96,18 @@ 'foo%5Ebar/_aliases/bar%2Fbam' end + let(:expected_args) do + [ + 'PUT', + url, + {}, + body, + {}, + { defined_params: { index: 'foo^bar', name: 'bar/bam' }, + endpoint: 'indices.put_alias' } + ] + end + it 'performs the request' do expect(client_double.indices.put_alias(index: 'foo^bar', name: 'bar/bam')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_data_lifecycle_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_data_lifecycle_spec.rb index 233788dbc5..fedb498df3 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_data_lifecycle_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_data_lifecycle_spec.rb @@ -24,7 +24,8 @@ '_data_stream/foo/_lifecycle', {}, nil, - {} + {}, + { defined_params: { name: 'foo' }, endpoint: 'indices.put_data_lifecycle' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb index ccd40712ee..ddce002359 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb @@ -24,7 +24,8 @@ url, {}, body, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.put_mapping' } ] end @@ -79,6 +80,17 @@ 'foo,bar/_mapping' end + let(:expected_args) do + [ + 'PUT', + url, + {}, + body, + {}, + { defined_params: { index: ['foo','bar'] }, endpoint: 'indices.put_mapping' } + ] + end + it 'performs the request' do expect(client_double.indices.put_mapping(index: ['foo','bar'], body: {})).to be_a Elasticsearch::API::Response end @@ -89,6 +101,17 @@ 'foo%5Ebar/_mapping' end + let(:expected_args) do + [ + 'PUT', + url, + {}, + body, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.put_mapping' } + ] + end + it 'performs the request' do expect(client_double.indices.put_mapping(index: 'foo^bar', body: {})).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_settings_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_settings_spec.rb index 27c43cd690..ef4009bc6e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_settings_spec.rb @@ -25,7 +25,8 @@ url, params, body, - {} + {}, + { endpoint: 'indices.put_settings' } ] end @@ -68,6 +69,17 @@ 'foo/_settings' end + let(:expected_args) do + [ + 'PUT', + url, + params, + body, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.put_settings' } + ] + end + it 'performs the request' do expect(client_double.indices.put_settings(index: 'foo', flat_settings: true, body: {})).to be_a Elasticsearch::API::Response end @@ -79,6 +91,17 @@ 'foo/_settings' end + let(:expected_args) do + [ + 'PUT', + url, + params, + body, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.put_settings' } + ] + end + it 'performs the request' do expect(client_double.indices.put_settings(index: 'foo', body: {})).to be_a Elasticsearch::API::Response end @@ -90,6 +113,17 @@ 'foo,bar/_settings' end + let(:expected_args) do + [ + 'PUT', + url, + params, + body, + {}, + { defined_params: { index: ['foo','bar'] }, endpoint: 'indices.put_settings' } + ] + end + it 'performs the request' do expect(client_double.indices.put_settings(index: ['foo','bar'], body: {})).to be_a Elasticsearch::API::Response end @@ -101,6 +135,17 @@ 'foo%5Ebar/_settings' end + let(:expected_args) do + [ + 'PUT', + url, + params, + body, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.put_settings' } + ] + end + it 'performs the request' do expect(client_double.indices.put_settings(index: 'foo^bar', body: {})).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_template_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_template_spec.rb index cba8aa18f5..a076da4e93 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_template_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_template_spec.rb @@ -25,7 +25,8 @@ url, params, body, - {} + {}, + { defined_params: { name: 'foo' }, endpoint: 'indices.put_template' } ] end @@ -100,6 +101,17 @@ {} end + let(:expected_args) do + [ + 'PUT', + url, + params, + body, + {}, + { defined_params: { name: 'foo^bar' }, endpoint: 'indices.put_template' } + ] + end + it 'performs the request' do expect(client_double.indices.put_template(name: 'foo^bar', body: {})).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/recovery_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/recovery_spec.rb index 365b11d716..cc9605dd43 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/recovery_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/recovery_spec.rb @@ -25,7 +25,8 @@ 'foo/_recovery', {}, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.recovery' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/refresh_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/refresh_spec.rb index 678accbacc..970cda977d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/refresh_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/refresh_spec.rb @@ -25,7 +25,8 @@ url, params, body, - {} + {}, + { endpoint: 'indices.refresh' } ] end @@ -51,6 +52,17 @@ 'foo/_refresh' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.refresh' } + ] + end + it 'performs the request' do expect(client_double.indices.refresh(index: 'foo')).to be_a Elasticsearch::API::Response end @@ -62,6 +74,17 @@ 'foo,bar/_refresh' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + {}, + { defined_params: { index: ['foo', 'bar'] }, endpoint: 'indices.refresh' } + ] + end + it 'performs the request' do expect(client_double.indices.refresh(index: ['foo', 'bar'])).to be_a Elasticsearch::API::Response end @@ -73,6 +96,17 @@ 'foo,bar/_refresh' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + {}, + { defined_params: { index: 'foo,bar' }, endpoint: 'indices.refresh' } + ] + end + it 'performs the request' do expect(client_double.indices.refresh(index: 'foo,bar')).to be_a Elasticsearch::API::Response end @@ -84,6 +118,17 @@ 'foo%5Ebar/_refresh' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.refresh' } + ] + end + it 'performs the request' do expect(client_double.indices.refresh(index: 'foo^bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/rollover_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/rollover_spec.rb index 70346ac04e..67a748a257 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/rollover_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/rollover_spec.rb @@ -25,7 +25,8 @@ url, params, body, - {} + {}, + { defined_params: { alias: 'foo' }, endpoint: 'indices.rollover' } ] end @@ -51,6 +52,17 @@ 'foo/_rollover/bar' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + {}, + { defined_params: { alias: 'foo', new_index: 'bar' }, endpoint: 'indices.rollover' } + ] + end + it 'performs the request' do expect(client_double.indices.rollover(alias: 'foo', new_index: 'bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/segments_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/segments_spec.rb index 49293e444c..aa2001b95d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/segments_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/segments_spec.rb @@ -25,7 +25,8 @@ url, params, body, - {} + {}, + { endpoint: 'indices.segments' } ] end @@ -51,6 +52,17 @@ 'foo/_segments' end + let(:expected_args) do + [ + 'GET', + url, + params, + body, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.segments' } + ] + end + it 'performs the request' do expect(client_double.indices.segments(index: 'foo')).to be_a Elasticsearch::API::Response end @@ -62,6 +74,17 @@ 'foo,bar/_segments' end + let(:expected_args) do + [ + 'GET', + url, + params, + body, + {}, + { defined_params: { index: ['foo', 'bar'] }, endpoint: 'indices.segments' } + ] + end + it 'performs the request' do expect(client_double.indices.segments(index: ['foo', 'bar'])).to be_a Elasticsearch::API::Response end @@ -73,6 +96,17 @@ 'foo,bar/_segments' end + let(:expected_args) do + [ + 'GET', + url, + params, + body, + {}, + { defined_params: { index: 'foo,bar' }, endpoint: 'indices.segments' } + ] + end + it 'performs the request' do expect(client_double.indices.segments(index: 'foo,bar')).to be_a Elasticsearch::API::Response end @@ -84,6 +118,17 @@ 'foo%5Ebar/_segments' end + let(:expected_args) do + [ + 'GET', + url, + params, + body, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.segments' } + ] + end + it 'performs the request' do expect(client_double.indices.segments(index: 'foo^bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb index a0eb410aa0..82a0eccda3 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb @@ -25,7 +25,8 @@ '_shard_stores', {}, nil, - {} + {}, + { endpoint: 'indices.shard_stores' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/shrink_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/shrink_spec.rb index 36f15010c0..73e2682716 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/shrink_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/shrink_spec.rb @@ -25,7 +25,9 @@ 'foo/_shrink/bar', {}, nil, - {} + {}, + { defined_params: { index: 'foo', target: 'bar' }, + endpoint: 'indices.shrink' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/split_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/split_spec.rb index eeb1fd55b1..ba08085bdd 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/split_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/split_spec.rb @@ -25,7 +25,9 @@ 'foo/_split/bar', {}, nil, - {} + {}, + { defined_params: { index: 'foo', target: 'bar' }, + endpoint:'indices.split' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/stats_spec.rb index 934faba7e2..91b0ed7bb2 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/stats_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/stats_spec.rb @@ -25,7 +25,8 @@ url, params, body, - {} + {}, + { endpoint: 'indices.stats' } ] end @@ -50,6 +51,17 @@ 'foo/_stats' end + let(:expected_args) do + [ + 'GET', + url, + params, + body, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.stats' } + ] + end + it 'performs the request' do expect(client_double.indices.stats(index: 'foo')).to be_a Elasticsearch::API::Response end @@ -60,6 +72,17 @@ 'foo,bar/_stats' end + let(:expected_args) do + [ + 'GET', + url, + params, + body, + {}, + { defined_params: { index: ['foo', 'bar'] }, endpoint: 'indices.stats' } + ] + end + it 'performs the request' do expect(client_double.indices.stats(index: ['foo', 'bar'])).to be_a Elasticsearch::API::Response end @@ -70,6 +93,17 @@ 'foo,bar/_stats' end + let(:expected_args) do + [ + 'GET', + url, + params, + body, + {}, + { defined_params: { index: 'foo,bar' }, endpoint: 'indices.stats' } + ] + end + it 'performs the request' do expect(client_double.indices.stats(index: 'foo,bar')).to be_a Elasticsearch::API::Response end @@ -84,6 +118,17 @@ 'foo/_stats' end + let(:expected_args) do + [ + 'GET', + url, + params, + body, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.stats' } + ] + end + it 'performs the request' do expect(client_double.indices.stats(index: 'foo', expand_wildcards: true)).to be_a Elasticsearch::API::Response end @@ -98,6 +143,17 @@ 'foo/_stats/fielddata' end + let(:expected_args) do + [ + 'GET', + url, + params, + body, + {}, + { defined_params: { index: 'foo', metric: 'fielddata' }, endpoint: 'indices.stats' } + ] + end + it 'performs the request' do expect(client_double.indices.stats(index: 'foo', metric: 'fielddata', fields: ['foo', 'bar'])).to be_a Elasticsearch::API::Response end @@ -112,6 +168,17 @@ '_stats/search' end + let(:expected_args) do + [ + 'GET', + url, + params, + body, + {}, + { defined_params: { metric: 'search' }, endpoint: 'indices.stats' } + ] + end + it 'performs the request' do expect(client_double.indices.stats(groups: [ 'groupA', 'groupB'], metric: 'search')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb index 1a735daec5..b9e48d1c44 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.unfreeze' } ] end @@ -78,6 +79,17 @@ 'foo%5Ebar/_unfreeze' end + let(:expected_args) do + [ + 'POST', + url, + params, + nil, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.unfreeze' } + ] + end + it 'performs the request' do expect(client_double.indices.unfreeze(index: 'foo^bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb index 3b6deab78a..0d18ca537a 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb @@ -25,7 +25,8 @@ '_aliases', params, body, - {} + {}, + { endpoint: 'indices.update_aliases' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/validate_query_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/validate_query_spec.rb index c8489ffa59..2aeb027e36 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/validate_query_spec.rb @@ -24,9 +24,11 @@ url, params, body, - {} + {}, + { endpoint: 'indices.validate_query' } ] end + let(:method) { 'GET' } let(:url) do @@ -50,6 +52,17 @@ 'foo/_validate/query' end + let(:expected_args) do + [ + method, + url, + params, + body, + {}, + { defined_params: { index: 'foo' }, endpoint: 'indices.validate_query' } + ] + end + it 'performs the request' do expect(client_double.indices.validate_query(index: 'foo')).to be_a Elasticsearch::API::Response end @@ -60,6 +73,17 @@ 'foo,bar/_validate/query' end + let(:expected_args) do + [ + method, + url, + params, + body, + {}, + { defined_params: { index: ['foo', 'bar'] }, endpoint: 'indices.validate_query' } + ] + end + it 'performs the request' do expect(client_double.indices.validate_query(index: ['foo', 'bar'])).to be_a Elasticsearch::API::Response end @@ -70,6 +94,17 @@ 'foo,bar/_validate/query' end + let(:expected_args) do + [ + method, + url, + params, + body, + {}, + { defined_params: { index: 'foo,bar' }, endpoint: 'indices.validate_query' } + ] + end + it 'performs the request' do expect(client_double.indices.validate_query(index: 'foo,bar')).to be_a Elasticsearch::API::Response end @@ -84,6 +119,17 @@ '_validate/query' end + let(:expected_args) do + [ + method, + url, + params, + body, + {}, + { endpoint: 'indices.validate_query' } + ] + end + it 'performs the request' do expect(client_double.indices.validate_query(explain: true, q: 'foo')).to be_a Elasticsearch::API::Response end @@ -95,6 +141,17 @@ end let(:method) { 'POST' } + let(:expected_args) do + [ + method, + url, + params, + body, + {}, + { endpoint: 'indices.validate_query' } + ] + end + it 'performs the request' do expect(client_double.indices.validate_query(body: { filtered: {} })).to be_a Elasticsearch::API::Response end @@ -105,6 +162,17 @@ 'foo%5Ebar/_validate/query' end + let(:expected_args) do + [ + method, + url, + params, + body, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'indices.validate_query' } + ] + end + it 'performs the request' do expect(client_double.indices.validate_query(index: 'foo^bar')).to be_a Elasticsearch::API::Response end From 6d02be5e72b20945935779260bd117f4f95df615 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 10:15:37 +0200 Subject: [PATCH 062/540] Update ingest specs --- .../api/actions/ingest/delete_pipeline_spec.rb | 14 +++++++++++++- .../api/actions/ingest/geo_ip_stats_spec.rb | 3 ++- .../api/actions/ingest/get_pipeline_spec.rb | 14 +++++++++++++- .../api/actions/ingest/put_pipeline_spec.rb | 14 +++++++++++++- .../api/actions/ingest/simulate_spec.rb | 14 +++++++++++++- 5 files changed, 54 insertions(+), 5 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb index 4bb90b522f..5d7efa7c52 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb @@ -25,7 +25,8 @@ url, {}, nil, - {} + {}, + { defined_params: { id: 'foo' }, endpoint: 'ingest.delete_pipeline' } ] end @@ -53,6 +54,17 @@ '_ingest/pipeline/foo%5Ebar' end + let(:expected_args) do + [ + 'DELETE', + url, + {}, + nil, + {}, + { defined_params: { id: 'foo^bar' }, endpoint: 'ingest.delete_pipeline' } + ] + end + it 'performs the request' do expect(client_double.ingest.delete_pipeline(id: 'foo^bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/geo_ip_stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/geo_ip_stats_spec.rb index 6f845d6963..91cc24079b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/geo_ip_stats_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/geo_ip_stats_spec.rb @@ -24,7 +24,8 @@ '_ingest/geoip/stats', {}, nil, - {} + {}, + { endpoint: 'ingest.geo_ip_stats' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb index 9ebfe3f976..5a8c3e0fd4 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb @@ -25,7 +25,8 @@ url, {}, nil, - {} + {}, + { defined_params: { id: 'foo' }, endpoint: 'ingest.get_pipeline' } ] end @@ -43,6 +44,17 @@ '_ingest/pipeline/foo%5Ebar' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { id: 'foo^bar' }, endpoint: 'ingest.get_pipeline' } + ] + end + it 'performs the request' do expect(client_double.ingest.get_pipeline(id: 'foo^bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb index baedaa06fc..32b56fa97f 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb @@ -25,7 +25,8 @@ url, {}, {}, - {} + {}, + { defined_params:{ id: 'foo' }, endpoint: 'ingest.put_pipeline' } ] end @@ -53,6 +54,17 @@ '_ingest/pipeline/foo%5Ebar' end + let(:expected_args) do + [ + 'PUT', + url, + {}, + {}, + {}, + { defined_params:{ id: 'foo^bar' }, endpoint: 'ingest.put_pipeline' } + ] + end + it 'performs the request' do expect(client_double.ingest.put_pipeline(id: 'foo^bar', body: {})).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/simulate_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/simulate_spec.rb index 6fddb32e1d..616f6e835a 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/simulate_spec.rb @@ -24,7 +24,8 @@ url, {}, {}, - {} + {}, + { endpoint: 'ingest.simulate' } ] end let(:method) { 'POST' } @@ -42,6 +43,17 @@ '_ingest/pipeline/foo/_simulate' end + let(:expected_args) do + [ + method, + url, + {}, + {}, + {}, + { defined_params: { id: 'foo' }, endpoint: 'ingest.simulate' } + ] + end + it 'performs the request' do expect(client_double.ingest.simulate(id: 'foo', body: {})).to be_a Elasticsearch::API::Response end From a2a3cd025f55c1f65205e0523e636ab8e48bad71 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 10:28:55 +0200 Subject: [PATCH 063/540] Update machine_learning specs --- .../machine_learning/get_memory_stats_spec.rb | 14 +++++++++++++- .../get_model_snapshot_upgrade_stats_spec.rb | 6 +++++- .../infer_trained_model_deployment_spec.rb | 3 ++- .../put_trained_model_definition_part_spec.rb | 4 +++- .../put_trained_model_vocabulary_spec.rb | 4 +++- .../api/actions/machine_learning/reset_job_spec.rb | 3 ++- .../machine_learning/set_upgrade_mode_spec.rb | 6 ++++-- .../start_trained_model_deployment_spec.rb | 4 +++- .../stop_trained_model_deployment_spec.rb | 4 +++- .../update_trained_model_deployment_spec.rb | 4 +++- 10 files changed, 41 insertions(+), 11 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/get_memory_stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/get_memory_stats_spec.rb index 26dd5260d5..fbf15c743e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/get_memory_stats_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/get_memory_stats_spec.rb @@ -25,7 +25,8 @@ url, {}, nil, - {} + {}, + { endpoint: 'ml.get_memory_stats' } ] end @@ -40,6 +41,17 @@ context 'with a node id' do let(:url) { '_ml/memory/foo/_stats' } + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { node_id: 'foo' }, endpoint: 'ml.get_memory_stats' } + ] + end + it 'performs the request' do expect(client_double.ml.get_memory_stats(node_id: 'foo')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats_spec.rb index 6fee4733a3..df21e3b626 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats_spec.rb @@ -24,7 +24,11 @@ '_ml/anomaly_detectors/foo/model_snapshots/bar/_upgrade/_stats', {}, nil, - {} + {}, + { defined_params: { + job_id: 'foo', + snapshot_id: 'bar' }, + endpoint: 'ml.get_model_snapshot_upgrade_stats' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/infer_trained_model_deployment_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/infer_trained_model_deployment_spec.rb index 78d386530d..fccbe878bd 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/infer_trained_model_deployment_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/infer_trained_model_deployment_spec.rb @@ -24,7 +24,8 @@ '_ml/trained_models/foo/deployment/_infer', {}, {}, - {} + {}, + { defined_params: { model_id: 'foo' }, endpoint: 'ml.infer_trained_model' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part_spec.rb index 6070109668..68c35b2e4f 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part_spec.rb @@ -24,7 +24,9 @@ '_ml/trained_models/foo/definition/3', {}, {}, - {} + {}, + { defined_params: { model_id: 'foo', part: 3 }, + endpoint: 'ml.put_trained_model_definition_part' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary_spec.rb index 7d8dd8e4fb..62846cc751 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary_spec.rb @@ -24,7 +24,9 @@ '_ml/trained_models/foo/vocabulary', {}, {}, - {} + {}, + { defined_params: { model_id: 'foo' }, + endpoint: 'ml.put_trained_model_vocabulary' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/reset_job_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/reset_job_spec.rb index 61e4ea3412..9e498a7d3b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/reset_job_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/reset_job_spec.rb @@ -24,7 +24,8 @@ '_ml/anomaly_detectors/foo/_reset', {}, nil, - {} + {}, + { defined_params: { job_id: 'foo' }, endpoint: 'ml.reset_job' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/set_upgrade_mode_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/set_upgrade_mode_spec.rb index 26193929aa..376b37dad0 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/set_upgrade_mode_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/set_upgrade_mode_spec.rb @@ -24,7 +24,8 @@ '_ml/set_upgrade_mode', {}, nil, - {} + {}, + { endpoint: 'ml.set_upgrade_mode' } ] end @@ -40,7 +41,8 @@ '_ml/set_upgrade_mode', { enabled: true, timeout: '10m' }, nil, - {} + {}, + { endpoint: 'ml.set_upgrade_mode' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/start_trained_model_deployment_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/start_trained_model_deployment_spec.rb index 39bca8779c..7e30fe7773 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/start_trained_model_deployment_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/start_trained_model_deployment_spec.rb @@ -24,7 +24,9 @@ '_ml/trained_models/foo/deployment/_start', {}, nil, - {} + {}, + { defined_params: { model_id: 'foo' }, + endpoint: 'ml.start_trained_model_deployment' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment_spec.rb index f40f502c22..eb42c9a37d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment_spec.rb @@ -24,7 +24,9 @@ '_ml/trained_models/foo/deployment/_stop', {}, nil, - {} + {}, + { defined_params: { model_id: 'foo' }, + endpoint: 'ml.stop_trained_model_deployment' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/update_trained_model_deployment_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/update_trained_model_deployment_spec.rb index 7626c17bae..a3a2f26ca7 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/update_trained_model_deployment_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/update_trained_model_deployment_spec.rb @@ -24,7 +24,9 @@ '_ml/trained_models/foo/deployment/_update', {}, {}, - {} + {}, + { defined_params: { model_id: 'foo' }, + endpoint: 'ml.update_trained_model_deployment' } ] end From 95d1a0d7a5307f8565bd509d99e4542acd2d4a0e Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 10:29:52 +0200 Subject: [PATCH 064/540] Update migration specs --- .../api/actions/migration/get_feature_upgrade_status_spec.rb | 3 ++- .../api/actions/migration/post_feature_upgrade_spec.rb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/migration/get_feature_upgrade_status_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/migration/get_feature_upgrade_status_spec.rb index 4ef5135c15..81c8375ed2 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/migration/get_feature_upgrade_status_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/migration/get_feature_upgrade_status_spec.rb @@ -24,7 +24,8 @@ '_migration/system_features', {}, nil, - {} + {}, + { endpoint: 'migration.get_feature_upgrade_status' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/migration/post_feature_upgrade_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/migration/post_feature_upgrade_spec.rb index 5ac4015250..0b84b8ad43 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/migration/post_feature_upgrade_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/migration/post_feature_upgrade_spec.rb @@ -24,7 +24,8 @@ '_migration/system_features', {}, nil, - {} + {}, + { endpoint: 'migration.post_feature_upgrade' } ] end From a75511f6128c7be5fa7518404c6075205a9d9fbd Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 10:35:25 +0200 Subject: [PATCH 065/540] Update info specs --- ...lear_repositories_metering_archive_spec.rb | 4 +- .../get_repositories_metering_info_spec.rb | 4 +- .../api/actions/nodes/hot_threads_spec.rb | 25 +++++++++- .../api/actions/nodes/info_spec.rb | 47 ++++++++++++++++++- 4 files changed, 76 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb index 0d45d075bb..f42397d7f5 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb @@ -25,7 +25,9 @@ '_nodes/foo/_repositories_metering/bar', {}, nil, - {} + {}, + { defined_params: { max_archive_version: 'bar', node_id: 'foo' }, + endpoint: 'nodes.clear_repositories_metering_archive' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb index b5d78f08e0..56bfdbe3c9 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb @@ -24,7 +24,9 @@ '_nodes/foo/_repositories_metering', {}, nil, - {} + {}, + { defined_params: {node_id: 'foo' }, + endpoint: 'nodes.get_repositories_metering_info' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb index 811b37136c..af5124bdcc 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb @@ -25,7 +25,8 @@ url, {}, nil, - {} + {}, + { endpoint: 'nodes.hot_threads' } ] end @@ -43,6 +44,17 @@ '_nodes/foo/hot_threads' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { node_id: 'foo' }, endpoint: 'nodes.hot_threads' } + ] + end + it 'performs the request' do expect(client_double.nodes.hot_threads(node_id: 'foo')).to be_a Elasticsearch::API::Response end @@ -54,6 +66,17 @@ '_nodes/foo%5Ebar/hot_threads' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { node_id: 'foo^bar' }, endpoint: 'nodes.hot_threads' } + ] + end + it 'performs the request' do expect(client_double.nodes.hot_threads(node_id: 'foo^bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/info_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/nodes/info_spec.rb index 7ee8925fa6..ad677be08d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/info_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/nodes/info_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { endpoint: 'nodes.info' } ] end @@ -47,6 +48,17 @@ '_nodes/foo' end + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { defined_params: { node_id: 'foo' }, endpoint: 'nodes.info' } + ] + end + it 'performs the request' do expect(client_double.nodes.info(node_id: 'foo')).to be_a Elasticsearch::API::Response end @@ -58,6 +70,17 @@ '_nodes/A,B,C' end + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { defined_params: { node_id: ['A', 'B', 'C'] }, endpoint: 'nodes.info' } + ] + end + it 'performs the request' do expect(client_double.nodes.info(node_id: ['A', 'B', 'C'])).to be_a Elasticsearch::API::Response end @@ -69,6 +92,17 @@ '_nodes/A,B,C' end + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { defined_params: { node_id: 'A,B,C' }, endpoint: 'nodes.info' } + ] + end + it 'performs the request' do expect(client_double.nodes.info(node_id: 'A,B,C')).to be_a Elasticsearch::API::Response end @@ -95,6 +129,17 @@ '_nodes/http,network' end + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { defined_params: { metric: ['http', 'network'] }, endpoint: 'nodes.info' } + ] + end + it 'performs the request' do expect(client_double.nodes.info(metric: ['http', 'network'])).to be_a Elasticsearch::API::Response end From fbb240478e146b7e44e745347fd82db6b3997631 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 10:37:54 +0200 Subject: [PATCH 066/540] Update query_ruleset specs --- .../api/actions/query_ruleset/delete_spec.rb | 3 +- .../api/actions/query_ruleset/get_spec.rb | 3 +- .../api/actions/query_ruleset/list_spec.rb | 34 ------------------- .../api/actions/query_ruleset/put_spec.rb | 3 +- 4 files changed, 6 insertions(+), 37 deletions(-) delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/list_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/delete_spec.rb index 6b4ac1c15d..9a48000000 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/delete_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/delete_spec.rb @@ -25,7 +25,8 @@ '_query_rules/foo', {}, nil, - {} + {}, + { defined_params: { ruleset_id: 'foo' }, endpoint: 'query_ruleset.delete' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/get_spec.rb index 33bac01549..a033fa3086 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/get_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/get_spec.rb @@ -24,7 +24,8 @@ '_query_rules/foo', {}, nil, - {} + {}, + { defined_params: { ruleset_id: 'foo' }, endpoint: 'query_ruleset.get' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/list_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/list_spec.rb deleted file mode 100644 index ee3c544ee2..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/list_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.query_ruleset#list' do - let(:expected_args) do - [ - 'GET', - '_query_rules', - {}, - nil, - {} - ] - end - - it 'performs the request' do - expect(client_double.query_ruleset.list).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/put_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/put_spec.rb index 99372f8fb7..af9b2d74cc 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/put_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/put_spec.rb @@ -25,7 +25,8 @@ '_query_rules/foo', {}, {}, - {} + {}, + { defined_params: { ruleset_id: 'foo' }, endpoint: 'query_ruleset.put' } ] end From 3b7f8db02f277b4ceadca1790a7f7d8fe04262f4 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 10:43:34 +0200 Subject: [PATCH 067/540] Update search_application specs --- .../search_application/delete_behavioral_analytics_spec.rb | 4 +++- .../api/actions/search_application/delete_spec.rb | 3 ++- .../search_application/get_behavioral_analytics_spec.rb | 3 ++- .../elasticsearch/api/actions/search_application/get_spec.rb | 3 ++- .../elasticsearch/api/actions/search_application/list_spec.rb | 3 ++- .../post_behavioral_analytics_event_spec.rb | 4 +++- .../search_application/put_behavioral_analytics_spec.rb | 4 +++- .../elasticsearch/api/actions/search_application/put_spec.rb | 3 ++- .../api/actions/search_application/render_query_spec.rb | 4 +++- .../api/actions/search_application/search_spec.rb | 3 ++- 10 files changed, 24 insertions(+), 10 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/delete_behavioral_analytics_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/delete_behavioral_analytics_spec.rb index d959402c1e..2d16db3844 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/delete_behavioral_analytics_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/delete_behavioral_analytics_spec.rb @@ -24,7 +24,9 @@ '_application/analytics/foo', {}, nil, - {} + {}, + { defined_params: { name: 'foo' }, + endpoint: 'search_application.delete_behavioral_analytics' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/delete_spec.rb index dbdb16f547..ebb7653aa5 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/delete_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/delete_spec.rb @@ -24,7 +24,8 @@ '_application/search_application/foo', {}, nil, - {} + {}, + { defined_params: { name: 'foo' }, endpoint: 'search_application.delete' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/get_behavioral_analytics_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/get_behavioral_analytics_spec.rb index 57bfa3a64e..62a47ec1a7 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/get_behavioral_analytics_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/get_behavioral_analytics_spec.rb @@ -24,7 +24,8 @@ '_application/analytics', {}, nil, - {} + {}, + { endpoint: 'search_application.get_behavioral_analytics' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/get_spec.rb index bb4e23cbe8..85989091f5 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/get_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/get_spec.rb @@ -24,7 +24,8 @@ '_application/search_application/foo', {}, nil, - {} + {}, + { defined_params: { name: 'foo' }, endpoint: 'search_application.get' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/list_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/list_spec.rb index 6de6d0653c..b7acd856aa 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/list_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/list_spec.rb @@ -24,7 +24,8 @@ '_application/search_application', {}, nil, - {} + {}, + { endpoint: 'search_application.list' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/post_behavioral_analytics_event_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/post_behavioral_analytics_event_spec.rb index a037c22674..335c6d3707 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/post_behavioral_analytics_event_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/post_behavioral_analytics_event_spec.rb @@ -24,7 +24,9 @@ '_application/analytics/foo/event/search', {}, {}, - {} + {}, + { defined_params: { collection_name: 'foo', event_type: 'search' }, + endpoint: 'search_application.post_behavioral_analytics_event' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/put_behavioral_analytics_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/put_behavioral_analytics_spec.rb index a3d712c241..013bff584f 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/put_behavioral_analytics_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/put_behavioral_analytics_spec.rb @@ -24,7 +24,9 @@ '_application/analytics/foo', {}, nil, - {} + {}, + { defined_params: { name: 'foo' }, + endpoint: 'search_application.put_behavioral_analytics' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/put_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/put_spec.rb index 42f5a8a925..3b2037f11f 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/put_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/put_spec.rb @@ -24,7 +24,8 @@ '_application/search_application/foo', {}, {}, - {} + {}, + { defined_params: { name: 'foo' }, endpoint: 'search_application.put' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/render_query_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/render_query_spec.rb index e1dcb69b23..1fb4baad7b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/render_query_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/render_query_spec.rb @@ -24,7 +24,9 @@ '_application/search_application/foo/_render_query', {}, nil, - {} + {}, + { defined_params: { name: 'foo' }, + endpoint: 'search_application.render_query' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/search_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/search_spec.rb index a124b81fb1..6763d78e63 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/search_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_application/search_spec.rb @@ -24,7 +24,8 @@ '_application/search_application/foo/_search', {}, nil, - {} + {}, + { defined_params: { name: 'foo' }, endpoint: 'search_application.search' } ] end From 03c45a77f8dca8972bcd6f1e74e67dad8ec55e12 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 10:48:21 +0200 Subject: [PATCH 068/540] Update searchable_snapshots specs --- .../searchable_snapshots/cache_stats_spec.rb | 14 +++++++++++++- .../searchable_snapshots/clear_cache_spec.rb | 15 ++++++++++++++- .../actions/searchable_snapshots/mount_spec.rb | 4 +++- .../actions/searchable_snapshots/stats_spec.rb | 16 +++++++++++++++- 4 files changed, 45 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/cache_stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/cache_stats_spec.rb index bd5ab27f8e..19d3c17245 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/cache_stats_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/cache_stats_spec.rb @@ -24,7 +24,8 @@ url, {}, nil, - {} + {}, + { endpoint: 'searchable_snapshots.cache_stats' } ] end @@ -37,6 +38,17 @@ context 'when using index' do let(:url){ '_searchable_snapshots/foo/cache/stats' } + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { node_id: 'foo' }, endpoint: 'searchable_snapshots.cache_stats' } + ] + end + it 'performs the request' do expect(client_double.searchable_snapshots.cache_stats(node_id: 'foo')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/clear_cache_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/clear_cache_spec.rb index be377a5cbf..e156ba16ca 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/clear_cache_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/clear_cache_spec.rb @@ -24,7 +24,8 @@ url, {}, nil, - {} + {}, + { endpoint: 'searchable_snapshots.clear_cache' } ] end @@ -37,6 +38,18 @@ context 'when using index' do let(:url){ 'foo/_searchable_snapshots/cache/clear' } + let(:expected_args) do + [ + 'POST', + url, + {}, + nil, + {}, + { defined_params: { index: 'foo' }, + endpoint: 'searchable_snapshots.clear_cache' } + ] + end + it 'performs the request' do expect(client_double.searchable_snapshots.clear_cache(index: 'foo')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/mount_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/mount_spec.rb index d18a955f06..f34d2d4075 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/mount_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/mount_spec.rb @@ -24,7 +24,9 @@ '_snapshot/foo/bar/_mount', {}, {}, - {} + {}, + { defined_params: { repository: 'foo', snapshot: 'bar' }, + endpoint: 'searchable_snapshots.mount' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/stats_spec.rb index 2c36013f91..50da731855 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/stats_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/stats_spec.rb @@ -24,9 +24,12 @@ url, {}, nil, - {} + {}, + { endpoint: 'searchable_snapshots.stats' } ] end + + let(:url) { '_searchable_snapshots/stats' } it 'performs the request' do @@ -36,6 +39,17 @@ context 'using index' do let(:url) { 'foo/_searchable_snapshots/stats' } + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { index: 'foo' }, endpoint: 'searchable_snapshots.stats' } + ] + end + it 'performs the request' do expect(client_double.searchable_snapshots.stats(index: 'foo')).to be_a Elasticsearch::API::Response end From 943584d481bd624cd239a1540142b9ff1f86c44c Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 11:34:22 +0200 Subject: [PATCH 069/540] Update security specs --- .../clear_cached_service_tokens_spec.rb | 4 ++- .../actions/security/create_api_key_spec.rb | 6 ++-- .../create_cross_cluster_api_key_spec.rb | 3 +- .../security/create_service_token_spec.rb | 16 ++++++++- .../security/delete_service_token_spec.rb | 4 ++- .../security/disable_user_profile_spec.rb | 3 +- .../security/enable_user_profile_spec.rb | 3 +- .../actions/security/enroll_kibana_spec.rb | 3 +- .../api/actions/security/get_api_key_spec.rb | 3 +- .../security/get_builtin_privileges_spec.rb | 3 +- .../security/get_service_accounts_spec.rb | 27 ++++++++++++++- .../security/get_service_credentials_spec.rb | 4 ++- .../api/actions/security/get_settings_spec.rb | 34 ------------------- .../has_privileges_user_profile_spec.rb | 3 +- .../security/invalidate_api_key_spec.rb | 3 +- .../actions/security/query_api_keys_spec.rb | 3 +- .../security/saml_authenticate_spec.rb | 3 +- .../security/saml_complete_logout_spec.rb | 3 +- .../actions/security/saml_invalidate_spec.rb | 3 +- .../api/actions/security/saml_logout_spec.rb | 3 +- .../saml_prepare_authentication_spec.rb | 3 +- .../saml_service_provider_metadata_spec.rb | 4 ++- .../security/suggest_user_profiles_spec.rb | 3 +- .../actions/security/update_api_key_spec.rb | 3 +- .../update_cross_cluster_api_key_spec.rb | 4 ++- .../actions/security/update_settings_spec.rb | 34 ------------------- 26 files changed, 92 insertions(+), 93 deletions(-) delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/security/get_settings_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/security/update_settings_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/clear_cached_service_tokens_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/clear_cached_service_tokens_spec.rb index 879b09b3e7..d0a2d85cad 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/clear_cached_service_tokens_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/clear_cached_service_tokens_spec.rb @@ -24,7 +24,9 @@ '_security/service/foo/bar/credential/token/service_token/_clear_cache', {}, nil, - {} + {}, + { defined_params: { name: 'service_token', namespace: 'foo', service: 'bar' }, + endpoint: 'security.clear_cached_service_tokens' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/create_api_key_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/create_api_key_spec.rb index 45dc2a192c..d6b9b18320 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/create_api_key_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/create_api_key_spec.rb @@ -25,7 +25,8 @@ '_security/api_key', {}, body, - {} + {}, + { endpoint: 'security.create_api_key' } ] end @@ -68,7 +69,8 @@ '_security/api_key', { refresh: 'wait_for' }, body, - {} + {}, + { endpoint: 'security.create_api_key' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/create_cross_cluster_api_key_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/create_cross_cluster_api_key_spec.rb index f942097c49..5a4de5500c 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/create_cross_cluster_api_key_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/create_cross_cluster_api_key_spec.rb @@ -25,7 +25,8 @@ '_security/cross_cluster/api_key', {}, {}, - {} + {}, + { endpoint: 'security.create_cross_cluster_api_key' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/create_service_token_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/create_service_token_spec.rb index bee231bee7..46e6b66002 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/create_service_token_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/create_service_token_spec.rb @@ -26,7 +26,9 @@ expected_path, {}, nil, - {} + {}, + { defined_params: { namespace: 'foo', service: 'bar' }, + endpoint: 'security.create_service_token' } ] end @@ -34,6 +36,18 @@ let(:expected_request_method) { 'PUT' } let(:token_name) { 'test-token' } let(:expected_path) { "#{super()}/#{token_name}" } + let(:expected_args) do + [ + expected_request_method, + expected_path, + {}, + nil, + {}, + { defined_params: { name: 'test-token', namespace: 'foo', service: 'bar' }, + endpoint: 'security.create_service_token' } + ] + end + it 'performs the request' do expect( client_double.security.create_service_token( diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/delete_service_token_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/delete_service_token_spec.rb index ae1408cef5..1366db2358 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/delete_service_token_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/delete_service_token_spec.rb @@ -24,7 +24,9 @@ '_security/service/foo/bar/credential/token/service_token', {}, nil, - {} + {}, + { defined_params: { name: 'service_token', namespace: 'foo', service: 'bar' }, + endpoint: 'security.delete_service_token' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/disable_user_profile_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/disable_user_profile_spec.rb index 3a22747b1b..2b7173a565 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/disable_user_profile_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/disable_user_profile_spec.rb @@ -24,7 +24,8 @@ '_security/profile/foo/_disable', {}, nil, - {} + {}, + { defined_params: { uid: 'foo' }, endpoint: 'security.disable_user_profile' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/enable_user_profile_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/enable_user_profile_spec.rb index bc87ed2197..1e61a7395c 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/enable_user_profile_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/enable_user_profile_spec.rb @@ -24,7 +24,8 @@ '_security/profile/foo/_enable', {}, nil, - {} + {}, + { defined_params: { uid: 'foo' }, endpoint: 'security.enable_user_profile' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/enroll_kibana_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/enroll_kibana_spec.rb index c76085a1cf..6e281668c3 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/enroll_kibana_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/enroll_kibana_spec.rb @@ -24,7 +24,8 @@ '_security/enroll/kibana', {}, nil, - {} + {}, + { endpoint: 'security.enroll_kibana' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_api_key_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/get_api_key_spec.rb index e5066f43fc..082d249109 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_api_key_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/get_api_key_spec.rb @@ -25,7 +25,8 @@ '_security/api_key', params, nil, - {} + {}, + { endpoint: 'security.get_api_key' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_builtin_privileges_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/get_builtin_privileges_spec.rb index 955881b062..8e1e77b0e8 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_builtin_privileges_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/get_builtin_privileges_spec.rb @@ -25,7 +25,8 @@ '_security/privilege/_builtin', {}, nil, - {} + {}, + { endpoint: 'security.get_builtin_privileges' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_service_accounts_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/get_service_accounts_spec.rb index 5b7cd8015b..81a0df1ef2 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_service_accounts_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/get_service_accounts_spec.rb @@ -24,7 +24,8 @@ url, {}, nil, - {} + {}, + { endpoint: 'security.get_service_accounts' } ] end @@ -39,6 +40,18 @@ context 'when using namespace' do let(:url) { '_security/service/foo' } + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { namespace: 'foo' }, + endpoint: 'security.get_service_accounts' } + ] + end + it 'performs the request' do expect( client_double.security.get_service_accounts(namespace: 'foo') @@ -49,6 +62,18 @@ context 'when using namespace and service' do let(:url) { '_security/service/foo/bar' } + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { service: 'bar', namespace: 'foo' }, + endpoint: 'security.get_service_accounts' } + ] + end + it 'performs the request' do expect( client_double.security.get_service_accounts(namespace: 'foo', service: 'bar') diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_service_credentials_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/get_service_credentials_spec.rb index 7bb6099294..b49e925a73 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_service_credentials_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/get_service_credentials_spec.rb @@ -24,7 +24,9 @@ '_security/service/foo/bar/credential', {}, nil, - {} + {}, + { defined_params: { namespace: 'foo', service: 'bar' }, + endpoint: 'security.get_service_credentials' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_settings_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/get_settings_spec.rb deleted file mode 100644 index f596687688..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_settings_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#security#get_settings' do - let(:expected_args) do - [ - 'GET', - '_security/settings', - {}, - nil, - {} - ] - end - - it 'performs the request' do - expect(client_double.security.get_settings).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/has_privileges_user_profile_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/has_privileges_user_profile_spec.rb index bccd3624fa..a124ca0142 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/has_privileges_user_profile_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/has_privileges_user_profile_spec.rb @@ -24,7 +24,8 @@ '_security/profile/_has_privileges', {}, {}, - {} + {}, + { endpoint: 'security.has_privileges_user_profile' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/invalidate_api_key_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/invalidate_api_key_spec.rb index 229a66a4ac..4e9819ab7d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/invalidate_api_key_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/invalidate_api_key_spec.rb @@ -24,7 +24,8 @@ '_security/api_key', {}, body, - {} + {}, + { endpoint: 'security.invalidate_api_key' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/query_api_keys_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/query_api_keys_spec.rb index ecb7537efa..e58c4aaa54 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/query_api_keys_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/query_api_keys_spec.rb @@ -24,7 +24,8 @@ '_security/_query/api_key', {}, body, - {} + {}, + { endpoint: 'security.query_api_keys' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_authenticate_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_authenticate_spec.rb index 7bf79e26da..cc7159e2f1 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_authenticate_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_authenticate_spec.rb @@ -24,7 +24,8 @@ '_security/saml/authenticate', {}, {}, - {} + {}, + { endpoint: 'security.saml_authenticate' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_complete_logout_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_complete_logout_spec.rb index 8aca481e45..66a8f0b282 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_complete_logout_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_complete_logout_spec.rb @@ -24,7 +24,8 @@ '_security/saml/complete_logout', {}, {}, - {} + {}, + { endpoint: 'security.saml_complete_logout' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_invalidate_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_invalidate_spec.rb index 78875389a1..6ce3cf8f2a 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_invalidate_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_invalidate_spec.rb @@ -24,7 +24,8 @@ '_security/saml/invalidate', {}, {}, - {} + {}, + { endpoint: 'security.saml_invalidate' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_logout_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_logout_spec.rb index 44c8f95051..542004b532 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_logout_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_logout_spec.rb @@ -24,7 +24,8 @@ '_security/saml/logout', {}, {}, - {} + {}, + { endpoint: 'security.saml_logout' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_prepare_authentication_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_prepare_authentication_spec.rb index dd6c86d079..c3e535dce6 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_prepare_authentication_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_prepare_authentication_spec.rb @@ -24,7 +24,8 @@ '_security/saml/logout', {}, {}, - {} + {}, + { endpoint: 'security.saml_logout' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_service_provider_metadata_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_service_provider_metadata_spec.rb index ce404c3380..365cdf5430 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_service_provider_metadata_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_service_provider_metadata_spec.rb @@ -24,7 +24,9 @@ "_security/saml/metadata/#{realm_name}", {}, nil, - {} + {}, + { defined_params: { realm_name: 'foo' }, + endpoint: 'security.saml_service_provider_metadata' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/suggest_user_profiles_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/suggest_user_profiles_spec.rb index ec31fde218..499ea90bfc 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/suggest_user_profiles_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/suggest_user_profiles_spec.rb @@ -24,7 +24,8 @@ '_security/profile/_suggest', {}, body, - {} + {}, + { endpoint: 'security.suggest_user_profiles' } ] end let(:method) { 'GET' } diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/update_api_key_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/update_api_key_spec.rb index be21f2e76b..786eb57136 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/update_api_key_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/update_api_key_spec.rb @@ -24,7 +24,8 @@ '_security/api_key/foo', {}, nil, - {} + {}, + { defined_params: { id: 'foo' }, endpoint: 'security.update_api_key' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/update_cross_cluster_api_key_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/update_cross_cluster_api_key_spec.rb index 206310cec8..a25c5fdc55 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/update_cross_cluster_api_key_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/update_cross_cluster_api_key_spec.rb @@ -25,7 +25,9 @@ '_security/cross_cluster/api_key/the_id', {}, {}, - {} + {}, + { defined_params: { id: 'the_id' }, + endpoint: 'security.update_cross_cluster_api_key' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/update_settings_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/update_settings_spec.rb deleted file mode 100644 index ea6fa73be1..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/update_settings_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#security#update_settings' do - let(:expected_args) do - [ - 'PUT', - '_security/settings', - {}, - {}, - {} - ] - end - - it 'performs the request' do - expect(client_double.security.update_settings(body: {})).to be_a Elasticsearch::API::Response - end -end From 5d8baab380a88120eba72d4be7f48dd5ef682622 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 11:36:30 +0200 Subject: [PATCH 070/540] Update shutdown specs --- .../api/actions/shutdown/delete_node_spec.rb | 3 ++- .../api/actions/shutdown/get_node_spec.rb | 14 +++++++++++++- .../api/actions/shutdown/put_node_spec.rb | 3 ++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb index 214d6ab4e0..7454aed968 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb @@ -24,7 +24,8 @@ '_nodes/id/shutdown', {}, nil, - {} + {}, + { defined_params: { node_id: 'id' }, endpoint: 'shutdown.delete_node' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb index aa12297a4c..1c4f54d553 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb @@ -24,7 +24,8 @@ url, {}, nil, - {} + {}, + { defined_params: { node_id: 'id' }, endpoint: 'shutdown.get_node' } ] end @@ -39,6 +40,17 @@ context 'when no id is provided' do let(:url) { '_nodes/shutdown' } + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { endpoint: 'shutdown.get_node' } + ] + end + it 'performs the request' do expect(client_double.shutdown.get_node).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb index 411a90e562..d746c899d1 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb @@ -24,7 +24,8 @@ '_nodes/id/shutdown', {}, {}, - {} + {}, + { defined_params: { node_id: 'id' }, endpoint: 'shutdown.put_node' } ] end From 7dd8141eee3b161c6674e5aa87672db2054a685f Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 11:43:00 +0200 Subject: [PATCH 071/540] Update snapshot specs --- .../api/actions/snapshot/clone_spec.rb | 5 ++++- .../actions/snapshot/create_repository_spec.rb | 4 +++- .../api/actions/snapshot/create_spec.rb | 4 +++- .../actions/snapshot/delete_repository_spec.rb | 16 +++++++++++++++- .../api/actions/snapshot/delete_spec.rb | 4 +++- .../api/actions/snapshot/get_repository_spec.rb | 3 ++- .../api/actions/snapshot/get_spec.rb | 4 +++- .../actions/snapshot/repository_analize_spec.rb | 4 +++- .../api/actions/snapshot/restore_spec.rb | 4 +++- .../api/actions/snapshot/status_spec.rb | 14 +++++++++++++- .../actions/snapshot/verify_repository_spec.rb | 4 +++- 11 files changed, 55 insertions(+), 11 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/clone_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/clone_spec.rb index b99623382b..f56de899de 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/clone_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/clone_spec.rb @@ -24,7 +24,10 @@ '_snapshot/foo/bar/_clone/snapshot', {}, {}, - {} + {}, + { defined_params: + { repository: 'foo', snapshot: 'bar', target_snapshot: 'snapshot' }, + endpoint: 'snapshot.clone' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb index 40d0bc0ffc..05eb80e837 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb @@ -25,7 +25,9 @@ '_snapshot/foo', {}, {}, - {} + {}, + { defined_params: { repository: 'foo' }, + endpoint: 'snapshot.create_repository' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/create_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/create_spec.rb index c9f9fcc6c9..7c0a3f7688 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/create_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/create_spec.rb @@ -25,7 +25,9 @@ '_snapshot/foo/bar', {}, {}, - {} + {}, + { defined_params: { repository: 'foo', snapshot: 'bar' }, + endpoint: 'snapshot.create' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb index 5e58be5f3d..9956f0b7ea 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb @@ -25,7 +25,9 @@ url, {}, nil, - {} + {}, + { defined_params: { repository: 'foo' }, + endpoint: 'snapshot.delete_repository' } ] end @@ -43,6 +45,18 @@ '_snapshot/foo,bar' end + let(:expected_args) do + [ + 'DELETE', + url, + {}, + nil, + {}, + { defined_params: { repository: ['foo','bar'] }, + endpoint: 'snapshot.delete_repository' } + ] + end + it 'performs the request' do expect(client_double.snapshot.delete_repository(repository: ['foo','bar'])).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/delete_spec.rb index ce3a2b5cee..10eb98e74a 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/delete_spec.rb @@ -25,7 +25,9 @@ '_snapshot/foo/bar', {}, nil, - {} + {}, + { defined_params: { repository: 'foo', snapshot: 'bar' }, + endpoint: 'snapshot.delete' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb index f9591818af..fe56e64c73 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb @@ -25,7 +25,8 @@ '_snapshot/foo', {}, nil, - {} + {}, + { defined_params: { repository: 'foo' }, endpoint: 'snapshot.get_repository' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/get_spec.rb index 3bed381e03..7c70263ea3 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/get_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/get_spec.rb @@ -25,7 +25,9 @@ '_snapshot/foo/bar', {}, nil, - {} + {}, + { defined_params: { repository: 'foo', snapshot: 'bar' }, + endpoint: 'snapshot.get' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb index dc17d73dca..d2378fa1b3 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb @@ -24,7 +24,9 @@ url, {}, nil, - {} + {}, + { defined_params: { repository: 'foo' }, + endpoint: 'snapshot.repository_analyze' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/restore_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/restore_spec.rb index feaccf4035..fd0824dbfb 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/restore_spec.rb @@ -24,7 +24,9 @@ '_snapshot/foo/bar/_restore', {}, nil, - {} + {}, + { defined_params: { repository: 'foo', snapshot: 'bar' }, + endpoint: 'snapshot.restore' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/status_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/status_spec.rb index d007a5792c..c20245db8b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/status_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/status_spec.rb @@ -25,7 +25,8 @@ url, {}, nil, - {} + {}, + { endpoint: 'snapshot.status' } ] end @@ -42,6 +43,17 @@ '_snapshot/foo/bar/_status' end + let(:expected_args) do + [ + 'GET', + url, + {}, + nil, + {}, + { defined_params: { repository: 'foo', snapshot: 'bar' }, endpoint: 'snapshot.status' } + ] + end + it 'performs the request' do expect(client_double.snapshot.status(repository: 'foo', snapshot: 'bar')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb index fe0a026d52..fe72233ed5 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb @@ -24,7 +24,9 @@ '_snapshot/foo/_verify', {}, nil, - {} + {}, + { defined_params: { repository: 'foo' }, + endpoint: 'snapshot.verify_repository' } ] end From 33df19866b23a2eb91a5bdfabde31d87b64c4671 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 11:44:32 +0200 Subject: [PATCH 072/540] Update sql specs --- .../spec/elasticsearch/api/actions/sql/delete_async_spec.rb | 3 ++- .../spec/elasticsearch/api/actions/sql/get_async_spec.rb | 3 ++- .../spec/elasticsearch/api/actions/sql/get_async_stats_spec.rb | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/sql/delete_async_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/sql/delete_async_spec.rb index 5a5d328d42..d901f791d3 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/sql/delete_async_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/sql/delete_async_spec.rb @@ -24,7 +24,8 @@ '_sql/async/delete/foo', {}, nil, - {} + {}, + { defined_params: { id: 'foo' }, endpoint: 'sql.delete_async' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/sql/get_async_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/sql/get_async_spec.rb index 0b4aaf611a..a510d863c7 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/sql/get_async_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/sql/get_async_spec.rb @@ -24,7 +24,8 @@ '_sql/async/foo', {}, nil, - {} + {}, + { defined_params: { id: 'foo' }, endpoint: 'sql.get_async' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/sql/get_async_stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/sql/get_async_stats_spec.rb index 32616ccb89..4f45410593 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/sql/get_async_stats_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/sql/get_async_stats_spec.rb @@ -24,7 +24,8 @@ '_sql/async/status/foo', {}, nil, - {} + {}, + { defined_params: { id: 'foo' }, endpoint: 'sql.get_async_status' } ] end From f6c589fa09917e035edd3404d3e32a7f8f870528 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 11:51:03 +0200 Subject: [PATCH 073/540] Update tasks specs --- .../elasticsearch/api/actions/tasks/cancel_spec.rb | 14 +++++++++++++- .../elasticsearch/api/actions/tasks/get_spec.rb | 3 ++- .../elasticsearch/api/actions/tasks/list_spec.rb | 3 ++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/tasks/cancel_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/tasks/cancel_spec.rb index 14c2b2eec0..5e6b8536c9 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/tasks/cancel_spec.rb @@ -24,7 +24,8 @@ url, {}, nil, - {} + {}, + { endpoint: 'tasks.cancel' } ] end @@ -42,6 +43,17 @@ '_tasks/foo/_cancel' end + let(:expected_args) do + [ + 'POST', + url, + {}, + nil, + {}, + { defined_params: { task_id: 'foo' }, endpoint: 'tasks.cancel' } + ] + end + it 'performs the request' do expect(client_double.tasks.cancel(task_id: 'foo')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/tasks/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/tasks/get_spec.rb index 44c316d31c..6b9d60d010 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/tasks/get_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/tasks/get_spec.rb @@ -25,7 +25,8 @@ '_tasks/foo1', {}, nil, - {} + {}, + { defined_params: { task_id: 'foo1' }, endpoint: 'tasks.get' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/tasks/list_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/tasks/list_spec.rb index 73ec37ee8e..7da4ce67ea 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/tasks/list_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/tasks/list_spec.rb @@ -24,7 +24,8 @@ url, {}, nil, - {} + {}, + { endpoint: 'tasks.list' } ] end From 3be36d382734c002f79999ca5c3257aef4291ff2 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 11:51:13 +0200 Subject: [PATCH 074/540] Delete synonyms specs --- .../synonyms/delete_synonym_rule_spec.rb | 34 ------------------- .../actions/synonyms/delete_synonym_spec.rb | 34 ------------------- .../actions/synonyms/get_synonym_rule_spec.rb | 34 ------------------- .../api/actions/synonyms/get_synonym_spec.rb | 34 ------------------- .../synonyms/get_synonyms_sets_spec.rb | 34 ------------------- .../actions/synonyms/put_synonym_rule_spec.rb | 34 ------------------- .../api/actions/synonyms/update_spec.rb | 34 ------------------- 7 files changed, 238 deletions(-) delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_rule_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_rule_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonyms_sets_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/synonyms/put_synonym_rule_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/synonyms/update_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_rule_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_rule_spec.rb deleted file mode 100644 index 644796bf9d..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_rule_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.synonyms#delete_synonym_rule' do - let(:expected_args) do - [ - 'DELETE', - '_synonyms/set/rule', - {}, - nil, - {} - ] - end - - it 'performs the request' do - expect(client_double.synonyms.delete_synonym_rule(set_id: 'set', rule_id: 'rule')).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_spec.rb deleted file mode 100644 index b6b792f76a..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/delete_synonym_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.synonyms#delete_synonym' do - let(:expected_args) do - [ - 'DELETE', - '_synonyms/foo', - {}, - nil, - {} - ] - end - - it 'performs the request' do - expect(client_double.synonyms.delete_synonym(id: 'foo')).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_rule_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_rule_spec.rb deleted file mode 100644 index d5ba7485b7..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_rule_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.synonyms#get_synonym_rule' do - let(:expected_args) do - [ - 'GET', - '_synonyms/foo/bar', - {}, - nil, - {} - ] - end - - it 'performs the request' do - expect(client_double.synonyms.get_synonym_rule(set_id: 'foo', rule_id: 'bar')).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_spec.rb deleted file mode 100644 index 53febb2b08..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonym_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.synonyms#get_synonym' do - let(:expected_args) do - [ - 'GET', - '_synonyms/foo', - {}, - nil, - {} - ] - end - - it 'performs the request' do - expect(client_double.synonyms.get_synonym(id: 'foo')).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonyms_sets_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonyms_sets_spec.rb deleted file mode 100644 index f1ec7a0fa9..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/get_synonyms_sets_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.synonyms#get_synonyms_sets' do - let(:expected_args) do - [ - 'GET', - '_synonyms', - {}, - nil, - {} - ] - end - - it 'performs the request' do - expect(client_double.synonyms.get_synonyms_sets).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/put_synonym_rule_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/put_synonym_rule_spec.rb deleted file mode 100644 index 0dfcdc91a3..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/put_synonym_rule_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.synonyms#put_synonym_rule' do - let(:expected_args) do - [ - 'PUT', - '_synonyms/set/rule', - {}, - {}, - {} - ] - end - - it 'performs the request' do - expect(client_double.synonyms.put_synonym_rule(body: {}, set_id: 'set', rule_id: 'rule')).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/update_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/update_spec.rb deleted file mode 100644 index 82a131a43d..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/synonyms/update_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.synonyms#put_synonym' do - let(:expected_args) do - [ - 'PUT', - '_synonyms/foo', - {}, - {}, - {} - ] - end - - it 'performs the request' do - expect(client_double.synonyms.put_synonym(body: {}, id: 'foo')).to be_a Elasticsearch::API::Response - end -end From 56656f321d27f73d3d06a0739bebb688dfbbc152 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 11:51:56 +0200 Subject: [PATCH 075/540] Update transform specs --- .../api/actions/transform/schedule_now_transform_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/transform/schedule_now_transform_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/transform/schedule_now_transform_spec.rb index a0d5830b92..2c2f2ecec0 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/transform/schedule_now_transform_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/transform/schedule_now_transform_spec.rb @@ -24,7 +24,9 @@ '_transform/id/_schedule_now', {}, nil, - {} + {}, + { defined_params: { transform_id: 'id' }, + endpoint: 'transform.schedule_now_transform' } ] end From 0e57018a43e95999984df2df3a75e627a0ec73c8 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 11:53:14 +0200 Subject: [PATCH 076/540] Update watcher specs --- .../elasticsearch/api/actions/watcher/get_settings_spec.rb | 3 ++- .../api/actions/watcher/update_settings_spec.rb | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/watcher/get_settings_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/watcher/get_settings_spec.rb index 0cf419b222..4554361c54 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/watcher/get_settings_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/watcher/get_settings_spec.rb @@ -24,7 +24,8 @@ '_watcher/settings', {}, nil, - {} + {}, + { endpoint: 'watcher.get_settings' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/watcher/update_settings_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/watcher/update_settings_spec.rb index b8e8a06364..56e0094429 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/watcher/update_settings_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/watcher/update_settings_spec.rb @@ -17,14 +17,15 @@ require 'spec_helper' -describe 'client#watcher.get_settings' do +describe 'client#watcher.update_settings' do let(:expected_args) do [ 'PUT', '_watcher/settings', {}, {}, - {} + {}, + { endpoint: 'watcher.update_settings' } ] end From d6cf11f0f3c390000bdc53a219cde0ed4d4a8f66 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 12:39:21 +0200 Subject: [PATCH 077/540] Update top-level specs --- .../elasticsearch/api/actions/bulk_spec.rb | 25 ++++++++++- .../api/actions/clear_scroll_spec.rb | 6 ++- .../api/actions/close_point_in_time_spec.rb | 3 +- .../elasticsearch/api/actions/count_spec.rb | 9 ++-- .../api/actions/create_document_spec.rb | 42 +++++++++++++++++-- .../api/actions/delete_by_query_spec.rb | 6 ++- .../api/actions/delete_document_spec.rb | 6 ++- .../api/actions/delete_script_spec.rb | 3 +- .../api/actions/exists_document_spec.rb | 3 +- .../api/actions/explain_document_spec.rb | 36 +++++++++++++++- .../api/actions/field_caps_spec.rb | 3 +- .../api/actions/get_document_source_spec.rb | 14 ++++++- .../api/actions/get_document_spec.rb | 14 ++++++- .../api/actions/get_script_spec.rb | 3 +- .../api/actions/health_report_spec.rb | 6 ++- .../api/actions/index_document_spec.rb | 25 ++++++++++- .../elasticsearch/api/actions/info_spec.rb | 3 +- .../api/actions/json_builders_spec.rb | 6 ++- .../elasticsearch/api/actions/mget_spec.rb | 25 ++++++++++- .../elasticsearch/api/actions/msearch_spec.rb | 36 +++++++++++++++- .../api/actions/msearch_template_spec.rb | 14 ++++++- .../api/actions/mtermvectors_spec.rb | 3 +- .../api/actions/open_point_in_time_spec.rb | 3 +- .../elasticsearch/api/actions/ping_spec.rb | 3 +- .../api/actions/put_script_spec.rb | 6 ++- .../api/actions/rank_eval_spec.rb | 14 ++++++- .../elasticsearch/api/actions/reindex_spec.rb | 3 +- .../actions/render_search_template_spec.rb | 6 ++- .../elasticsearch/api/actions/scroll_spec.rb | 6 ++- .../api/actions/search_mvt_spec.rb | 4 +- .../api/actions/search_shards_spec.rb | 3 +- .../elasticsearch/api/actions/search_spec.rb | 25 ++++++++++- .../api/actions/search_template_spec.rb | 3 +- .../api/actions/terms_enum_spec.rb | 3 +- .../api/actions/termvectors_spec.rb | 14 ++++++- .../api/actions/update_by_query_spec.rb | 3 +- .../api/actions/update_document_spec.rb | 14 ++++++- 37 files changed, 351 insertions(+), 50 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/bulk_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/bulk_spec.rb index d18330b38c..0d18d0ee9a 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/bulk_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/bulk_spec.rb @@ -24,7 +24,8 @@ url, params, body, - headers + headers, + {:endpoint=>"bulk"} ] end @@ -59,6 +60,17 @@ context 'when an index is specified' do let(:url) { 'myindex/_bulk' } + let(:expected_args) do + [ + 'POST', + url, + params, + body, + headers, + { defined_params: { index: 'myindex' }, :endpoint=>"bulk"} + ] + end + it 'performs the request' do expect(client_double.bulk(index: 'myindex', body: [])).to be_a Elasticsearch::API::Response end @@ -113,6 +125,17 @@ 'foo%5Ebar/_bulk' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + headers, + { defined_params: { index: 'foo^bar' }, :endpoint=>"bulk"} + ] + end + it 'performs the request' do expect(client_double.bulk(index: 'foo^bar', body: [])).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/clear_scroll_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/clear_scroll_spec.rb index 9c4fb4c77a..041c13d832 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/clear_scroll_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/clear_scroll_spec.rb @@ -25,7 +25,8 @@ '_search/scroll/abc123', {}, nil, - {} + {}, + { defined_params: { scroll_id: 'abc123' }, endpoint: 'clear_scroll' } ] end @@ -41,7 +42,8 @@ '_search/scroll/abc123,def456', {}, nil, - {} + {}, + { defined_params: { scroll_id: ['abc123', 'def456'] }, endpoint: 'clear_scroll' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/close_point_in_time_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/close_point_in_time_spec.rb index 38af28c4ef..d770830179 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/close_point_in_time_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/close_point_in_time_spec.rb @@ -24,7 +24,8 @@ '_pit', {}, nil, - {} + {}, + { endpoint: 'close_point_in_time' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/count_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/count_spec.rb index 06508838f1..e7806501dd 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/count_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/count_spec.rb @@ -24,7 +24,8 @@ '_count', {}, nil, - {} + {}, + { endpoint: 'count' } ] end @@ -39,7 +40,8 @@ 'foo,bar/_count', {}, nil, - {} + {}, + { defined_params: { index: ['foo', 'bar'] }, endpoint: 'count' } ] end @@ -55,7 +57,8 @@ '_count', {}, { match: { foo: 'bar' } }, - {} + {}, + { endpoint: 'count' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb index 51a305e6fb..6779213278 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb @@ -23,9 +23,10 @@ [ 'PUT', 'foo/_doc/123', - { op_type: 'create' }, + { endpoint: 'create', op_type: 'create' }, { foo: 'bar' }, - {} + {}, + { defined_params: { id: '123', index: 'foo' }, endpoint: 'create' } ] end @@ -39,12 +40,23 @@ [ 'PUT', 'foo/_doc/123', - { op_type: 'create' }, + { endpoint: 'create', op_type: 'create' }, {}, {} ] end + let(:expected_args) do + [ + 'PUT', + 'foo/_doc/123', + { endpoint: 'create', op_type: 'create' }, + {}, + {}, + { defined_params: { id: '123', index: 'foo' }, endpoint: 'create' } + ] + end + it 'performs the request' do expect(client_double.create(index: 'foo', id: '123', body: {})).to be_a Elasticsearch::API::Response end @@ -56,12 +68,23 @@ [ 'PUT', 'foo/_doc/1', - { op_type: 'create' }, + { endpoint: 'create', op_type: 'create' }, { foo: 'bar' }, {} ] end + let(:expected_args) do + [ + 'PUT', + 'foo/_doc/1', + { endpoint: 'create', op_type: 'create' }, + { foo: 'bar' }, + {}, + { defined_params: { id: 1, index: 'foo' }, endpoint: 'create' } + ] + end + it 'updates the arguments with the `op_type`' do expect(client_double.create(index: 'foo', id: 1, body: { foo: 'bar' })).to be_a Elasticsearch::API::Response end @@ -79,6 +102,17 @@ ] end + let(:expected_args) do + [ + 'POST', + 'foo/_doc', + { endpoint: 'create' }, + { foo: 'bar' }, + {}, + { defined_params: { index: 'foo' }, endpoint: 'create' } + ] + end + it 'updates the arguments with the `op_type`' do expect(client_double.create(index: 'foo', body: { foo: 'bar' })).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/delete_by_query_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/delete_by_query_spec.rb index bf19dcb924..8445e04445 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/delete_by_query_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/delete_by_query_spec.rb @@ -25,7 +25,8 @@ 'foo/_delete_by_query', {}, { term: {} }, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'delete_by_query' } ] end @@ -46,7 +47,8 @@ 'foo/_delete_by_query', { q: 'foo:bar' }, { query: 'query' }, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'delete_by_query' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/delete_document_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/delete_document_spec.rb index a5fd6652e5..7621060762 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/delete_document_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/delete_document_spec.rb @@ -25,7 +25,8 @@ 'foo/_doc/1', params, nil, - {} + {}, + { defined_params: { id: '1', index: 'foo' }, endpoint: 'delete' } ] end @@ -70,7 +71,8 @@ 'foo%5Ebar/_doc/1', params, nil, - {} + {}, + { defined_params: { id: 1, index: 'foo^bar' }, endpoint: 'delete' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/delete_script_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/delete_script_spec.rb index 8bcc510c77..ec243185d1 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/delete_script_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/delete_script_spec.rb @@ -26,7 +26,8 @@ '_scripts/foo', {}, nil, - {} + {}, + { defined_params: { id: 'foo' }, endpoint: 'delete_script' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/exists_document_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/exists_document_spec.rb index cd394d88e5..bd4ed1e402 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/exists_document_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/exists_document_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { id: '1', index: 'foo' }, endpoint: 'exists' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/explain_document_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/explain_document_spec.rb index 157f06d708..50f6ce7f88 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/explain_document_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/explain_document_spec.rb @@ -24,7 +24,8 @@ url, params, body, - {} + {}, + { defined_params: { id: 1, index: 'foo' }, endpoint: 'explain' } ] end @@ -68,6 +69,17 @@ { q: 'abc123' } end + let(:expected_args) do + [ + method, + url, + params, + body, + {}, + { defined_params: { id: '1', index: 'foo' }, endpoint: 'explain' } + ] + end + let(:body) do nil end @@ -82,6 +94,17 @@ { query: { match: {} } } end + let(:expected_args) do + [ + method, + url, + params, + body, + {}, + { defined_params: { id: '1', index: 'foo' }, endpoint: 'explain' } + ] + end + it 'passes the query definition' do expect(client_double.explain(index: 'foo', id: '1', body: { query: { match: {} } })).to be_a Elasticsearch::API::Response end @@ -92,6 +115,17 @@ 'foo%5Ebar/_explain/1' end + let(:expected_args) do + [ + method, + url, + params, + body, + {}, + { defined_params: { id: '1', index: 'foo^bar' }, endpoint: 'explain' } + ] + end + it 'URL-escapes the parts' do expect(client_double.explain(index: 'foo^bar', id: '1', body: { })).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/field_caps_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/field_caps_spec.rb index 8799ccda84..e7c905a27e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/field_caps_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/field_caps_spec.rb @@ -25,7 +25,8 @@ 'foo/_field_caps', { fields: 'bar' }, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'field_caps' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/get_document_source_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/get_document_source_spec.rb index 29dc28500c..6c655ad76f 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/get_document_source_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/get_document_source_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { id: '1', index: 'foo' }, endpoint: 'get_source' } ] end @@ -69,6 +70,17 @@ 'foo%5Ebar/_source/1' end + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { defined_params: { id: '1', index: 'foo^bar' }, endpoint: 'get_source' } + ] + end + it 'URL-escapes the parts' do expect(client_double.get_source(index: 'foo^bar', id: '1')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/get_document_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/get_document_spec.rb index e5335e723e..e0951a12bf 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/get_document_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/get_document_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { id: '1', index: 'foo' }, endpoint: 'get' } ] end @@ -68,6 +69,17 @@ 'foo%5Ebar/_doc/1' end + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { defined_params: { id: '1', index: 'foo^bar' }, endpoint: 'get' } + ] + end + it 'URL-escapes the parts' do expect(client_double.get(index: 'foo^bar', id: '1')).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/get_script_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/get_script_spec.rb index ecd33cbaea..3c8cac827d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/get_script_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/get_script_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { defined_params: { id: 'foo' }, endpoint: 'get_script' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/health_report_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/health_report_spec.rb index a268c98e4b..53819fc457 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/health_report_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/health_report_spec.rb @@ -24,7 +24,8 @@ '_health_report', {}, nil, - {} + {}, + { endpoint: 'health_report' } ] end @@ -39,7 +40,8 @@ '_health_report/foo', {}, nil, - {} + {}, + { defined_params: { feature: 'foo' }, endpoint: 'health_report' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/index_document_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/index_document_spec.rb index 0fef9c2504..b6f5abed74 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/index_document_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/index_document_spec.rb @@ -25,7 +25,8 @@ url, params, body, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'index' } ] end @@ -68,6 +69,17 @@ 'foo/_doc/1' end + let(:expected_args) do + [ + request_type, + url, + params, + body, + {}, + { defined_params: { id: '1', index: 'foo' }, endpoint: 'index' } + ] + end + it 'performs the request' do expect(client_double.index(index: 'foo', id: '1', body: body)).to be_a Elasticsearch::API::Response end @@ -103,6 +115,17 @@ { op_type: 'create' } end + let(:expected_args) do + [ + request_type, + url, + params, + body, + {}, + { defined_params: { id: '1', index: 'foo' }, endpoint: 'index' } + ] + end + it 'passes the URL params' do expect(client_double.index(index: 'foo', id: '1', op_type: 'create', body: body)).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/info_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/info_spec.rb index a54f5bd3b0..881496a083 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/info_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/info_spec.rb @@ -25,7 +25,8 @@ '', { }, nil, - {} + {}, + { endpoint: 'info' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/json_builders_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/json_builders_spec.rb index 792ca0e270..899674590e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/json_builders_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/json_builders_spec.rb @@ -25,7 +25,8 @@ '_search', {}, body, - {} + {}, + { endpoint: 'search' } ] end @@ -57,7 +58,8 @@ '_search', {}, body, - {} + {}, + { endpoint: 'search' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/mget_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/mget_spec.rb index 550d6136fd..893231f112 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/mget_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/mget_spec.rb @@ -24,7 +24,8 @@ url, params, body, - {} + {}, + { endpoint: 'mget' } ] end @@ -50,6 +51,17 @@ 'foo/_mget' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + {}, + { defined_params: { index: 'foo' }, endpoint: 'mget' } + ] + end + it 'performs the request' do expect(client_double.mget(index: 'foo', body: { :docs => [] })).to be_a Elasticsearch::API::Response end @@ -80,6 +92,17 @@ { ids: [ '1', '2' ]} end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + {}, + { defined_params: { index: 'foo^bar' }, endpoint: 'mget' } + ] + end + it 'performs the request' do expect(client_double.mget(index: 'foo^bar', body: { :ids => [ '1', '2'] })).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/msearch_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/msearch_spec.rb index 203766940a..3c56a6a46c 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/msearch_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/msearch_spec.rb @@ -24,7 +24,8 @@ url, params, body, - headers + headers, + { endpoint: 'msearch' } ] end @@ -97,6 +98,17 @@ '' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + headers, + { defined_params: { index: 'foo' }, endpoint: 'msearch' } + ] + end + it 'performs the request' do expect(client_double.msearch(index: 'foo', body: [])) end @@ -112,6 +124,17 @@ '' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + headers, + { defined_params: { index: ['foo', 'bar'] }, endpoint: 'msearch' } + ] + end + it 'performs the request' do expect(client_double.msearch(index: ['foo', 'bar'], body: [])) end @@ -127,6 +150,17 @@ '' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + headers, + { defined_params: { index: 'foo^bar' }, endpoint: 'msearch' } + ] + end + it 'performs the request' do expect(client_double.msearch(index: 'foo^bar', body: [])).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/msearch_template_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/msearch_template_spec.rb index c08b988c5a..5ec1af4dbc 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/msearch_template_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/msearch_template_spec.rb @@ -24,7 +24,8 @@ url, params, body, - headers + headers, + { endpoint: 'msearch_template' } ] end @@ -86,6 +87,17 @@ '' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + headers, + { defined_params: { index: 'foo' }, endpoint: 'msearch_template' } + ] + end + it 'performs the request' do expect(client_double.msearch_template(index: 'foo', body: [])) end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/mtermvectors_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/mtermvectors_spec.rb index 8a56b3265d..1bbc458fb4 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/mtermvectors_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/mtermvectors_spec.rb @@ -24,7 +24,8 @@ 'my-index/_mtermvectors', {}, body, - {} + {}, + { defined_params: { index: 'my-index' }, endpoint: 'mtermvectors' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/open_point_in_time_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/open_point_in_time_spec.rb index 4a80f3a191..3636a9c490 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/open_point_in_time_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/open_point_in_time_spec.rb @@ -24,7 +24,8 @@ 'foo/_pit', {}, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'open_point_in_time' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ping_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ping_spec.rb index f347105dd3..28b2a917d3 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/ping_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ping_spec.rb @@ -25,7 +25,8 @@ '', {}, nil, - {} + {}, + { endpoint: 'ping' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/put_script_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/put_script_spec.rb index cba29c0d86..b6d1ad6c99 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/put_script_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/put_script_spec.rb @@ -29,7 +29,8 @@ url, {}, { script: 'bar', lang: 'groovy' }, - {} + {}, + { defined_params: { id: 'foo' }, endpoint: 'put_script' } ] end @@ -45,7 +46,8 @@ url, {}, { script: 'bar' }, - {} + {}, + { defined_params: { id: 'foo' }, endpoint: 'put_script' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/rank_eval_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/rank_eval_spec.rb index ba14ff428a..5446908f6d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/rank_eval_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/rank_eval_spec.rb @@ -25,7 +25,8 @@ url, params, body, - {} + {}, + { defined_params: { index: 'my_index' }, endpoint: 'rank_eval' } ] end @@ -75,6 +76,17 @@ } end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + {}, + { endpoint: 'rank_eval' } + ] + end + it 'performs the request' do expect(client_double.rank_eval(body: {}, ignore_unavailable: true, diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/reindex_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/reindex_spec.rb index 66b1e6ca70..49c5431c61 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/reindex_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/reindex_spec.rb @@ -25,7 +25,8 @@ '_reindex', {}, {}, - {} + {}, + { endpoint: 'reindex' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/render_search_template_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/render_search_template_spec.rb index 087c761c3f..7c9fe2ef0f 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/render_search_template_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/render_search_template_spec.rb @@ -25,7 +25,8 @@ '_render/template', {}, { foo: 'bar' }, - {} + {}, + { endpoint: 'render_search_template' } ] end @@ -41,7 +42,8 @@ '_render/template/foo', {}, { foo: 'bar' }, - {} + {}, + { defined_params: { id: 'foo' }, endpoint: 'render_search_template' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/scroll_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/scroll_spec.rb index e649b5fa98..36ba031209 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/scroll_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/scroll_spec.rb @@ -25,7 +25,8 @@ '_search/scroll/cXVlcn...', {}, nil, - {} + {}, + { defined_params: { scroll_id: 'cXVlcn...' }, endpoint: 'scroll' } ] end @@ -41,7 +42,8 @@ '_search/scroll', {}, { scroll_id: 'cXVlcn...' }, - {} + {}, + { endpoint: 'scroll' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_mvt_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_mvt_spec.rb index ed4455d020..e0c1d93574 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_mvt_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_mvt_spec.rb @@ -24,7 +24,9 @@ url, params, body, - {} + {}, + { defined_params: { field: 'field', index: 'foo', x: 57.2127, y: 6.2348, zoom: 10 }, + endpoint: 'search_mvt' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_shards_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_shards_spec.rb index ca43518ba2..1caaf037d2 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_shards_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_shards_spec.rb @@ -25,7 +25,8 @@ '_search_shards', {}, nil, - {} + {}, + { endpoint: 'search_shards' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_spec.rb index 7d55c7abf6..02e10edabe 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_spec.rb @@ -24,7 +24,8 @@ url, params, body, - {} + {}, + { endpoint: 'search' } ] end let(:method) { 'GET' } @@ -65,6 +66,17 @@ 'foo/_search' end + let(:expected_args) do + [ + method, + url, + params, + body, + {}, + { defined_params: { index: 'foo' }, endpoint: 'search' } + ] + end + it 'performs the request' do expect(client_double.search(index: 'foo')) end @@ -75,6 +87,17 @@ 'foo,bar/_search' end + let(:expected_args) do + [ + method, + url, + params, + body, + {}, + { defined_params: { index: ['foo', 'bar'] }, endpoint: 'search' } + ] + end + it 'performs the request' do expect(client_double.search(index: ['foo', 'bar'])) end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_template_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/search_template_spec.rb index cb061c5569..60d235aba1 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/search_template_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/search_template_spec.rb @@ -24,7 +24,8 @@ 'foo/_search/template', { }, { foo: 'bar' }, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'search_template' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/terms_enum_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/terms_enum_spec.rb index d09a52a42d..a183a53c31 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/terms_enum_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/terms_enum_spec.rb @@ -24,7 +24,8 @@ 'foo/_terms_enum', {}, body, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'terms_enum' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/termvectors_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/termvectors_spec.rb index 2b07e1d749..86e2ad33ba 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/termvectors_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/termvectors_spec.rb @@ -24,7 +24,8 @@ url, params, body, - {} + {}, + { defined_params: { id: '123', index: 'foo' }, endpoint: 'termvectors' } ] end @@ -59,6 +60,17 @@ 'foo/_termvectors/123' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + {}, + { defined_params: { id: '123', index: 'foo' }, endpoint: '_termvector' } + ] + end + it 'performs the request' do expect(client_double.termvector(index: 'foo', id: '123', body: {})).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/update_by_query_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/update_by_query_spec.rb index 73d252b0e9..b67daa0b6c 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/update_by_query_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/update_by_query_spec.rb @@ -24,7 +24,8 @@ 'foo/_update_by_query', {}, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'update_by_query' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/update_document_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/update_document_spec.rb index 734addee26..5329b2806c 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/update_document_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/update_document_spec.rb @@ -24,7 +24,8 @@ url, params, body, - {} + {}, + { defined_params: { id: '1', index: 'foo' }, endpoint: 'update' } ] end @@ -83,6 +84,17 @@ {} end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + {}, + { defined_params: { id: '1', index: 'foo^bar' }, endpoint: 'update' } + ] + end + it 'escapes the parts' do expect(client_double.update(index: 'foo^bar', id: '1', body: {})) end From 49fd8a408e1f57485257ec2e1a9f3c760d028ee3 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Mon, 4 Sep 2023 12:43:14 +0200 Subject: [PATCH 078/540] Update remaining node specs --- .../nodes/reload_secure_settings_spec.rb | 36 ++++++++++++++++++- .../api/actions/nodes/stats_spec.rb | 36 ++++++++++++++++++- 2 files changed, 70 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb index 31b5bf4449..8eef6c461b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb @@ -25,7 +25,8 @@ url, params, body, - {} + {}, + { endpoint: 'nodes.reload_secure_settings' } ] end @@ -43,6 +44,17 @@ '_nodes/foo/reload_secure_settings' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + {}, + { defined_params: { node_id: 'foo' }, endpoint: 'nodes.reload_secure_settings' } + ] + end + it 'performs the request' do expect(client_double.nodes.reload_secure_settings(node_id: 'foo')).to be_a Elasticsearch::API::Response end @@ -55,6 +67,17 @@ '_nodes/foo,bar/reload_secure_settings' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + {}, + { defined_params: { node_id: 'foo,bar' }, endpoint: 'nodes.reload_secure_settings' } + ] + end + it 'performs the request' do expect(client_double.nodes.reload_secure_settings(node_id: 'foo,bar', body: { foo: 'bar' })).to be_a Elasticsearch::API::Response end @@ -66,6 +89,17 @@ '_nodes/foo,bar/reload_secure_settings' end + let(:expected_args) do + [ + 'POST', + url, + params, + body, + {}, + { defined_params: { node_id: ['foo', 'bar'] }, endpoint: 'nodes.reload_secure_settings' } + ] + end + it 'performs the request' do expect(client_double.nodes.reload_secure_settings(node_id: ['foo', 'bar'], body: { foo: 'bar' })).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/nodes/stats_spec.rb index 11106c968e..3cd5053ddd 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/stats_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/nodes/stats_spec.rb @@ -25,7 +25,8 @@ url, params, nil, - {} + {}, + { endpoint: 'nodes.stats' } ] end @@ -47,6 +48,17 @@ '_nodes/foo/stats' end + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { defined_params: { node_id: 'foo' }, endpoint: 'nodes.stats' } + ] + end + it 'performs the request' do expect(client_double.nodes.stats(node_id: 'foo')).to be_a Elasticsearch::API::Response end @@ -58,6 +70,17 @@ '_nodes/stats/http,fs' end + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { defined_params: { metric: [:http, :fs] }, endpoint: 'nodes.stats' } + ] + end + it 'performs the request' do expect(client_double.nodes.stats(metric: [:http, :fs])).to be_a Elasticsearch::API::Response end @@ -69,6 +92,17 @@ '_nodes/stats/indices/filter_cache' end + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { defined_params: { metric: :indices, index_metric: :filter_cache }, endpoint: 'nodes.stats' } + ] + end + it 'performs the request' do expect(client_double.nodes.stats(metric: :indices, index_metric: :filter_cache)).to be_a Elasticsearch::API::Response end From c4d13893ea10e478af166ff3c569c5c573cb6d1b Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 14 Sep 2023 13:50:53 +0200 Subject: [PATCH 079/540] Generate code using new template with additional perform_request arg --- .../elasticsearch/api/actions/async_search/delete.rb | 10 +++++++++- .../elasticsearch/api/actions/async_search/get.rb | 10 +++++++++- .../elasticsearch/api/actions/async_search/status.rb | 10 +++++++++- .../elasticsearch/api/actions/async_search/submit.rb | 10 +++++++++- .../actions/autoscaling/delete_autoscaling_policy.rb | 10 +++++++++- .../actions/autoscaling/get_autoscaling_capacity.rb | 4 +++- .../actions/autoscaling/get_autoscaling_policy.rb | 10 +++++++++- .../actions/autoscaling/put_autoscaling_policy.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/bulk.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cat/aliases.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cat/allocation.rb | 10 +++++++++- .../api/actions/cat/component_templates.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cat/count.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cat/fielddata.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cat/health.rb | 4 +++- .../lib/elasticsearch/api/actions/cat/help.rb | 4 +++- .../lib/elasticsearch/api/actions/cat/indices.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cat/master.rb | 4 +++- .../api/actions/cat/ml_data_frame_analytics.rb | 10 +++++++++- .../elasticsearch/api/actions/cat/ml_datafeeds.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cat/ml_jobs.rb | 10 +++++++++- .../api/actions/cat/ml_trained_models.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cat/nodeattrs.rb | 4 +++- .../lib/elasticsearch/api/actions/cat/nodes.rb | 4 +++- .../elasticsearch/api/actions/cat/pending_tasks.rb | 4 +++- .../lib/elasticsearch/api/actions/cat/plugins.rb | 4 +++- .../lib/elasticsearch/api/actions/cat/recovery.rb | 10 +++++++++- .../elasticsearch/api/actions/cat/repositories.rb | 4 +++- .../lib/elasticsearch/api/actions/cat/segments.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cat/shards.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cat/snapshots.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cat/tasks.rb | 4 +++- .../lib/elasticsearch/api/actions/cat/templates.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cat/thread_pool.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cat/transforms.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/clear_scroll.rb | 12 ++++++++++-- .../elasticsearch/api/actions/close_point_in_time.rb | 4 +++- .../api/actions/cluster/allocation_explain.rb | 4 +++- .../api/actions/cluster/delete_component_template.rb | 10 +++++++++- .../cluster/delete_voting_config_exclusions.rb | 4 +++- .../api/actions/cluster/exists_component_template.rb | 10 +++++++++- .../api/actions/cluster/get_component_template.rb | 10 +++++++++- .../api/actions/cluster/get_settings.rb | 4 +++- .../lib/elasticsearch/api/actions/cluster/health.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cluster/info.rb | 10 +++++++++- .../api/actions/cluster/pending_tasks.rb | 4 +++- .../actions/cluster/post_voting_config_exclusions.rb | 4 +++- .../api/actions/cluster/put_component_template.rb | 10 +++++++++- .../api/actions/cluster/put_settings.rb | 4 +++- .../elasticsearch/api/actions/cluster/remote_info.rb | 4 +++- .../lib/elasticsearch/api/actions/cluster/reroute.rb | 4 +++- .../lib/elasticsearch/api/actions/cluster/state.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/cluster/stats.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/count.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/create.rb | 9 +++++++++ .../delete_auto_follow_pattern.rb | 10 +++++++++- .../api/actions/cross_cluster_replication/follow.rb | 10 +++++++++- .../actions/cross_cluster_replication/follow_info.rb | 10 +++++++++- .../cross_cluster_replication/follow_stats.rb | 10 +++++++++- .../cross_cluster_replication/forget_follower.rb | 10 +++++++++- .../get_auto_follow_pattern.rb | 10 +++++++++- .../pause_auto_follow_pattern.rb | 10 +++++++++- .../cross_cluster_replication/pause_follow.rb | 10 +++++++++- .../put_auto_follow_pattern.rb | 10 +++++++++- .../resume_auto_follow_pattern.rb | 10 +++++++++- .../cross_cluster_replication/resume_follow.rb | 10 +++++++++- .../api/actions/cross_cluster_replication/stats.rb | 4 +++- .../actions/cross_cluster_replication/unfollow.rb | 10 +++++++++- .../dangling_indices/delete_dangling_index.rb | 10 +++++++++- .../dangling_indices/import_dangling_index.rb | 10 +++++++++- .../dangling_indices/list_dangling_indices.rb | 4 +++- .../lib/elasticsearch/api/actions/delete.rb | 12 ++++++++++-- .../lib/elasticsearch/api/actions/delete_by_query.rb | 10 +++++++++- .../api/actions/delete_by_query_rethrottle.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/delete_script.rb | 10 +++++++++- .../api/actions/enrich/delete_policy.rb | 10 +++++++++- .../api/actions/enrich/execute_policy.rb | 10 +++++++++- .../elasticsearch/api/actions/enrich/get_policy.rb | 10 +++++++++- .../elasticsearch/api/actions/enrich/put_policy.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/enrich/stats.rb | 4 +++- .../lib/elasticsearch/api/actions/eql/delete.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/eql/get.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/eql/get_status.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/eql/search.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/esql/query.rb | 4 +++- .../lib/elasticsearch/api/actions/exists.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/exists_source.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/explain.rb | 10 +++++++++- .../api/actions/features/get_features.rb | 4 +++- .../api/actions/features/reset_features.rb | 4 +++- .../lib/elasticsearch/api/actions/field_caps.rb | 10 +++++++++- .../elasticsearch/api/actions/fleet/delete_secret.rb | 10 +++++++++- .../elasticsearch/api/actions/fleet/get_secret.rb | 10 +++++++++- .../api/actions/fleet/global_checkpoints.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/fleet/msearch.rb | 10 +++++++++- .../elasticsearch/api/actions/fleet/post_secret.rb | 4 +++- .../lib/elasticsearch/api/actions/fleet/search.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/get.rb | 12 ++++++++++-- .../lib/elasticsearch/api/actions/get_script.rb | 10 +++++++++- .../elasticsearch/api/actions/get_script_context.rb | 4 +++- .../api/actions/get_script_languages.rb | 4 +++- .../lib/elasticsearch/api/actions/get_source.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/graph/explore.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/health_report.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/index.rb | 10 +++++++++- .../index_lifecycle_management/delete_lifecycle.rb | 10 +++++++++- .../index_lifecycle_management/explain_lifecycle.rb | 10 +++++++++- .../index_lifecycle_management/get_lifecycle.rb | 10 +++++++++- .../actions/index_lifecycle_management/get_status.rb | 4 +++- .../migrate_to_data_tiers.rb | 4 +++- .../index_lifecycle_management/move_to_step.rb | 10 +++++++++- .../index_lifecycle_management/put_lifecycle.rb | 10 +++++++++- .../index_lifecycle_management/remove_policy.rb | 10 +++++++++- .../api/actions/index_lifecycle_management/retry.rb | 10 +++++++++- .../api/actions/index_lifecycle_management/start.rb | 4 +++- .../api/actions/index_lifecycle_management/stop.rb | 4 +++- .../elasticsearch/api/actions/indices/add_block.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/indices/analyze.rb | 10 +++++++++- .../elasticsearch/api/actions/indices/clear_cache.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/indices/clone.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/indices/close.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/indices/create.rb | 10 +++++++++- .../api/actions/indices/create_data_stream.rb | 10 +++++++++- .../api/actions/indices/data_streams_stats.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/indices/delete.rb | 12 ++++++++++-- .../api/actions/indices/delete_alias.rb | 10 +++++++++- .../api/actions/indices/delete_data_lifecycle.rb | 10 +++++++++- .../api/actions/indices/delete_data_stream.rb | 10 +++++++++- .../api/actions/indices/delete_index_template.rb | 10 +++++++++- .../api/actions/indices/delete_template.rb | 12 ++++++++++-- .../elasticsearch/api/actions/indices/disk_usage.rb | 10 +++++++++- .../elasticsearch/api/actions/indices/downsample.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/indices/exists.rb | 10 +++++++++- .../api/actions/indices/exists_alias.rb | 10 +++++++++- .../api/actions/indices/exists_index_template.rb | 10 +++++++++- .../api/actions/indices/exists_template.rb | 10 +++++++++- .../api/actions/indices/explain_data_lifecycle.rb | 10 +++++++++- .../api/actions/indices/field_usage_stats.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/indices/flush.rb | 10 +++++++++- .../elasticsearch/api/actions/indices/forcemerge.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/indices/get.rb | 10 +++++++++- .../elasticsearch/api/actions/indices/get_alias.rb | 10 +++++++++- .../api/actions/indices/get_data_lifecycle.rb | 10 +++++++++- .../api/actions/indices/get_data_stream.rb | 10 +++++++++- .../api/actions/indices/get_field_mapping.rb | 10 +++++++++- .../api/actions/indices/get_index_template.rb | 10 +++++++++- .../elasticsearch/api/actions/indices/get_mapping.rb | 10 +++++++++- .../api/actions/indices/get_settings.rb | 10 +++++++++- .../api/actions/indices/get_template.rb | 10 +++++++++- .../api/actions/indices/migrate_to_data_stream.rb | 10 +++++++++- .../api/actions/indices/modify_data_stream.rb | 4 +++- .../lib/elasticsearch/api/actions/indices/open.rb | 10 +++++++++- .../api/actions/indices/promote_data_stream.rb | 10 +++++++++- .../elasticsearch/api/actions/indices/put_alias.rb | 10 +++++++++- .../api/actions/indices/put_data_lifecycle.rb | 10 +++++++++- .../api/actions/indices/put_index_template.rb | 10 +++++++++- .../elasticsearch/api/actions/indices/put_mapping.rb | 10 +++++++++- .../api/actions/indices/put_settings.rb | 10 +++++++++- .../api/actions/indices/put_template.rb | 10 +++++++++- .../elasticsearch/api/actions/indices/recovery.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/indices/refresh.rb | 10 +++++++++- .../api/actions/indices/reload_search_analyzers.rb | 10 +++++++++- .../api/actions/indices/resolve_index.rb | 10 +++++++++- .../elasticsearch/api/actions/indices/rollover.rb | 10 +++++++++- .../elasticsearch/api/actions/indices/segments.rb | 10 +++++++++- .../api/actions/indices/shard_stores.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/indices/shrink.rb | 10 +++++++++- .../api/actions/indices/simulate_index_template.rb | 10 +++++++++- .../api/actions/indices/simulate_template.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/indices/split.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/indices/stats.rb | 10 +++++++++- .../elasticsearch/api/actions/indices/unfreeze.rb | 10 +++++++++- .../api/actions/indices/update_aliases.rb | 4 +++- .../api/actions/indices/validate_query.rb | 10 +++++++++- .../api/actions/inference/delete_model.rb | 10 +++++++++- .../elasticsearch/api/actions/inference/get_model.rb | 10 +++++++++- .../elasticsearch/api/actions/inference/inference.rb | 10 +++++++++- .../elasticsearch/api/actions/inference/put_model.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/info.rb | 4 +++- .../api/actions/ingest/delete_pipeline.rb | 10 +++++++++- .../elasticsearch/api/actions/ingest/geo_ip_stats.rb | 4 +++- .../elasticsearch/api/actions/ingest/get_pipeline.rb | 10 +++++++++- .../api/actions/ingest/processor_grok.rb | 4 +++- .../elasticsearch/api/actions/ingest/put_pipeline.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/ingest/simulate.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/knn_search.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/license/delete.rb | 4 +++- .../lib/elasticsearch/api/actions/license/get.rb | 4 +++- .../api/actions/license/get_basic_status.rb | 4 +++- .../api/actions/license/get_trial_status.rb | 4 +++- .../lib/elasticsearch/api/actions/license/post.rb | 4 +++- .../api/actions/license/post_start_basic.rb | 4 +++- .../api/actions/license/post_start_trial.rb | 4 +++- .../api/actions/logstash/delete_pipeline.rb | 10 +++++++++- .../api/actions/logstash/get_pipeline.rb | 10 +++++++++- .../api/actions/logstash/put_pipeline.rb | 10 +++++++++- .../clear_trained_model_deployment_cache.rb | 10 +++++++++- .../api/actions/machine_learning/close_job.rb | 10 +++++++++- .../api/actions/machine_learning/delete_calendar.rb | 10 +++++++++- .../machine_learning/delete_calendar_event.rb | 10 +++++++++- .../actions/machine_learning/delete_calendar_job.rb | 10 +++++++++- .../machine_learning/delete_data_frame_analytics.rb | 10 +++++++++- .../api/actions/machine_learning/delete_datafeed.rb | 10 +++++++++- .../actions/machine_learning/delete_expired_data.rb | 10 +++++++++- .../api/actions/machine_learning/delete_filter.rb | 10 +++++++++- .../api/actions/machine_learning/delete_forecast.rb | 10 +++++++++- .../api/actions/machine_learning/delete_job.rb | 10 +++++++++- .../machine_learning/delete_model_snapshot.rb | 10 +++++++++- .../actions/machine_learning/delete_trained_model.rb | 10 +++++++++- .../machine_learning/delete_trained_model_alias.rb | 10 +++++++++- .../machine_learning/estimate_model_memory.rb | 4 +++- .../actions/machine_learning/evaluate_data_frame.rb | 4 +++- .../machine_learning/explain_data_frame_analytics.rb | 10 +++++++++- .../api/actions/machine_learning/flush_job.rb | 10 +++++++++- .../api/actions/machine_learning/forecast.rb | 10 +++++++++- .../api/actions/machine_learning/get_buckets.rb | 10 +++++++++- .../actions/machine_learning/get_calendar_events.rb | 10 +++++++++- .../api/actions/machine_learning/get_calendars.rb | 10 +++++++++- .../api/actions/machine_learning/get_categories.rb | 10 +++++++++- .../machine_learning/get_data_frame_analytics.rb | 10 +++++++++- .../get_data_frame_analytics_stats.rb | 10 +++++++++- .../actions/machine_learning/get_datafeed_stats.rb | 10 +++++++++- .../api/actions/machine_learning/get_datafeeds.rb | 10 +++++++++- .../api/actions/machine_learning/get_filters.rb | 10 +++++++++- .../api/actions/machine_learning/get_influencers.rb | 10 +++++++++- .../api/actions/machine_learning/get_job_stats.rb | 10 +++++++++- .../api/actions/machine_learning/get_jobs.rb | 10 +++++++++- .../api/actions/machine_learning/get_memory_stats.rb | 10 +++++++++- .../get_model_snapshot_upgrade_stats.rb | 10 +++++++++- .../actions/machine_learning/get_model_snapshots.rb | 10 +++++++++- .../actions/machine_learning/get_overall_buckets.rb | 10 +++++++++- .../api/actions/machine_learning/get_records.rb | 10 +++++++++- .../actions/machine_learning/get_trained_models.rb | 10 +++++++++- .../machine_learning/get_trained_models_stats.rb | 10 +++++++++- .../actions/machine_learning/infer_trained_model.rb | 10 +++++++++- .../api/actions/machine_learning/info.rb | 4 +++- .../api/actions/machine_learning/open_job.rb | 10 +++++++++- .../actions/machine_learning/post_calendar_events.rb | 10 +++++++++- .../api/actions/machine_learning/post_data.rb | 10 +++++++++- .../machine_learning/preview_data_frame_analytics.rb | 10 +++++++++- .../api/actions/machine_learning/preview_datafeed.rb | 10 +++++++++- .../api/actions/machine_learning/put_calendar.rb | 10 +++++++++- .../api/actions/machine_learning/put_calendar_job.rb | 10 +++++++++- .../machine_learning/put_data_frame_analytics.rb | 10 +++++++++- .../api/actions/machine_learning/put_datafeed.rb | 10 +++++++++- .../api/actions/machine_learning/put_filter.rb | 10 +++++++++- .../api/actions/machine_learning/put_job.rb | 10 +++++++++- .../actions/machine_learning/put_trained_model.rb | 10 +++++++++- .../machine_learning/put_trained_model_alias.rb | 10 +++++++++- .../put_trained_model_definition_part.rb | 10 +++++++++- .../machine_learning/put_trained_model_vocabulary.rb | 10 +++++++++- .../api/actions/machine_learning/reset_job.rb | 10 +++++++++- .../machine_learning/revert_model_snapshot.rb | 10 +++++++++- .../api/actions/machine_learning/set_upgrade_mode.rb | 4 +++- .../machine_learning/start_data_frame_analytics.rb | 10 +++++++++- .../api/actions/machine_learning/start_datafeed.rb | 10 +++++++++- .../start_trained_model_deployment.rb | 10 +++++++++- .../machine_learning/stop_data_frame_analytics.rb | 10 +++++++++- .../api/actions/machine_learning/stop_datafeed.rb | 10 +++++++++- .../stop_trained_model_deployment.rb | 10 +++++++++- .../machine_learning/update_data_frame_analytics.rb | 10 +++++++++- .../api/actions/machine_learning/update_datafeed.rb | 10 +++++++++- .../api/actions/machine_learning/update_filter.rb | 10 +++++++++- .../api/actions/machine_learning/update_job.rb | 10 +++++++++- .../machine_learning/update_model_snapshot.rb | 10 +++++++++- .../update_trained_model_deployment.rb | 10 +++++++++- .../actions/machine_learning/upgrade_job_snapshot.rb | 10 +++++++++- .../api/actions/machine_learning/validate.rb | 4 +++- .../actions/machine_learning/validate_detector.rb | 4 +++- .../lib/elasticsearch/api/actions/mget.rb | 10 +++++++++- .../api/actions/migration/deprecations.rb | 10 +++++++++- .../actions/migration/get_feature_upgrade_status.rb | 4 +++- .../api/actions/migration/post_feature_upgrade.rb | 4 +++- .../lib/elasticsearch/api/actions/monitoring/bulk.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/msearch.rb | 10 +++++++++- .../elasticsearch/api/actions/msearch_template.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/mtermvectors.rb | 10 +++++++++- .../nodes/clear_repositories_metering_archive.rb | 10 +++++++++- .../actions/nodes/get_repositories_metering_info.rb | 10 +++++++++- .../elasticsearch/api/actions/nodes/hot_threads.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/nodes/info.rb | 10 +++++++++- .../api/actions/nodes/reload_secure_settings.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/nodes/stats.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/nodes/usage.rb | 10 +++++++++- .../elasticsearch/api/actions/open_point_in_time.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/ping.rb | 4 +++- .../lib/elasticsearch/api/actions/put_script.rb | 10 +++++++++- .../api/actions/query_ruleset/delete.rb | 10 +++++++++- .../elasticsearch/api/actions/query_ruleset/get.rb | 10 +++++++++- .../elasticsearch/api/actions/query_ruleset/list.rb | 4 +++- .../elasticsearch/api/actions/query_ruleset/put.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/rank_eval.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/reindex.rb | 4 +++- .../elasticsearch/api/actions/reindex_rethrottle.rb | 10 +++++++++- .../api/actions/render_search_template.rb | 10 +++++++++- .../elasticsearch/api/actions/rollup/delete_job.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/rollup/get_jobs.rb | 10 +++++++++- .../api/actions/rollup/get_rollup_caps.rb | 10 +++++++++- .../api/actions/rollup/get_rollup_index_caps.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/rollup/put_job.rb | 10 +++++++++- .../api/actions/rollup/rollup_search.rb | 10 +++++++++- .../elasticsearch/api/actions/rollup/start_job.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/rollup/stop_job.rb | 10 +++++++++- .../api/actions/scripts_painless_execute.rb | 4 +++- .../lib/elasticsearch/api/actions/scroll.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/search.rb | 10 +++++++++- .../api/actions/search_application/delete.rb | 10 +++++++++- .../delete_behavioral_analytics.rb | 10 +++++++++- .../api/actions/search_application/get.rb | 10 +++++++++- .../search_application/get_behavioral_analytics.rb | 10 +++++++++- .../api/actions/search_application/list.rb | 4 +++- .../post_behavioral_analytics_event.rb | 10 +++++++++- .../api/actions/search_application/put.rb | 10 +++++++++- .../search_application/put_behavioral_analytics.rb | 10 +++++++++- .../api/actions/search_application/render_query.rb | 10 +++++++++- .../api/actions/search_application/search.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/search_mvt.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/search_shards.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/search_template.rb | 10 +++++++++- .../api/actions/searchable_snapshots/cache_stats.rb | 10 +++++++++- .../api/actions/searchable_snapshots/clear_cache.rb | 10 +++++++++- .../api/actions/searchable_snapshots/mount.rb | 10 +++++++++- .../api/actions/searchable_snapshots/stats.rb | 10 +++++++++- .../api/actions/security/activate_user_profile.rb | 4 +++- .../api/actions/security/authenticate.rb | 4 +++- .../api/actions/security/bulk_update_api_keys.rb | 4 +++- .../api/actions/security/change_password.rb | 10 +++++++++- .../api/actions/security/clear_api_key_cache.rb | 10 +++++++++- .../api/actions/security/clear_cached_privileges.rb | 10 +++++++++- .../api/actions/security/clear_cached_realms.rb | 10 +++++++++- .../api/actions/security/clear_cached_roles.rb | 10 +++++++++- .../actions/security/clear_cached_service_tokens.rb | 10 +++++++++- .../api/actions/security/create_api_key.rb | 4 +++- .../actions/security/create_cross_cluster_api_key.rb | 4 +++- .../api/actions/security/create_service_token.rb | 10 +++++++++- .../api/actions/security/delete_privileges.rb | 10 +++++++++- .../api/actions/security/delete_role.rb | 10 +++++++++- .../api/actions/security/delete_role_mapping.rb | 10 +++++++++- .../api/actions/security/delete_service_token.rb | 10 +++++++++- .../api/actions/security/delete_user.rb | 10 +++++++++- .../api/actions/security/disable_user.rb | 10 +++++++++- .../api/actions/security/disable_user_profile.rb | 10 +++++++++- .../api/actions/security/enable_user.rb | 10 +++++++++- .../api/actions/security/enable_user_profile.rb | 10 +++++++++- .../api/actions/security/enroll_kibana.rb | 4 +++- .../api/actions/security/enroll_node.rb | 4 +++- .../api/actions/security/get_api_key.rb | 4 +++- .../api/actions/security/get_builtin_privileges.rb | 4 +++- .../api/actions/security/get_privileges.rb | 10 +++++++++- .../elasticsearch/api/actions/security/get_role.rb | 12 ++++++++++-- .../api/actions/security/get_role_mapping.rb | 10 +++++++++- .../api/actions/security/get_service_accounts.rb | 10 +++++++++- .../api/actions/security/get_service_credentials.rb | 10 +++++++++- .../api/actions/security/get_settings.rb | 4 +++- .../elasticsearch/api/actions/security/get_token.rb | 4 +++- .../elasticsearch/api/actions/security/get_user.rb | 12 ++++++++++-- .../api/actions/security/get_user_privileges.rb | 4 +++- .../api/actions/security/get_user_profile.rb | 10 +++++++++- .../api/actions/security/grant_api_key.rb | 4 +++- .../api/actions/security/has_privileges.rb | 10 +++++++++- .../actions/security/has_privileges_user_profile.rb | 4 +++- .../api/actions/security/invalidate_api_key.rb | 4 +++- .../api/actions/security/invalidate_token.rb | 4 +++- .../api/actions/security/oidc_authenticate.rb | 4 +++- .../api/actions/security/oidc_logout.rb | 4 +++- .../actions/security/oidc_prepare_authentication.rb | 4 +++- .../api/actions/security/put_privileges.rb | 4 +++- .../elasticsearch/api/actions/security/put_role.rb | 10 +++++++++- .../api/actions/security/put_role_mapping.rb | 10 +++++++++- .../elasticsearch/api/actions/security/put_user.rb | 10 +++++++++- .../api/actions/security/query_api_keys.rb | 4 +++- .../api/actions/security/saml_authenticate.rb | 4 +++- .../api/actions/security/saml_complete_logout.rb | 4 +++- .../api/actions/security/saml_invalidate.rb | 4 +++- .../api/actions/security/saml_logout.rb | 4 +++- .../actions/security/saml_prepare_authentication.rb | 4 +++- .../security/saml_service_provider_metadata.rb | 10 +++++++++- .../api/actions/security/suggest_user_profiles.rb | 4 +++- .../api/actions/security/update_api_key.rb | 10 +++++++++- .../actions/security/update_cross_cluster_api_key.rb | 10 +++++++++- .../api/actions/security/update_settings.rb | 4 +++- .../api/actions/security/update_user_profile_data.rb | 10 +++++++++- .../api/actions/shutdown/delete_node.rb | 10 +++++++++- .../elasticsearch/api/actions/shutdown/get_node.rb | 10 +++++++++- .../elasticsearch/api/actions/shutdown/put_node.rb | 10 +++++++++- .../api/actions/snapshot/cleanup_repository.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/snapshot/clone.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/snapshot/create.rb | 10 +++++++++- .../api/actions/snapshot/create_repository.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/snapshot/delete.rb | 12 ++++++++++-- .../api/actions/snapshot/delete_repository.rb | 12 ++++++++++-- .../lib/elasticsearch/api/actions/snapshot/get.rb | 12 ++++++++++-- .../api/actions/snapshot/get_repository.rb | 12 ++++++++++-- .../api/actions/snapshot/repository_analyze.rb | 10 +++++++++- .../elasticsearch/api/actions/snapshot/restore.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/snapshot/status.rb | 12 ++++++++++-- .../api/actions/snapshot/verify_repository.rb | 10 +++++++++- .../delete_lifecycle.rb | 10 +++++++++- .../execute_lifecycle.rb | 10 +++++++++- .../execute_retention.rb | 4 +++- .../snapshot_lifecycle_management/get_lifecycle.rb | 10 +++++++++- .../snapshot_lifecycle_management/get_stats.rb | 4 +++- .../snapshot_lifecycle_management/get_status.rb | 4 +++- .../snapshot_lifecycle_management/put_lifecycle.rb | 10 +++++++++- .../actions/snapshot_lifecycle_management/start.rb | 4 +++- .../actions/snapshot_lifecycle_management/stop.rb | 4 +++- .../elasticsearch/api/actions/sql/clear_cursor.rb | 4 +++- .../elasticsearch/api/actions/sql/delete_async.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/sql/get_async.rb | 10 +++++++++- .../api/actions/sql/get_async_status.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/sql/query.rb | 4 +++- .../lib/elasticsearch/api/actions/sql/translate.rb | 4 +++- .../elasticsearch/api/actions/ssl/certificates.rb | 4 +++- .../api/actions/synonyms/delete_synonym.rb | 10 +++++++++- .../api/actions/synonyms/delete_synonym_rule.rb | 10 +++++++++- .../api/actions/synonyms/get_synonym.rb | 10 +++++++++- .../api/actions/synonyms/get_synonym_rule.rb | 10 +++++++++- .../api/actions/synonyms/get_synonyms_sets.rb | 4 +++- .../api/actions/synonyms/put_synonym.rb | 10 +++++++++- .../api/actions/synonyms/put_synonym_rule.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/tasks/cancel.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/tasks/get.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/tasks/list.rb | 4 +++- .../lib/elasticsearch/api/actions/terms_enum.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/termvectors.rb | 10 +++++++++- .../api/actions/text_structure/find_structure.rb | 4 +++- .../api/actions/transform/delete_transform.rb | 10 +++++++++- .../api/actions/transform/get_transform.rb | 10 +++++++++- .../api/actions/transform/get_transform_stats.rb | 10 +++++++++- .../api/actions/transform/preview_transform.rb | 10 +++++++++- .../api/actions/transform/put_transform.rb | 10 +++++++++- .../api/actions/transform/reset_transform.rb | 10 +++++++++- .../api/actions/transform/schedule_now_transform.rb | 10 +++++++++- .../api/actions/transform/start_transform.rb | 10 +++++++++- .../api/actions/transform/stop_transform.rb | 10 +++++++++- .../api/actions/transform/update_transform.rb | 10 +++++++++- .../api/actions/transform/upgrade_transforms.rb | 4 +++- .../lib/elasticsearch/api/actions/update.rb | 12 ++++++++++-- .../lib/elasticsearch/api/actions/update_by_query.rb | 10 +++++++++- .../api/actions/update_by_query_rethrottle.rb | 10 +++++++++- .../elasticsearch/api/actions/watcher/ack_watch.rb | 10 +++++++++- .../api/actions/watcher/activate_watch.rb | 10 +++++++++- .../api/actions/watcher/deactivate_watch.rb | 10 +++++++++- .../api/actions/watcher/delete_watch.rb | 12 ++++++++++-- .../api/actions/watcher/execute_watch.rb | 10 +++++++++- .../api/actions/watcher/get_settings.rb | 4 +++- .../elasticsearch/api/actions/watcher/get_watch.rb | 10 +++++++++- .../elasticsearch/api/actions/watcher/put_watch.rb | 10 +++++++++- .../api/actions/watcher/query_watches.rb | 4 +++- .../lib/elasticsearch/api/actions/watcher/start.rb | 4 +++- .../lib/elasticsearch/api/actions/watcher/stats.rb | 10 +++++++++- .../lib/elasticsearch/api/actions/watcher/stop.rb | 4 +++- .../api/actions/watcher/update_settings.rb | 4 +++- .../lib/elasticsearch/api/actions/xpack/info.rb | 4 +++- .../lib/elasticsearch/api/actions/xpack/usage.rb | 4 +++- .../elasticsearch/api/actions/esql/query_spec.rb | 3 ++- .../api/actions/inference/delete_model_spec.rb | 4 +++- .../api/actions/inference/get_model_spec.rb | 4 +++- .../api/actions/inference/inference_spec.rb | 4 +++- .../api/actions/inference/put_model_spec.rb | 4 +++- 460 files changed, 3493 insertions(+), 473 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb index 2d48e84bcd..93ade79c06 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html # def delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "async_search.delete" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -44,7 +52,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb index 98e0940929..8bac99994c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html # def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "async_search.get" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -47,7 +55,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb index 842771be0d..6080a251dd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html # def status(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "async_search.status" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -44,7 +52,7 @@ def status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb index 6ef7381cf4..fd709ff80c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb @@ -72,6 +72,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html # def submit(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "async_search.submit" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -88,7 +96,7 @@ def submit(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb index 1f0960a0cf..899136eec9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html # def delete_autoscaling_policy(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "autoscaling.delete_autoscaling_policy" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -44,7 +52,7 @@ def delete_autoscaling_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb index ed2d383bec..d1bf262f08 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html # def get_autoscaling_capacity(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "autoscaling.get_autoscaling_capacity" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def get_autoscaling_capacity(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb index e4dfa1782d..a28add1530 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html # def get_autoscaling_policy(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "autoscaling.get_autoscaling_policy" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -44,7 +52,7 @@ def get_autoscaling_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb index f13afffc89..916d7263b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html # def put_autoscaling_policy(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "autoscaling.put_autoscaling_policy" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + 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] @@ -46,7 +54,7 @@ def put_autoscaling_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index bd4b706ba2..25c6802d42 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -41,6 +41,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html # def bulk(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "bulk" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -66,7 +74,7 @@ def bulk(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb index 6aeba66637..829aad3b81 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-alias.html # def aliases(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.aliases" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -54,7 +62,7 @@ def aliases(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb index ff7aba8654..7c4dbe5c26 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb @@ -38,6 +38,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-allocation.html # def allocation(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.allocation" } + + defined_params = [:node_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -55,7 +63,7 @@ def allocation(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb index 79c56e02d0..187b5f01cc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-component-templates.html # def component_templates(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.component_templates" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -53,7 +61,7 @@ def component_templates(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb index da96e79935..0e62564545 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html # def count(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.count" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -52,7 +60,7 @@ def count(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb index cedc5d89a8..18faca057b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html # def fielddata(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.fielddata" } + + defined_params = [:fields].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -52,7 +60,7 @@ def fielddata(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb index b85a478441..68b7d40d08 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb @@ -36,6 +36,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-health.html # def health(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.health" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -47,7 +49,7 @@ def health(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb index e8690abbab..cccb4a922e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html # def help(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.help" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -41,7 +43,7 @@ def help(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb index 026de0e783..0b45b154ad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb @@ -42,6 +42,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html # def indices(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.indices" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -59,7 +67,7 @@ def indices(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb index 92df41d96e..69f1252b95 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb @@ -36,6 +36,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-master.html # def master(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.master" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +48,7 @@ def master(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb index dfaa649b2d..147f353447 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb @@ -38,6 +38,14 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html # def ml_data_frame_analytics(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.ml_data_frame_analytics" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -54,7 +62,7 @@ def ml_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb index c2170b7efd..32991053b3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb @@ -37,6 +37,14 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html # def ml_datafeeds(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.ml_datafeeds" } + + defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -53,7 +61,7 @@ def ml_datafeeds(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb index ceb6771691..bec650d66e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb @@ -38,6 +38,14 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html # def ml_jobs(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.ml_jobs" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -54,7 +62,7 @@ def ml_jobs(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb index fc206369cc..1479168a62 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb @@ -40,6 +40,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html # def ml_trained_models(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.ml_trained_models" } + + defined_params = [:model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -56,7 +64,7 @@ def ml_trained_models(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb index dbf07acb05..0e493b2228 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb @@ -36,6 +36,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodeattrs.html # def nodeattrs(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.nodeattrs" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +48,7 @@ def nodeattrs(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb index 47356741e8..6ce67f6edd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb @@ -39,6 +39,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html # def nodes(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.nodes" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -50,7 +52,7 @@ def nodes(arguments = {}) params[:h] = Utils.__listify(params[:h], escape: false) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb index 1d3dba91b7..2edf46fd2a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb @@ -37,6 +37,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-pending-tasks.html # def pending_tasks(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.pending_tasks" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +50,7 @@ def pending_tasks(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb index 9dea6c0d31..c6a91a0115 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb @@ -37,6 +37,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-plugins.html # def plugins(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.plugins" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -47,7 +49,7 @@ def plugins(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb index 445924eb78..5068de4cf6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb @@ -39,6 +39,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html # def recovery(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.recovery" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -56,7 +64,7 @@ def recovery(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb index 1454d0b12c..c92ae9c43e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb @@ -36,6 +36,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-repositories.html # def repositories(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.repositories" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +48,7 @@ def repositories(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb index 3deb0db3f0..3a33d25bab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html # def segments(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.segments" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -52,7 +60,7 @@ def segments(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb index ccedb98ea7..a437c3aebb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb @@ -38,6 +38,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html # def shards(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.shards" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -55,7 +63,7 @@ def shards(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb index 7f3e9f66d9..2bcd838cab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb @@ -38,6 +38,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html # def snapshots(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.snapshots" } + + defined_params = [:repository].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -54,7 +62,7 @@ def snapshots(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb index a40f6429b6..00f392b26f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb @@ -43,6 +43,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html # def tasks(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.tasks" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -53,7 +55,7 @@ def tasks(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb index afc0e72390..5e869541a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html # def templates(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.templates" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -53,7 +61,7 @@ def templates(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb index 3407cc92c7..9d14aed0ef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb @@ -39,6 +39,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html # def thread_pool(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.thread_pool" } + + defined_params = [:thread_pool_patterns].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -56,7 +64,7 @@ def thread_pool(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb index 7414201f94..c22fd7201e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb @@ -39,6 +39,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html # def transforms(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cat.transforms" } + + defined_params = [:transform_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -55,7 +63,7 @@ def transforms(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb index d3e918a518..d7358ac2e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html # def clear_scroll(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "clear_scroll" } + + defined_params = [:scroll_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -53,12 +61,12 @@ def clear_scroll(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb index b82d581896..7f8351aa25 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html # def close_point_in_time(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "close_point_in_time" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def close_point_in_time(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb index d554b92c91..aad51d651e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb @@ -32,6 +32,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html # def allocation_explain(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.allocation_explain" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -47,7 +49,7 @@ def allocation_explain(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb index caae9e6c07..7638592e21 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html # def delete_component_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.delete_component_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -46,7 +54,7 @@ def delete_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb index 33b279e300..ab01ebcd1d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/voting-config-exclusions.html # def delete_voting_config_exclusions(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.delete_voting_config_exclusions" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -41,7 +43,7 @@ def delete_voting_config_exclusions(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb index 7e2289b508..262780561b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html # def exists_component_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.exists_component_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -46,7 +54,7 @@ def exists_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb index 11dab29e49..e2d3437353 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html # def get_component_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.get_component_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -49,7 +57,7 @@ def get_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb index 02e72b246a..8db6e8d610 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb @@ -33,6 +33,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-get-settings.html # def get_settings(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.get_settings" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -43,7 +45,7 @@ def get_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb index 01e659b1c9..5d535d9b31 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb @@ -41,6 +41,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html # def health(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.health" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -57,7 +65,7 @@ def health(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb index a501535c15..6504417445 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-info.html # def info(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.info" } + + defined_params = [:target].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'target' missing" unless arguments[:target] arguments = arguments.clone @@ -44,7 +52,7 @@ def info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb index f8b556bc2b..062d825d9a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb @@ -32,6 +32,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-pending.html # def pending_tasks(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.pending_tasks" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -42,7 +44,7 @@ def pending_tasks(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb index 8901d8bc66..7c0f7e371c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb @@ -33,6 +33,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/voting-config-exclusions.html # def post_voting_config_exclusions(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.post_voting_config_exclusions" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -43,7 +45,7 @@ def post_voting_config_exclusions(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb index 330de203fe..c156ad28e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html # def put_component_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.put_component_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + 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] @@ -49,7 +57,7 @@ def put_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb index aaec93ee7c..f7863a5209 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb @@ -33,6 +33,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html # def put_settings(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.put_settings" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -45,7 +47,7 @@ def put_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb index 1aadcdae48..7bada737f2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-remote-info.html # def remote_info(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.remote_info" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def remote_info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb index 753ada1994..e2dc714d5e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb @@ -36,6 +36,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html # def reroute(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.reroute" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +48,7 @@ def reroute(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb index 56b0f07647..3c3f431fb9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb @@ -39,6 +39,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html # def state(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.state" } + + defined_params = [:metric, :index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -59,7 +67,7 @@ def state(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb index abb3424046..aaa3a3b570 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html # def stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "cluster.stats" } + + defined_params = [:node_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +56,7 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb index 7c66173d03..535a050ceb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb @@ -44,6 +44,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html # def count(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "count" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -65,7 +73,7 @@ def count(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb index d4f3676fdb..8910d97cb9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb @@ -40,6 +40,15 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html # def create(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "create" } + + defined_params = [:index, :id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + arguments.update endpoint: 'create' if arguments[:id] index arguments.update op_type: 'create' else diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb index 83fdb12e10..a639e7f5a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html # def delete_auto_follow_pattern(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ccr.delete_auto_follow_pattern" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -44,7 +52,7 @@ def delete_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb index 4f276f904d..fd438741c8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html # def follow(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ccr.follow" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -47,7 +55,7 @@ def follow(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb index 8e79207d9e..967866ed84 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html # def follow_info(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ccr.follow_info" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -44,7 +52,7 @@ def follow_info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb index 26fb2c8718..a8c488c062 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html # def follow_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ccr.follow_stats" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -44,7 +52,7 @@ def follow_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb index 89f2853ff7..751a8c88c6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html # def forget_follower(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ccr.forget_follower" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -46,7 +54,7 @@ def forget_follower(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb index d6d2fb8b42..0927b259f0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html # def get_auto_follow_pattern(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ccr.get_auto_follow_pattern" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +54,7 @@ def get_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb index 894c598491..51fc1a3b32 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html # def pause_auto_follow_pattern(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ccr.pause_auto_follow_pattern" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -44,7 +52,7 @@ def pause_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb index f4bbb1eb78..e4cd9cb64e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html # def pause_follow(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ccr.pause_follow" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -44,7 +52,7 @@ def pause_follow(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb index dfa3b58798..cde2834639 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html # def put_auto_follow_pattern(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ccr.put_auto_follow_pattern" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + 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] @@ -46,7 +54,7 @@ def put_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb index e6b32f55bc..a46cdab753 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html # def resume_auto_follow_pattern(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ccr.resume_auto_follow_pattern" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -44,7 +52,7 @@ def resume_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb index 82357e2a5d..db49d39b25 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html # def resume_follow(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ccr.resume_follow" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -45,7 +53,7 @@ def resume_follow(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb index 10ebac4884..d7544df34a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html # def stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ccr.stats" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb index 9c411d82bc..907278b01c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html # def unfollow(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ccr.unfollow" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -44,7 +52,7 @@ def unfollow(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb index 044a99de9f..9355e7885f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html # def delete_dangling_index(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "dangling_indices.delete_dangling_index" } + + defined_params = [:index_uuid].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index_uuid' missing" unless arguments[:index_uuid] arguments = arguments.clone @@ -47,7 +55,7 @@ def delete_dangling_index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb index fb1c45a360..0cb29024a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html # def import_dangling_index(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "dangling_indices.import_dangling_index" } + + defined_params = [:index_uuid].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index_uuid' missing" unless arguments[:index_uuid] arguments = arguments.clone @@ -47,7 +55,7 @@ def import_dangling_index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb index 57a11e424a..9b46a92409 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html # def list_dangling_indices(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "dangling_indices.list_dangling_indices" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def list_dangling_indices(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb index 692ff9438d..9e84e25d55 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb @@ -38,6 +38,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html # def delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "delete" } + + defined_params = [:index, :id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -57,12 +65,12 @@ def delete(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb index 00ab16999e..f587d54d86 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb @@ -59,6 +59,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html # def delete_by_query(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "delete_by_query" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -74,7 +82,7 @@ def delete_by_query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb index e7a43cdd19..8148dee65f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html # def delete_by_query_rethrottle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "delete_by_query_rethrottle" } + + defined_params = [:task_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id] arguments = arguments.clone @@ -44,7 +52,7 @@ def delete_by_query_rethrottle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb index 0484619902..2e359f44c0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html # def delete_script(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "delete_script" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -45,7 +53,7 @@ def delete_script(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb index 8d2ea05fb5..50578f6177 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html # def delete_policy(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "enrich.delete_policy" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -44,7 +52,7 @@ def delete_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb index b90e1f98b7..e0b7423018 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html # def execute_policy(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "enrich.execute_policy" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -45,7 +53,7 @@ def execute_policy(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb index 273dda7de6..6589fde2bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html # def get_policy(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "enrich.get_policy" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +54,7 @@ def get_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb index 3ced98f637..fe6724d50d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html # def put_policy(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "enrich.put_policy" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + 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] @@ -46,7 +54,7 @@ def put_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb index 22828fa7b4..6402becb84 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html # def stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "enrich.stats" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb index f793fcc5e9..3b11e1a1ba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html # def delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "eql.delete" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -44,7 +52,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb index a13ff1ec19..87f4349841 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html # def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "eql.get" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -46,7 +54,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb index 14eff8b8a6..81cd4a00ad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html # def get_status(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "eql.get_status" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -44,7 +52,7 @@ def get_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb index c4c34384d8..42597973e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html # def search(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "eql.search" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -49,7 +57,7 @@ def search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb index 6b43681fa8..771a5d0e6b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb @@ -36,6 +36,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html # def query(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "esql.query" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -48,7 +50,7 @@ def query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb index 8978685183..90a52b083b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb @@ -40,6 +40,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html # def exists(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "exists" } + + defined_params = [:index, :id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -57,7 +65,7 @@ def exists(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb index bfd168146b..028e24597f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb @@ -39,6 +39,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html # def exists_source(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "exists_source" } + + defined_params = [:index, :id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -56,7 +64,7 @@ def exists_source(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb index 6509cad3ce..25ea610e94 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb @@ -43,6 +43,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html # def explain(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "explain" } + + defined_params = [:index, :id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -65,7 +73,7 @@ def explain(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb index 661c93ef45..6ab52782ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-features-api.html # def get_features(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "features.get_features" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -40,7 +42,7 @@ def get_features(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb index 922eb32bf2..e60eb64d60 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb @@ -33,6 +33,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def reset_features(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "features.reset_features" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -43,7 +45,7 @@ def reset_features(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb index 7ecb73e4bd..671588f012 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html # def field_caps(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "field_caps" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -58,7 +66,7 @@ def field_caps(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb index cb08f91f90..24efd95a85 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb @@ -34,6 +34,14 @@ module Actions # @see [TODO] # def delete_secret(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "fleet.delete_secret" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -48,7 +56,7 @@ def delete_secret(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb index dcbef0b0f5..b3fe39be0f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb @@ -34,6 +34,14 @@ module Actions # @see [TODO] # def get_secret(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "fleet.get_secret" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -48,7 +56,7 @@ def get_secret(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb index 8130b9721c..4fd349e6c9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-global-checkpoints.html # def global_checkpoints(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "fleet.global_checkpoints" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -48,7 +56,7 @@ def global_checkpoints(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb index 86fd9ac0ca..06c6eee577 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb @@ -35,6 +35,14 @@ module Actions # @see [TODO] # def msearch(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "fleet.msearch" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -76,7 +84,7 @@ def msearch(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb index c40eba1ff7..ef3106bc31 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb @@ -34,6 +34,8 @@ module Actions # @see [TODO] # def post_secret(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "fleet.post_secret" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -46,7 +48,7 @@ def post_secret(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb index 4f260bc66b..04d483a423 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb @@ -38,6 +38,14 @@ module Actions # @see [TODO] # def search(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "fleet.search" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -57,7 +65,7 @@ def search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb index fcf8c65e21..6c1dfd3a1d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb @@ -41,6 +41,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html # def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "get" } + + defined_params = [:index, :id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -60,12 +68,12 @@ def get(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb index 871d9b0972..b78db8f9f1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html # def get_script(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "get_script" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -44,7 +52,7 @@ def get_script(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb index b76598d65e..b11e3ae4f9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb @@ -28,6 +28,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-contexts.html # def get_script_context(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "get_script_context" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -38,7 +40,7 @@ def get_script_context(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb index 0a835aff70..e27b3804f3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb @@ -28,6 +28,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html # def get_script_languages(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "get_script_languages" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -38,7 +40,7 @@ def get_script_languages(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb index c2f645ca3f..05515f7d88 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb @@ -39,6 +39,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html # def get_source(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "get_source" } + + defined_params = [:index, :id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -56,7 +64,7 @@ def get_source(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb index f9c8187e39..0c77dd803c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html # def explore(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "graph.explore" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -52,7 +60,7 @@ def explore(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb index 48293f7b6d..82dec94607 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html # def health_report(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "health_report" } + + defined_params = [:feature].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +56,7 @@ def health_report(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb index f4a90f1416..46902ebfe8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb @@ -42,6 +42,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html # def index(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "index" } + + defined_params = [:index, :id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -63,7 +71,7 @@ def index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb index 2c2a8c89f3..f2e7ed0249 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html # def delete_lifecycle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ilm.delete_lifecycle" } + + defined_params = [:policy].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'policy' missing" unless arguments[:policy] arguments = arguments.clone @@ -44,7 +52,7 @@ def delete_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb index e789cd2447..633efe06e2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html # def explain_lifecycle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ilm.explain_lifecycle" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -46,7 +54,7 @@ def explain_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb index cf2ba111cf..55a1f6fe2b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html # def get_lifecycle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ilm.get_lifecycle" } + + defined_params = [:policy].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +54,7 @@ def get_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb index 1d237cbde1..a11cbd711a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html # def get_status(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ilm.get_status" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def get_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb index 29b806142d..0bcc6dc36a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html # def migrate_to_data_tiers(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ilm.migrate_to_data_tiers" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -41,7 +43,7 @@ def migrate_to_data_tiers(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb index 04e398b5d6..9d73641ae1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html # def move_to_step(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ilm.move_to_step" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -45,7 +53,7 @@ def move_to_step(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb index 89c3fc8adc..3eeb140997 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html # def put_lifecycle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ilm.put_lifecycle" } + + defined_params = [:policy].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'policy' missing" unless arguments[:policy] arguments = arguments.clone @@ -45,7 +53,7 @@ def put_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb index 3949503e61..0b1defd4d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html # def remove_policy(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ilm.remove_policy" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -44,7 +52,7 @@ def remove_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb index 5f307f3687..92bb6b6ab0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html # def retry(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ilm.retry" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -44,7 +52,7 @@ def retry(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb index 2db6b015b6..9c4ba85f90 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html # def start(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ilm.start" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def start(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb index 994a8dea19..6d4ef5484d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html # def stop(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ilm.stop" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def stop(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb index dbc424a3a4..94e1929a99 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-blocks.html # def add_block(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.add_block" } + + defined_params = [:index, :block].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'block' missing" unless arguments[:block] @@ -53,7 +61,7 @@ def add_block(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb index d4a922ef32..fed860ea5f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html # def analyze(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.analyze" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -52,7 +60,7 @@ def analyze(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb index 6d1e5d4431..de956c6961 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html # def clear_cache(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.clear_cache" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -53,7 +61,7 @@ def clear_cache(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb index d81382ac55..a36c64d4cd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clone-index.html # def clone(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.clone" } + + defined_params = [:index, :target].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'target' missing" unless arguments[:target] @@ -52,7 +60,7 @@ def clone(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb index 98f72f6c66..cd351a1a58 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html # def close(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.close" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -50,7 +58,7 @@ def close(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb index 82f098841a..31efb53622 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html # def create(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.create" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -48,7 +56,7 @@ def create(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb index 8a297a522b..7f2020c631 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def create_data_stream(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.create_data_stream" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -44,7 +52,7 @@ def create_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb index c5089eca6c..e40df64d9b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def data_streams_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.data_streams_stats" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +54,7 @@ def data_streams_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb index cbfc13369e..5195919945 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html # def delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.delete" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -51,12 +59,12 @@ def delete(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb index 948c3512fd..1c27f92032 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def delete_alias(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.delete_alias" } + + defined_params = [:index, :name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -52,7 +60,7 @@ def delete_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb index 000327bafd..4be5e87247 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-delete-lifecycle.html # def delete_data_lifecycle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.delete_data_lifecycle" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -47,7 +55,7 @@ def delete_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb index c46183e3a9..56d39a4881 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def delete_data_stream(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.delete_data_stream" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -45,7 +53,7 @@ def delete_data_stream(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb index d4a4d0b6ca..9d7a724fea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-template.html # def delete_index_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.delete_index_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -46,7 +54,7 @@ def delete_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb index 5fe53d7ad9..25f78099ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-template-v1.html # def delete_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.delete_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -48,12 +56,12 @@ def delete_template(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb index b93645a48c..4a86b132da 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb @@ -39,6 +39,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-disk-usage.html # def disk_usage(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.disk_usage" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -53,7 +61,7 @@ def disk_usage(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb index 687b99fd07..5bec9333a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html # def downsample(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.downsample" } + + defined_params = [:index, :target_index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'target_index' missing" unless arguments[:target_index] @@ -54,7 +62,7 @@ def downsample(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb index b244d86513..aab738b7e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html # def exists(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.exists" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -50,7 +58,7 @@ def exists(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb index e52f4575e7..7e487c27b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def exists_alias(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.exists_alias" } + + defined_params = [:name, :index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -55,7 +63,7 @@ def exists_alias(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb index f6be1e72f2..941496fd7f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index-templates.html # def exists_index_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.exists_index_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -47,7 +55,7 @@ def exists_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb index 899ff0cb15..8c188674c7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-template-exists-v1.html # def exists_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.exists_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -47,7 +55,7 @@ def exists_template(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb index 5e85f50dbc..f69ce9beed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-explain-lifecycle.html # def explain_data_lifecycle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.explain_data_lifecycle" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -46,7 +54,7 @@ def explain_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb index 265b064caf..44a15fbfb7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb @@ -38,6 +38,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/field-usage-stats.html # def field_usage_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.field_usage_stats" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -52,7 +60,7 @@ def field_usage_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb index 92c77705e0..e9e68d9bf8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html # def flush(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.flush" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -51,7 +59,7 @@ def flush(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb index 674d155040..7275f5e69e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html # def forcemerge(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.forcemerge" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -53,7 +61,7 @@ def forcemerge(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb index b9abcde2d1..7dd7204641 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb @@ -38,6 +38,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html # def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.get" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -52,7 +60,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb index 90a6b25cfc..661b276f85 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def get_alias(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.get_alias" } + + defined_params = [:name, :index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -57,7 +65,7 @@ def get_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb index af3de3de97..fe6f6f4d66 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-get-lifecycle.html # def get_data_lifecycle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.get_data_lifecycle" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -46,7 +54,7 @@ def get_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb index 6bf54b2e28..511d8dd2e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def get_data_stream(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.get_data_stream" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +56,7 @@ def get_data_stream(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb index 6f67efdc66..8ce35dd267 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html # def get_field_mapping(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.get_field_mapping" } + + defined_params = [:fields, :index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone _fields = arguments.delete(:field) || arguments.delete(:fields) raise ArgumentError, "Required argument 'field' missing" unless _fields @@ -55,7 +63,7 @@ def get_field_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb index bf5dfe8232..dd91801bb6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template.html # def get_index_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.get_index_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -50,7 +58,7 @@ def get_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb index 9ebf4590d0..12e121ea02 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html # def get_mapping(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.get_mapping" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -51,7 +59,7 @@ def get_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb index 2c8a123d94..80b80122bd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb @@ -38,6 +38,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html # def get_settings(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.get_settings" } + + defined_params = [:index, :name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -60,7 +68,7 @@ def get_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb index 9ab05b689f..e11959ce17 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template-v1.html # def get_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.get_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -49,7 +57,7 @@ def get_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb index c6a4a4ba95..cc25b796e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def migrate_to_data_stream(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.migrate_to_data_stream" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -44,7 +52,7 @@ def migrate_to_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb index 709b7e98ef..1b594a9f58 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def modify_data_stream(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.modify_data_stream" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def modify_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb index fe9619cbfc..ad758723e1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html # def open(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.open" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -50,7 +58,7 @@ def open(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb index c93174a286..afab1ebf7a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def promote_data_stream(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.promote_data_stream" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -44,7 +52,7 @@ def promote_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb index 135b6b5513..ded3ff1002 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def put_alias(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.put_alias" } + + defined_params = [:index, :name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -53,7 +61,7 @@ def put_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb index b65a237553..3c637a4981 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-put-lifecycle.html # def put_data_lifecycle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.put_data_lifecycle" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -48,7 +56,7 @@ def put_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb index 6a0870ac45..16b2a11896 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-template.html # def put_index_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.put_index_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + 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] @@ -49,7 +57,7 @@ def put_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb index fdfb26aa63..1d38203329 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html # def put_mapping(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.put_mapping" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +60,7 @@ def put_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb index a5a48e4b21..0d400faade 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb @@ -38,6 +38,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html # def put_settings(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.put_settings" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -56,7 +64,7 @@ def put_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb index 51d589a41f..2dbd61ff30 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html # def put_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.put_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + 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] @@ -49,7 +57,7 @@ def put_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb index 9076c02224..157897569b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html # def recovery(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.recovery" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +56,7 @@ def recovery(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb index aeb521327f..999e3de93c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html # def refresh(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.refresh" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -49,7 +57,7 @@ def refresh(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb index 25b6f49645..df552335f7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-reload-analyzers.html # def reload_search_analyzers(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.reload_search_analyzers" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -48,7 +56,7 @@ def reload_search_analyzers(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb index 71a0f80cd1..f68a9c866f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-index-api.html # def resolve_index(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.resolve_index" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -45,7 +53,7 @@ def resolve_index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index aac93fbb27..74f77536eb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html # def rollover(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.rollover" } + + defined_params = [:alias, :new_index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'alias' missing" unless arguments[:alias] arguments = arguments.clone @@ -57,7 +65,7 @@ def rollover(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb index 0f5505852c..cd627031ef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html # def segments(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.segments" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -50,7 +58,7 @@ def segments(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb index 62f4848579..174b35bfcd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html # def shard_stores(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.shard_stores" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -50,7 +58,7 @@ def shard_stores(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb index 2fbb9c91a3..9f046786a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shrink-index.html # def shrink(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.shrink" } + + defined_params = [:index, :target].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'target' missing" unless arguments[:target] @@ -52,7 +60,7 @@ def shrink(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb index a7d92ec69c..c7c7d90c8d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-simulate-index.html # def simulate_index_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.simulate_index_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -49,7 +57,7 @@ def simulate_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb index fa13869430..b71c34621d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-simulate-template.html # def simulate_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.simulate_template" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -51,7 +59,7 @@ def simulate_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb index 1c6d3e3ff7..5084307c94 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-split-index.html # def split(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.split" } + + defined_params = [:index, :target].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'target' missing" unless arguments[:target] @@ -52,7 +60,7 @@ def split(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb index 1c8c3387c8..e487bac32b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb @@ -40,6 +40,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html # def stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.stats" } + + defined_params = [:metric, :index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -62,7 +70,7 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb index def6fb41f1..1b9e340037 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb @@ -41,6 +41,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html # def unfreeze(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.unfreeze" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -55,7 +63,7 @@ def unfreeze(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb index 2b7dba3775..07e3e8da40 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb @@ -32,6 +32,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def update_aliases(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.update_aliases" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -44,7 +46,7 @@ def update_aliases(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb index ce7eed2869..c82fd4d605 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb @@ -43,6 +43,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-validate.html # def validate_query(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "indices.validate_query" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -64,7 +72,7 @@ def validate_query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb index cf8f87b53c..f861a3ca9c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/inference_delete_model.html # def delete_model(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "inference.delete_model" } + + defined_params = [:task_type, :model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -52,7 +60,7 @@ def delete_model(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb index a0f613c525..48afb17671 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/inference_get_model.html # def get_model(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "inference.get_model" } + + defined_params = [:task_type, :model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -52,7 +60,7 @@ def get_model(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb index a6d2dd3b2d..99f6d14e8f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/inference.html # def inference(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "inference.inference" } + + defined_params = [:task_type, :model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -53,7 +61,7 @@ def inference(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb index 7cbc8c956a..0360716cdb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/inference_put_model.html # def put_model(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "inference.put_model" } + + defined_params = [:task_type, :model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -53,7 +61,7 @@ def put_model(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb index d199a17277..dd26a5b986 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb @@ -28,6 +28,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html # def info(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "info" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -38,7 +40,7 @@ def info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb index 4c653ec284..681e4c798e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-pipeline-api.html # def delete_pipeline(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ingest.delete_pipeline" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -46,7 +54,7 @@ def delete_pipeline(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb index 15ab98e64a..6b9d1e5b82 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-stats-api.html # def geo_ip_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ingest.geo_ip_stats" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def geo_ip_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb index 400c3ea593..fdaba2eee3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-pipeline-api.html # def get_pipeline(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ingest.get_pipeline" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +56,7 @@ def get_pipeline(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb index 9f893c10a0..bb8431e65f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html#grok-processor-rest-get # def processor_grok(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ingest.processor_grok" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def processor_grok(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb index db4628544b..1da84bfe2f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-pipeline-api.html # def put_pipeline(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ingest.put_pipeline" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -49,7 +57,7 @@ def put_pipeline(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb index 21f26cc5d5..b711c8323a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/simulate-pipeline-api.html # def simulate(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ingest.simulate" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -50,7 +58,7 @@ def simulate(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb index 83bd8ac9d9..bc8a00adef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html # def knn_search(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "knn_search" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -54,7 +62,7 @@ def knn_search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb index 47b5c5adae..495fb1c7b9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-license.html # def delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "license.delete" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb index aaff59578f..f0966f9936 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-license.html # def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "license.get" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -41,7 +43,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb index ae1ee87210..b3ac307f76 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-basic-status.html # def get_basic_status(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "license.get_basic_status" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def get_basic_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb index 454e77cce8..752c936d11 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trial-status.html # def get_trial_status(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "license.get_trial_status" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def get_trial_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb index 8c03da859f..e71d3628c1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-license.html # def post(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "license.post" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -41,7 +43,7 @@ def post(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb index b5b3ff59a5..b164b4c945 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-basic.html # def post_start_basic(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "license.post_start_basic" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -40,7 +42,7 @@ def post_start_basic(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb index ae1713b178..ccb31989f1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trial.html # def post_start_trial(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "license.post_start_trial" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -41,7 +43,7 @@ def post_start_trial(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb index 58ab034b24..a7d39e7323 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html # def delete_pipeline(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "logstash.delete_pipeline" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -44,7 +52,7 @@ def delete_pipeline(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb index 356a05261d..39b6fffc76 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html # def get_pipeline(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "logstash.get_pipeline" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +54,7 @@ def get_pipeline(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb index dd4d6d8b6b..4960eb8351 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html # def put_pipeline(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "logstash.put_pipeline" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -46,7 +54,7 @@ def put_pipeline(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb index 05e471a91e..314bc96487 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-trained-model-deployment-cache.html # def clear_trained_model_deployment_cache(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.clear_trained_model_deployment_cache" } + + defined_params = [:model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] arguments = arguments.clone @@ -44,7 +52,7 @@ def clear_trained_model_deployment_cache(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb index 18a2d043db..5987648572 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html # def close_job(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.close_job" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] arguments = arguments.clone @@ -48,7 +56,7 @@ def close_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb index 7af6b3b13d..d3ec48a4fd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html # def delete_calendar(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.delete_calendar" } + + defined_params = [:calendar_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] arguments = arguments.clone @@ -44,7 +52,7 @@ def delete_calendar(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb index 14b90a8406..61ba87a19f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html # def delete_calendar_event(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.delete_calendar_event" } + + defined_params = [:calendar_id, :event_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] raise ArgumentError, "Required argument 'event_id' missing" unless arguments[:event_id] @@ -48,7 +56,7 @@ def delete_calendar_event(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb index 2869b2bd88..5a971fecab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html # def delete_calendar_job(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.delete_calendar_job" } + + defined_params = [:calendar_id, :job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -48,7 +56,7 @@ def delete_calendar_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb index 1529f7ad1a..31309c49df 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html # def delete_data_frame_analytics(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.delete_data_frame_analytics" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -46,7 +54,7 @@ def delete_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb index d9b4a1e009..80c9a2fb14 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html # def delete_datafeed(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.delete_datafeed" } + + defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] arguments = arguments.clone @@ -45,7 +53,7 @@ def delete_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb index 1dc2b2e0cd..583f896ad2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html # def delete_expired_data(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.delete_expired_data" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -49,7 +57,7 @@ def delete_expired_data(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb index f5751b33a9..69d0e3b5de 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html # def delete_filter(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.delete_filter" } + + defined_params = [:filter_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id] arguments = arguments.clone @@ -44,7 +52,7 @@ def delete_filter(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb index 0ace7f717c..f85736576b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html # def delete_forecast(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.delete_forecast" } + + defined_params = [:job_id, :forecast_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] arguments = arguments.clone @@ -53,7 +61,7 @@ def delete_forecast(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb index 118dfc35fa..349bc2680d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html # def delete_job(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.delete_job" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] arguments = arguments.clone @@ -47,7 +55,7 @@ def delete_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb index 0596fd2728..3ae9962ea3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html # def delete_model_snapshot(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.delete_model_snapshot" } + + defined_params = [:job_id, :snapshot_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] @@ -48,7 +56,7 @@ def delete_model_snapshot(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb index 827a0e0a64..1e9965b573 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html # def delete_trained_model(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.delete_trained_model" } + + defined_params = [:model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] arguments = arguments.clone @@ -46,7 +54,7 @@ def delete_trained_model(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb index 491d168962..437b8e959c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html # def delete_trained_model_alias(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.delete_trained_model_alias" } + + defined_params = [:model_id, :model_alias].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] raise ArgumentError, "Required argument 'model_alias' missing" unless arguments[:model_alias] @@ -48,7 +56,7 @@ def delete_trained_model_alias(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb index 2c351d13be..895c06383f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html # def estimate_model_memory(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.estimate_model_memory" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def estimate_model_memory(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb index 380a3c62de..06435db983 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html # def evaluate_data_frame(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.evaluate_data_frame" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def evaluate_data_frame(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb index 1e49f96a08..70375bc81b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb @@ -31,6 +31,14 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html # def explain_data_frame_analytics(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.explain_data_frame_analytics" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -52,7 +60,7 @@ def explain_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb index 81f4889724..939763bdd2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html # def flush_job(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.flush_job" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] arguments = arguments.clone @@ -50,7 +58,7 @@ def flush_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb index 7e91fd2b4a..59b13bca8f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html # def forecast(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.forecast" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] arguments = arguments.clone @@ -48,7 +56,7 @@ def forecast(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb index e5b9098019..7b2837477b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb @@ -41,6 +41,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html # def get_buckets(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_buckets" } + + defined_params = [:job_id, :timestamp].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] arguments = arguments.clone @@ -66,7 +74,7 @@ def get_buckets(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb index 56207de79d..6ba6fe2dbd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html # def get_calendar_events(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_calendar_events" } + + defined_params = [:calendar_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] arguments = arguments.clone @@ -49,7 +57,7 @@ def get_calendar_events(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb index 8fee8aa989..2c34372306 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html # def get_calendars(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_calendars" } + + defined_params = [:calendar_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -54,7 +62,7 @@ def get_calendars(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb index 03091a80a7..93a67e38c0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html # def get_categories(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_categories" } + + defined_params = [:job_id, :category_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] arguments = arguments.clone @@ -60,7 +68,7 @@ def get_categories(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb index ad2f81d8f1..9507f68871 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html # def get_data_frame_analytics(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_data_frame_analytics" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -50,7 +58,7 @@ def get_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb index 8dc251dca6..6870432a04 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html # def get_data_frame_analytics_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_data_frame_analytics_stats" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -50,7 +58,7 @@ def get_data_frame_analytics_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb index bd8bde1788..b3556516a9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html # def get_datafeed_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_datafeed_stats" } + + defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -47,7 +55,7 @@ def get_datafeed_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb index 76cca4e56b..ef71e58d7b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html # def get_datafeeds(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_datafeeds" } + + defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +56,7 @@ def get_datafeeds(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb index 81b6c1e7d1..cda9f94fc3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html # def get_filters(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_filters" } + + defined_params = [:filter_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +56,7 @@ def get_filters(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb index 4cbdd7adf8..4b540cba82 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb @@ -39,6 +39,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html # def get_influencers(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_influencers" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] arguments = arguments.clone @@ -58,7 +66,7 @@ def get_influencers(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb index b8e22d38bd..4e607b22f6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html # def get_job_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_job_stats" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -47,7 +55,7 @@ def get_job_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb index 0d2aebe1bb..b62efb1b30 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html # def get_jobs(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_jobs" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +56,7 @@ def get_jobs(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb index 84881b8492..9db2816dad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html # def get_memory_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_memory_stats" } + + defined_params = [:node_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +56,7 @@ def get_memory_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb index a1378d96e0..b74c008eba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html # def get_model_snapshot_upgrade_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_model_snapshot_upgrade_stats" } + + defined_params = [:job_id, :snapshot_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] @@ -49,7 +57,7 @@ def get_model_snapshot_upgrade_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb index 65371c057c..9b4aff01c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb @@ -38,6 +38,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html # def get_model_snapshots(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_model_snapshots" } + + defined_params = [:job_id, :snapshot_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] arguments = arguments.clone @@ -63,7 +71,7 @@ def get_model_snapshots(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb index 382a996d21..71501ff37c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb @@ -38,6 +38,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html # def get_overall_buckets(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_overall_buckets" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] arguments = arguments.clone @@ -57,7 +65,7 @@ def get_overall_buckets(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb index 524cb79457..7bb28cdf47 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb @@ -39,6 +39,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html # def get_records(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_records" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] arguments = arguments.clone @@ -58,7 +66,7 @@ def get_records(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb index 148ace8472..083d43793a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb @@ -38,6 +38,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html # def get_trained_models(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_trained_models" } + + defined_params = [:model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -54,7 +62,7 @@ def get_trained_models(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb index a34eb6f0d9..7ffd95ebfb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html # def get_trained_models_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.get_trained_models_stats" } + + defined_params = [:model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -49,7 +57,7 @@ def get_trained_models_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb index dce043ef99..9aa937960c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-trained-model.html # def infer_trained_model(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.infer_trained_model" } + + defined_params = [:model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -54,7 +62,7 @@ def infer_trained_model(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb index 45944ab36d..2988ee0c6f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html # def info(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.info" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb index 4d3de91959..9e851c55e5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html # def open_job(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.open_job" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] arguments = arguments.clone @@ -45,7 +53,7 @@ def open_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb index f98a9274db..47b43c0d0e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html # def post_calendar_events(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.post_calendar_events" } + + defined_params = [:calendar_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] @@ -46,7 +54,7 @@ def post_calendar_events(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb index d860c6e6e1..0d44a0d0c4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html # def post_data(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.post_data" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -48,7 +56,7 @@ def post_data(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb index 86fa509837..6b7d05fc3a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb @@ -31,6 +31,14 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html # def preview_data_frame_analytics(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.preview_data_frame_analytics" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -52,7 +60,7 @@ def preview_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb index 6a373e8e75..63476bd422 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html # def preview_datafeed(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.preview_datafeed" } + + defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -54,7 +62,7 @@ def preview_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb index 7459b0bd60..b50a34edbc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html # def put_calendar(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.put_calendar" } + + defined_params = [:calendar_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] arguments = arguments.clone @@ -45,7 +53,7 @@ def put_calendar(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb index beaf19c365..c9bc69fa7e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html # def put_calendar_job(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.put_calendar_job" } + + defined_params = [:calendar_id, :job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -48,7 +56,7 @@ def put_calendar_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb index ba2b626c7c..4eb754abb9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html # def put_data_frame_analytics(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.put_data_frame_analytics" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -46,7 +54,7 @@ def put_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb index e8dea26e38..967f3c49ae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html # def put_datafeed(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.put_datafeed" } + + defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] @@ -50,7 +58,7 @@ def put_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb index 73cd594b0c..6d2dabfbb2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html # def put_filter(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.put_filter" } + + defined_params = [:filter_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id] @@ -46,7 +54,7 @@ def put_filter(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb index 6b4e85913a..e8b0c3f2a1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html # def put_job(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.put_job" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -50,7 +58,7 @@ def put_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb index 61bd0d3eab..3ea00db8a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html # def put_trained_model(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model" } + + defined_params = [:model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -48,7 +56,7 @@ def put_trained_model(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb index 77503e79df..6cc4f48d74 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html # def put_trained_model_alias(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model_alias" } + + defined_params = [:model_id, :model_alias].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] raise ArgumentError, "Required argument 'model_alias' missing" unless arguments[:model_alias] @@ -49,7 +57,7 @@ def put_trained_model_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb index 0dfc798631..38d26b78a5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html # def put_trained_model_definition_part(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model_definition_part" } + + defined_params = [:model_id, :part].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] raise ArgumentError, "Required argument 'part' missing" unless arguments[:part] @@ -50,7 +58,7 @@ def put_trained_model_definition_part(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb index f9d8566d3c..cd9d3545a9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html # def put_trained_model_vocabulary(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model_vocabulary" } + + defined_params = [:model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -46,7 +54,7 @@ def put_trained_model_vocabulary(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb index 2155227ad9..f07bcef8db 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html # def reset_job(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.reset_job" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] arguments = arguments.clone @@ -46,7 +54,7 @@ def reset_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb index 9dea6125aa..8081ea7094 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html # def revert_model_snapshot(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.revert_model_snapshot" } + + defined_params = [:job_id, :snapshot_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] @@ -50,7 +58,7 @@ def revert_model_snapshot(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb index 7e183cf4cb..a95855ff9a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html # def set_upgrade_mode(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.set_upgrade_mode" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -41,7 +43,7 @@ def set_upgrade_mode(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb index ef225f1514..92a6bbd34b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html # def start_data_frame_analytics(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.start_data_frame_analytics" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -46,7 +54,7 @@ def start_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb index 625a297763..1187f6d2b9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html # def start_datafeed(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.start_datafeed" } + + defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] arguments = arguments.clone @@ -48,7 +56,7 @@ def start_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb index 155e5e673b..956e913092 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb @@ -38,6 +38,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trained-model-deployment.html # def start_trained_model_deployment(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.start_trained_model_deployment" } + + defined_params = [:model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] arguments = arguments.clone @@ -52,7 +60,7 @@ def start_trained_model_deployment(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb index 805fc84dbe..14192254c4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html # def stop_data_frame_analytics(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.stop_data_frame_analytics" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -48,7 +56,7 @@ def stop_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb index 8d908a4aaf..4bd4ef7a1e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html # def stop_datafeed(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.stop_datafeed" } + + defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] arguments = arguments.clone @@ -49,7 +57,7 @@ def stop_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb index 44c21207f7..4b6024bb65 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-trained-model-deployment.html # def stop_trained_model_deployment(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.stop_trained_model_deployment" } + + defined_params = [:model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] arguments = arguments.clone @@ -47,7 +55,7 @@ def stop_trained_model_deployment(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb index e938d30701..5e883d540d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html # def update_data_frame_analytics(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.update_data_frame_analytics" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -46,7 +54,7 @@ def update_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb index 1f1c1a8b30..792b8dade7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html # def update_datafeed(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.update_datafeed" } + + defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] @@ -50,7 +58,7 @@ def update_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb index 00ebc41e81..c98c6c65a1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html # def update_filter(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.update_filter" } + + defined_params = [:filter_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id] @@ -46,7 +54,7 @@ def update_filter(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb index 0692dfd7eb..d8ea774ca0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html # def update_job(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.update_job" } + + defined_params = [:job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -46,7 +54,7 @@ def update_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb index 7cdf14a574..8dec4ccb72 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html # def update_model_snapshot(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.update_model_snapshot" } + + defined_params = [:job_id, :snapshot_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] @@ -50,7 +58,7 @@ def update_model_snapshot(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb index 1b592c79f5..25878d7de7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-trained-model-deployment.html # def update_trained_model_deployment(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.update_trained_model_deployment" } + + defined_params = [:model_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -50,7 +58,7 @@ def update_trained_model_deployment(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb index 9042b13be7..3ab0ae2582 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html # def upgrade_job_snapshot(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.upgrade_job_snapshot" } + + defined_params = [:job_id, :snapshot_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] @@ -50,7 +58,7 @@ def upgrade_job_snapshot(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb index 7982cc8a9f..6f1fc68595 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html # def validate(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.validate" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def validate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb index 8a577a7ae9..fd99c712bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html # def validate_detector(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ml.validate_detector" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def validate_detector(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb index 64611bbb83..c9076967b3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb @@ -39,6 +39,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html # def mget(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "mget" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -57,7 +65,7 @@ def mget(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb index 7b29369a02..45f90274d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html # def deprecations(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "migration.deprecations" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +54,7 @@ def deprecations(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb index 0b3bbfa799..165a7d2f33 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html # def get_feature_upgrade_status(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "migration.get_feature_upgrade_status" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def get_feature_upgrade_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb index 7e81fe6a48..08766c3cb2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html # def post_feature_upgrade(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "migration.post_feature_upgrade" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def post_feature_upgrade(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb index 5b3eab461c..1dd391bc7e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb @@ -40,6 +40,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/monitor-elasticsearch-cluster.html # def bulk(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "monitoring.bulk" } + + defined_params = [:type].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -65,7 +73,7 @@ def bulk(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb index 7ee4ed4aa0..7922036d28 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html # def msearch(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "msearch" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -78,7 +86,7 @@ def msearch(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb index f4e4457771..a341972c7a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html # def msearch_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "msearch_template" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -64,7 +72,7 @@ def msearch_template(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb index 968cf42a93..69a42f269e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb @@ -42,6 +42,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html # def mtermvectors(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "mtermvectors" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -67,7 +75,7 @@ def mtermvectors(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb index 6e2856820d..21c94a185d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html # def clear_repositories_metering_archive(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "nodes.clear_repositories_metering_archive" } + + defined_params = [:node_id, :max_archive_version].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] raise ArgumentError, @@ -54,7 +62,7 @@ def clear_repositories_metering_archive(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb index 9dfb0d96a1..1d5c846fed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html # def get_repositories_metering_info(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "nodes.get_repositories_metering_info" } + + defined_params = [:node_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] arguments = arguments.clone @@ -48,7 +56,7 @@ def get_repositories_metering_info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb index a6a51ffde1..6755bb1b67 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html # def hot_threads(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "nodes.hot_threads" } + + defined_params = [:node_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -53,7 +61,7 @@ def hot_threads(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb index 63a10d6a99..03e1d34bc3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html # def info(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "nodes.info" } + + defined_params = [:node_id, :metric].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -55,7 +63,7 @@ def info(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb index 3370c927c9..3dbc232e0a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/secure-settings.html#reloadable-secure-settings # def reload_secure_settings(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "nodes.reload_secure_settings" } + + defined_params = [:node_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +56,7 @@ def reload_secure_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb index 706b73eb2d..924f0cbd29 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb @@ -41,6 +41,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html # def stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "nodes.stats" } + + defined_params = [:node_id, :metric, :index_metric].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -69,7 +77,7 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb index 4b54a7fbe2..05d29c9052 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-usage.html # def usage(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "nodes.usage" } + + defined_params = [:node_id, :metric].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -54,7 +62,7 @@ def usage(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb index 82d6ecd10f..f903756a95 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html # def open_point_in_time(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "open_point_in_time" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -48,7 +56,7 @@ def open_point_in_time(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb index d8ed048ff1..5f62c14bb3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb @@ -28,6 +28,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html # def ping(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ping" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -38,7 +40,7 @@ def ping(arguments = {}) params = {} begin - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false rescue Exception => e if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not *Found|404|ConnectionFailed/i false diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb index d2d33c424a..8f55cf16db 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html # def put_script(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "put_script" } + + defined_params = [:id, :context].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -54,7 +62,7 @@ def put_script(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb index 0558c5fac5..d89ce3cf90 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-ruleset.html # def delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "query_ruleset.delete" } + + defined_params = [:ruleset_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'ruleset_id' missing" unless arguments[:ruleset_id] arguments = arguments.clone @@ -48,7 +56,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb index c6d3fe2e72..fea65f17c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-ruleset.html # def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "query_ruleset.get" } + + defined_params = [:ruleset_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'ruleset_id' missing" unless arguments[:ruleset_id] arguments = arguments.clone @@ -48,7 +56,7 @@ def get(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb index 06c425809b..e552975586 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb @@ -35,6 +35,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-query-rulesets.html # def list(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "query_ruleset.list" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -45,7 +47,7 @@ def list(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb index ec6ef648d2..75bda0f38c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-ruleset.html # def put(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "query_ruleset.put" } + + defined_params = [:ruleset_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'ruleset_id' missing" unless arguments[:ruleset_id] @@ -50,7 +58,7 @@ def put(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb index bf4a92afdb..2ce15dade8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-rank-eval.html # def rank_eval(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "rank_eval" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -52,7 +60,7 @@ def rank_eval(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb index 72d44efb4f..d3d1e10244 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb @@ -39,6 +39,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html # def reindex(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "reindex" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -51,7 +53,7 @@ def reindex(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb index aa6f493642..3686472394 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html # def reindex_rethrottle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "reindex_rethrottle" } + + defined_params = [:task_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id] arguments = arguments.clone @@ -44,7 +52,7 @@ def reindex_rethrottle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb index 7b7f3e2e30..26ff15d9d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html # def render_search_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "render_search_template" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -51,7 +59,7 @@ def render_search_template(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb index df5481d092..4ba53ada9c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-delete-job.html # def delete_job(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "rollup.delete_job" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -48,7 +56,7 @@ def delete_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb index f07d6bc358..ca5e9f4d57 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-job.html # def get_jobs(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "rollup.get_jobs" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -50,7 +58,7 @@ def get_jobs(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb index 3047e45a2e..201e95b897 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-caps.html # def get_rollup_caps(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "rollup.get_rollup_caps" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -50,7 +58,7 @@ def get_rollup_caps(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb index c1e5264a7d..e404838673 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-index-caps.html # def get_rollup_index_caps(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "rollup.get_rollup_index_caps" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -48,7 +56,7 @@ def get_rollup_index_caps(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb index fdb9616f4b..db75a21541 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-put-job.html # def put_job(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "rollup.put_job" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -50,7 +58,7 @@ def put_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb index 832db0da11..3589c2a597 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-search.html # def rollup_search(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "rollup.rollup_search" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +60,7 @@ def rollup_search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb index 768b461fb4..22e81b2ba1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-start-job.html # def start_job(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "rollup.start_job" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -48,7 +56,7 @@ def start_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb index bad3231161..6c0b1d89ef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-stop-job.html # def stop_job(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "rollup.stop_job" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -50,7 +58,7 @@ def stop_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb index 07e39dcb8f..6fdef5a87e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb @@ -33,6 +33,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html # def scripts_painless_execute(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "scripts_painless_execute" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +50,7 @@ def scripts_painless_execute(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb index c3b4bf52b4..5c21fc763c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-scroll # def scroll(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "scroll" } + + defined_params = [:scroll_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -58,7 +66,7 @@ def scroll(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb index d278fcb4a4..9a11ea7cd3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb @@ -75,6 +75,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html # def search(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -96,7 +104,7 @@ def search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb index ac9ff6b3fa..af7907c674 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-search-application.html # def delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search_application.delete" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -48,7 +56,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb index 5565e636ec..6c28810474 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-analytics-collection.html # def delete_behavioral_analytics(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search_application.delete_behavioral_analytics" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -48,7 +56,7 @@ def delete_behavioral_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb index 328f3f0dc4..36524d4bdc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-search-application.html # def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search_application.get" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -48,7 +56,7 @@ def get(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb index 3b916a6d87..718fb8a860 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-analytics-collection.html # def get_behavioral_analytics(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search_application.get_behavioral_analytics" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -50,7 +58,7 @@ def get_behavioral_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb index 8f97e322f7..0ba111f144 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb @@ -36,6 +36,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-search-applications.html # def list(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search_application.list" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +48,7 @@ def list(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb index ee71ab3785..30cafd6534 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb @@ -37,6 +37,14 @@ module Actions # @see http://todo.com/tbd # def post_behavioral_analytics_event(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search_application.post_behavioral_analytics_event" } + + defined_params = [:collection_name, :event_type].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'collection_name' missing" unless arguments[:collection_name] raise ArgumentError, "Required argument 'event_type' missing" unless arguments[:event_type] @@ -55,7 +63,7 @@ def post_behavioral_analytics_event(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb index 9a3f7e566e..85a587a130 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-search-application.html # def put(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search_application.put" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + 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] @@ -51,7 +59,7 @@ def put(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb index 5551f9b9ab..47cab7053c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-analytics-collection.html # def put_behavioral_analytics(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search_application.put_behavioral_analytics" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -48,7 +56,7 @@ def put_behavioral_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb index 91f27e67f8..b5632ad4b5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-render-query.html # def render_query(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search_application.render_query" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -49,7 +57,7 @@ def render_query(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb index 0a9c36381f..33cfa788ba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-search.html # def search(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search_application.search" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -54,7 +62,7 @@ def search(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb index a19695770b..f92b796d46 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb @@ -45,6 +45,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-vector-tile-api.html # def search_mvt(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search_mvt" } + + defined_params = [:index, :field, :zoom, :x, :y].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'field' missing" unless arguments[:field] raise ArgumentError, "Required argument 'zoom' missing" unless arguments[:zoom] @@ -71,7 +79,7 @@ def search_mvt(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb index 8b03109690..1bcdfacff7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html # def search_shards(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search_shards" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -51,7 +59,7 @@ def search_shards(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb index c3a2dd7ece..2e435da6c0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb @@ -43,6 +43,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html # def search_template(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "search_template" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -61,7 +69,7 @@ def search_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb index 7c194bdc0a..66e25f74e2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html # def cache_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "searchable_snapshots.cache_stats" } + + defined_params = [:node_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -50,7 +58,7 @@ def cache_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb index 63e42e7cbd..1f2f944b7d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb @@ -37,6 +37,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html # def clear_cache(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "searchable_snapshots.clear_cache" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -53,7 +61,7 @@ def clear_cache(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb index 08f1b0e198..5a3cd48741 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-mount-snapshot.html # def mount(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "searchable_snapshots.mount" } + + defined_params = [:repository, :snapshot].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot] @@ -53,7 +61,7 @@ def mount(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb index 0a214885f4..b0eda79745 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html # def stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "searchable_snapshots.stats" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -47,7 +55,7 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb index de2b478aca..042f04d939 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-activate-user-profile.html # def activate_user_profile(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.activate_user_profile" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def activate_user_profile(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb index eed4a29a5e..c220700bc5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html # def authenticate(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.authenticate" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def authenticate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb index 5b0f12419b..c285a8d7f4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-update-api-keys.html # def bulk_update_api_keys(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.bulk_update_api_keys" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def bulk_update_api_keys(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb index 239a8f38e6..989a7ac0e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html # def change_password(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.change_password" } + + defined_params = [:username].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -50,7 +58,7 @@ def change_password(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb index aba6705fbf..b6ed47e3b0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-api-key-cache.html # def clear_api_key_cache(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.clear_api_key_cache" } + + defined_params = [:ids].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'ids' missing" unless arguments[:ids] arguments = arguments.clone @@ -44,7 +52,7 @@ def clear_api_key_cache(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb index abd6699fae..ee2d4132b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-privilege-cache.html # def clear_cached_privileges(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.clear_cached_privileges" } + + defined_params = [:application].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'application' missing" unless arguments[:application] arguments = arguments.clone @@ -44,7 +52,7 @@ def clear_cached_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb index 4e039ebea5..ef22a86a66 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html # def clear_cached_realms(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.clear_cached_realms" } + + defined_params = [:realms].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'realms' missing" unless arguments[:realms] arguments = arguments.clone @@ -45,7 +53,7 @@ def clear_cached_realms(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb index 5b8cf1b848..ec47a610a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html # def clear_cached_roles(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.clear_cached_roles" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -44,7 +52,7 @@ def clear_cached_roles(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb index 6ca1f72b4a..908af0205f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html # def clear_cached_service_tokens(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.clear_cached_service_tokens" } + + defined_params = [:namespace, :service, :name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] raise ArgumentError, "Required argument 'service' missing" unless arguments[:service] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -52,7 +60,7 @@ def clear_cached_service_tokens(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb index 5d0fc93ddb..94c1d3f1bd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html # def create_api_key(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.create_api_key" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -43,7 +45,7 @@ def create_api_key(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb index ef1f442980..f951ab3d38 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb @@ -34,6 +34,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-cross-cluster-api-key.html # def create_cross_cluster_api_key(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.create_cross_cluster_api_key" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -46,7 +48,7 @@ def create_cross_cluster_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb index 42bc6d73fa..b6bc6db240 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html # def create_service_token(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.create_service_token" } + + defined_params = [:namespace, :service, :name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] raise ArgumentError, "Required argument 'service' missing" unless arguments[:service] @@ -56,7 +64,7 @@ def create_service_token(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb index d25c5b95e3..f589a1f6a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html # def delete_privileges(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.delete_privileges" } + + defined_params = [:application, :name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'application' missing" unless arguments[:application] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -49,7 +57,7 @@ def delete_privileges(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb index d4902cf9e9..8da0c68a5e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html # def delete_role(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.delete_role" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -45,7 +53,7 @@ def delete_role(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb index 2cc199f560..d6f9aa3d84 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html # def delete_role_mapping(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.delete_role_mapping" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone @@ -45,7 +53,7 @@ def delete_role_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb index eb89dfc7d9..6825b5ecab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html # def delete_service_token(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.delete_service_token" } + + defined_params = [:namespace, :service, :name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] raise ArgumentError, "Required argument 'service' missing" unless arguments[:service] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -53,7 +61,7 @@ def delete_service_token(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb index 1729c6ffd1..c031bf9571 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html # def delete_user(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.delete_user" } + + defined_params = [:username].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] arguments = arguments.clone @@ -45,7 +53,7 @@ def delete_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb index 1d756e2048..58f4da420c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html # def disable_user(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.disable_user" } + + defined_params = [:username].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] arguments = arguments.clone @@ -45,7 +53,7 @@ def disable_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb index b5228f47dc..abd0b86ec9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user-profile.html # def disable_user_profile(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.disable_user_profile" } + + defined_params = [:uid].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] arguments = arguments.clone @@ -45,7 +53,7 @@ def disable_user_profile(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb index 926b295fa0..6cf13e3eab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html # def enable_user(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.enable_user" } + + defined_params = [:username].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] arguments = arguments.clone @@ -45,7 +53,7 @@ def enable_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb index 42c61217d9..fa3ea55eaf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user-profile.html # def enable_user_profile(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.enable_user_profile" } + + defined_params = [:uid].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] arguments = arguments.clone @@ -45,7 +53,7 @@ def enable_user_profile(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb index 1ac392de4e..300252229c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-kibana-enrollment.html # def enroll_kibana(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.enroll_kibana" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def enroll_kibana(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb index 9c33882787..7a26df20f2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-node-enrollment.html # def enroll_node(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.enroll_node" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def enroll_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb index 7ffb39ba07..02eb2ed685 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb @@ -35,6 +35,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html # def get_api_key(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.get_api_key" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -45,7 +47,7 @@ def get_api_key(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb index b4983e21f5..c224e24702 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html # def get_builtin_privileges(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.get_builtin_privileges" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def get_builtin_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb index 9b09f3c75b..797c6603e5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html # def get_privileges(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.get_privileges" } + + defined_params = [:application, :name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -51,7 +59,7 @@ def get_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb index 2d4c5e4992..c429bde772 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html # def get_role(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.get_role" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,12 +56,12 @@ def get_role(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb index 8c4571c8bd..c652b62846 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html # def get_role_mapping(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.get_role_mapping" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +54,7 @@ def get_role_mapping(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb index d48a0b13e9..ba3393dc48 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html # def get_service_accounts(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.get_service_accounts" } + + defined_params = [:namespace, :service].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -51,7 +59,7 @@ def get_service_accounts(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb index 4b28035cb9..a63897e466 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html # def get_service_credentials(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.get_service_credentials" } + + defined_params = [:namespace, :service].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] raise ArgumentError, "Required argument 'service' missing" unless arguments[:service] @@ -48,7 +56,7 @@ def get_service_credentials(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb index 95feb9ca02..1e7ce4dc06 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-settings.html # def get_settings(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.get_settings" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def get_settings(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb index f96a03978a..bc93d79207 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html # def get_token(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.get_token" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def get_token(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb index 68254b014c..2ad61c4770 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html # def get_user(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.get_user" } + + defined_params = [:username].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -49,12 +57,12 @@ def get_user(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb index 826e3cdf3a..5d47137301 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html # def get_user_privileges(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.get_user_privileges" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def get_user_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb index 836794286f..a3a8dffc97 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-profile.html # def get_user_profile(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.get_user_profile" } + + defined_params = [:uid].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] arguments = arguments.clone @@ -45,7 +53,7 @@ def get_user_profile(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb index bf1803e561..4a415b7ead 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html # def grant_api_key(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.grant_api_key" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -43,7 +45,7 @@ def grant_api_key(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb index f607ce5d2a..5e7646cf72 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html # def has_privileges(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.has_privileges" } + + defined_params = [:user].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -49,7 +57,7 @@ def has_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb index e292fad425..5bfcfdf1e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges-user-profile.html # def has_privileges_user_profile(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.has_privileges_user_profile" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def has_privileges_user_profile(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb index 4c6af6d104..9f2ba723f6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html # def invalidate_api_key(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.invalidate_api_key" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def invalidate_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb index 00c7321015..8e04a19169 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html # def invalidate_token(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.invalidate_token" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def invalidate_token(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb index e2e0d93456..d17b93d883 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-authenticate.html # def oidc_authenticate(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.oidc_authenticate" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def oidc_authenticate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb index 93985d9fde..b1f3959b43 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-logout.html # def oidc_logout(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.oidc_logout" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def oidc_logout(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb index b79da8ad73..83cfc90cd5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-prepare-authentication.html # def oidc_prepare_authentication(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.oidc_prepare_authentication" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def oidc_prepare_authentication(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb index d2cfd8dd15..2deddf2d18 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html # def put_privileges(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.put_privileges" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -43,7 +45,7 @@ def put_privileges(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb index b8e7ca155c..48b9c13a98 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html # def put_role(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.put_role" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + 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] @@ -47,7 +55,7 @@ def put_role(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb index 7de6143ab4..ddac43d1dd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html # def put_role_mapping(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.put_role_mapping" } + + defined_params = [:name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + 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] @@ -47,7 +55,7 @@ def put_role_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb index 966d8131ef..7ca37ac984 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html # def put_user(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.put_user" } + + defined_params = [:username].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] @@ -47,7 +55,7 @@ def put_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb index d60d86253b..61886c6caa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html # def query_api_keys(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.query_api_keys" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +48,7 @@ def query_api_keys(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb index d743628c83..7b42482994 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html # def saml_authenticate(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.saml_authenticate" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def saml_authenticate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb index f78b2278e7..74c0fafebe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html # def saml_complete_logout(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.saml_complete_logout" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def saml_complete_logout(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb index 264dfad171..0f69bcb70a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html # def saml_invalidate(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.saml_invalidate" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def saml_invalidate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb index c3a9b3ed53..e6e224e464 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html # def saml_logout(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.saml_logout" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def saml_logout(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb index 38ada9f603..f54a34c374 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html # def saml_prepare_authentication(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.saml_prepare_authentication" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def saml_prepare_authentication(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb index ef67353889..a341f17e5b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html # def saml_service_provider_metadata(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.saml_service_provider_metadata" } + + defined_params = [:realm_name].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'realm_name' missing" unless arguments[:realm_name] arguments = arguments.clone @@ -44,7 +52,7 @@ def saml_service_provider_metadata(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb index 8f11761af6..e22046a53d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-suggest-user-profile.html # def suggest_user_profiles(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.suggest_user_profiles" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +48,7 @@ def suggest_user_profiles(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb index 2939d02627..be6bc88d17 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-api-key.html # def update_api_key(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.update_api_key" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -45,7 +53,7 @@ def update_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb index f2c68f5ec9..ea7dae4b34 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html # def update_cross_cluster_api_key(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.update_cross_cluster_api_key" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -50,7 +58,7 @@ def update_cross_cluster_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb index d05e85d06c..a880c51b53 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-settings.html # def update_settings(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.update_settings" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def update_settings(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb index 41d7f5bf3d..6a7ee5eb13 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-user-profile-data.html # def update_user_profile_data(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "security.update_user_profile_data" } + + defined_params = [:uid].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] @@ -49,7 +57,7 @@ def update_user_profile_data(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb index dcb95bab40..3732724564 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current # def delete_node(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "shutdown.delete_node" } + + defined_params = [:node_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] arguments = arguments.clone @@ -44,7 +52,7 @@ def delete_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb index 2ccfb56563..ab0c9abfe5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current # def get_node(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "shutdown.get_node" } + + defined_params = [:node_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +54,7 @@ def get_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb index 768b5cc0c9..5161108fe9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current # def put_node(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "shutdown.put_node" } + + defined_params = [:node_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] @@ -46,7 +54,7 @@ def put_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb index 43f94739af..59e9e598ec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clean-up-snapshot-repo-api.html # def cleanup_repository(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "snapshot.cleanup_repository" } + + defined_params = [:repository].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] arguments = arguments.clone @@ -46,7 +54,7 @@ def cleanup_repository(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb index a4804c4d3c..5217fc0e84 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def clone(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "snapshot.clone" } + + defined_params = [:repository, :snapshot, :target_snapshot].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot] @@ -55,7 +63,7 @@ def clone(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb index 1adf0321e7..22646b3699 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def create(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "snapshot.create" } + + defined_params = [:repository, :snapshot].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot] @@ -51,7 +59,7 @@ def create(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb index 239b0e656f..d80e6f62af 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def create_repository(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "snapshot.create_repository" } + + defined_params = [:repository].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -49,7 +57,7 @@ def create_repository(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb index ee154a709b..0ea575a5b2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "snapshot.delete" } + + defined_params = [:repository, :snapshot].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot] @@ -51,12 +59,12 @@ def delete(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb index 7570265903..d7954ac39d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def delete_repository(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "snapshot.delete_repository" } + + defined_params = [:repository].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] arguments = arguments.clone @@ -48,12 +56,12 @@ def delete_repository(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb index 4d42438caf..655557acdb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb @@ -44,6 +44,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "snapshot.get" } + + defined_params = [:repository, :snapshot].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot] @@ -63,12 +71,12 @@ def get(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb index a15f903d52..c51f3fb950 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def get_repository(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "snapshot.get_repository" } + + defined_params = [:repository].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -50,12 +58,12 @@ def get_repository(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb index cee6820ec2..f598d91d89 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb @@ -41,6 +41,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def repository_analyze(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "snapshot.repository_analyze" } + + defined_params = [:repository].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] arguments = arguments.clone @@ -55,7 +63,7 @@ def repository_analyze(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb index b304cb43c7..a1cf7693f6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def restore(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "snapshot.restore" } + + defined_params = [:repository, :snapshot].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot] @@ -51,7 +59,7 @@ def restore(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb index c2a024cd9d..7fb7fd6391 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def status(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "snapshot.status" } + + defined_params = [:repository, :snapshot].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -55,12 +63,12 @@ def status(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb index 35c02f62e1..4bec5a4c3b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def verify_repository(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "snapshot.verify_repository" } + + defined_params = [:repository].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] arguments = arguments.clone @@ -46,7 +54,7 @@ def verify_repository(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb index 0781577c3b..f615613bc5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html # def delete_lifecycle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "slm.delete_lifecycle" } + + defined_params = [:policy_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id] arguments = arguments.clone @@ -44,7 +52,7 @@ def delete_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb index a4e11a1c67..33fdba4799 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html # def execute_lifecycle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "slm.execute_lifecycle" } + + defined_params = [:policy_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id] arguments = arguments.clone @@ -44,7 +52,7 @@ def execute_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb index 6f49f1bb91..3dee31ebd7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html # def execute_retention(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "slm.execute_retention" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def execute_retention(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb index cbd8f3e3a7..d6b9049420 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html # def get_lifecycle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "slm.get_lifecycle" } + + defined_params = [:policy_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +54,7 @@ def get_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb index 3463f48a12..eec5225fab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-stats.html # def get_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "slm.get_stats" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def get_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb index 1801e72b97..cec2686bff 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html # def get_status(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "slm.get_status" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def get_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb index 86106c0d82..ef447beae7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html # def put_lifecycle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "slm.put_lifecycle" } + + defined_params = [:policy_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id] arguments = arguments.clone @@ -45,7 +53,7 @@ def put_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb index 92b091f26e..cec8014bbd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html # def start(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "slm.start" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def start(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb index 0fe259257e..65a328f832 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html # def stop(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "slm.stop" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def stop(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb index aa97e9efca..3223c0cde9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-sql-cursor-api.html # def clear_cursor(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "sql.clear_cursor" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def clear_cursor(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb index 5801dcc08d..40d7f6de40 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-async-sql-search-api.html # def delete_async(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "sql.delete_async" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -44,7 +52,7 @@ def delete_async(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb index a2347e9717..e565509613 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-api.html # def get_async(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "sql.get_async" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -48,7 +56,7 @@ def get_async(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb index bc7a91522f..61ae0b5dbb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-status-api.html # def get_async_status(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "sql.get_async_status" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -44,7 +52,7 @@ def get_async_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb index 90f4875669..0d9c874ece 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html # def query(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "sql.query" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -43,7 +45,7 @@ def query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb index 3f9764e75f..31bce125fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html # def translate(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "sql.translate" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def translate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb index 549c149c9a..f257e88d3b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html # def certificates(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "ssl.certificates" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def certificates(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb index c902acb793..0758b07290 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonyms-set.html # def delete_synonym(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "synonyms.delete_synonym" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -48,7 +56,7 @@ def delete_synonym(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb index 9af3c63419..49927c7ebb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonym-rule.html # def delete_synonym_rule(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "synonyms.delete_synonym_rule" } + + defined_params = [:set_id, :rule_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'set_id' missing" unless arguments[:set_id] raise ArgumentError, "Required argument 'rule_id' missing" unless arguments[:rule_id] @@ -52,7 +60,7 @@ def delete_synonym_rule(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb index 0873064ccf..9bfe11f4ec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonyms-set.html # def get_synonym(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "synonyms.get_synonym" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -50,7 +58,7 @@ def get_synonym(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb index 9e006a31e8..4cde607f25 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonym-rule.html # def get_synonym_rule(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "synonyms.get_synonym_rule" } + + defined_params = [:set_id, :rule_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'set_id' missing" unless arguments[:set_id] raise ArgumentError, "Required argument 'rule_id' missing" unless arguments[:rule_id] @@ -52,7 +60,7 @@ def get_synonym_rule(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb index 892388f62a..0ae03903e4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb @@ -35,6 +35,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-synonyms-sets.html # def get_synonyms_sets(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "synonyms.get_synonyms_sets" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -45,7 +47,7 @@ def get_synonyms_sets(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb index 3708af4f39..1817b0da65 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonyms-set.html # def put_synonym(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "synonyms.put_synonym" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -50,7 +58,7 @@ def put_synonym(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb index b079a610ce..3a295a3042 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonym-rule.html # def put_synonym_rule(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "synonyms.put_synonym_rule" } + + defined_params = [:set_id, :rule_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'set_id' missing" unless arguments[:set_id] raise ArgumentError, "Required argument 'rule_id' missing" unless arguments[:rule_id] @@ -54,7 +62,7 @@ def put_synonym_rule(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb index 076fb91d80..8dde233be7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb @@ -38,6 +38,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html # def cancel(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "tasks.cancel" } + + defined_params = [:task_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -54,7 +62,7 @@ def cancel(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb index b94d91bc6b..e5ea28eb70 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb @@ -36,6 +36,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html # def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "tasks.get" } + + defined_params = [:task_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +56,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb index a16ef69c36..dfa6dc4195 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb @@ -40,6 +40,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html # def list(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "tasks.list" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -50,7 +52,7 @@ def list(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb index 9dbfd23551..554edc11e2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html # def terms_enum(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "terms_enum" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -49,7 +57,7 @@ def terms_enum(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb index 1e6f2eea98..9be51977b9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb @@ -42,6 +42,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html # def termvectors(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "termvectors" } + + defined_params = [:index, :id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -68,7 +76,7 @@ def termvectors(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb index 56ea7efbfa..cff8f5f5bf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb @@ -45,6 +45,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html # def find_structure(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "text_structure.find_structure" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -64,7 +66,7 @@ def find_structure(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb index 0be922e61b..5e73bf1195 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html # def delete_transform(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "transform.delete_transform" } + + defined_params = [:transform_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone @@ -47,7 +55,7 @@ def delete_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb index 957645fca5..86b185d634 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html # def get_transform(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "transform.get_transform" } + + defined_params = [:transform_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -50,7 +58,7 @@ def get_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb index 72c8b5f0d3..5c4f992307 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb @@ -34,6 +34,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html # def get_transform_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "transform.get_transform_stats" } + + defined_params = [:transform_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone @@ -48,7 +56,7 @@ def get_transform_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb index ec438cd5d6..dffd9196f1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html # def preview_transform(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "transform.preview_transform" } + + defined_params = [:transform_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -53,7 +61,7 @@ def preview_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb index ceab00abbc..c369208ce6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html # def put_transform(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "transform.put_transform" } + + defined_params = [:transform_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -48,7 +56,7 @@ def put_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb index b05517f375..a031fb6394 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/reset-transform.html # def reset_transform(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "transform.reset_transform" } + + defined_params = [:transform_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone @@ -46,7 +54,7 @@ def reset_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb index c609724e69..c4a1514c7f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/schedule-now-transform.html # def schedule_now_transform(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "transform.schedule_now_transform" } + + defined_params = [:transform_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone @@ -45,7 +53,7 @@ def schedule_now_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb index d41773766d..6eebc7557b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html # def start_transform(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "transform.start_transform" } + + defined_params = [:transform_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone @@ -46,7 +54,7 @@ def start_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb index 42743b657c..ced1794eb3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html # def stop_transform(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "transform.stop_transform" } + + defined_params = [:transform_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone @@ -49,7 +57,7 @@ def stop_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb index f5b8e245c7..f60762fb2f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb @@ -33,6 +33,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html # def update_transform(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "transform.update_transform" } + + defined_params = [:transform_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -48,7 +56,7 @@ def update_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb index 22bf4c0353..b5e6509e3e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/upgrade-transforms.html # def upgrade_transforms(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "transform.upgrade_transforms" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -41,7 +43,7 @@ def upgrade_transforms(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb index 93cdb4b992..3c819b32b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb @@ -43,6 +43,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html # def update(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "update" } + + defined_params = [:index, :id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -63,12 +71,12 @@ def update(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb index 54d1d63102..dea4533e4f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb @@ -62,6 +62,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html # def update_by_query(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "update_by_query" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone @@ -76,7 +84,7 @@ def update_by_query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb index b34ecd28b4..753a28f863 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html # def update_by_query_rethrottle(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "update_by_query_rethrottle" } + + defined_params = [:task_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id] arguments = arguments.clone @@ -44,7 +52,7 @@ def update_by_query_rethrottle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb index 985ca3db1d..b25cf966fc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html # def ack_watch(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.ack_watch" } + + defined_params = [:watch_id, :action_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id] arguments = arguments.clone @@ -51,7 +59,7 @@ def ack_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb index c973d60dac..0ceb96bc3c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html # def activate_watch(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.activate_watch" } + + defined_params = [:watch_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id] arguments = arguments.clone @@ -44,7 +52,7 @@ def activate_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb index 25cbeabd9d..6684b81b3e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html # def deactivate_watch(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.deactivate_watch" } + + defined_params = [:watch_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id] arguments = arguments.clone @@ -44,7 +52,7 @@ def deactivate_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb index 46a19f167b..74d8859cdf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html # def delete_watch(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.delete_watch" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -46,12 +54,12 @@ def delete_watch(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb index d0bf8b1c26..a295f1fccc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb @@ -32,6 +32,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html # def execute_watch(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.execute_watch" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +56,7 @@ def execute_watch(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb index 565a6b8840..843bfb5865 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-settings.html # def get_settings(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.get_settings" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def get_settings(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb index f6d28bea93..13bab26cde 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb @@ -30,6 +30,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html # def get_watch(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.get_watch" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -44,7 +52,7 @@ def get_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb index a582e0016e..fb7199e437 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb @@ -35,6 +35,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html # def put_watch(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.put_watch" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] arguments = arguments.clone @@ -49,7 +57,7 @@ def put_watch(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb index 5a952ca40a..a02065c959 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-query-watches.html # def query_watches(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.query_watches" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -45,7 +47,7 @@ def query_watches(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb index fa71261a8a..80d284a2d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html # def start(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.start" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def start(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb index cea1d31c91..2a7f6d983b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb @@ -31,6 +31,14 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html # def stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.stats" } + + defined_params = [:metric].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -47,7 +55,7 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb index 5d2394caf4..853529315c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb @@ -29,6 +29,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html # def stop(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.stop" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +41,7 @@ def stop(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb index 6e4c27c223..5b710e14bc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-update-settings.html # def update_settings(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "watcher.update_settings" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone @@ -42,7 +44,7 @@ def update_settings(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb index 6dc2b6e496..47a259db47 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb @@ -31,6 +31,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html # def info(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "xpack.info" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -41,7 +43,7 @@ def info(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb index b15346c02a..567974ce92 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb @@ -30,6 +30,8 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html # def usage(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "xpack.usage" } + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -40,7 +42,7 @@ def usage(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/esql/query_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/esql/query_spec.rb index 0a28b94056..681ecedd4a 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/esql/query_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/esql/query_spec.rb @@ -24,7 +24,8 @@ '_query', {}, {}, - {} + {}, + { endpoint: 'esql.query' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb index 61751b2ce9..a1becfc918 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb @@ -24,7 +24,9 @@ '_inference/foo/bar', {}, nil, - {} + {}, + { defined_params: { model_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.delete_model' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb index 9ba80518b7..ef55c4d589 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb @@ -24,7 +24,9 @@ '_inference/foo/bar', {}, nil, - {} + {}, + { defined_params: { model_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.get_model' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb index 1273ea56ae..fbca8fbbcf 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb @@ -24,7 +24,9 @@ '_inference/foo/bar', {}, nil, - {} + {}, + { defined_params: { model_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.inference' } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb index 5160834810..cc9fc45661 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb @@ -24,7 +24,9 @@ '_inference/foo/bar', {}, nil, - {} + {}, + { defined_params: { model_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_model' } ] end From 5e432cf27f688f8d97cc136744def9731394413b Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Tue, 26 Sep 2023 16:26:45 +0200 Subject: [PATCH 080/540] Add docs for native open telemetry instrumentation --- docs/images/otel-waterfall-retry.png | Bin 0 -> 32201 bytes docs/images/otel-waterfall-with-http.png | Bin 0 -> 45854 bytes docs/images/otel-waterfall-without-http.png | Bin 0 -> 38114 bytes docs/open-telemetry.asciidoc | 79 ++++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 docs/images/otel-waterfall-retry.png create mode 100644 docs/images/otel-waterfall-with-http.png create mode 100644 docs/images/otel-waterfall-without-http.png create mode 100644 docs/open-telemetry.asciidoc diff --git a/docs/images/otel-waterfall-retry.png b/docs/images/otel-waterfall-retry.png new file mode 100644 index 0000000000000000000000000000000000000000..5a64515df1f04f70f9388ddb1019dad73f4d1918 GIT binary patch literal 32201 zcmeFZWmJ^i`!*~gAt0fMh;&IyOLv!obayj!H%chdAq*|uT|+5KN_Pz1-NTUY#r?Z~ z|Jz&tU*0e8de^fa)|#1%Ij`M&U;8|dQhH^1M;2%9pF|pS&Vq#>k9YJQ6Hm3LPy@-=!)YHGJM|;owY^gacSxw+o z8Y#A0Cln!|{F??PnlMO9k{p5uou!u&V|glpOc`n@^F|>d#xzX!pd@Gr64G|+8Zn^7 z(0K+)()l`mGLkp(akKRliB)Y(KK>-g@r`NleKZ*(c$ZO%QYbB!)`#;Hr@m!|e*8#2 zyFO2H1#hY6YTL5$=SdpHC-54LXPw(BW#P8Zu@I3is%NYqWa^A(r=$fhz>y^$d93yN47Ld=C})!~+VJo6)_nZ;8Vre(bUw=$pYle(;5B~$ZEp!t%kFPf;_J=$d=jA1Y~5& z>~3p+m*gJ5J1=l)YwB!B=5A|a=fvwSK=IcdyukI{*DMrdf8FA2EkL26@S02v}YB4YzeX>yUW+m2;|}{KtXX=(Et4Xr=F(n zmj9Gw=k#~8fCjSMSy)(^U$Xp9-au0RyKi}4Te_RtXo_3f0^I|YA;`}9lK-#!|FHa1 z;x8#R{z=LDlIvede=+@@RMpAUQ4C}Yl<6$^&(Qo`?yttb6Y{g%HT{>a_)kCo^)1lR zf)Dsv{%6nxADlmU^yA(=;d?UTB5&OhcA%)j+?iKiL(h)Q&Z-V z?3Z(KCSPgL(Giewgzx?9EmR_4rNW(A@%=qSG&28xy=fpI;x*y^ouBK{%@|sk!q3g~ zO}R>gcEc&pjkpxZ3X3LtcEX1rjg^Nta|k8_#5ew&E}0o3X#ybY(v)%*W15}8MV0Tr5UbP_zW8l$-`F<6p6wI z+c{ojZa3<}E_sPxo#bJOUR@8+p+9_>fUeRS=W~fIvCTom4N7EbNg^m=J6RBuis;GS z)bBpsp7^4h@TA-mCbP-zlEXOTJBvc;3`U`L)~(yV*`U&g^SFGzZKXb%>8a^2tePCu+8-*zr=nX;rMBwWR4kf5gs$r%Qa>2?n$-?y6(hoqfnFc$)x_-we#s#&C4ne z&;7KkOMOBC-$tDVN6w$ilL5a@Vi|R^S%2~AYD;SCgr8^YgPCGkLj8?z1_WiKfn&eNxY$o5#~qbvh{Yj z+}GA}swtXDjI^yoA%z@iZjW+vI2T>Dv{wH70s^lzolzY5F7W5rF0-9E7KN=;v_lcM7JdR1nfdaBjlIm!}k&Z+?N^>d_< zh_1+7)i%8m(J!w9yp?MlJFqJUO1BnaO5%HUb~6NCcL0g5;zOp_54CRc+q!mRr{RR`>o?z7c(q* zK_$qOQ}=YX$t8sGde@ETXx-sBt(z&b*5~yHd?phZDl&2x4C6`f^r`kr&sdRiwY`W( zp)pZ6m^NGcU2S%EDm&!)<#zVYY>m>~#&wp!IGu_%uZ=I#*fK_Fs z-11sE_XN6j?UDYN1IC+`4drN(NiMUWkowkFxL=k|aBH?NQ?eDm+ZrpM3yH~t*>zxU znsy{s*?J%eKBvpsrz1~I_xV{%HN4H|b(VsqW-^f0*D}CqAujsMLpdOu8pjSJ?BK=G zS~unK+BF%wnYUe)EwoX=Y#@!{_UbxPcf#k3RAjszR6jxDLVEqHTu0(&E@lua^=t9(8*D~lTw^J+68NWTWkx^z`* zjP(NA`KPk@z0!w9?|%%i|XErO?ndZ5%FXnQVn?#rOQ5BS9zE_m_pn zlJ2oh-P|4*6Kg&i!u0Bl)`1eO-Pkk-S->NxPWYxt8DfSHY1Lf5SW8o{>GiyJYPn5^ zyH!s$rCTTYD{&>A!5KB-m!6Px{a?5JC}-qvw&b`ZVyivzRG_)0$}QNKV>hN}oj3de zxLE-_IA3|Qp9fdYe=TA;e1b5P@#Dtla<#XtrM5HtDXV-kcdLHz!)x(e#Z+c6Hz>N% zW&54mG~d~#2JRdc=m^UllIVjrepH zjFA}kcAiizRK=uQJ@!6V7Qd$_h1B;6G3MK#$G1tPD8w^$ zwJnYMq;09=XzZ$EP39NZb7O&-0)J70Znh23Z zk+i3ig=6RTvFChLV>bJ^Wje8jP=U?BbLKSn(^hx3rG9rYNDNoAevg-~GCehN+PCAfTr%cbuVLIZ*bI#^?Hq1p8Wn+1Ur=)++xE=9$?eT`rD?Akq(r?;UBWNrq%$Hl`l0lO z&9gaVA`X3b8OXy8?jyxv(CTTXGUUy39?#k8&*zw~dkrJd) zMd}3$R+VMC2)_DNLp+~+#wuR$_vvNmqHyqFA2t@xzaZek&c1kEihxdBULo3`T$&NK zHpEOZZ7UMXZ8{llcr`r5@ePCPRfuIv`S2oT=MJ+iw4&WvrM#Q}ofWU08N<*x@*W-7 z18pFdFYhO~bXTH$*)A zo4im zB%b9tSkm6`)rq4{Qa+%P9Wk8NYCKMB;bXkE$r<__^O)P!pHUw^FQ0K-?J;e!Wj4^3 z3xCF`(-Y5ReKD;ceQ(4uL!-ioOUcA{b2N7vTca|C8JCyeJcO955yEUVt3q$y#Rmq8w%|@&yWz7KRc$^+ zowgN@eVCj-;<@$eQ8KWFQ9)okb@SPLy7x}NKC~Vx!Lbt~)<7K6{6N~Gr939$Q)Yp8 zlGjc>0yp#@6l)*-rP!#&q&VgTsEfgdnnKO=Cy8cZv>%W z#U*o63Jv>a%1^DU}G~7DjxL&)iq+c_Y_@n>TAg4 zeHd%&c00Z?H_sas{$4%M8t;n~JiYg_jx-M&CiRn%hBvnRjWPE$=J^H{$lJ-J*UYSZ z64V&7gHK%5E?}uU>Rem!F=8Nd{V9)KvbSZ2!(hS-s{$lht9vW+D&{636{E0#aT%2_ zC@woYI8}XZ;aeqDwoOxhp@j9$@mL0yz38dB5~xJbDwzLGWD*X1X(3R3(VcjC1SSN5#hL<|0#5_I+~&t86vJVNE47Z_dtV zO!_tbC|+CRrE5ED_`il!F`@nwOjL?jr|ZO2oe{*`Pg29A`n|*bidorlnS69cI zwYN>R5%x;`aarpF>2)FxU_Q~hrRwF`kNZ<}ovoBo6~sE@23aYq!NIlRp*Al?2mJJ# zwJI%-N!JWr3QHnttp=Hqaj8?+j;W6oF3!8zcc0=V>v#HWcsk*HKZuwh3+nG@9havq zoG;(z-YtV|S($$x)O^ZeDWJzb!(otBkYeeQ0TpQh*R@5sWnzEt1J9Y~n(LS~K6&>Y z3^=V%9`~0`=N!pqrVvWxosCX$ILo6Gvx`D3EqX%_0&x{9d=$9RYOZGaL#>8E?R)}b zdLJIs+e=}fr#^H(C|9yI5I(lDM$h~Bj=P1IuVX=}V`}eFne+BzD{m~O{Te-%uC5A| zT}+zBQYJ$^?o&Ba6q2z`o^i7ejYtm8CXK2X56?2BGu?@+1|6{0C9aZ7-H;m?y79C z;Btt4P}g^vYP(nFN#x>+W{ZnE-VPEstxqIS>E-^(QNUYbx+af{os~c0ZB=xCmu8Vp zV#R9+lPc+}^H;QiWgzx59ADj;x}{Rd#Uw$seG5vB7t_|6)oZz#864;EWU(W?Z69%Y zHPh4(qBwVcv9;M;RPr{k&u^MZO#6ogjx3~U<86&5oB7EGk$zdEC;2b?w*NkI*7GPd zOw2g=F~OvPc*%6lPwu%ol9w(SKgwE@Oi9KoyTq^sHXzf=c!+3J76>qZ@xT@w`p94X zwV@}#-cK=Yo_h}&N7@lFJv@!^exGpa?o743<3#^`%3sP8wg7OuOaTqCUn0l9R#<=r zPUsmUQN?R1#eZQce+3L-^8Wtf6p&1vhrd2g?+`?E5x^o^FE@(&>pBHs!2od@VPT4B z=xb)w-!1RR01Npn^;YPwjQ|P~rg%g~7Tsm{A~EQ9izp6Y!P&!e`5lKOi$=$Zk~ZOv z>lOK}No3?`fCbGhjQ3YZ=`Q1_E@U)ms!F1s)!#r+vM8K8%R7iTG45~Bsk8|qG8Ntw z)~e(0n5Q(_o#mTuR>ZHt)m@)cu>qYOwiE2g^M?f)u%It8zmfXYbGR!KFXZ^Oh=Qq?sON>327lB;nKxYr{QRVTuD1Q7RN?n->8@hb3 zGJpFaU0?RNrSD0i>dLIlTQcceecvTecM9E?YX|d%;}PAU)q1>o&)sC5W=91e48$vZ z;O!c`WN;s$>^{ff!6NE)j>JbZlE@_ZDr1A==?6ybi&(f@qUu9pK?-c4;WxfFa01Jj z+L}(|m@Ub46e?u_E}1z?6^S`ZZR)u7wkfd5LW%<3flK1+nb?b-u-Mx!e{3n)WR8N> zr5|#`r3!MEbJ-%w=8G50uMGxTg4oQi%pEt6Op{nG>r2r0M_x6Nr%Y2HTnGMO1Ko&r z8?>k%U>_v9&ACfFAn0M4kaz0B4vC2OQ%bG)T0IPli%Wy@$sElfJ}C{<5N_*447uf} zA;r3U3%Kjn;QjH!HxiA4uzCTE^mM_F-1-;j7H!41sO_sw@Jhp_&tGdX1^K>+cZ;BD z1Yi&_PfyHxIKHP-Zq*~UgbT9+(7ODO4^LS2^H*Y*{ZbFy zQS>Eqo@w}c&po|h$h8=M8-)AJeemA9*c5|zdz9~=obP9!_d+9J?o5J*IYOu=A(@so#;)$GIU ze70}Cn9sG~m{9l)+t+%3fB)C(hW7)?kx#$^Sdy3|2f^V)tgoLX--`J0xdrsKxNpin z3avM+^&>MDB7A|0eNDH`Z43F5f4mln>N8;JHvo_oGuIa$g#qC+kJ7)?eJm$Q^S^1; z7UGt|^iY??CL*&Qw~cANy_RMR|F03rjv>*Cc%geUzTQ_l(ht z;ox{_e&uMjD6_KjyLp~(!`dc0=V+Lw2pKLKz+4EO(LZ6-croCzM-FNh5cburr5KG@ zEmG6mW7UtbXw3EN^uGOKiSH+BHD3G#K)63d$Q|0keELOPPl3RkbBrNEogvw01Q)IY6Gln;lrNkd{2Ee4!Q|AhWg*%9S`2mcT%T+Z^TL=3bS|9$)|tklD zI|YmTZf^Xzipu8mp1mak@XBl;a7tN^;UC{4w;at-bRRP!MT}w8WZQ&Y$i=XL?24j= z^zEkH7Rq(?>I^@=Ez=ruU6eM|0;|4E_u1yQiBBG*e;-4{X_sut>oHa>39-?>$7$_d zcGc*8+IMu+}2)f@D-!m|P^0Wzld$mX@wHnJByDMy-Sf&#V zM5NM+>@TOkw)@HY`}sGWELABNh!S4rAg8Chy{;lhM8LA?yL8BGnuNrE2aVYd+uHlQtQcrihyikIAoN`;zq47M0#iiHncGRa zW=~kW+x#YjEs4j=QT&MXm#Q@KDOPnZ`{SBc<7j+jnMr9L7Y-h0NwhY;yH6_ZpeTgA zCK=iCNyWKe4y?PYtJ*HH3 z!OvBi3H!VvFDb&^+8e-33zoVlkvuaBxR($SgxlN->TYa@KSHCP=<| zr{4ROO>wnX_Ir5yYG?{aP@X&q-}f8b>^|`6OxxS=m973R$5)62DtT;3$JvfPUd5Wg zded!o{jza+Rg=at3Bsw{pCnfNH2GdQ)c@v<_EBk;s|4hck8Mk|@7iIl>-EnmCr9-P z?c3w#B6nQ4?dr2g=N}&)$1tbz_GD4_t`>p(UNX_oC01LGNGFo`^tHY9n-RXB{)J?7 z@@as7EBbRxZjtxbG_S|A4FzVD^huF9J&teTMe1eU88>B9EHsU$-r7BJ^p--j>$fK# z89A{%o<%Jjvj>9P>>?3kbA9NrIc#5eIEL71?ez}yH|0)Uu(Xy|?;BnR+8z$$*N!Qr z&GHD0hkZh$at`Q;XXx5el@rzNkP-_9?>&07k0xy)7t-W$+|?7`+FP$g3ogaK-@dEn z;MR>->Ua#kC!WNX0|aZ_PZ*yb&7RN0kCi#B4IAd22i)s!$u#SHzl;{Bs%(vyP$%^f z%%U^Ft9yf;4o~IQWA*1OEjz>Q?-rpu7Or$O#k-qEOS;8uVfN1%lJNpL!)uX`6y85r zi-pKNuDbpLJhcrV_7>Zr6l;AY(N#bk-E#-{8o$8_KcMQa?Ls@h@X@O9CY)+EZ^a}O zobzt?k$whM=Vlut2jLM6l5K~Gb;`tlSj{#&?NOtYIC@-b8YK25sFH?zhCj#AbgveS zk^IDbs_&l4g+iLI-5RT(yfrtLpp-yCMITW>oSE<#0CmgN(BqqoC1cf2d720c)x6Jc zp*;op>+n>`6?lo>kTGdxXLx{uof(#nN5Fg{ByIr!Q#>95|Th2YxEa|ps zmuY;M)BSj6Zglf|lf8kCS#7?MCDUHS@H@s2mx4TRpxVl~37&6YRm2i=`Eg@#}yXDB&R}c2R3b?AY zXfff`y;=L2N;*cdyi;%CGBv2lnH3vzR7~_tfmy#c&UPtRA=)ho^r?oQzG6iWY+_IC0~bX!Jb zXL17WYK|CK&9yiW@H?uFMGoPF(a$f9wHCTNNnEjleLGHgCYU97`y*(8C-0U)f-!A> zR3gMBW;oX+G9uM+Wy66^n>SlkOJ1LLl@ezL5q`WL`~G9XWUCa3S8=K>KI_Ud?veer zn%M(KA?;KH^javLbIOv}9y7Ui-8Ff7(m1XXzwfqO{Kn|zyG^U zgD7GSmCht-3pyd7m zl0M(sSuqZe$m^OtV<#^HzJUV*4GApiTGj zoGGPwT@6Uqy5`ceKkMIy&e;Q)_$R?aMun!BR6XY z6k+_{5slX6&j|zeSoo=VEw-|#8Fma|;{}E&Oc_OdcGY_qJLtc1HI=@Z;5Jb-iuS?R+V8;ba~GJ>Wb2>vCaV zxbv(%-2UJte172L?lD-gVG8zXu2jzVvSflfUY~yRc8(09kbdYaJCIi9?6ewYPafW? zed6&t59iuofzP!~o)|2u()$F~`-ON~T*Jn@H|i$`9jgO4pBjr^oR$oC%=nAi%(+*b zqGeuCZNu#%?%1>*`#g>n>06cX9ggB6qj zan0{5Zc-XPFw|ucJ%Kwo&^2mCwmB1o(U?AoPd2Vea-Uel!RLD(_4m=XE0QWVe>Mr2;G2W)>n`hhA=r%?{@Jop8KwF-nfm^0DcQlAw zb{z8;(6Nx)r=NyO}wtbhC6^8Zzm06>EF1G>q>{!35(2L+*$K+uw=`T^^q|-o3=l{W!8Nud*3MvbRQ8B zBwY??snM@zrJ7HR8^$>h6_(0uSRy6c9LYYS;MT+m)kW|-o=W0R3f1pECP&}85<|iBslZr2ojsTq$6Y`=Ffa(Ok9{cl6W=bo z-fp33J7h<^IZ`P}+{dfo)$i3@$^!tLa}WJ|{NMW|ObbBKvRayTp8sw+Q~@kkO)R4i zew)4l;!FUF_GVs>`Qh)Db2`A{J4aykyUb5G>j{9O<%3uVLVm~Bt{zJh3KdC|JP$x^ zCE8>>`ta`?qC$}`p4g^@meL$0ieiLyfgO;4uPK`NT~#>{c%J`O9|U9y7N9~$X3zfw z7Ka{_k>M%`Ka~0nySo?Ag@F?l+C(VzJ3{9#%mFA8#UDkr|30&Y$&P^OLjmf*{T*#1 z!%+a%$q@32{qIA96WRof$^Yx-;Lsw3$t5y(XJChP2bGY<`}?V zFC9b+<&23Due5y)I$BScqMp2x`c=8}SAPNWodp+RqxOzIz20|;ce=9STWAa0LbI=4 zqLkzx^_JE_)Voi`(RSdyPQvEbX!8>A>p6ZIeg%bAC<3G zQ|auJ87u$!71M0SI}}Qe$h9$J=|4Kn-=8)hE{)4``pjrzeb)@@m4)N@?g#iPNqD_a zdThu<7sgM}#0be_9QXE!y6EYFZS5!USYTef!9n9{Z__!%jykbamRPiSC_-j-|Eka2 z{K$mDmrmvTPS^|L0O<#_Xb%$n+qPr4YV@fhsrV3CS?tGd8?%q(nCW7?PNAkh)kE3I z>{ZAPJfo2Bqskb0&}daTn8%Q+uqrFnDP}C5Wgve=6Z~KLoDDG=AThu0iG+Ou*G@Xw z&es2M9kD-?$VFU{_+y%7)8gc~Y5 zCsz#%qpNop;sr%es02bF7W2)h$m(mR_DO_w`9fmcp8N0h5A-ZWh9#pHfe-#FbEJ-#^It~BXZ z?oMJz1h7b%hopiw-e(Odt?)H%LO#1D?~@_20_{B4I7OG$9(>ITqa1OxgxLKDUBH_Sd@Jg~hfrGK&SDRD$+P@A_yt$vnMo z%FO3DXS7It0xY)IRb@S4=W$Ze+1GxZ^!n2CWP=9ObW@luy$IRFOk~j~7rJfgnycG` z>SMaJbd`pa2&g46UaNY-JbxfldG_vZM>7oww4%iD3QS0(dF^QuMFE;Rj3f?^4_CD| zVOUp;*Qe?{&Kpt1+I50G2w}#Z5i?F39&Wp{G@6wr4rQX@j04w;=772pl-aX)tH#ou z&Ju}b<8!(Tt27$pJ>(uKRs-ahdOKHC0Wq(&ivM{OQc>N}2b*@#V(Xg1c-xoX2t>k; z*I8x{Gm7%y+hvdL@K3LfuR#|x69Qf^xmy@YcX63e)pioQIUBZR(&}>LT;2BkZMpCn z=_{(TQ;(_A^*(SX|6`Kc`4}beQNc#t^!7L?P9!KqwkM7*TeGTzEB$zTw&C_Ck^#5J z?wES^ymnbnIH7)b5zQp4@dYyNMHe4=6AM<$hBrq`%Fzduow=%a< zl4XiSg^<`7l2GwYX6e7Is;l-aZ$?H&?y0r)>sr$Hjc);+R5Br|UAIV%mqHD+T`}SA z?>H=8D_JE!!GCu0^lFH)4Q`+P?ssD6Ni;%(5VU=z2VzJI42i8t-_jg`e`=y{~%T&*kI0v3>> zQA{zihFBgyF`m>Cgq!5=OjfAmD&5K#sus~FDcsuvR%FkCl3)V8Dn0lZe4M0)kE*aB zqcA(L?mA`2T=*jr!?)5E|L3*UaTn!qxgipGz5o>RaM$!Y7^~8-UDCK*gV$}79^w{) zOePueoKoNWF#hVW^P!h~5h`f{>ldk>3H^b}iNemUQ-RUOPsmAXg4Y+#bo0L4GcD;_ z)fUW=Zh-6;ppYX4{BD{6`J$Guc8ksfe8v~M({(j7P`^|jCrQD}9Vg8S$9Sf)+6FVM zS(Bd6Z_L23?r_3%xzgDNli}}&XFeB449zR$6_zulpZKpwWA`LHbZ%gygbl5mKFUX> zMs7O;#yz{&jsy*PCJvA?#lFHy>wz1-qs`!KGsu^+l=B1 zpXSFbYT{Zo7DihsUrCCXnAJ-3SO6R_CirywGfaG#_-!{O4beZ|j?o<%8$NVVyMVQ= zF8h~r+r>0f?od@U6AT)7e4Jwmi;N>_B(x|O^-HNX?d77=sgKH*U8P-Rh>H&h5=tohoUlFM+n%>rO$Sz zOuu&xEt0glLV3Zr0c(A_U(uik)7H(liBELTV6ZyuR$!2psQJrW0Up%UB|6?7006$8K_O{TC?YA;g#1`oPgp)s`KVB z^|3wag*TvULvs|&V;>-$Pi{D_Oq^#yEN_u0?ElhKiZ#)vUiao4?BI+Z;6%7EhjR7f)FS=2(> zw58i4nDgNh_2&7xO6fw#-biB!SLe^<(|8WsX^pupSS_@+4Ox?8BU|Kw?bPs60P5_= z2Tt(O&8kWpxE1`+uT}b{sbO^y6)YD9`7nJ|WA(P8EHV7+&2@-P%Ua*wvBr2VlV4Ya zu2+r^SdB)bR`R0dIP)=Ml+v@&BIKlbpn%4vNs z|MBYKQ=iaTfT@IccvgA%r(2Ntugk^KU zt>DO~wD=4O+(?RC&jz_CWdFe6Bowt=UsrnZgmpu&Rx(p~- z&o->?q8*>;q2)5LM$)m*OaQZr-{W$3n4DsTUNwbND^u1+e!tmGrjYTFPq2I$BXsolH_|I z?oMY~em_t$fd;!6rm?(5;8u5z>TdzHm`u>OmkD~XV z&5@NJ2-_q*jB^jrALTWoR67SgQdKaZDBKhrff`N?r;A?4(Yv_4{dnv?+u1JJZU5-y z`Q^UfN)T*5IvDoe+i92XxI5Ob7eiM+dJoz-Y4=nyO*Wohx+Hl_A@;JN)PdePy*6e8 z3JLMP?z6F+&W=7W+?&Q)ici#!c|dc{YI}h>v*WitZd=Pc%_*U>JI%RU{|jJpzhv{9k65Rjl+<6~)UZ2OJ`3dg3Em25uA zLWn8vUoV(#4~eYTqQ83O7r+l6tzz@)*8!_)Gh0M`mx&a*`MitxWnI8!EAFbr^AkGR zPVGd!XP?$cJT29$?5|&tP#^M!czBQP5lu6#)79-gl8PjW)rHt$=}m7=nN#`Qcpv>_ zR|=swKJI%$LBO0su=`=Cxs!qBv%}n)gO-Ey#$bQbt?bm4cJ+@C6vi}P-lfuK{b8QX zqnc^%C%7}vC46=@@zN9?lk1KW0H@}?hz&Se^lyoosYdqL4~iP+$z+?==}u!R(sk?* z?KTVKNoGslqrTyu$F5PR!?xua`U0C7-u{G8=?XOihx~d%;Ct{rT`nWBsm}G!ygVz5 z#u#Z8Ix+C!?fsry zv#pSRt5az|gtvLJQ-a$39wTvb_oJUCeY2-4w=uiP(U$k3=>ra9vr*7s*VreKynAD) z@;-yk!;t-xD(q#UtC#b&W`jPwz9Mx5`cZZB4=oWER>stAH8Y_PPBJxA#5=9)a8l`v zx?}WLyJ<=4IyYGOO54rZZPY*20o)9Kn||dbo7qpQ{^k*bfY{O`J7UG2EiP^GTzSIO zKHQcyHWeGI11S{~V2BOY-Jyvzw$Gf1>2_^!pOp_e!yUU$HyrJp^k{tmi2|GB=u=1` zyKS{C5!+m--Ba^iI3~yPr}{{QrRVESW?UstIT}#CoUePvtS^j^82gK<`-7UGhQ6sn zeqWg{;5m+cHg5`)sUdxE*cTDT)P%9`ayC6_0^o@f7w5HbrWx1CDfSdPNtZzlbNeX; za2?p-HA1&x52KMDU$w0%B3`=!Lz?xP=kU9fmocrU^==m}6z2VD>`Vf+y+6y=Kl||! z{@5hJ>t5=L_y@WX&PMhIoRfl)m?;88-i#a?AD4Yc+|)gymVEWMy@RF1Q2j0A+)zeC zEnI#})Yegim#K78A(+H;FwT1QjtD}UFOrdolu{AXDweQ_f)T+)^kpg8RNfkSx$ufN zC8GJuCqxeB^6#OL+TQhaCGPnibEnlIX5x9U@HMgcaAJ{nf~HEbE;{Fxyr6^64tZPL{tTg zi1J3=wIka^N~F}cT(JNCY1-ML%=mJQY5 zz<&`nKL;u~el+dbjv201C5Z(AEsC-~>i7`PRi24JZkx*HcN6KVFW!3f^ZX@1!^9=& z_pu@*F;osAqq%}b7#LI;&9Sd77nR}e=k7dkSSy$RK@cH^D3a_O!0FD^>X2&hm_lGK zQZKPUVgi`)Px*yAzaU?2w20MF2k6GLkF%I4v-nQ)jz87qG1#}zomCHvaA}YCfd*5r z7vuL=9P|Gb{me?4E%7mA=QGlBr&3&^-WJK?Ayk1N z3^>F%r77s_8a6ZHMKhQw12M3O5{ATa021x|gy#c76Psu4-*n29slUsky4bk-VGzAL zjGMalRseI=F$q?$hR}fe6MMqZvy5#wGQhwgG@WGdWlq3j+ta~9Qw+KA2PLMT!eHZ0AFCkD z(>+@YbDbd(MNTHY6Cu7i>DIc-nN#lh9fs*|S-`oKzI(;{GG8P=*+hNY!(2|Rwek1@ z`^e^fVxn1T6OZ+ff2!h>wb~~;7JlP1g*ZW<`8w*ApGmrNzRRYOIXTjXMt!AzAIVF! z_)TpzT5FSJolE$k4T(_Q+7qa9of@Z-=2Y-M>(YP!{!ebOVXgvSWN8P2g$#W0wFR3_xA)Q-4u!S%oT!4*-4H3y!M{Q$D$ulI4V-hnZn} z$H{$efYfUtP2jTr$byiid6s=rp4<|)-FQ>1a|+QVWi!dwov?+t?mvv!a2MDBln!6b z{J$^ox)9Yz_!KY4ekJ0ztu^Is?N1XRn%!*ZFXiX79>W^nb{tkwa;v-q+`Mm7k7us} z)Lg+{g3Vlcb7qYr3t_P|GpDGep5I+kn1NMTmp<z*l>294qMr9(eCjIcSGlypd_WfLB7E&J9Vy>gjuGLe&iuzfnfqMX70Vy4|LImo|?9WZEicN&_?BM z;J74!TrRV}5mnV_Hk3NpC%Tc&AA`v>$6C@EzUSfE=cS34Bfzxgo-uyYcD0Pbxtn)c z;KGPbyfI9u{mqB8cZgt+kldLjxV#Z}gYYChS}`)IU4E5tDuFthXO92rj0k#-i=>7O zB=EC;DDeqvF+Z;DgviS>U5J@^MCc0;pi72dj#|>KEM|w_yT>zj_ges;S(L;z+h_fH zo|lajO6E!^e10$C6f$R>+CbHGnU7?l*Xr9o`w?@9pD3iW+P@XPBX9RC>^w&vcO);% z8<~RIU1n=>4ssaV|iSJS4HnW!L zhgRxL;HS*AvJ-&ACu>vT_u3sHY_bf?TznzHKbWKJGXmjAo{Wn%r5xJ#M*#A4xFY%b z6Ca?IofY{O>`nzFB7tHS;>iMW>5B;Q3M1ZUv43FC_W~yI0jwV~mxA>NKM;No0eueT zAIJ0WE1Ycr&o@d1g%&D2(%4hW(@3L(m068i1k=WI~%w-nmvFqFH(F_<1WcOcDwZ;p_AeX{dy zyq*B~roI)mr4&Jz%bQ8o#2~Cd&x;A? z!PUc0yu-P_3k7I`I3oSxvm_5i{h#0+E^)m^|Gh>r2|(+zU0NHoezz>W2Q2OmMEQU4 zLNao|v>0xj*J1i^$^Y#epd5ekrh2Tmh`-GUfC~YdX9)$B{_8+J(4+u&a=@ZDi$ec9 zmn1xl2XI@}d)(?D|9Q^-btT*cXvc9`?2zLBqDFstBeT5Ij%&fdMZXgRWO``dd;Pz+ z-loN*HP1y&yAbt`47kQKY1jV1VEm)(dx$N#p@|4#iC!(tNmV8Z1G!274!7OQo~jr3 zk$?rh_JQvHZ%sr%UeakZM+n0r;`Z`kU0l6`Gw#H}dRvEqaf}X${P6EzVwkkmrXX(V z6RWYmtLuT}b^c0-c+U*nTb!^7g$!lisTX;0fHXwH0DV`_GQGv~l zGHd5ocjZ4^N&qrN)Uf)gcg6N`?TgI3fAqG$f~N)BLN&JAX}*Nf2Z{-Ab2JS zFB(e{`TqUxnSIQ-w(SYim5iI16zq2K1GQzm-)DY3^#Y*Xd$LUuH(77_QDCIwleP^5 zs`-4$h?m}lMVCE$=&Enh!6q6y8d|kb!AN$(Xo0eapnu69Ydb0f*_$M4u*eM&ds;cm zYD_lzfh2G$T*u6ZZ-RmgG}Q4Peqk-JdKj^*yUqB=$`t;FFa5+u`E60F#{_GEPNTtF z?DcwSG-TwtD1&2ttJbGs(xO79tlHl+8FjLG7AKM0w0YCCYA?+c-%n{ynX_@H#oycV zJ@uY`U1zF*`QPIa;7(RzUQ?2pHiqC5MW7daar3K12Q$;@nQuQZK5OZ z!c;&gj9ie8-UsolX=T8VFo=7e?lCYVvV3q9UK-tG2V~pMJl-q$cZ=W-rjKLM?$K-L zkKqDD+nUuT4Nb$>Jaj6BCj11Mo`03&z$BdbslEj%h4k;GwItt0=&!9UX|Wwr9s`^W ze}Xsd`7LRVzql#P;}VdJOLt%rt~C4l+)49}hRPirH-}9RvC*OgK@a0h8Pr0GFE44$ zP)h&Wp4z1DTyb2gAAb*{@VCc<10&lJ#1NCM zlO)H31;c{31x?k~BU%7Ku-n7yHs=j@nR)?+J12Rgxl051{4g%94;Xnb>QtbYFy>y~_LPcXOj&__p8$ zRBwkdiOtkG)oHySdbGRa0f3_O!^M`A9xIEe)J|*irPqc`IuKU{HuD~;0fFm$limag z;3qApZne*gcDN_hmP(D3ffMnjNU$ zYk;!Q`#``zQKH2WElEmz+@sony@%?6 zNc!||u$s&ham=nZ++OdC`gF;cffOEwNFjI=2PgJ5RL@&4fkmHMx3Ps$==zm5n`u8I zySXpZa)&~>NN`U)eb-Nxmgrr-ow%g`r?|I{imH3xhXp}ElnxaMX&3>en?aE7Zcs|P zK^g=lq*EHCbC8q{=}zfTVt^rs9P)Q~KIr53@!xl?_aD}*HFM5k?|tvRulw59eH}L1 zAZPEjJ$Ru#pjTW!(QwCLMGD%ZHTbNY*)V-Z;~rJ4UH$Qr|G)s#HNO+nd8T4rzbkJz zt><=sl2nSgdDp~3UnG!I_EeXfd}aLZ-5hW&R8uNz(`9w-F}2@HY+8SZhZkdK3@?qK zm3{Q^U>;T?&>5B%(cBDX(4a^&l1P)|b$+uoP5iy}4`Q~=qy5qP*+9V2$(=*Zy^d50q`SbTP^}20xF4SsDcPefLORx$MA5&$$1KKIGJgcy+hKlRS=io z5;))B)-@{cR54?&0%2s6SzPLyDj#?<(x7ch(l&Je(TT?H=pdjf&_Vt5zBeAyC7$NN zDEnv*#8YPKut4|&9vv<~dAKna5#>V2ffUpNANiOutKyviGha)p; z#M6&5^-?yX+CQp2#!XGW_s?wIy9S5#wWKO{Zf5IiZ3kr?mCc^mV<_%5Q*A4q+_P#X?zOr|ic&vQ8Ug6_C@y z7w^kh&ESqRBP}xtT#ogD$7ta($vkDzL*!?AdTi$`aqHrg7O$9w}1vtZ6d4opfWW5hM<@@MlfD4#o}65fyGW!~Ib&mVq7~ z@MclC&UEb)R-sz)7hP7V*jjB`*#}ly4|JSKqbXnBoq)5+3t4L`>(n|*@(S+NCkuLN zC9<2*8%r%vnaRcn#TKg7!8hJH+u4p7vwh9VxtD_~_Lc#V22N}fblarNR6b8ewNl*M z+ud`P`N*Ze^`yI>8|QiCNRBMk&Vgrp#U?jh5~odkg8tz1B^{#}Eslb=wsrb{yrC$< z036?j%b$A#fqYM%;3(^Ip7+b(UtPLOrM|8Ay8zZ@fY;kKEOYDUWt%jjao^)LSiR_f zG-GV_WDlCwd9BVbGwF9L_fYY=Gz(j=!ezB?1w`Bdm}+Iqy3SVse9BVoU3EsZzW>M> zs0gv%vJF3U&Xq&t8;ak1TNiGnnqerB#p)-QBj*I_`eCK{W96(Rgzk&`px64o6mh;@ zXzP4N}!OdU#iUSaXx z83_Yq%w@8W!XD%fO^@L zG0N(n$$_Ckkr31o;HVMO`qFaVN#;6Jc~8YdU51S0%hlI4-4Zn&{y@oStBbrG`4q#x zT?jmqySG(s_*~mUN}dt#6W8a%h%gOT2`wch`k2wwxv3s?uOsHf%3d}R> zNE`Z&-5Yml)R~m0Q4<#Okb`~f6Rx@p2sz~?AUDab3PCox6Y|7wp;|fAdhRHI|Dq4G z%pO5G!Ja;imuXR*T4r})zvp}pL)-T0g;I44gYtB~kl}hvatFH3VH0!yd6abUgN>-$ ztjLOl==EgO!Y#r!JBszLMvzhYQ6cHY8 zgK6AT&24(+I!~Y)FKu}MIP=>iP2jg2%4db>G`u#+>Dqk7l7xe<56t8f!OhVBsVm8q zO=&4`mCFQ~<9+r-Fd>U z$}wtp`g<7;rHl)58s9xt2EerlgZq1H!hiy3{`)qnAQI7DP&Z1L7y?NO$y69)4Ct z#roe|q>#MZ)~6#Y85Q;MH*Ee5Zf$`0e+zo~w-$02C?Lg1Q&htFZ@Pv476j;Wv>D)k z)*t_qA^8lVw5Avv?w1$}^5LTX^)>h>ejb2VW0)BMceNNPN4_`0Unrf6S2C!qwKYS6 zZ;g71y$m&cEdr#?h9U_LqN>1$OvX;T=hvzAb0!(YFfNcbudUfx%G`anWh%4LAv@(b z6-eST@E?_-4>;;tpqOPNMErm1n}JCJo&}0||9`ziA|VTs`tdhiTaPn2mXStW(-ozH zQqcD(Muj;Rc3qqNS_Md+pZ7@r1-U5}C4umzBdq$ne?tI75U8kk_xH_zkFq=vHT?Od ze^VyFV*n8VT#5VdQ3mqhACm9?x3c`Ryxjc3$-JghV&eaj1cRHSfsm1BwEUZzcyP_x zWY!b>ai(ySU8e%u##^OVB!4}>Ee~J<9;{^lt+m_*n4;F`yEDIA_lrcJ5Cej_jh^NG ze+9vS1QD3(Kpn#$-098pZw@CJ{#KjvV`LpvME=qK>gxe=v}i|@{#Vuu^&6r8AMN1l z&j7{@@^@XxWSYe+E`H15CV8 zd(XI1qt3(bRKRf!E|+?)eY7J)e>|@(UZU5)Xz|@TB7M=I#_Qrk798^;S7V;PCL7qs zIpys1Wz9z2QFD4(k9q7>oVTZ~N}#pH>fLxQHE`gd zwD{xV!dTYZF9h9BW2d}b+P?&K}uijytzs?i<)mb>i z$k0Lkh-*?N2w!XtH{!(ekoVz93(i!Papk!we7!74{8NB?WVz{}BtVM;R)=F%(@a{k zEIS^|0%g=QhUXU- zD}YeM*|jI@ixMC_R6hbLUb;v;7b;;|LjCILV8H~=73J;}zW6yZ0s?Bo4!Ib!QPbKI zVc0H^V8ET5Ca3|-;CuztXj|;_9Xf0P9%*C{WISDcFXaQB?fe4)nk>_BsBY3F;WC7;CC@|mBQueGy>u>l_L5ptGPr1mJ|!ITfQjQTr1Mt(}G{ofT0c6 z=DIGZzERUEm7933kC)d~Se)7BVUF_46)5Cab@Bu5YDRtM9%cP*=O-8l%Z_-?i1eBL zm0lPD?nb3F)HK_@dVrQ5?Vq@AyqmHEFLoqigIm2GLh5W3NX<~FgB8yO5%IWF! zJC*c3PraXPxb)59D3OE4Jv6b*W=sN7xZgZ~0f)xxcMTk)eGQY0WlCb_WKz0BIOQkL z)N4vLjmtZGK2yMwP1@+eC&oPV)}wFXdS~>q7p+ymbCuPY+H?4`{p*%@w)?Kr>+wA0 z?3zuAM_~_`(da^sW3E?D9C_4j%QRwnkW}Tri&ZPp5YasrXU_qX$;-}xQnvZo%sG~8 z9iY4r;?tXF-^{w70pN*5W^Jx80HDy0UbhGLoY;MnP4zYcYP+la8&-h>>t3RM%Xn-i z$aQJ4^Fiq|zb8jN5|@m2>WU1m>d()jdst%gzcHAdNl2?R1cX1122|$KY3j8SUp~KI z_B|t!$__R*{=w2z1Lwvx9lW3u5toVJfN}Pok%vV{DmPUW3pFNk$j_6o>v-wa_uVmP zZ>lmGzSzNfOsn62s>ht5M)^E)phy=)qrYzEUC+Ew@ql57*Ab`i1XGu$X1!$pxb?lg z$G~GAe$T{|^=~j%Lwdu4qA5{78r*CpS|24d|6}2Y$M7f``6t~M=hT(NP&=V8V-%b~ z_iIGvjh%<|Yo0FRBawCrE8iW(YndT<@Ze4P#&cex4`FP>MP`|N9kE@8S}wr(tfuqk zr18E5Cb}&7{fAG0e4~dM25~zymkz>f*M&9eocv6xQ7U&c?oI)9rnJ|F+TdD}P0C-A zj;OW?ECEM8fJ-SBevt+(hlNUHsCJcfb?U|PtT%C%R_tBY{X(8HhhstaE;RDcC~vux zIFnFV@3z31@z0oq?Ux8gSJ_T+D#DnPeDf^C{|s!TzbAxlZ%&4lWI@i z^E%pE9arF}%@xR|QpN(lo?7}|OraA+n8(uxI&O0-f+q?GyzH@S^CH_93ojUEt^~|# z&B}9?%K9{Z8->r`)fXl|Q*JbV@!ovXJzA77J6>F8xjwEuvfK?avxmkh zgI;XQKEmghN)l?y>W=LdY@5*D6_R`vGGH}JuL)9*t95{OmwmXu+)-KREKs>Boi>lc z_+p-mfz2qQZ>49dxnqy#iLPt1g<}sh0uHiAbm7*RX!Wo8A?7^wVx`fry6&^tS`3?} z#*Xng^sL6aaR*FIJW3mkd0Ywm#7vXa#^ON4aB4~Cejb}CzS0p30*n>`AqDl~rlvMz zV^lD@c^|q0{~;0u)F7Lc9;j<76@JhxVIdTH$jmFTJigSqoI0V0?L>AQySovWt>Zdu zF~NIPZIxtq&(5KVQ z?yN==*j54o_$6v7iuDVRHG_QJoGg+8&L}hB){|df5-n`5;+O|ut5sNh2z&m6n$$p@|{*Ac%969a%8oE z40znxN19aq^>;3|ECb)t+sLUsVQ*%L^#}JRd0*58-+Q$C!GqWA1K{48MZl`7ez`E8 z;$x~fi~abDCITf8NpYExtBa|c{;hBZ{ptSCc}lQd)~3Cn0r@>%h?i23p|w;F1VT^r7RPsgcuBjwgiWmM$1JJN)etP(|> z&~(vspSEGEnXJVw-2Bm8h?(5SApCx4$$L!x#EHde3z|$fC&cmi?S7H!)ZC0?7)f?Z zrQdR|YGKxoMOaqkX+hCxiFn-F)x}jim{4V7vU}`se4$5NhFiVyIH9u4_>`1(eI)$K z;vKHd5y)!r{a|rCZ`0;d^4unjhpAw!kOhsi@zpz0Hxw}|!Z&YSCJ#pphA4Q--CYp2 zvl`LI=c@AgHFROv-|679%V!@jQqVMR-lj}!a>3$e>P!{yY>E{{OECt$vXJ;~$ z1qBCP768d_^p<}wB_4MVl%jc3z2|F~p`+txTVL) z4pl_EJ(i3;kr(^yfR#Lygo8j}q-ENXLIm>ei%38AaK17cXlk!URrcLfcDY5Z*LbG; zamlL1<{B>R+phb7d4pTc;c+&0cUUX#<|g7CH1)+HoFA@$pbk@Wa=I+g^KsauYe zv!;CHK5`haHWQQ4DG|HmwyAW#8bM)m1dD}d4b4oj@b9ou;O1E&HYy*JhS<)}o*iu! zLU`r8&o)4`6pDr7niLAM1yaviTfSi-KLL0J^n{RK8?X=fHTqays^O{=dNxN>p8kSO z0+~QHWik4xl>7Xsqi8t<~kb_KnI9d+(>5 z7Yw$);`-4R6wP{wUA`Q*N0sf=yE;;i2SX1XbSPKNVpzAJ_h!ZFJ zh}I>r(MY3a9*D-xb6)WJ&vVMwwucau!k6O(`e50@7S3A*t2Pqxb03MNotJ3M9lx>k zgUHT2#>~cFd2ZBzye?Nsx=Dlvq*&8VV{xFxqaxV(&D|JN2WJc2zSZ+l(p;XK9@EA` zS3^(mAG@9vfL<1#ZE(B1zVb3-H_F41(g@tRlc zU+PRrLomMJMMn3hPILSBa|d@Kb%R+WHoijL8DJmI&fn`!tIbTWta7ll$&GQfNomvknnBN@pbkF z$_~Ihr9UrF5?{PKr$4Q04MW*@Dq6mGOxq?Z(HLUPeK(&p*Of)K?6Ba216hN9v6kxk z0;IYx_3YC);o0TXf(CYR;o0=11lVFkzICm zgsBZfl*ZKYEjDVX2GpZPH`GZEKos9iXy3_5t7ksK%100hMsvE%n$do#7=T4SsJ$;M z9*QRr(9XqT6~SIvZ&BE-Or2>W%LBbcdnsR=uP?;2yDBzn;(1>{s%_yhUQ0#4xnH%s z?&Sd%X+QtN`z4JXec_4+qw@A}7^K0N4nQt12n_s10}YIRQzb75haC9c&N#Xyx=HL; zqege?BNPVLF&GZ<(xl@ApEyAKxq4r3NV3q$J)kli13moCx!Z%Jq@j=}##o;NXXfg5 z8oQzvdIqzu*?mW*#@T6Fo0vo~CqTK#4Rg?S9YvaDcD6yyz6>(FuCwhSyW$ zooF__(W|AdATO)6rlSt|=pJ}kR%MqNpjiip^`7+*UYvC)R-Wf_K>e4D2wYk*#5Cd; z;?F7)WR&EenuYogL8XGFrONXrFv7MbpUiAGbQZ;BsK*WozY`(%pm3j9P2|7QZqnnu zaFts}iQIUiE%XNFN+=a9m%u|O1!BCKsj&tfHvDLc{5am0z|1LiA z)b8vIyP$73Ck)moDtV<#r72jv;O%Dx!IDUJoky&yh8pzxCqW9_bj8DqY{_bHtaaym z)`Q5{#^2oWysw{>s!plgul!lu19IMS87NSIm#W{ezF{`0*Q(s{8qu4mZEgmzOg{ zwT@Z^&%UV*y5XeI{Tb86IZ*D3t??EX);yhT#UI*#iNaAz$v4u|j2@x1BA^wn&+$x3jZs?1ACP`bF-nt}geLu3VM#t-y1FtFd> zQ^?2r&52Psp&s~|vI=>m_OSq2jbnZmEe8-G02j)z=rT1ZJ0lQ35oBzbNAmlMUz~T8 zbh`A+hgTevHekx4M=5vLeZ;=rcPRLvOQWFhwx>wZBA&ygCjSVRo&lF9QlDZB z!R5rHiX616A%{eij&D_{n%?~woc%RR zV-qfOU_H;dA2Ly{?XEqStHAq>yGWs;>%U^5TgZxl0Us`*7~_BKByagD0FaEX|3OtOJ3jgORUE(6!F95f|WR%*~`5nhLX59&W9=zm@Q^ZK{~t4rsykZS>5!LI?%2Xvd4eZ z-;b|PAdwQJ|LwM$Pdx$e}k=G3qYH2y8YvlmOuY52@Kzo znqxXoA^BBeNfWVJ6)ETybM&Rj2;lXp zs7~HIt?XdO4aczhv-tqEs7}*{TBj`8BsIV$3R>o};MIvJH&0<;(oSL0Oh^c0KTZ(< z;P%DY6;$F#owf;}Pp8VpbuyJZ9kR?uX`|xeR_QIa018y1%6g6&tx1TQNsB$Y%4$Z! z#N-1{!^J2me5)F*sE900z}+#Pv0%^=ox*?x=!>J;w1Z!o0zh2Rg1YT(TXL{9Ds7$0 z{XIK-!P5myE1$q@;h-*6m`qe=@B?qy%#F|EBoM*B6q2}Ft_Qrrz-8dJ{X)^ys>W6J zzLBYVbWzdMXikG>V_J&6Ss}fMTs3I0>h}VRqqObVUgj+r{Z4&mZ;@s>r$K^u!+GND zbI%-x0*EI-t(py`H$K%r`ZSiWJfpZ`0cm2Wmc8)f`3^naxzd`hw4e&-=hq(KEsV3A z+zqb(`oq{^-aKtwFXg0qyf@o=t{Exl;_6I{OuP1lT<<`fkjz<1KBTl%fr!Oj3eIU2 z3DnYdt;8S2fzS@vpeL9}D2!^rTHJo>;PglA*5BoCSj7;p_4*_aQIRA|^h~3Y-Ldqz zc-d*!IUryRFXrl96jtXODN4bDRz$0U$hiV|AM7p%kJCn^kHRJ(rp6A4dn&X$nc=de zO{9V<9U+avazYo5i1U4x<*FIeu9Ki>FfsvJOkyF1CIzIF5?x+ycqw26Oi0!I7>{siK=ohLjgyCiB=F)@>&fuy zw6@?BkqSwDEKnu_vG1lK?uqHH{$$`^lBZdoQ?@qjYHrl&0*8YjNwvqZ4a}^zi-chl z%z(IpI-Et5f>?KwEf0nkE!o6tztcC9eFbr=Gn$~H7Q09CbZfdICKc)u9R{t4EuIl_ z=+4CEw3%WaH^?8ch7k`GKut6t(M6=m-zSP zOA#+6Dv?PbFdczd%}7%GWAXLPBBEzxWZi;fiRq%$@x=201!QYA&zQF+#79PT$r&~Z zYCyI5uFnoUaNR7v7X@Lc^rcjT0mgLwYqFQ|bv7KfB;j&;Sfi21X}zY{-@hczD<-m* z-d-}NFQH6`W4F-Ax7)yfd@gOjw)<**8u7UM;%uLFtK=+OZcFPkbm`N6JWUvnfXT%= zE@J!4&)#f7dU+I3vUQiKZjalA+(H&c-|Z0ttabm`3Mmqi3n!KnB|#}Lepk3D^xLN` zSbB4CtcA=4DPINl2Jg0UVFJEMq}N+*J+8!QeJndS_8k5GAqN?aq*NdKALl$ubw`@lYuGd6gC2@`&J-^#xvHfY zJ=LY*_YTI;k~#R%%ud%Slng zykTVh10mp$`W|gf_c-}M?DA#g(Q6L&;6YDy<;30&eYK-X;4w_h&jy@fNAeVJhpRKq zviyLA0ECt5GiQ$~X(pi!9-igzR%uf41F7q7qVF#s@x1;d)3k4`S#RX3gN%2o8d80E z(a3K*NNV2r5uWbnp5`ae2o4S5hG?5k6~~F|)@`HKKwAQgf7ENX5Ydq%qsL%;ZQMo0 z{By6HlmlPMH>FMpd#_{A%t1YOzyAOm1NIrry=fXWXxOCo43{6=R1No6nMU#r&A>m$ zCpdf7zEppr5iSmK+YYAPa0&(9g*Ge|JOw4Ox$Klt;V~Z3$WL`htX-AI>xMn2lS_^X zs-CCe8}A`y8nmV@)~>`!=>QIaGccdMpmb!D`U5INz>!C-n^dhI*hODk<9@&^79gmv#k98apxZ^s?U}W^ZQ>3P~=`4vBQr^jbs)+3b2x zaOcZ_7kvVg8eIbA)=&07`p6EK-u>3m(c>a!z%mNOo^)&~#SYR{1xG)HO6jP|Im*)2qWsbbE0Z82BaW9I5vk7#lA5moS$ zC|QU{MpKbh`x3TxotMyAKI>`kG_CAYt3s#EbEysp%MM8WV24V49G*7(7PYPRP8xbv zA~-Sec@?!<%6x@qnxh%4=0L8f#1!g=c~@RC=rlT3_+IzGG0(%Z9Pf9@3i$lS>fJIO ztD`1Kn9GG}DL_elNKXrkg{cExZ9D~XZm@J#dg(RJrk42l<__`-GTr`1YBnle#u_H5 zX6iQw$k(rvDAe|2Al%C;V1MATUk=nX`=&2A@MKXoy);iFcs!Wa*_GCf%O=US12)C< zb=f!bZ`{6$_j^UJe8)_8Dpp$}OLF8zZHOcN6mz<-lbf)Y9Z+S`g_hp*u`-FSnL z(q8}|R)t=O_%}0f^92P5>Zb^bUzb?YEm}!Yr{vH{!JP-3Z#mNEqx2o;TwaFEspv_r z2pi%{`|J$1)slBlKGFxpP#fyMaj?7=Cwz~e{^wsyMtOT;-)e9J&Xex8Z7iH=j9ZM( zL=epVj1A5DD$9PI7)e+o!Mtap>WC|TNe39Ud=?lOPq9RgPrc$VlBuP`0A zCZ}UA)|&WQOZ?uUx4obMfs{Y!jjO9ITL->895W;F9U;sytQx4m&YdTAjJ?n&kI>cM z+>i7#LSYn3KT6=pHa*6IhsVzse7a++igJ#w<22O{mz!4utQAYsbdq0CTp}|ivIF%9 z8$BJ~(EN{uP7PCdVg^036Ys}~nvjA@&9nZI3i&XhJRmarI3q!K({atRK0M5`V8-1D z9%@FMH0f(`Mi3+T8KvURy{#MI?<;|t>^=B|8#mv?XeB{}l2u6R`e#-6wwL15&MBE9 zztFZ%w9jQjz=CHo_-B1DdJwmt0}rr7Qz)Y1U63z{+US3tSD*f$T^aZ#CiORZ6zBq5 zR7L}#r+lW9=W0Y?9QEP#oX22ZJjb@8&ZCOlae6u}2Bst`7`x^x zRD8f$*h?94*c?qlQE$Gl?C>Vv$bWp>2m@Dddwz9#uRWj?T2ZemU*LfkArZ?bD})Pf zc19k48;G49rT};Q7FJPT%`5rqvN1gLV_%^$`;1kWM$E_?x@=50qEwRho||*)tuHB5v z@owVtDg$GYAtV`XrW*&DFFun4&-9T+m6BBnPOEIX^)&pOhW4{LV6L8yF z)C8j;M|u4bTtGaPV0JhT;K8y?LM>nUi{ACRJp>%DO9=Yfir+<19?(y<9n@^S?9q0u z_xzwepskzrD@K0a_2+v>@yY%Y?(aSjb)Y`qvvmH@+zVRfJWogQ3R)+4haUT|w)_%)#!DRPsPFW3!N*`9b>pLZ!{Zwj82Bfq zC>*>EvCM;dtYCBKemrAbf?4|~E~pDQO8|`usFNTE8ucA{*v;oyHN4u<#_Z9Qz}&?o zLhOXkbOn<(Ja%Hjlzn4Ym23SbU~uZe733AS$DuF}`t^CZn{+vWN6LPzb*#hHJ&q=K z*Sg2}5v9E;S-@Z$Nc$>~Rb8wcIt>8#)W{TzGMOW=angVm4I02TToJ$CLvn_JvLCU{ w5?<{vEH}C_zi|-14UdVr$KAM|lm6PK7O9qSny(vIVIXT`ULSe5W6w(^rdF&BA zs?XMU(wb)2HFX3nhDB|59AiG$o>WRY3UyJl2)ly=cyr$WCR6o2GoF6rS*9y^nQi28 zjEDo+hgR87jzSxukaU)&TYhw2FFr*cz6HbgyTq-~V~v-6T1-P5_4FWCjloDJf&y2_ zd_(p2lyR<|SO2wOSg_c{t8ke)7MH)s#%3dwKc|MvQ}kh2gxp@9Qv2@)?HG(;qR*Xr zm@i&@%-Qtip{sDgbZba^^HgHtvCj)vfrqDFZFmoIgj75+aljZSq04QJlzr`3VN@lJ zr?|&!<~Gw&3<)TOYg_07ER~hfSW(9~Xz1ZUG%VB+I_g7)`kw*G*ShN!ZNMp3~Ia z@r?zim%Y=^Drll!!l*-g3pZ05FMB%&S79$Px_^}rMjijW%tc4@uOe=?VsyI7uV|zk zT`Xw$IiGPpqZ7YJLqj9#Vs0s{E-m}->Zmg@I%_vKCt)rwPft%yPaaN37b~vkLPA1Z z&$zj`xj9fJI9$CQ+)TYV99-%DZsdR3k+yI(a{)TJ0UaG^ezt4+#?jqPjE?SSNB{fx zx11JU!2k5*;QH@jp$5qH^A6W@&SzZz+cv7I=+CRduYg__c6!o4dz5-meTeh&3W@%! z{BL*u)8j8Sb^lZI`Ey>LU#tFd>%XgNxmvhLIohN8bQAy2)cm{huQ&f)QIzZF(0@_I z-+KPnRg|K|?}>8#@1%*}^M3!L84XPm4IuqO(+hoj?yetkFG=UV+%8CQ7vx!R$|Ms> z`A&lM^XK;%_ws@?(Kl&ubYDoLKSW0_JjEX`3!#zUmFW(g?-Aqt;ZpKe%I_&s9%A%oT5la5^>k9^!XA|LnUquy?ctX>( z+{YYKME`q>s4Ce1pRe*B(P!_;cRd{ z-gx$@m?Sro;}1p4Dlf~T!&X(`%g_v4PUEu*E&wDbl#1)m zBYfH$oYr^z;{~1R2GYdJs`x&h{Ay1@1UPTKP9?nd2ulnL!}_XjFtN`ip_mz8mNvw_ zkttQ?kRMt6U-Dh~I`enk+c{&lTo%Wu`9B?=4g{`@WQlMGj0@B_-sZ|9Etl7j2gi-I zbXwsKejEKc+@^z?=cfyS^hPP#Uwlq+H@SiD*rx-Au|3?fvAvE!Be2yt7PZy&I@6K1 z-Ws=F{q>5b95$GeMA{er9Dj~W0*Yv-sL_gf&eoO>u~0?+>CR~F0(2_>szdkY#)EZ8 z$M&%sa^{#&=gX8k7u)6MY2U5l>)0 ziO{dv9qXrX!jAn4?PlAQPqsxiY(}mHbt(t_{a*TRQ;Tp z8(9e}QKF0~<20^O_drf_rBM$&RZOXhyKpa4%=h85cZ?vd4M^^Y&Pl|=T~Y+wBo#P^ z>Nntn(kKr%Nyb~PNC25nO=ErP`-baCUCoCYvMm2nq+l_s`CMl=^=hdng2-I#RA3?f zI3?BJq{CTiK46y~sM(P`@mU{Id2qvwGV0Ec?NWEMh9eAQEMsDufAmOy}{>t2^ zY@1IkyvD*?dN7f7jok$lrX6nE`IKdK_)P z>LD3~Fl2oGRliQqUMTP;Z)GS$aYppGiPE@usLtO+>Dm~d@0V2J zGT0z6#U!ONo<5L*2d0GWU1LEski?T=Q)HuW++TX^%rMW*Z&^3GZ%r6;$Cz`wH`qKfKLelNPci@gd35E=W|CIZs{mL3 zso3&0!*K1tXDS8sb=g>F5@CDOU3ikI$*waPpc0=!8}b+S(^d})l))^_ZM@vs$XUE^ zH0|(qc~&M*imaZ)-Bzn!>XWFE>U51|11Qci{fCi3<8ES5kcbD4x$9x`gsJTeycB+k zSrCx5RpWAueR#O+cpVc7e*5k0(0ti-KYEG@>i2|Oj1k&^q%I+evDf;v1V>m zT9m>RR!-+{96H^Vpb5psi(}6A`!@T`$i0-{ux#x+uHt^f{3cJZKzava*#vGDig% z&_V-K$^GhSb`_JKvNyY0qe%u#4kc>AR^L~iQN*hdBy&ChH z==5Tyv*z@huc{3k5z4zfc%Og)dD;G9-!oh)I!=Rrpxo;6_{8kh`f!|9QR-py_32!T zyvOz|J^eS8hOYJt_fkDiBa^B-95XvPBv(v~Q6vp;Y6)j`YtICMSMGv59%^ z`LNBtn;7tm(-`xzbd?4eo*>|fpJsdDxaq!0EY?9bs}RpnU1v8xHsTR|{T}xLtW<6K z>VpuAR9K)5#&WQP)XUbLtQK#Xe{8%&ao>J-?Sl@Ew5b;=C=@BBnXi^kx=b?|8a3E8 z8%^ZNjCI_MUV2BH4<&1DP1rvrL!0Sv?C|4pPoG;$Pz{q0#XeqLjtL(u0BD#Wu5qY0 zALNg4b{~~CyLYR1*BI|+XW2`>KtQQ@XP}?#N|sJ!jn_AokE4xz!6utxr#NHobrgbL zJy@X!(;1%rRUrFEJuy`YF3aD*G+#B}^gaTlGeqF|tPEH8&0pzw*JT>%z(0X>^c$`1 zd>?HNE36KE&ldBc*M-m0Y$-S3#~~)K@!%>*y$M8qZo_G0C3Ui}8z?q%ZR+PUlHKsa z7r(^Hg6KO$y+~7yykMrmKLzh?({BE&o3`=X>)Je!RGsEi19fA>xZ+7#8_(mR!hAKDdp?0#RKxood2stX_Ntv!aDYqZ?iSz@LH{^ zkuf>jPlI8YAuG?>HAckcjeSp zA|^Ta_LN-_sK?9#)TjJOIh0Z#Ln+8?a^_=RUpac~BCN7fqej=%_ged@&OtVnK7E*< zb*M*6_KDlM!T8d; zxd6p3cFR{P5{PHAnKITNu`+7(KQ81S;oL66W|i=(suer+G3tQk=iu#Z@;#Yxr!JtI z|8={DhS7yZM?4EDepYWY*?rQk*XoePZdmtS+n^)B$alHeaXg)tgHeIF@vuz0gdN(E zL3??+o5EqxFyoyi(!p`DnuvPr9(X#*1G|D{AI#a=fRH*@yA03i{GY|VE0QX#9byh z$BpGWGIHe`QptTd`i5g4BUhJ<)iZ*^@G~G87L@G;Qb~2zglbU&CaobUj?r@7u4YK$ zW4|&D-}MS&Ua4jmWe-RV-F@b;;K_`IGXzra0hI)EC3Zz4)6DF@c>O0&ii~&fzb4YDZ}k( z#{JuCXRo#Xty+@oyd2WvjdkO2<#(D#nctpE-15?F5K~$ftu~Q%mw-TZ)}2gV&Jw4a z;5|_>_+QCdX_e@M}sW)c5{rl{*c~CW;BIOHy{1aJf z&q~$adlef#v`K81sc{-dMc-M->U>r@40%UH{U?pZg+C}_ik>TrQ-A}P#3zO`s(i(= zizo@0Pos<7c?m|g>NCuz2kW^fA2>s+JQo5c*UZO{>-#=lIwx{zj5lbd_}hg|Ti-C* zH?C=VGidn0ePvRF7?XQkn843^JI%jF5HWjz4|#LH9%nuhIhjLddDDWn{&(ngk4BNt zH>z(D?!+_v*~xba7JH&dysqclyxHW(`k)OLO|Jf|+SW3#`>MDub`G%5#lo4R*_V8u zn$wQhf^n~edZBueBmx^&lX^NPQms34FblF@;|D?Q3? zy2O$)NR034f3cud=3_)sx`( z(v^jZS0e-7Y4Qq{X&kJKm@@M*e}LYXBs$s3AK~MQNzN3i8E_y{8l$2bc}9(NUP}Bj z@uM8ES?@fZX?kx5HEEB*j0J_dKQQ=5BUNmD>(?XJES-IdH~cs{(&e;B*wkOOwB6+S zR|!COx+opnJunYBXcilINLMC-Q73dRVLzHmjXUA$1I!@K|k0 zMcwpR*TH3MgE=ZlYW)Mp2z+DLrpKF`WzRl^Cc89%9 zm->S+mZp4!jD>SYHg8`vlQAq)Y35Qk%9t5eY0?Oj-9reKBXN)|1h!)3;lBn{&oyZF z@YzE8Zln>(l^nK{rJLzfxZr_=^Ef5`+!__t%xA{x1@g2N`VFz3t)59l%qsGurxJw7 zX-JicNy#f(JJn(51wg|Ja3$+rFs|aCwgT^Fx%j|_s+qtz1G$HSt{=2W z#XeiQe&GQ++}4#s2)t1s`te_!yRo$f19aR>Id9_TAi8KpH9}sGTGBNd`9On^8oLq*xYTj8@zRR zb7JscKq*Ai&Cgmk!B3{+pDOwc9DgG+E`zML7@I5X+3Fw^>?^G}YznkhAa8q6;Z+wI zhe7iQ_6VyED}w#xB7G-rWxO18nnToL2#YFxbmcSNnU9SM0C>E+m118>q+o`BtcTUE zxkXy)Cko^Jl&1n7?rthV_ESkOmt3)?#Ho|coV zF)A7(5zjBGk>kZIK!``1*_x0Tc4YeeGvO86Z{^MW60z7MWD^yp)W?);+OKCh>xA3t z0V!Inseqb7MW%l_ujI8w2!)6+v7+y`*ZpllcTWMStce3fSB)weUtparRNuvX$VGLO z(qH-_h}O(LRt7ei0kpzV()FvC>kY~^+a@d#Fb0w^P{&Q3s;sA2oNWO3xuV-)RQg8B zmrEH1u#5f!s~kIr!;%e+k-80{#B|(dF=F1IoIutSM11YA`}v|GX$+KgMG#aL74$1U5hdEwP1BsWtB>hNnIj~meNsX zcs(&|LNB)Ck@Nb6COfz*U&zDlY4XYUh{4Y229~qq0?>w!2f{o@cg>IU*h&f}AoBf_ zs`O}DBSO5K|G)fz4oz}1X|u?aryuZz%k!iMxbwW-d7WzCoIe_fr460acikc8&>qB} z)^C0T_{;VPJn7aSE#5u{e^nZ*UkTretwezt@9HA^&V_rVF!9LxodzomZU;YR2y7El zS!G|AWxrHDD;INrd5__(cDS$qsqICBw_BU|mWa%OdG5|jYX3?Q(Cukr@uT!z#)KZh z5>m@m@bXr@Ep5Xp3ciRJ^;VC;4V}E4J-^?;{A%ywxHcEmc4UY(nzFJfnCWdQ6h6|@ zezCPVGs)aD_x!f5G3sP$JSZFAR>XfT^SQzr1V$1w3Oz26s@_S>P5g2F!B?bxtkTyJ zUi0ABj5_U^r>D|Dhz! z`ygK@=6;O-+PmUNE6}{`%92OMeMFU!z4w4pNUbKF0a9VW8y(j-`r@D1^r>Rd;>dM; zq494hwwf{@|2o~HlXU94k0131P}_tAg@Yrk-k;F^j)NOx;p}*I znLhl-{_9`G77-|1-S7GVMErMII-}6KD7ggLU;g4t{;fDaqoBp;svO#xe=ID2BN|>0 zQG(nFm-z?2@vrqKsOmo9?EW#2^yMGq=Ryh6w)h3-*Qxot*q%Fjh)8=tm^JkuaP`Waakg6m2gZ%&hr2SK2i~rY5nxvtLBh8--gd!MpiQhkx)yiNrQ>R{I{v43b zTT&}OV$wvDA>il=@?;uJh9m)utUp z`@b#h&F9W65l{0C=KR&NsvpIOhBf95HL8F;s z%mR+{@k*r71=qHV*4P`WM1JKhnxUpZobIlSzn*@v8Wku1PRjcwW}-?5KC5GxY?W=x zmB8fBLLIPI`S={}7r?t$>(sSP`0fNLL31r}AxXwpO0pz;(?B!0ler|p_hQ~rO@H1| zPx$?dgv`6@mRPA zBy%y&SHL=O!1nj*cbDPeD;SH<=op=TEXe?;%Bv?TG@w%n?0V|J@1LTtYW4(lK+Gyv z9D22u&L9GD=lvx{5w_6qPMbaVW6;SHpIjq3@11F8a6mv3=3RWiu}#e25LbPIDzj2@ z5*th*xBJdYTCss*dz-i2o;`$R?{;P+R0`WUD*EWRu6Kscq`V9q%90+G`goPZt6tVP#>{yaj%bNwkxS@(04h}jMP6T< z#OPHmL(G^Jb_|6IwZWa2VY?kU9K|Zv^ac%f3BZK_uD+O@SX4l(xYQGzZ*g;W_<1<> zIqD>u-o&5BXsTl2^;Q&zkgFv@-2T^jO!LW7zJ|tEC)?BJOI9ZRs;=vbS7-Z$0oOA% zZkr0zO~5E#`|+`<=YBo9=N=cQ2i=FG^7Eq276*x3_MHuGC68!#=xgrp%-@lzVJhy6 zCR&7Sxy@)eX3Osk?h3%rhUc%t3+gv3@?`>bi+RN!^E+M|*=Uy$ubj2CUB;OY9lQse zxV@-M3sS+W^;_M-TT96@SSxC5sgMe+-krN8I`6{@*}4CT#zl{y#HZT*?NzTT3zV)$u3qy8HY?uU76F;^BF*VQDxrgI!G4OR1SP68v^_^UhM)cp}2~QNFXomRyEA$`Z zt3wBxWku>`7x|SQ&w?f0a8~-WW#)HJS_A`Q$4&KgDh+E}jT=p)64^Amjc=Wm2yU0w zPA`tvJd0`yBV{&!+R26>bemontH|%B-a0y~9pu~OQG5!Y`O2JsZnp{ZYe za+MAs1Q{07mCINjF9oI6M@;GzUCdkITI`Jxk8HRoRb_5lw5t7p=U!*U2bYx~{=vYN z7_;%ferw>d7rm>7ue3_4v^tR-L5-NF<*1SMx83S6C#o_*HQL2-$ATfpNj>z1mZ8Hlf4HTU#FB;_V27bMYm+YSej zD$x^iU|fW=oO6vLf~Dll50fbm%sV>C6+ml;sf$Jbf}(s*%Huw_2QJnw;v8;`Vn~c$ z%E(5OafK@1WZ6yEwBTEuF^3vLg&|A(mg5`M$p`TG)$wv5J&RUpQ@L@oV81ZtUAzQ{ znfNi;>_84zm2Ji_Q>sRj(+i#0DN^hr)vfWx5wnk5iVFdu;9EZCLd%af>dh`PhvCT1 zhbol{d0uo1p&~QA0z$WW7P>9cIKL`_BNlKx?DS>lQ>jEPIT_Q3PT8?} zAjeFXjlG;x^RJ%Cy*E|Np@-sUWjA;1j>g0fbVK!B`XA_RP86mne|zF5Hc!8JALD{I z5iKE6N%7l*O}m5P4&~9>y0r*BvTaDQq_vRk6cnvUT$z(j#`XBfyCce6DMwrUa>;;b zBaJ-H<~w%qCF>%x<+OpF?&A{A!-sqg5uE5qqY|l+`i)(_b0zNU<-XhKgIjX9CKz+5 zL@bJA><^I{Dp>fW262DCeK(i}V;vkyfAQciS}+-`R_rM29dNvW7ztiZyuKTg`eVJs zNLBYk>E&JV`_a#;Zk~RU%67xiY;72w&gAck`4KvQZE+JKQ#qZUvc3T^vs{t16mhH| zRhg{t<;pne(cAo9-LY-H*HybZbN!9f}k#?@HuqU*K$fZEQwHJBDuXuVg#R7^`= z`ZZSf+q~%2nc*}}9atzj)~qkS(QazYEquYO${&8oZfq#>z%~uQs+(^kqh~EnO?Kt% zv+=f3%#6v81x48>Su*LZYw>(gbUk=QxW^aVwuY@8PVLjO!)Kx?KSbw3;m1Um_l+OI z_{??$L&#_QZ5#C5B7-;ZGI~zEV)_0OlIKxe15i@#_CUYNLu=r5$n94-)kt|hyHLpj zEL2vGC8mfLYf{p;wV2wSLWM#X?%fo|@lOtT&Cb_h1Mq4CWA9BNc!Ch?Pt$BF<3Xxo zgexh;<5Mntk;*I8^4Dx|fd8-wK*bD5D-^yT-%gEJ(|q4GHMdElIKawxMYH5l>H@#( znw)tTR}`{ERcvyQlbrXA2spp}{L-9F=iS51F)Gh04<7@Um3~X#C!5PN#}9XQr26P| z>tSFzidl$0J=v!SyVw1Qhvx&`xAopHu~Rc<8z|=+jABJl+@tc=O7;2e@hl{Y*GuP_ zQGuCraa!>`(3!pf9Qq>R%O)Y`J&g9JW7XHL+;$UI4F+xVs7x&dkxLzYd)svt&V~pA(`Pfl80Q5Lu>`S!=A9CrcVW3L#MJEZ?(Rve< zUW4dc*uNaXiXh4n{8;=Lh_kUSS>;^J>!`jUPIj@XvO9B*r_|m>_wE4ROY1M2X^*u1 zOX6;CBylXd)VKZ*dag*WYhmIKA(C$QuWG!~z|4FoAr@ot#V)jzUQ+|Z)&{AMs_A%OCt;dEVD4Pei)-O=5Zu7SJGDLS)>HH`$O@Lo zaxLy-a&bh-5W@$w*MW9ITjyH6W*7$7dbvmK2q>r@j2&RT+QCRv@Aq^UAC?bG`3UZ$2v%yVW?-(0voLCpo{ z-@ZV!uh)uBRKNU^2CH(RiFSXvx0U&Qm3>6%Xz)~_SW!Z%+>&hXu8BVNo#4+;#=`Th zE3=xMmuEHHHRmPv^qRs`ND1PCPCh~IRx|Jf^5T~m@_r5BqajwmfyXx7NBC8kAg26h zcOR83s+g0>IWcql*hT#_hX08kVcnA!Y{I1Z9hC{{3?*q2`F`Hj`0mL+N#4KFlD8T( zgP|h+9SaQUF~uqi%{6wgeJB3#$%lWyyt?TL3%e-swvVn&6WSK?>NGi02e7@|sP6m@ zv`8-A;7CuKCCy@r>^8C^Z7Q&R>zYPgIm|KsP?km=1GT@=YrlMptX`(-aV~Nv{Zo@P zTX($lwI?#v>3<(4p*@CLx-0XHJ~;XhfEHFc3KHVP`fmV$P_i@TC&aWrkiYpm#DuC+ z`3GVDZ?3WwHgRH_6F@RfxAsq%^WVtWd&zQZe?TIoQ2<~}CQkZ4a|Zv_h&1Y+iuA;H?B6xI_Yei;iM!BQ zWB*}Vf8KkjW=8&psgpw?sb~EWpGbe7I!S4)C0TR&h6v-};`Qi{^OQ9L|J}fw)Xs@- zRcFYDP}e?3RZ2X$-^U}3v*Yym4=M;?N1>T9s#MBRjJ{W@!^Iq>Vi-?iH*MN5e6%0j=sYtU4^EISCv?<+uv>?$`R{6n3{^LTsW^R|o&fsUT(a7I> zM8ojB^Ac~z`b!bi*70Zl(vHL9ZdB$6!sq@TukDodcmaTZeIzTPH!3gz4m5sdAYNhL})?5yC0Ap)y1N~yP<8USYqFsft< zs+a3N1UiHPEA&89CDA&6lEw+=tuXr#h!X`C;CIZ_SY#O0^{%WyKE>1y`(H0Y_m}z- zP8W7Lgo(?PGptsIH+i@n=P^(zx4L^;-Z8%~C^UrF!OsYWT&jjPD>TMerdaf9yizel zMovULcj9l>oHyj~sjF+ZrYbm$THWKMBOVEr?M42n8QEZ*JD%OTjj%~nyvVe_)SJ-c z{B_d1-!_X~`uAtAtTt7JrkM1C&+(Rg6@ky&rp!Bkn#t39(zZ@klUs$S4M9Q= zA9*3`1qzK?NnZMI`@Ln2c|nextCfqU5+hrB*!PiKwG{T5YU$t$`}a2Q+DtK5*_!o! zTJOU(ydfsqO4qA1=jkTXd?Vu~dD8*Yt%;SDcKv7yA-cOKyD2Ly>hjGls|>6hM-je? z0hh|-MT%Aj9!Z2&CX9+n@w~wC{!^az6cqd^pCb+`eAyfMkZznRtW3MI4z68hJa@wX z;gyWtKY5B-xnOI&o!P$S_s&|juZt6K_dbw`iH@UZi}{`me#xab@9wF7K~WqiBE@Oc z!hkffV;&Vf4A}s??Wvcj-vNIA(tfmkZn`IP;*YYjLQC-0!4Y({HMv+oV7X8sCDAI! ze{lIrTi}flhg7&9T?W5>oT#@8pf8$Bv3g0y2rjqUQ?6HwGJXK9b{YfV(R7Wy?fapx zHLtIloNL?$)V(X9w(+MQ1-fen#1JTi_J#44iSKj^pS3}$W(nQbus}K%r9FnyK?R~= z-8!dS^N~y$W1sUvd96!$RmWf_Iwts>lVd^URy(h|8#tB|c*RoX<|i{Fy6_F#v&f%E z3zfP^clczuu`A1BC^>!BINTx>H%x}N$#wht^Hzen^{|iRj533tT|J`d&k#R(%yko$ zgbKKaeD_=2LX`>|^$uf>)^tw9g~KjQ1~G^Fs~ONVhr#e+MvAi7Sn^?kc6`hbH&huErBRL|DR{nbnvCY?)1oF25 zq2`0@M98a^fdoYbBHayWaf-i$=Z>h5+s2o+n~Sm&|8E~iw-FGD7=?ux@kDk#?xA+j zrFl9oMV7d~{(L}dtjj2jLgF$U~Kv{xB}$QZsrKfS;d@;xapH)vGRF4v{y>Nu*w%aq1_ zUt->|iOO2s;w66;VdunLI7QCM^uQ$TMv70*Gf^)o-kSmfojxnK?phby})sF3}N2f&t4f!g3h{GHV&y5s&G&TjOnzvd277sz1Ieq zY^gM9b?`AN;1`pffx~8-T?YhA0@*H4DPzm0Yx+|m%Z1BqT#6S*n=3v0M3&#d4BpEh zVdf~@v_K(ga80(o4u$=9G%%}&h8-7JL+Dh9#M-ASjSNsPEa;d707FHDTvlQ|ecMRP zuUChX2daul2GjX$m1C0S3XDM);};QAk3>A|;Q7Fv+2$IXUIi%pO$KFvCdh}c#Hd&$ zRyb2YAGV>EkA&~+g4lYaNJt#vh%x%&zL5zaR2oxVf9?9Jw(a~|MvXU=NyuyO6Y32X zc*Cke?MP`-+4i%-gViBL=o;AWlWZgDSYVLd^RGSGfj_*bZA0wXlDPyxd6CmJ^0_bH znV*#Faa)X=8%^%ix({iO2QH#bTV%VO9_yG)Qwg%DGms$nd0$HgvZ&P*c)@cjo+dhW zq%9jfb8N4N9!}N)HA?g=(&ubOVq8UcJZGEsndF;bl{_B9f2G|Z8*5zGRW5HLv@2GZ zbEV9`dGc&mH&{=1Q!ON@in5>=olc9)wG5W0@mTalFMz$vtwzm!T<2^cRO)7OG1V_> z+4XAW5BsPa59d07uaOy59m!f{+VG1(ozJg*1sN5Sl`KcIIW#(MWXIDkP?#GqeAwOp zlG2wmozIa|Rf6dI*KeTqMd$^oZ;iVvORU5mPow3W>~yVX;A^M#BRxPYP4Ffpndi(h z59D)HrVHtg=QK+9O>P}c-J4EPZ_#uGM5&s4(~CEOI0NB*Y$D_{pWVm=~4I0+eP$Da7JT`&(7O=d=tGM|{+5m?mcC^b{Wa|GLCyhxdCANRGl+;m--}8E&p43#)exwx0V8nVN>j; z8t>TA>+=~bg|#&DYoi10l=pbSF378nh5XY&;iE!P-hNKpM3ls za(b*xKs9G8*-4pke+~6s)OfKc%JyVaY=xW_gZvJ`0u5F%_#cJsd|ItPSqH{kH{5++ zng8M;UY_0eI<=eg^}4I;(*$bg{KCYHi~6J zU+Wv&+~(ODfSc=lPaQ~kJU-xkaQCT5C^xG8R$1&JoH+tAZ1>Z<#e*Hd~hi3Pa6 zd5(+I#DR$&LkPaBnTOgFP1WV%ac2v;PF3>QUnrelt^fw?LrN<2dE-!iyLro%sloo% z$YXb!3!KjT1wDJ-U*abNG?1S(m|r+iO7F$S` zC(?C!c%p@(@DfT5_s_y6-wG*X#rLo8)d?e?K-5ltD-V1wJISLI+ zhg-D{&>viXNaMCy(e*9|X(jPHIha368AtrFr7r81&E z+Ok*=untjgJ>7|mx$rk%um-lYAq5-PBxVa2i)FVBabq&MBtsD{E5Cfl9gY&Ev4`aYUKL8cC45v(NO5Z zI4`hCic~L?)zYi6OTuMUZsfBeXrg;}Kb=a#TWPE)cK~#lazuU>VJ()efJjy@)Spxs zUu&LXdQJQ~?4~}BY?4j!>qWgq*|{B1$STaD)Op~MOrh~yI=5HnT`Uh#Q|?~^>)^ZW zlA~F7{V?cSE(a1MJQ+1S2#%!d#3^l#=RP=w*xmH5n+&0-(~#k);fzsts$9jF{b*x9m=a@h1j{osPbx&%%@2a#x^?`5z<0T1=;+%?JxqA;(Ei3M zgz_Up;Emr1Q(S<(#lh|dG}}!OI!tXjLo1@cxfysjGJY@#)3;d=aVKzcUWyD&-4PEPh&yx>0?XgM z6+8$py9>VZK3swIMy<{q+j?jnyZNkbJUG41<^`#Hq?%2-yS1-T=>uo$4F%xT!d~(& zt0NW*z86K_UM{J*o~mNkb+%raOe*uWzA?7P{7kQkRcU=srmaGc=BFDNpXDAi5w>9D=|{xtn;L7UkB8gneWEy?pXPI2R|BuU*%z(d0sjRUj5oB-b{sJ6AQY zbFE`2@p!HE+Rg+-ZW~Qf`pc@??R?b);WBIWzAy(5>yJ~pQW?DK9}fjxvS1ayo~R7| z`YXGGosCyic!?;&`m3l#Imit;rL2Ri&TGAoSTeDXAvYqNIk~WQ#3SS2Y4+jGc{SS< zOl?qM^<^{H_0l5>gcC*L_V0SUmN;0kz)@a(w zOkA3LHhZ%_0*f!xg6yyHye`&0t~gwu782x-d>MF&i9WAYe6nTs z{Q%c$X6>!zyNiRvws$o?V4ux%W0FILy3Ug=*`IW@^YA)t#(+d2W1(JA4ld=I*N<)) zq5V?;+*d9I=s+cgk4z$g3Z;3ut0InUuI46K(6&#K=~4SD<;I1tuj zcHyGPQF`+9LmCKmSg=@-KzSrjE6YH7tZV z2fn&!i{D=HBxtO@zd9JAGZ+oVysJE#<~Tf7Lc3NCTeV+WCG;eWz5}Z=@x0?9e!Fx( zqqXQwuR896olXn6e?rwQnts%nsQ|$Hs{4apbxA?t2Z8EPz=1+Z3 z>YDAlYd{H-dZCo`av$oNwNoG0dPkzR$Ciy+&{LnI zXQ~N<)(f_;)~kz@4UfaD=mKvrJlx%<<|Ta`)-t3=cVxodfZhzQmcH%v;EEi-mo}3n zNFP?%l1!AH3KQO=&6Jb$@fDaU$B<5C9Ce^RO;y|M2oqnsU5JMdr44Eu6Z?RSTm9y2 z`LiMS`g-ebU?RnI?erpquXdy#LIiedQ?|S&KUmJ}Y_Q$QdY^oLKOpG`y+l3osa8!Y zp0yE(>@Tb+>nyu}WJ0QOp`7n$fsa#U`76#Fx5s|_6MNsCyGd?qLBcOTk8bY&07{Is znf2Yor}0?98#xR_H;0o2=Ka7&8=pC;14Wg>V*avmEp3C=M-5Dm_dT#>Wy8Gd$Bx2t zs>MR*y_U6rGX;ec6*>kADV(dN^mIfsuDMP>y7@;3f4*Nll1YsmV=v}J7FL^HW5YG% zFdy*QP7?c*B|lk@P#tLz*4#KJF^;uROc@|Olt)nQwlfnk`#;$_c{~hFLeB2QLs>8Q6 zy_SM$$eHD$n}E`^5chj|WrmYw#U^B>)z??$2Ht z+=e<5ao~gp;rB+`1r?`yFOB5&1`h;a{|^JB)_E)iU>YdcMaMuqgLhu5ipj*oWVD_pgve-Ex#c7t!fXyiE1bK%VNPIH zcEKBhtTuv)KJZ%e9A}hxaLv>f$c<8Y2z!)wqUo_8rgyK5Li*eqeRC^Nt3Qae{qf9+ z{(xfv60=Jj)#btLh-74ro-<^=KgF|bbce7oS~o@?aEyc^r+eBQtZNixkcJhbb0ayRtH?%+ zjab?dR?9%4)%yts03t@)7z)0rY_0SRIci1;hizSQ3UyEA?uyG)Zi`582M>gyYN}^2 zH|aV3-SDPJ{9T{(-gWR^8{Ff)F$%j0DK7)WAf`%8!{2Pylc|&P`32dk+3;lAbvKz- zo}xA*&%E<7e4jEZr%PW1oK=?Wrh{K3(!B74`6&I0siPLt9&RZCQE>%}!^-@4E-UN> zAPdJn>!)T<-hrBgs6NCX`-j+0??W61ypgvPm;ecdVsL(`MlrzN@$J{vgf9+NLYj4W zU9R7nc2&cPjhdXgPBxr#sI!5T_lnW+{V_DH8Cg#}FOGoZv$z8Sb^Ow+F5rs%u7}99 z$LbJcVV~Lbpwy8603fI%QF&BQNuZwN{|DM7j=0IQT!w+o-1XNm^xyPa@CFfzPw}7H z#{D(Y_}hZtyPz6XQ&D*L>tghGM!Dn>F5zs1xb4Y5amBx>mS(iBtf$O{FMscj<^pTU z2R_;Ul^MigN%}k864Z(L1ZQ7uBe&ibrCIgTS5sr!X5Pd&vu*AMJE?)VOWq%QWxBFI zW1ufQZlWZl5pcXCpNHj#?{~@$so5ZGa=A`s;Li!wt$riZxAXljhB%AU*DD8NxF6P1 z@5ki?WWE}Xba-b)AST123fd_SBp592r@c5r8CNFYpb-CdpMLHeAGzm@Fl#ak#byhY z^qmJoK7?D_M1Rl?-A~T&wyAy+xw9Ch3O^lfRnbzYT!kCF%`=&{tMDze^%XjN9`u&*w9W^rCyZ*YoN8 z;cPtkXU_{yQs*mz9R*^i{&$l|5P>GyH)5q!g2#&VGGC5XS`0PDG`9i!luUL1r4K zKrBDjCfBom>H}RU^Gat|=s_QK;2`B;%s-#gzjaGkBbkWh$!|AHaX=NqvEQ)s?mo$C zsPSCkX}DO3eXqgq27rdHiV=tZlYqL8sv2n8&+#sm=odATgW<7sYUFvTl^9nj#M*m> z{x&~2G^oxBLPb!{Egqk%@&9o5mT^&aZQQ5=qM(F;A|N5%C@GDKbVy4p(kUH7iVD)* zAyQH^bf=)ez|h^2(nvRF&8kUd${^GKJ;|(!@p4Q%*1Uz~}H1G0;pNPy2Fn1ov2yVY5-COm% zP~prZf=A;UMy~mFgolZ0N*YBCIvLh9Z;Q*M%B*X8)8b#E*2xn^!6AAU&EnN%rz3%{d)d^xKLdu6E`aN>b}bv8T{9;@*v{(0S3 zP6{L4jCd@1N@yQ+Jrnr5tvblul)#5tXB}geZA>5!B>Bwkff_)_Be%U4Q*&qP5lY!9 zR){D6#WAY=F5VP|ZnpQ`0lyZMnyo(<6om=fg$K9Mj?SZ=vM*>q&|8XKD0h>4*7yZs zcz?!llog>qcg@0%SR+G5l3zW;PLe?>BO-!JS3$*cto+W4W;a?al7aB!gH2JDlD_{8 zKQ0z>vAGzlO@SNdd89OFH;&DACJ&dpMqJ%J6&wYoLRkG&=lsisqQVF2?foGpag(*YxV@yVhw0Ix0sY=cs>)G|7Z#;>)k zw=R0fdRk(~G%_7wD=&GQBhR^iw60Hb!nGz9uqj$^uaPnUsePzY=4t3$o0??9tAlid zHbceSZ{xFiklhsy`xA=zGV}0HZ!jfhzU&wr?@O{f_dI<^$d;68h!*R(0>j_zh$p4C zN=n#W_8H!q?fNQAy+uW2uy(AQ{=9}5)bx2!C40ixuV0I?--Ab$yu%o&t^h4ww&utYpiJQT9@ z;?K2o$_kAB@oGT#gpX={YsyTu*qm3AfW4HVt8klpiP=#CwN!)zt@~~T)`Z>i$nctJ z4#ufgrQNU`@YhS!9v*6DDW->EEwv}|>jJdrQ52gth4svr$QR8)(p9^#m}m0Wk!}P1 ziQ_k$Ks`Kcf%<9xf)LhN`=N;!wN!${?usDAAZ#)OU|JF)BAyAt9u4TOx4m7RZCd5G zZjMq!aCAD47aRB-*P6jdOH0fTh!;=YJzC@Du4n0_e`rstdZHIQ@jzaXtl$COlVf@D^ym zXBBS}f%HePs(iAHqY~$K&NP#EK1eSOqkQZK$!-g|QxkAo=&4@(#NGaEA;ukI&S=^A zGN}U_gIS;0A{vX4Vs^czXOg(WwZ*2xS~`#u3-toM9l@Q~oT=8{BRyv`3O$);bPka= z22v7mf>!N|v{+sDY1%w`0o)bZgrUS&qz&s7+$mRfF0P*CsPU|<6BgmKH>Znb&nRp2 zP_J%BckGC{EeuK#g#zWb^im%K;&5)|R4elCpIhC27LWxA3tDp?eZ{}hna`|UcJk$Y zW9cW#X`$Tg&D0yKv=Bg4*%(Mq7C9q``^}$;6Y96eJm4I%ooz|xF5f!p7*|Ynxj`~y z&7G@Qp%~-M52{2(0BLQ^duiJ&wW{pf92E|SShr2y>ag59aLgWNls|Tp0#N&lO!>I4 z&ozMa$6VLjLpq!J_VPvzMKdQf=BW@cWNAEx+*z0hTx)_FBAY5r-CWQ|6D zn)~>Y1JUH40gnf=QeUT0aH+5|ikv*@0#`N;t7KRccU_PY3>(&Cb24IYq#B}zkOphU zb6Fsh$0{7kVryx~owzOF)WiykWMzIfJG{^S za9ABn$$@o(g=+2ZMX zy-xL|mEWrFj*;woB+k*b5WM+C^}}1+8&Mgu#3Qrq2r>_iI4%ojvjJ%M&N9!N3Sv_3 z9aA4d{hozh{X-n#;Z?>6CK?1;j!~wj(8SZAlbtfVwZjxQn0$$8cXbNdSb>$dYf+7} zOwVlnbTzvA=h`gwyf9|n3e_Z!dw0F;KrxMUo6m)N(3abOgc0?fNMY14Mrs8P%#-7G zn{(h26(X7^7{S$Bd=Or`Ul~&@?7DNetRPVIE4I!g4_-rISjsj&_z%++e#%* z2!f(*C!e$sskE1a+_kv{9r5DtD8-czGkk9kDRAU-3?bn`*_!)?TQEA$paHUg`#I%0 zbiw3HadPprkuoQ)#mjD=H`Ckma};;o*thO)r=UWHlOFQDZXeC(P`mV>4a=PZ=&5kz z@MK;0FYy6D2)l$)sWR>Lj){7utdlfsud0m%R;On>NG%)JS5hIw>N*-#C0|J_Y*}s= z%Te&M!Q7~)mR2s}sf))(lG()Tcggrp5tAa)E;WI zo4tJ%MTokq;1ML=$SAcnhvT$YveaNz_u3(6F1vxuR5O}K@i$zk@9u`=b21*X;X=D% zOy?Pd<>ovIOai!xkaCR$T~~{w_bOZxI0-FlKCAzUs2&0AkKXUs<9NK z)A9tPbtdpC8RxulcHS{nnLSAw*PqYjWd~lMqnK^lV6KQke*0^-q`AI-#*?^QCLZuSs0$8me|sr~iE>Y6>g~Zeed)oKCVvvT47`_PS6V=F*4{{qQZ7EF z;oFTuj3_tVw4;^0CESB;#=TZ-ugt7;zsFwC7jw<$s#`VOJS{!`9V z9t<|XH7Zt>ztWEjD0`Yn+x5*1_djOtKYu?Zg!wwgR@`>!$)8KskN@eai7c3?A20i9 zt_5>qJn1#uktN2j0)<*RsA3_B3WrhT;oN(&YX4Z|H?a$eso1}NQwy0Oin1Sk#qjrS z>(`NQ%{W79!(VBSXT3Jq)xdquabF+H0nOuNB0F)wpF@RA)5mU5l-vH_y%_~`vLptb z3bzrBTdpJ|M|ZYLN{fvUTNf2@iBz!)1>k-NTioH6xZxgW)pI_MxH!gz;W;Qwez;l9e0i->B<&)Mq1I30MsLv)JLeF`ABk&+e+A-${r1#%|jl1r?EGOPM z&yN&z7G1SHr_pr)OPC?dd?$9!^CyA)+R5QL>p6`kM89TF+=|Ii< z2_pU8B1&qJmvj%!|06j2C-2>V3%X$PK2GsD8f@PXfFoQfC^)Y!0SRb~>x@7b=HHE> zc!(n4K#RPcrxk|zSh+f=Oh;2;yKt>1pGghcQn?eKW*(~;20XOtB`$em<<=Z6d>!$k z82D13{pLOucPw%k=^yPTc4UNcO5!m*p-85dPip64+i&th^_e|>b5$|Ju64?PMX1OS zK{?z$2r7yi9QgIy0Ies*@}-zegBxrLp9EN#(#>k2Rptkbt+5hREV29rLpJ_K)~PdUZ4*icD(NW02 zhCI4dwNuL8^y22Bv`zD|Exi1lu4Hw&moQ&uXAG653=S>Hw|hImpu%oXx-`{}shX|o z!XNSr-12pl*|CcCrj-j`KDr`4F9f>}ty?3RGQqr~(ZGJ{lYlrdNkZmQyA&E5ZF;by z{;yAgz%Z;k^(`E(Vy6Fw=~SMYcyT-i61#z?c%|9aItH3!MNR7L*u6L8+K$; z$e^7aL%@)ri+x+bM!p1;6NnBLCSo%iu!s^m5e~%&uMGuL8xB0`vyJYJz}rj%eQwOx zXa1$Vq9D#hdJATZdSy}GNwR3s60+Ot~7jI?M z8a8K^<`BrZ>jnzW&Q5w*O)AlG{BP^{=Peiae6AjZ2D`FfQO~24Ioi~;=3~7&V!v0m zXQAOEdcx^gdz+(122kIm)9$6~Lk#l5M|F@WGq$Ly^mTD>>c@Tr&|xC>wCK~5b?iIw zf<{o%)5s=jTc}!DsZ7#l3Dyt+t8#sbtOWjWkwLh2RU_dTuid_U5klxdf5QiA+7`)h z$JSkknjDARYC$lJ!JD8xd9XxaU(_f(lMZPiULIgMc)ly(JeSVRE!+teJTmB=UsX(d z;?DcR=8l0gbt(p4WJq>ooAmP4;K!Qv%ubL$v8Yqz-Xq+BpC?M8d=X)D07OW)|kJF1_dK7C({7tiM_GfrhLANPDJSW zE6HVqQhlW(L|QIke^e-4I-I{Vx$em)ys-+Go$NHbtG6p0rVXZ-O@z@FOHy-oNd%;9 z7T~O~>Y*>RY6B^1sm*6~HT+&h1&8GKPe}u`>F*4;)&@OjxykVE2|WuuD*cnZKliDI z=&&QD_8%zEmBGI9;?EhO+-y=19Q;1I_iWHrpwoM38{$^ZDGtX8p5RKaAlvchB; zi)?x3&wczoSpWBLQ{Ymd0D>*N)Ivji86ku}6ni{TY`jo?U^q7PJZyNyI6c)!DuUh} zVew^au7+2Yq(qQPJTSOF7oGOWjloy&$(YaaTv%l6WA40fgpXWnw_Qph)mLejJJdAW zKfx_Vi*5Y0x9rzzy$fvzb%=J>MAUQ=P1Bdx1y1_#9Tbdex{fEluv_+Ah6+gX(kp&b zCF0t)=iNL?-fRrc(eJ8yp@01G0h&|TD@mf?wy7T93ubF+p_gTOu1jEeb(yNraB_;m zqgdP!^+7!AX9tA3(m7Fxxhk41ZCwr{nF4yt&G&9=6Tr^zHtE>nV@o#(-v8 zWo%qJ12eOLq`kr)rF44UUZ8U9`C^+9ePutfeoY&)!o4il$OeG!OIL4%xG~la7|_aju;D5)vX{IUH_( zi(~4Z-G0o|oj_84#eqCcqcWjEuD5y_H(Ayqc_v-d4wHpuDz}x(bau<%V^sI$US~`d z!wyB?NrlPI!dJeE4E7!Ddl!&FeF?agK8oQ$9@+V+KB=VWrU=WllRkCrUNU|Hi~1HF zUg_Y{#2aB_U>V-}!lwn4|D_S%HUH4*`6vI?M2D+?%5`kxN)+Z|(Hqo=r^xEuiy!8) zF2Y1eW-ZAYFC6>o-RDaqMd`vAgys4JaExHz2M)#VPJTa;Y=p z#}cd8M7d5#MYCx`T}S0~HNxdsaca{b)b{z;Fc#Y{`eh!7x2vT=8Yy$(+G?iC^~Je; zPZpBS3HhTzI^cwHE~D26g7}I`^rc(=J((!pfPCry zQ`3^Kt|jo=icJu60#}-=#HU6o#qy)`?!I5_@TYmvab0OqRCpUcEg z7O>1y?G?YU#Spz-{v6cn{Rp0WQ_lMS3srk#51UW@31^X3f9fSU>e~#luWB}#66Y6dhIH~{%w`D0}BL8_&qTigBbVKcvzqwtCka@JQnt3^ydsx%oD*1@}y3?B9 zVXdHDinT7Ky%Z~aZsW=?y#kd|_U6iA<|EcmAHr|=@uR9$)8bmrN9uBW#K#Us1Upw8}WU!OuQ)iqnp`fFL~5PqFzk8_yJed(z!orRF23#qmzm*WS>2CD_8 zG3Sid({lZ`gnPpmkZZAhA0|ukN~K~d3M_a`GEna2Id3RM9_EJpl*vwOuhox<>nbyq zi51^oye3w_r@>wABsb%c;(y$~vn#BNOKf5Pva6G#hCaB5neDKCdOYr1tv&!Zo z;Z;zf(N;0*A<^Q2^5xb9-lAo`%RfhTY7#}JZF7A=eEG*)eC3MQyYLB~RO{@K_klt1 zcT9^dWTX|TsV>Db8Zytne(l*y=h0u>?6;Y3SI4+|wdh)#YHnooVI2!H3#toFe%Wn) zdO#S<{US(U_obQhcaQP8u25l_3*R0M+GGFPhR!bCs+c+J3?cjZn&G1GX^4jhwRiVb zwDs=xAIuA}n86`0UT8aRI=h_AMU%4Ik6atBa;#I%(~uky=u%`quZ4+e$tJF-Hwy%_)+5J@w6N&!TS5mGmpT6zVm;CW>?^9OyfNm$Cp!gP1n zh3VVWa>EK<>k{348Dc(OslC((Wx$E! zzQLj~WG@Ky_Vx8w6ih2DhU8b+t?VW+#g}gFoOZTZ)vZQ;o@BF4Je$t>-1G6dc9u#} zoZz18x@Dook=&sDo_F`mWOQ7A4!rP&88y8&pUGrt`f(`)maA2wBSpZ*h=?Dj;hAk= zjb_yj>#Wt%UuJkZb<@Pf@ezaaU3g=SP|(k%cIptIa1}xwW4}!B&^uGPfI!rtg1llQ z=Sh7^=A2uE^c|u-<@1L+_Lhtm6;9>ITU;<2xlG>LqA+7oPn%|H5c|E`e7Mr0sy#+X zy(d$ijY>QyJXrRnxVQYl) zady*fr;0KY{H)%}jP^J|c_0O#Om2@|Gu`8VBreqpSz~{Ycx2E)m)y#Y?-?g#@nP9T z>oQ2^B6n9czEqB-DF{O3y!qD_>l>&*4Sx)x?T%Z#-`72CAc45f@8@dP)U}#Pc&x&8 z9gb-&$cSQkYZ&r>if~)U2MFf!Z zO0erotY`b9{@i8C-N9xBP3Cg^iO_mEq4C)-nq+G6_7>`)JL|EQ-a6vc zU(8HrV-XIUWxbhy>ejs)sdE>PpZ%W zLCIl=C^B2Ob1DvO=Kr>xS7~o5l@<0`=H-Hga|T4b;xk$a=OVE%@ffeA80ih>5M9&P zs-Z59eG#Q}@%TgEKekH#=n`l!*oT*A+O>bal~cqh?_#6Uo%yYNg)Eq$OUTOoJQFdR zWb7B?2l6yxOw>{oiwx~sW9|(FbPXH$=cylsn@<$>lP$k$j>EovUw`W+Pj4u<#R#QR zhFtU`pP-g6vhk}sN}2LiulRSC`wP5CYx3Jn z&rC{9*ra?b{Zn#$93@h{jTURsM{(SR&FZqAMm>GO)X=F8*)LMz^SyR6k&7n4qKBJ! zn4VQabiiRgE6Tx=3yWY@P#!6@WUYXrRhpy!64%$;BQbXEii%%iwkDdXfIe%T8F=*2 z7I9NI!_!Li4tS*53PEi=0j2h#H;m2de}=`{wL@#V=FO2ItT-5 zg|`)BGA#DRowPK{HUmXpfh8%_ zEAfF9c8DQjt#oh@dc-i%5yhy|6A3$TlU@A|N>v(shW9J(1&xF?GE2A$D!BoR=!|^r z-K&&@p)y1qa32m~F3rqnIh$wVqe38AEi$&VHtC-xd-3$M+#u#vf8u^y!J{uVKW7bv zl;;$7@~^rX8yH>@aZx}j!03GXM$MqF;5-j}K-u;w=dh$++A<5mccn zKQ4lHEEv8HX7xQD&g4jcT0j|wV1AbC^`23M(QobL&X@Q{(>pzUB-|g(#P_r+oxmo? z#sm&f2(_oBFW&Zf^F2xy{+Z&P&>=0oc1W5nNocClM`X>t?bW@?yxP}`y&U7o+fF&# zi-;?fYQx`lDhZ8$PiPN8LQA7NA+V-?|7YCmwM-9^LwiP3J!eX*N|Wa27z}Fkq3JD2 z1YR4y(l*1#tpqa6tPJiE7}x%dJigoF-ja{dp;q~o8iw&D(q`?+F4{!q3`8aKh+opi zbAdHQbg#ngHKKx=y8AL6<*SAY_>zP@bWW|NMmG`D>nmK^_$7K1%+~bG>*AU~NO-Yvk&^}_AhLp%d?djl@6jD;V?tR#h$z=*sh-lG z9Y-Ov;8grU*N^jo-uO*z@c}1Hv2PuUnFz{OV4wHX>8kE66b~jVy2@b$kJy-!aB_N` z!0*wK`#79KH8DW~6zxq+8&zO`3DP;Vj-oU=Nx+=i_6JRMs9a4Jq%5B)3V!=mTO6c0 zgV*CV4~mfwKrlYMq~$FT$8GNGQexH4qfID|$`@y6=U=1~B-l{)@8kM_i{F2CKQRMb zT+3~&-KyNQ;TO}9_Q4a~?8;EuH0spAudt~Mg`sFYW74MU<=<&ceI1g28r=F&@>l5W zDZ&Y!ulxRgxP~9(OEgG0&s=nh|I`%xlRo;=;x1UK$2;5(iV8h9d#I(uHF`-`A=^Lo zM55whYu?*UG0(iNgIg37pH#oOV&eMZU75}6a{h9KS{Zzg&-l1jYPsa!In~;%a*EuPWZokGxmLLf0Mhva`g}t z6q3=JFq9HSnjc?b5Psxd$a`%>ONU~K5-?`nIQ1ut^@FA40nc^1+hol4>pK5Zl2f!G zWXJM;bWTerk;6TT4=hjyP;bmc7QmcFBKRl9ml#4duCo`M+ByvI$yF-5K0- z&QIA$OhLunGU(sV`1Ofe9$*Ta$MnClq2K;GEnDQRat%Mv|LW$rioPF7D05At;hfR< zErA_`!|l;fRDZ5j5i$+OQiS<9u|ao2t^jm|8pS{Nw~PL4izf{9&-W6#hmfCp*KcA3 zFHx}VN}}CVKWCtHkppEW|9bb|KKb9LcS!u`3UlE(V^~XD-?LP^D{74Mb29Dc)+Y%b z&DMp}(G+X+Kef;Td?x{;@)OK>7-`*FMBORhO{QSm4-R?6;3!Kkvv~|`>?lzEw{5O1 z+M+vv$U9yC-E^3+hfrqrQ`p&UVOGsDOUFcDqmPeZP?EANzvHu}(bTYfmswMQ z`SKU@i^qa{bT;u0`s#nLg2)K&{;@wyW@?r&_WM^z0pIcQRT#Xe(=PhcDkl8X8)^N9 zPoKFv-{GH)43b#2uQGC&%^zXF!|%NiTO40_+#1D_qYsaeOsE8wM(UYnY>tJZiX}Vj z($i!A?Zu<8`+K(VVvq8`>J3*b3`};2Z+u!qx?Cb;gs?X^71M1V9~d0L*uSl&aC&FG6SumVb8pOzn$Y!ap)S zAnBAEy{yqfS^_H_SFPvy@%Hz4f>(lbBV>{CXXj|?dMz9ZF&(Cx>?Sy~yR@UJAD+B2 z4wR4}qr1!DIyA~Xg-1qqXL;a+nyt1^S1jN*8?1KIwU}>wl3C-fJiAc`bEaHk)Z-WjN3-wVf?gMPtUjW(Ppfdm(u9F@E7H|T>3J>?MFX+a^U zeaFSK!zZn_;R7D3l&}D0z)JWAke$^cvx<>PE56_eaMG$8PP!48l$O(S}2b>oN#xRQMq&$8_hR-h9X{e4@mZYn+%@-Q3 zR-%Di;6;hqsD>XQ8!ZX9d8vUNnxd%aYoO``$D?k~B6t=;&qy}Hl(V1eOn96oN5RNDNd(Px6ATpITNQOuDa9%I7C1DB-> zDBsMsHjlP;jykjeyw1Fqs_u*d0S-g9WKx%j8}DsFD`JnmE_pe%KgFuleEg2BFmQ{Z zSM$o$9=p6FD%egAi09Nsui+Qtwiupg+)B=ZZ1%iQTd58C}*avxt6+wItP%z$4lQQ%Z^BG@%BnWc$QH zkscoo!&c0q-OhCB=#>MMOO~Ouj^hlAJaD^Gn^?Scw#mhVGGUJRh@b%lb1$WC_g*-w*$@PcXDtYv_LWyi_ z)tgb^NYG|EA`(8Eu-9+ijILN=lhKGH=xMR&PfRm>W#iZzv)-!xnA@(Zo+j!-N5;mt zel1%d`Vkuu9$`@JP2e)q)83eV2VO^baGPq}j%#f}sw1A_j;;r3B&=3Pe-NIfP!q>e zXwrLgaXiPTdAcn28M64-%BSuMoB0UVME;ofa%lo5E4B`+$%i{@AxG<0H!ZZuf^Rr~ zoo($kYH#^~0*$kaQwMWei^_4$Y-A{?+S#q^N_?i6@r~9SRL|xJ2CmDD^9dVHo)*sV zRAqE}=fw?w&Q{CSFuK_=L8FqR9CCKbPg7!rQ=*%4ClX=59w28k(!lhiF${pyrK3^K z`UUrc9YnXbx~B(?M=xX5@cGvWsY>i1NVe`7c9D}U&z@32kl8>b$4JH6IA3d`<3QO0 z(3Ke6q!+?pt=yU)i!_mlMWA%Vf%D90PIOkNNRwTaRdcndCYetMplw^CKH_Qe>q&A2 z1kU|CcBjW%OVAg5kt<^dTVa9_RbG<;JYsg&gkq~fctBwmo%rd#^aQbh#!VI-#=Qyr zn)Q)#659p4l6#s1xnaF%5Y9!EUZmLls+!oEz;H@pVpO_PnVo1iesFPt8DRyc?T=8! z69-vpr@`l8_|Mm{-tp4rT#fojsR?P0SLH2hDH^N~Ll$sEaaNdNn~nC~yoO1_u&gvH zXJx7?Mv+@3bZ{muBwIzlIViDX)ELI^G0IZuRuL3tE$=K_M{Yd+$sKXLkMF!N9@>*N zGXrJm9^Z0V-j6zVUVYdq=XQicR_b$jZFkjQLo+iLW7gPHY;d+alwY%*dn4%;zZ~hH zOWq5y)xK+ai~xI&mY;W{L7gPK^TMajIZsdP$F5JIa;cg_flsBX9`S28_Nu>04_p-h zRvpS~#>X2{2n0l}1rb&saLI3L_{LgpkM9Y?Gh~IAHP!g+_I+JBZA+DT_Im8Tbv<9) z(C6vSGG5Dijd9ncC$Ce9o$KE6#L7g`B&%<3?}QMSKjkt?oAc(FzQZA-ex^Tyhsu0= z1Ui1CzbYTUG7Xos=mnc+y7;=9xrn6W0#bPTjTi67e5z%wZz0w7c=+!@A{&MECoFNT zOI*tcK0dc}+f2GNn>oxv$es=W+nDh=87KuS9ZMbi-h`h4Sq#yJhxhE81sBPNhh^}I znxpp8rN)(SWaH17XcYN4@Who43e(eMmkmKVS5cCd*64LZ=eai@S>|mQ;0%IQf_IdJ zV`yyKuaL-=4PFV2LadiIuT6e1t#T0)KXj7f6U;FQf6J~vbkR}iUpTx zCQc6LCvC5E13&d+e=dWTkO#E#w^{hGmgm$i$E`M=l`Pn2vW#;J8e)chtfegxF1y*n zM(%N!TcZS&T!}nduhQ&Du6sskH{k#LxMbL|wwRd2moi zikp41Lq8z&ZFGCZ9J=SVXgx)Le5!4!d~l3BsmNX6A zG~F}SnAynsdxAdo@GFHZWq{*oHMM0@&V zICSby3Db{6)Z#~#cd3oUoY2hmk=iKwPms!hbNrJhE0v4Sfe{a`^~XVLATrG znQQI65^-vJTw%V{O3>c1qcfF;DSV@xfQaGi_0TXHeBsOPhgVEWqtQBae8Dl$3l#M9 zEz(?oPd%l>y=g7k6HD$jb#3tk_PzMlMK%m%54W_19tTa)$Y+0-_iCFbocqP}IzIdV zG1L1iQ4ztsa&3v5?UE_h7^7~|zQ~jVYf#cX8#?S;a_2C;r$|LSc@mz*IXU7qNJ{W8 zU&}mafIX06RUG+u+~*`L)?i}2Lw(!(>w*5AGoHdoP|_z;l;rPAdff*(Ab@`UsG#+O z@&<1zNQ@hmJ_P=KNs-%N5>9)5YX;`KCi84%JrGA z_`yLT5%YUx;ewDoc!RgkY~jJ9b1)8EU(I@^hQwrUbH5|(d(funJ#fws`+E;zqJ0lo z6aD|2;j{H0!>4U@ropEshNPun2e~cdiEuE;`!OGS1H2NlT6vJj~O$5CZLC~Dk2c)tt2}AXAPo9LZkWeeY zcCr3rDf%&-dKhTh+zbQ5XbD3<7jVx6eMu;CCF%BwU>M3l%?lf4hEu)NzQp=iOv*_# zO~19Nv%&t&f}s%IZ|v^A7ODv@%HRVE=IO9Bjx+RI33pEH%Sp;a>Ul0vvWiK~&Plk7 zZy=f<Hp-aglm3c-p(X3bhfp%@`0AXU&>fbMy*6*r8!P1G2{whwfL-+_~hM^)NRQ7>DJ z8+9gaxr|F@y+rb8)1N14vcD1a?jjHM8O+p;@b%3}u3@XwU>0<#qYSopQ56etmggjA zumF_W54D?zWX?kW=-w6$3$v(O zk$4%6O?Im75_h5FE0sqJ(6k}q6cpOdPV>zpT@OE_IM1f2Zfev`Y%b_F>wkif)0XS7 zi(%xmGyIPY__+!+UvfX$;Q@T%wF8SmveqQQ_+sO38I2OtuckXGk9;1BE9UCfDQwQy zsFOKOxmOfD7d%+lw_fbcOh)jS?;9iIrdV$KSIk=Fq65$)$qAWtUh>f(h)*An$4^#xaC9eW#+9j$($^uHQ}0GrglS`(P{9nt5+! zm=0CfLz7nS76T~fS!B28ocA4E^u8K_s7)`0Veo-B=#nRf0tXA}WioQlS;duS_|pn${C&mlM`A7h3b!-Ru0i)Ayic?;A|m2^$M370R1SeLiy8OjD5i=7mp`M`QURO>sD~s_l_+FElK)@>&`swmM5fHzuY^K@P6nl z`yPujr^XfSa7T{@E6958zPdJ zIt)7}J?elLcGME}THFKFi^=ULGJq*G-fBM1SoHu26FBu@9Z8>)To^50G+I3DE8_0@ z{*B6FZcq3$g4=>T8XWgJJUzIywO)62hm?OW1VDm}^0!{NVV_*CzOg!hQ6b*$@HmGe zi3ds4U!TueBP{_L2KI;5RX3UtwPNGz_$>z#W0^1A_|~OcW4F*pC&2*9Ni*;dK+JzSYQ&x(JpBS9&oHXPO_Dx`l!Z)iV+VD6+8RqE$xm9UdGwh3#EKx z@QSEp8Vye@F!q@^`r`Io**p#I=tHb{xKXkP4G?h^E=(^Mp*L>MwgNv1c0p%4!aL90 z!(P-s9M2{=X4M9+v%KRquqWLM>T0ECT2_7+J8HN4I`<`zq=m!^JM;#Vn&!HP?6W6s zK3JssIixSd1jo(bd{kv?JX8&2%U%7@#%&K&oyvi{xgfrh_Kzv@vhSh3_mg2}H~px* z(Orf1zu`0Jq1aZ~&PBBL3YGG9CJL_?G`+wni~1=rFn^gTz0jN{8v615#PoWUh~cA4nVMhL`g+5wS0Iy2~Vmy0u?wO zfwY*6LHm$FsW0F@Jdz_b$F&_5OM(}i z0&bnwP_SYM50$I42}AGPT^(Jo=29A+UMs5X=dkCy$it#sW@#~K{NeRPV~sYHgl_76 zdFjb^to^RqlTtBddQ>xgWt z?F^;z`S$IuYzcw@*1yaR?>&R`yINXCRgv^ZLqH+ZL6jYmhC~s!!tJYntgsJ721mP1 z)cHQ8%B{w6i+s?uHL$Kifi_SAJRuYlteEj|;b34Qry#dnEqa zwPuRM#A4ubkBB$AzCe0!22NaYKse{ew2N1;EKQz>Wd z29u5mP`$QYjnsNJEkFMwg(te-*!u8?gBn9b+{aLQ8g$)Nsh;Au~-358Ta1FtKT4NwgsoeK!NOO&;z zha`j#-eAtHe7u#YGaDe&?de0d{IEjKkJFz3B4vPhSRX!lR3GG7@%8O(?lu7ItP(IL zCPgOLt=Gt|jIfb+_{Nzkbq1J!kATNsinE6gG~x&vi(fJ!bAx%&8KngW`E`d10^5H+ zRb;V8;F>u_uki5@G(0s`5igGOWqLy)C?_HbJlNWwvE#X%F=O6D(e_RLL46~7 zHy=V(a^B{&$dhnO8<%A7)}SLeSGlM@XRGF!2XnRD;&7&#N;O+eZK2BNavO6|7v^4P=hgfxEn#X%ssMRcg=t7!sVkkraE=eyEb|Y5skU;n@i)4FgLnJAFTNOI4UU zU1k0jcTssUv|uKQ^Zo~_3_BloENoTI2O@MO7QH=5gS$(8d{`kY>YFvB z7t;JS&hqUl5)XIgj=w3D+I_XGsXO#}^M+T2Zl5a=qr=1$xEqvnG!%5m?ml&i$?LHl z3(-z;%FSzb>B;1|6Tmdr?$s>dve|K1GPmv#B<;iMW}ZlcSlAD`f73Ro2v4{QAe6$8 zXPkeSa(kjYSw*TpnNN<-Wf_?_+mqNNM$M-A8S>j`)2lf~^(<<}*`WoXDB3#D_8XZ8y)4EoznkvS%*j-aJ zu7IdGl{hMOD1PEYSJgTznL48dX>DDvp3tDEb3JZ&x{zm~wg(NCjt&YQ+VNyJ3ew;l zi)>h(I(gTqwZ1tPp=l^b!n6RDDacXbXp*VIEEu$nS?%({TC)=OSmdnT&ls#=+}`r0 z;CRh!np`02p#Q^~VjbEoI`L{n4QZ(O32*K{Nz?X{HoRs1GckTJazfB$d*eRj&cnjE zWYoR7_jkNSH1MzZms1So!Y$)Qy=6+dXOy6H|^<`iR@F=sDJW&zQX6qozF=iJqqj;<7@M>r^m@1m1R1ddgV z;tM9Ljw^^)039#FcELBuU^&3X@x=V!Gp#2SM?Z^ za7}N!t2fs7u0Vx0O6`AVZM8|S)X#%?0}^6B+^Vj+UfIeCAXgoVFUU_`5&58Nq215^M((DNGLpZ$5c${cbO6g-CnLf-$A1C^BU$l(_humt z>l!lN|3xw-W>CB<5z-teZ1S!Yh;6PcQiEAJ#X0&vD#iX7xP3tXlaf1K;k@{JX!V0{ zlR!2z4X*H$X8FAzejF>XfoqKNH|80l45qGRWa{m|f0{xCo$5Mur|Xx<@&~N)&*)QR zf#1Ry#d&|f&rjIpG7@~PfAk*XKie+&r-&l(*-)zl+5G*JCk_(o_3{zH|H&WzE|N(@ zzE;_{=l=fbA~_ORM#b@>{cSq@nw643Bo?mB3;)mCgZ!UDNErJv8H((0jrw)RFh)Su zX4ynM`t`-Xw*__fy^(eH|GJq7C7KSv&M9rexw?SK0RNkO%;{gZ6%hdo2FAB$>4kr< z`12D*7w8$ZL;Q@t54FPW0)35g_`T=v&c0#?M$hZ?^&Rijaf6UkLub(8RF6v>trX=~}K|-E- z>3W>VP9$?bavv=bFEr|;&C{5mvmi5{%bxE_Y5b7NHvpTYcix&{#u0c~HwH+}W835M z?Zw{Cc@l2d;`V*xD4BS^2RB)@D9r{>s85dS%wdc40l|hH$g|od=9yzbF@L_E)34lN zLT)Y)w{Q8~iXWdm;B{EB>b~%3xG;UL;j*Swy5F3(#Y^EX27c|T9d-+IhQ0Djl(cej zrpw>XG=z!n*(8j)m|b+$fSqHwSSeORLj${0%aw}nU&eY$+VHtyrEX*8 zt()++&MFjDP=lS3XELEVvbjcZ(ISN>3tS7b48sCqYPqoXQ!E< zXdMEb0x4SXr%mhRBQ^!{q|M&9fr?OYtk6u5##&iP^YVaI$iWsNyj0ggVo{MM-G9-0 zLQ_d=wUF?I>vHcN4FCcI%_laCKp6*aqWc>+7<6(!mJ3(KSVqfE&Aba5pDPe25Bn@# z8x2YwNqQgJn+w}>B7mSiUF(2-6U0p2BWaz7$sVVn>$SRuNk@4$xbR_GfA zZhBUw40rkwdABtrD1!t%Wn$S|`}Ty3liL6u*7_pYF;tw)WZ_Vt$!Pt%n3`OYkiA%? zgE`w{e}b?DUH9Hd74eO4YW<8isDYRpx|M`27VM#GstRKS&ZN-yc8h6lqfv$S%~qSe zhq8*G5GOc|m9^rIxPzwM0o=aOX2+#BIlv~fp!X1!_Z|yVNHVM2?+cEXGX8y=Ssdq& zC*d~JlV@o&_`y4S8R>N)bw44=UBdmPlsoLtrwN=LztO8DbJ5=g(ly%h;!$*a zU{9g|;;%4&YZ>95_fK^2jbpc31=L8N8)6Ot(NJtC-Q!i>ye(K=(8vpmMt`=Q=mTAr z2t(SCCl!j9h=lZV1IReKbvn)5)swj(P~-fEy?eCZ^6f_*NLIS`Ky4JDyl|%lHBI}< z3c@Cq6CK6jp;UF!(H*4b7tE0sq58qgqY$pTbuyCUZwE5EB=5U0q5TUW!+yl)u=f0D z?3*9o7 zAS^sAwFYgfy-*(6jjUp~+I9IO38ZNgRMSA#Ob;U+b%cjFidC-7ZXZeGhnS9MR}kEN zP_Uru)Q{%kZZ~I*%^9<~UDVm?7nw8r0RM^ki`sd&-SmKaUOYetk;|HrqGIt(PS^*W z(pRtmGqB?L{5|jCL62gl>dsTOv(tswf;=aw@+)@#PgiFi4(0mB@od?SBeeWXjiqFY z(!tons4O!wb0kR&62ln#o_(oKk$uZpvkhS=vW8IF8XYGylKW z^*+ygz4PAB=l*`bcack6URxl}Uj&06pK_4#*tF*?xPe5coja8CKuQjNQ>BOo8#5+sev zHx`aoI)SllPc>q1yQ#;Vx0&CH^DD|~cTPzXOj*{8h^(SWE>99l7T)euk zJ?n}u#^?FoM*SCME*yede^QHmbDHE2LJ^;z*_h(?6;?H`au$`fw5bAWj^@bwf^t3~ z^MhUpkkEi*=Fwf4d3*?$qd$#?T6IsIt#~r%6t$z<;1+dUldBEHFwb8t`q-`e6}Q4b+XO=?G=$lRUYE;%$r4i^IT&*}aM ze-1Jl=M?Piw0`sdn|=-rT4S1)766>I>MO!5l%JVSp3^D*HsrqgP@G3i70(qE0&ZeiNKuS?F2`TrS}hQqE34MDoubol{R2{c{KMm2+;iK^Tw8{?I zyvS|OgNf<1j^Vjpx_u(pH)0p6vbCgP(KSIYzphw>Z`3`^JOMRnf1nV(09l?i3ZLu^ z{@n8DrjvK-_w^62igO*)h*zFiNgo}WrEW-{))$jdtol}KO|8f3Dg|ttt6U-b=vWJ6 zzO`PaMVl%)>0Bz@J|_vp{JuD#ZTO`&+eRP)8_8FzL(be-EuIHnvxilRR)HF{0)1kI z<5n}P$)Yox=c*|wGK#Jn5{urD05D6kH2W?bBo30GN{wkMNBb%PBQ0r!@c125bZ$As z(Y3Nz(6=Brf1d}sw3MG5xe{T_ah>I$vWEn2V2O@qsBV+x(oyn;^Ldo<;*HNv(kJ@NzM1nHRUBB6?Jn4IbN$l!8OLRG zRTz7uy-^QG%*X?i3qOFVa9MfdlPxh9-Q$z<1}gu0JLhq9a(1`QPAyQOZ8&1CO;r!_ zfe^eI@e!S=X1sa#pYAWHN(&@18;<~i-HG$S_lai_gA6%Sle=wlen8S31LCt3N|-N| zPY`0SnMbR7G+T4UxBXO7e%GHwS{)YMf2ZE8t-S#DwDAP&<5)cJ`~TVV zrl~1Sdw{?|ZI!{Vw-;qPNH3B-6PnMLfL?)$v1OfjkJ`0H0?4B&+F98W)?S!_wiAIx zXgpnNz~&pou&Jh~W94~3-9**K?ZGO1;k!q27~uL9eQtLxJVD`4G$^6tVMz5~OHm4m z)qO&@F@)`sSCVT8EB9qe6Y`Kmd|9@o`&`tD?u-5BSFf{({G_BHcWHez!%>?u z6zk6;JDyw#=nfRRW_?6Fi(crbIDX4SPgV9=vjO$1h5Oq?DRNPE2z++SO}uL2;cAz@ zwDPm*7lNu;|AM494QQ_{UsoLG9YrOBY?N7_KiOG#C*6sSCXe*okK}-(&!n@UQ^@ihnTQQ?xRv|F7un*nr%8aQA zDvRuSD|ib<1=&>(`$dh*Ez${hlF*}J$?gs!u-mUj3fgwQZf|fezyGpC%_gvO@)Vph zm-^Oc)`vGj>X`@BT?!bkHrZU8laRYm*fNiqPO<3P$hkIsWRiRjv6EH(pZK{iyiCx> ztZ)f>4LtDsM$)jH?hye`YMoxn2Ry2ze(j#|;Dmxom?lYbK_*;S1sN#4JHq>7b(dNKRDA=(bwi}hDq5kzlX4!G(f`?dVW}QB-D9R<%ANu? z646p(MM#ozFWK;w5PenJzeM98HXHVM7P$E0foU^(Ng%H!Z^_0VU-t9IX&(V59TKv7_}$8DhEc+#3I|!&w}aPgVT5*JSw$ zL^kQs@Kd|+NRGMA+^E%=ov?VgI<31$X(S}Ezn(m&+=ox{&o9ZM`$M&{W0j} zb$d>55QQbcn$CQgV=&X@o4A`6!^S9*6Q0WV$D&DY18^|RZVk10+V#}PsVizO6q2Q7 zZhx|6n90u%)n}`c2xKt-kwA{Q(8bl{oy|nz;H|~Y_N1Rz7#1rwQK&RY9<@1qJyLS^ z{s9tCO>MmR!ub8MP%NRr3T_YzkIo&;RLNFRPOo2RE-CL$&C#{$>| z=v7plYN1I6eNziKek+rK#Mq$%6DZ@uv_kfNnnhhGKzrKA4P*5x3%$}~;*7Nkz4G0h z9$mQhLT)6CW=5~?J@aXMiTzgE;0M~&x_lzT?wef?j%tS&h+8S^u;1P4+T9Esla(Bb zQfp-*$k*Br$Sz1UnRVQ(xF{@N)liHfvAkB$>o9zrA}B4Xqxhu9lXbCQ&sa?n>j3o4IBeH?}olQ@zQ}JM%J=*7D+Lt(7J8ez(=Ax z72NTngpiB$mE-5MYXY=8`Hm_-5he4g^ol?z&> z>8AC$tHz=QmHju%Cu*K$I$C}%aOmYbUDF*e8*v&3B~E{PAb{f=JvzP~} zxe%WEOnQ-5HjO(epL&Y&eVrH$RF#Bzpc#;sQc?{_H;s^HR}P!G)9)aeA($(W z6dX_iSNwElqG&RX@Ok9k#4!T=VyH^L49pRG8nbR%CTe#T3sh0*Qd`?f0lLc@+Lu^< zWn+{Kw$!iApXe9;n7DRw2USbQ3(|8~ujXM=Z2N4gYx2SjoSdDh0s4{Ek4g;8QFU|5 zT1(YfdOgIVt3Ye%WP5h@BXWYz+KdEN+3SA7*;A)BQK!ffgMNHhJ$MFVh<<W5B9Qb<6EW=+It;}4%mekRs|B?Ln z-LY06P~UgcDf$+Ho-^2gS>k91bXprGu;YEEKP|@l_?^F_HKJibLK4^|A|qFcH)Hhy z&GCX}t3dv>>W9S^;~gq-Mtr$^Uv34zxb3RD07;k#zuUH5bp-!>78iwz%c>_CvV8u! zwN$bGcIaF~+zM_G!_SO2%)FUq=QzVKFSUC#Oz!x2>$&DHd*_iw*;VAW?R&*iB zD9V(is1wJWEVIAuVsT2#YCkvCYIj%#YUBJyRp8B!<=}NG8%a;gdkH>29frYDl>7`t z;7fdE;N><{ZAW@Kqc+6Ty!*)sR0 zp5Om7Mh0NC&2^#givpcdih3TAF)H{umu^N@6{RewWViV>ZE)H+p=|HDf8@=+HME;P z#=9_Sa5o4B97anyFB$wzgu*(sOZ}vaUFr4Qh~?WGVIgvs>l-S%*=Qi~Jy-p3neu9X8jD6Cl3WfSZYUQ6U;sMKj=FXC;4`@y}B#uZb_poX9m zE$P#~A(3_fRgtn$#K_}8pqKmw_oX?-quFmixa6JhlF;52+ZRQ0nNOY8cS7~d3S%Bz z+avu!oS~7@$qTAv7H=(vRZqsXB3$;)6dVX9CpLo@hEe>!W#oN+R_?RPz~fkr z?i^yI2~-I&k8tFRqIR`LO(;UD%xcg|U&}`WR$yBfgP?6hcoRizN#tkM&L@dd-a;3eI7y zFbrZ1%E92Phrehc#H2mM#7khriNy7*u%Dn+#DP;x&O7#l>x1^s-w(zb^wkMP^63)?s~D1HOA+~wEWj~@BHHsYo2RhX1@w%DV;A?-JsCNP)Hyk>I}-AY1l zvGPlT2l3Q$g5e#xqAyY%9Casg-Lw9Y6=$(JPHAMXjgJ`M*RjtOd%RJXc5cc5X}crc fwj>ms!?mpr4=?M^R5Oj-2YyIR^d<5Ii;({VK{;YD literal 0 HcmV?d00001 diff --git a/docs/images/otel-waterfall-without-http.png b/docs/images/otel-waterfall-without-http.png new file mode 100644 index 0000000000000000000000000000000000000000..d3b04cc6ebd3a699036adc6ecc86b62a87708b87 GIT binary patch literal 38114 zcmeFZWmr_*7dNbgf{37?2uMgb(ozFR3`0scsB{b?4BerGNDU>8baywXbT1!Y1Bk7UJ64s)AMSq_iQ9T8Uo|g zg`X!;;5oL>-1IJP)uhG}g=tGYt$Q#t%>))_e=LbX9q<~WBp;114wTs`@Exr4Z$5Ac z>DOj%Kdg(@Z5i7i&KeI|YdS#ZP#=|x+V{0pGWNs7g1kBDc$1(QK#!~a;Wz=_yTIJ{ zFjUaG*X60a8~BMjN+#+!Rx^M9qyjWX>c2jI&+QDmK#K_>#gIk$G>Bn0Oo>KMGVlpD zztO7V)e-GXBe(Xe=YHP8BQO0WXBcfClMGA;%4dJ_mwwWYX6$oyc0}R6?X{)ThkkSB z$iZm-G&p(9m5Zvt7TvBg_6>u`+(Q>JIN$vvr+VDG$@~hA=vcjIhrSE-Rb=gr7=GkA zRY%wd%SINHK{OEn!_|#7Atv(jH<*BHtQ$A|&2L};S2uwV3Glgb10CUa<2La90Qg9x zp#7&5!#xH4Ki4-+t{)Ur5r;s4ZxusZV`FQ$8O$!C?NA43YTR5^(@s-fPQVZbWqWM| zdt=Pz1bus5<%W=x0B{L4wtG$K1huk;3pfc={q=+ZaD9E7or?0WN9-(xsWjzZQi{WD zjVXEAp0Pcn0^Omcq!h9>G7(UgkotFZ;FmC!nVsER0d{srM@KeCE;g90DLV&0KR^33 zPIgXCR^SO%xU;q0YbRD~IQ738`A<6%#&APh^S5^9Fl)-|c3;1N+1m+IQC)ZR-@kv2 z)7Z)Ue?3{l|4kM^Ap3O*I|th{_W!mGR290uEAZ0X$=FIu!W;^)2j~OD#q(U~ujhX& z`CpHJtEu_Fnj9S5{C}_dx1xVmRf8Mbio>8lpLU@CiRRyx|6cg-ibCwyr2mZ-|Kjss zcL7F&?g+8}S7@L+gx@b--?$-q10o@&>U48s=C&K*H=^dBVC)7BrCJ~5jCUa^l$7#H zaVb8^g!skH$yAbzJ`4>S8Ct87kyMYua_!QorIjS&?4+fS`{RpOXwz4)Vix&45J+TV zV&cVC;&ek#y}TWg@H3^?4K%EO{QJu6{q^U%)pKGDe9;>>|M8Dmbikho?YBCV_;{FD zr(eGWbum8uy-5srC)|H@a{cq?ORp3~q5ABE2fw!mbTj_@(EcyGp)_|B$XbZ$>qPh> zjZirvi|4_42u4W@#zg8OA&uh5MTMBjg{;#R1JCa9?xvWSI3arT;mq*h_^PfnOp0hZ zVlJn1O(p0~YZH<2cB8oRXI(}}!UR`ILxgEjN2x(*R|vJ~Vrx`9f2`Ppr(2u<=CK_1w=e7 zbNT?2R;Qs0!D(9g78#u95yNH>KGU=rvui9XgP?)53WIs6eqrxVdCFF^=5`9as4hjJ zhwJ?*E#mcU3o8V-GZwnEc4r2KdFRu}hMPk{;|H}f!%I8ihP(rNM{8WRXNS<(=bLbT zr&Z~X_sWcsY_S)ksgEl@3sRgcRLfm%;MCZo)ITDJZt-pi(&}Yiu!w94n4^Pg70^Xa zb;nVMp9mFC_}w*6H!V)qR^?rsNV?{qIo(JA|@ZP0+g5eMFRrSXbPn zfJ*&N(be%GMOcu1H2& zL%;pQm5y-gRFOXT%rdSd_}Hy<4f(b%6W7MhKjJ&w*>1e;Augk2lpx>B6?H2Mej=-ATzHSUBPhxcY z$2Zwh`!nmGdq;SAkTL3C_>DDf=#7=-XurOnxf&XMo1)8*qUqAbW?-Qdw%8kzn4z#a zrCenV70g|nVY`a(^187$x9z@m<{{D<#T+AaXeOprY8Ok$qA5C6ZcVFIW>RvtJ?AO< zh+T{6_Pr;O4`@Hgc0VeT_PeW;Op>8eOQlk-Pd`WUSzYg9L141(Dokj99({LsDtK3} zmp;R~z{0`qTfO95N3v&P^kQcOq$2lWhW_SyB`)s3$9Qh>(}OLl9OX=`vBHqz6Wdwk z$wqi6jeMMhObiQMFv$qEx31MjdRs;`Y)__Mszh4LP;N7d4KrJ_>6et){mleZtBq9bHGKB0_ zD8CiK`LsdXjpJn7-9<+J^E0Kj=}R7Lth;u4c_TSKK2Zt=mlsC}LY6QCZEn{Vh2ddz zvnvxf4ug;z{H@^u2WbS$da(OD!Z$NmufYh=qQ#B7_ZIK+PnO!OSU%S~5R+k*zjkfLhO5 zNpTl)y!6?4R`heah8!`qEUa=|f|i;#YT^c(s~m<6NY@o^TJ~Sr~EN2RKQ>nL7EYypra<+8A4eAE0noMVh6w%Gi$X%zOFNR8;sn0xc4~#See^HM# z_}*CH(|0Rj3*NVl22*J{4cp{&pzR@voSv62_%Dvk&vdJT$%WMg>L<0-3w3D?+df7_ z7gav+B)}gO?Jw&WhE-7r*lGIRC1#R0aO;%2UGr%6srXDLzZ;cGYo6obG^QZucmHJG z3HIYtW0kDzyXQ_H&Gf@g?USNg-`@$i<;8vU@lhhD?ec~*Hn&(|*wU~Te5sv>)M_Bp z_FL)h44z1L0%rFMb)3U`qd=_vCzmcjH1gq%ucoCn$a zNG7Un7BXiH&iGdsN>W!|_G5ft)30So?#I5_fXl+Z(r!=@#8dBxf$*wQvIz|k(Bo6A2IlL6^}-MSjj8QvW%{^<~ZIm8Gi zAr!di*E*~1O5jg}>L7*ShY2IkZU!@J6m{OF2q}gN3ik21D_HCfnawNhjeLxKJ~K(U zmA1SSD2H97FD)YMj~Ud&BUVJ9e38?&++eHi7m{Fv)^roG_xXu(iJQ4=hqj^y&-m0h z8+h^2l# zc6jL&wEH3Z*!>x*IS2$b_?}jkhp%ppt=d?=mSrBF)nm8v=BhcCsOcIwBsk7q0$tqy z9yy}F>3C?1>&@4fIeKTrCyNoUIiXXgrBI|pj&6;zlYfI{{PI?yT%cToN5fo+_bsR* zczPAz()oULK%*_~=g0wU^f?n1nZ?1lg$ZAS9 zRf5V~IjgcI%+2`-nbJ%U)iqT+b(?H+DE+mt;I6cWI?IYB7|s0EqWRu?*Kdv@feIBU zZFiikymp zX_$z{=rDi7fT1%t!cc@)t||+DFe>qs8MUIrI^3CZY7+> ziu=`lXIAj=$;g6d1E{=(xq?ZnKEQp(0?pWzMnl3{p>AutMfl7IO`YU8PiYfdXDJu^ zE^MM)lH`+D0v#jlM47rXi8aWQX7mJyXo+u+Jmc5H9JU^%lo-WD>u9x&xS+P_@N#eI zdfn*QUaYA_ocSYf2mYW~5|z}i3l2411X0F))6TZ515YO#-Tn2B`ULePJrhdLs)Uv9 zov!NDQV|Rcx_p0lVVg@Wn~-W?aS&9eP; zKh4-wHF<*%9je#&kSJ=7O%pOiIIgV_SC_Ju z{rCvci6KDVk)-yBRqu6{*jgk#D~ayNgQTJY{66;fv;=I`=aRy6n)+j+7wfh?qnAun18=e0Ee0qE4^4ymKbf;{ z(dHu|sQpK*af%%ct3(@lj+Haq)EaJxlWG{RLGx8N2VpF)&*qaKfwR$ifFzX$U0z4! znbaaw5Y;m;^nJDPW;^W{tj57)57UQRxOeulJFC+8b*HoP->;x%70kLr{3DR`p#q!zjDZAKRZV4V`QQfDy4eio)YOAiWjDkv&))Y{ zMa%p{50Z48&d#baC3prF2;KGUQNo&q@zW5=AR&`1FdY~5`XSl#Mb+>3e^t)KXjkq* zAL+zCzj$wzA_YG*Ge3UeTc>TY<3=smV3`+N8$~B?!KhmuCZv~E>jr%wrkHq|!wnsp z2)QwoGT4dOgs9EGL!!Rl*=k z-{ss@^{iYVGmV}=RYe|m^Ab6*0ganeKYP}!b@y;}UlL5luj0r3?4)}v(Lq9eeI#e` z6R}phvpF|K@U6hvO@7hncyl{}Qz>7sIQkBVLVmF2EP3LabbFrpwBdR?!szG%L5I1A z`z54X=Q6QW@1ZILl$MA$tm`EX7wm|+MFQpIPmxv!Okk$fv;!f%g!`UxcKkwBtK^Pz z-e2gh2Gxi;Q?i&>mubR7tm8NQe>rx2CGx(yG$QxqvY1K_x7=PI&8vyF7lU64?Z3Jg z-=P(gC6~moHk=jH7EB`3Pd>9alA|(I*MFAkS#q`W<)(6@+d$0ht6+&88pqn6-KJgp z)`ARV1+YvMv}!yq{Nx|xskm@smqg_A)jQZRb^DvV8wlVSwtBe`7VDQ02rH|VC&RJy z#HCw}nJ|#Q@nV}PV_47b>%d}vV=;Duy~PkiL^tg-%9jai5H-0=ip^w?Nn!IXtPF2P zdZG{H^qkOlqZE3{T(Tt2sL89$NAJ}&sw^9dW!mnpLEl=;rouM$inu5C)_Q7&^5*Cr z)^$5BxV=&#J_m(L?ZGo<5sMRy;Xiv3j1e_lV^8Cel5mC^qRpVVK0fzBH;Bu}@C8s* zzq~#fnNmh{oP?II+*JZUeN${b=c&K|$UNuLh&F!TwGm>JKkGtNl(db<(OEk_N%-^k>@#>2>$brbQBcs6Ue`30N$&RkEUuMLZgMSW;uk&h z%&RNx>c;j|JB{?)wMV3a%ipb-FiR}NG=eKuvsv6>7D;&&a%lEUtCso||XdV$M`ZgE!K7(OHq2Y-0h*uJA;gR z0|Uvu?i1~4H{5m z^RE{+RP(9?%4;oMrmtq5#ic?LP4>3T&ID5P;@6TDaEEmAn$Cah@s^a$+RF#c@~ltR z@@(wl^a~rpz7=AZH(feZG$7+b^oInU&7B+6;PLNjz;mG+dz^I15x0IOC}}zv2N>Y4 zkCz4}*$c$Z*6Q|GXf3Rydl9cav?Wvx(4#)!HvINO`S}rg>R(%ic?d=C_cWDSyLX}V z=%A^m?$Gs-2IKCgs+G&1%||p;Rnm#l0Wt#a3Uloz{DNCi zieb}m8ZcbN%MyN58P6f5l{x*eygBIA*Kg?=xiMLWROil8EcubKF;ZkNa`pIIbVFXP z!o?u6$DfauIiDQW7*_<&s*=c9<$j7QYUcHY@$#~2F>_8{P`*uT$8``{iZQ&c;t7JDEw`-fEMA(?Qq6VKIopzO=`jn1TGCO-X}a?R z1~MduO+Fh^IeG@*OOoJw@2w2xNCkE!iX=PSlQrpvi zf`^n|UgOyK`#)=CU-P(b!@APDDV>4YA};q(gteE9dReFx>065CcztnJ9mCO}Pw| zy|I?Y`TvRgFLVBX$^E~4TGAZUk`MlAGNXB;-^S}s5_YAvjAl_THL`(3(8(7Iv+32c z2s&&a;4A&IgH-P`M7{leq2u)TD{RK^*;rwUB|mp)S!Mg@+Q-(KKioueT7A`wy6g3CO^DXsE?iD7(mnm)>r6NPg1)l;6c3PwC;|(+p{A!oY zT3v2WV>tWwhVfS9^6af{EK2;6=1KU<(pbR_9gYFFS-UH~moeyQK9%N}pirp|2rdTx z4!QTm8Qzpve^}^gckaU=b!d_P>!^)?Z=K!JNT5wl2_}Ln}yY#B?(Ld+pC6@DaDNbeaev@wnh5?#_VV00-LXpHu>6Z_(fcaa&!23P zu$*3qUS)Gw56PWeta3OvtsoI12G;x@yX?-M^KT&$0u?CyhB`;Y6FegVP-v~Rrsxgt z=TvWh4$+zqq$G{xEA<{ehfZ-TXF1?%)vVthCpPMeR3d5INm%7&JwORlqu;t0?(6Rn z<4^7~aIVDkgI6~=7L$y4-y-jDx2u~yZo!S+ACDrOK2QAtnQ(ebx;=^)@|`NQQ?@r= zx&92%n8&2J+9(F|{?h+4S=4E^4bXw_`dnSXfvAYKp$>|P8VOIq@ zh!!`9J^N`){59HLE68qr1ZANP3&ZRKPL>rGs!^G^sN04E;ldFjXD-Izji3-kG)h4uw}OxUUwraH4(2*{2Ya$yH~Ap$U7| zGOadw*T6vx=%)_$1@K2g7tX5Shl!lY0My^d(21ah-}^!htf_ep@7<-YfXnBSS50L$ z!$r!~18IFsYsf5rOD&>GDAGJxBtfLe{i7UdWh#=r7td~W;I%n&S&iUjKQjTnd<3jf zk5=*nA%admDW(Qa)EO2E?kZ_Vdx@Ro{iCO`!}BP`UIZwY#{ z3E!Ub%N)`MMb|Glma4P&_C(%zAtdu7vD{E~&mnt`2VKVkMzF_ZtqPq&tg%nk+S1Tc_fS>4 z4nk04VET=QAqypbKjsG_R+=d0$Z(1=tGAf$t*%8E@MV_mFHV{>wWmP^?86rIQ_g2(lWYM!7iqkd=SSbQPuhc>414xr6d8Tr%chgKW!2r_0xuxx1lq#DZTh(Hos6nSSo=EwHn+ z5IQ4(brXMeQplO+WV__@GUN$A-Dr>hK#YOgtkGW6tK~Bj$KVbK3`B^^Cezy{-&d+b zjl(+px3BtdnF-d<=zJh#Vz_cW!__+Nb=Dm`Z{_uDi8I^kC3gSI+e}S{A+u))m;IL)k^PM=u zwW>;7*g*nXy}fVNf>xM?7fTr$vI}UQXx$p0M&y<2&(y{4Pv9gDm73GWtIt-K#zBC~ zK%YsY@YOJ+nk3-;d)Ej1gB}{J=P4I~@8JPu{?Z7VlFc(#t{?5r;j4B9G!Vo)7lrq| zF|w>Ry+mU@%M^QGmy5WZcNfdQEZIjY>JyZVIM{vAJmI8;T2uOs_{ns3VK6;25><3v z7MPI{32@lv(p(>Ro@!jNjy+0p1^ipZ+Z;#swfP1{_PH64E~vCuOH!`ZR=VS5$Kvs7 zwE+;C6;9;F>iI;3v5__?_P)foO&5=+VFQ@^b5+IHiU?<|?d(}PR{#9~O;HtWZrD_F z$krfZ$BYXef)(l5X^81-ZLk5bllB8qI86PVQru7RnP)x=?PzlD6PuN6Z{R#Hq4EmA z8g})IJa+q#FuyovF#3#M?P00o&gq*&ZVhY2qc4&pey)0YAu{WJExw@Q3++a?D7WXw z1jvzc#)b4SBzJk(rt7Km%aNAhf+78M3_EV`M`Q&Hk<{Q&WP)%X{HXow{YA_{A&{Z} zLCk4IUiW=2+zgeN##Bc!AOt})thr|IN+t!;oVnz^p#|maZt7jFW^vp#UQ3iMPvAS? zZjyc!5kx5fxP14whb757q9rr?j=M0tq9wD455*{FvELo(Cr?RdH5u@bR%bqgrZq{;_qi+jAp1HR-3fCOu&+1bFeiQy4cOaSB24`U$Ka6j*9c*aXhje?!(4$b z6S2HY047e1R7ULM@!+4*6b(8WaxyO(<6}Zb1`}@2UF?(*ayv^MZi&!n^bBy35#uM8 zUNyhgs{2l4erCZH(Vtap=TsMy0CFEQ!uDhk=q8OW_Ie>bABJr{k`h8}-8k1c zw}HhU@mMblUU1?ZA*7b!lh3&g!M(#z?UH(j!+KXPN2}oj;HQ->j9q)>azqFq9RY;T z3^>2I6q(=4FRqkq4>@{mH!?vF!eP;_eW8#bM0@4Bf_v@Z1!z~yt@IoXu{c;S_hb5QmNF&2`AnHmJ{Q^nfzwO& zo)N^;wuw<}TG^rVao|4wMmN$RppJSZZ(Mvrb*f!g=uizkt1OZRAiozP(~04rz^~^- zZ$?5v?f?L}yL6s0RB7laC?nQ1y{`HUAQ%I?9JcoXaM6z56C7ucf!UiGUrpuc%&m<` zNqvHHfs$d{ZsT93OD_uF%$kwp+p{khmmZlR=fsBrw>OhbmG()3{JSmi6FERHU zzJF95O)q(Uedv7D190!zy(CI}E$@|NcPYQ%Bo>(6y158^jJJj==#j_B))ugJdfE^Y{9eDnd9my`B<-L^-uW7%w(X>z$+fnM=4U%n1>cj~kwp$2F36z?`J zZe>G7O@#W2!X`~BZ|k}K)@+=|eY}iS$HRo>kU;d?`z4OYBzztp3e<|WxOU$R`+eT9 z*;c3JJc`4ML*e%tn$6SEi6yUYk@jx6Y+8@Qri(ql+g<&5JkvK@Z8N;gFo>*G0j9aN zx8-=DY_2Nf_Ux;%cU7z-WUZPxSC$R72XQsxGV9MQib=fRvEt9VverYDlos3{KV)5} zBfOb-n%vXAQYi9f^~7~|FFQnEF_CFh&of(&p)Y~{`ZU9q;)o{;v-LgwbamC{@Kbt# zo-UDYm4HC_Q1W+M{smEh%>ezriB`}rNb0{3fwv-_!emA}W6Y#r?p8vU#sRjl2Z|>l9;Q9{Zoh7hv^>07YLzQ5{-;pyL1g z)eus4Bwy%zgR}1-f5Ec;&9-{!`5C@A=~QIqyYVcjtDyL4SCC#JsGOA{2@K&x2OkP4@vkt? ztuX^mCKx;25MQq%mhRr)q4K`5S2Nu2wk6lO(s$;d#%n!k7^>G&)!~lvrN`^pXH&Eo zdi1+!=4r11rNtKmfa&>9kvB&GWkNX+o!_PH6@vw!We6NGzTaxyxT$ytC`+e<{vo7J zp9(;Di`~vWU3y_rEVNr$A9<_O;tH0q;c9z8O*}1u^|LBz!&Zq!SAX zM~xz6XgEmU5weQ^JGJ=mn?4{8zI4n#5Q_rlsM8GX=Rd4U(Vpul!RfF^e;~GqfO2)g zKIYxMKTyj-M7c@;7uWs+vGodGDWT(f4+P%*PVHA+Ai%H(*Zk)H*5!Y$b_4(d{;!Bb z%odUB)!J$K1wW<+)M?CJVovE{I`)nrdD7XUt+%?rbA(bKd%7y6|Lo$HR!4uPeAq&} zqI6c(CB5_Bax`EDer0~8aO*$g`X7bW6lh9uvj?bXX!w?)ggvtw1O4{F>Kk-nwOm!i zou%%s7GHnr8PLN&t(4YB0d@mmU%=pZh{Pty@|&4TWYq?v{D_XtN3y+*IuTj`Ktsu_ zUKkx5?-5>VECZh4efS5NU{E~@*xxVYY|KcXAuTZak*)~M+eB7iSJ>kon~@ddoxRg2 z)Nf!?R4cN~86|FM(gFoyDmszzoiv}#m}WgO!HpR9t92=%MO?%2%#n6W8JN1g#;uQKKP*CMZBiwaCW3MSC8=_=N$2Jpkb?|oG7Sgx!^QpU$8IjevyxAy zV-fv{N-y`UMuT+@ohn<-rnS?v9QiLsUWEW>eD_=pRW#7Gp=*!g>yj4{fgorCBN>!* zxGpruOK5 z;?QWV8V{!LyUwVZ-!=dfca^>=+$u1ng|o^!LG-z!jMN$xO%|8n8|6#e@+A zqybkoS44fCYbt;$yx9JD+vV*XHEWJ?#(uN;0LJec!pp0!*&Xk++R<+*8>ig*EHhSn zT)XQy`on48#`gykRj}kIf)3LMLW?hyDJYz4T`I!z()QiDqYHRF)f(MS76-vNQs#4E zQCH`C?348;M0K^AC8-DzPmmy#(?}TR?6JS9#Q%0aC0#LDpGlR0J*m9f9u=Lhf6-vn z8{NBz$;{YS;^yv7D;wRjJE{RU-l)dj9RyRzEXh1fleFEO;yJl&=UMJ^hNRazlO2B= zN5}kS3GO%m`eD}NJ=JRREw`!iO$L>$kHI$crv0-Q%RxV%#qz*qiqrbyE~0d6?Iss> zEiCugF)=>rIQcQCC1o=lpvJ?m>``QIWCw=tZ6c+6Nk-FKaC-HSWv2ZWr@GqO4TrYb z!)KQ#D;%-$)HFo0oK#zSDzf#&SBcUo-0_&*+RTDPXx}5BKs7RT zb*F(tqekbhD7PE;qOniwNtZ6{{ey_u0feq9vHL5-{%)VUhg*}3#GFQN?|Jr-EQa1fQi4_9|-7$3EEyc#{(w5EHmESl-btHcXERnv!#>W>xZ(E`EX zHbu+fOSVg0AC{qmrSNe!Qpy2Q#XXbW4FT9EKc|EB(N{N3+YTzqIU)tn%hZQZ; zCA-ymQ{D(}cpKclN6tNNT8W$fm3wu;d+Xig*X^b&>#Bz=n$6e4Zw4*%bbhb6dtnq% zf36H?G-yn4C)eRclpkCaay}dkoHl%VEe?jMJgc zcZ^(1d+bDAc}3j!-J3jw-0Fp{tf1F+ZjVm290&;2{P_66{%kPwilWHhw~K!}x*nrg zh4eZ18JS3qCu`il2ygZqhGNRg?sBE!D`zRt_Q6+D`t~;BOJlvhp1eY$qoYGBz~r4U zDT>7kB&TT?jqt3i!7OT0@&T>PBDbLwyKYq)w}8Fdmya(ySTM<*HLvk9h5KC*^i_8$ zIMio7@_dc@ljQAkhbL?zGLToZ2mpJJpig#t(G|l?EwE`?Ok9&r9VR2B-!tl9hEriN zN_a82yOuQ!9RO#&cHa?8el_ZO{GDE_VqNe$K5?<mghQRjH6 z$)@&XCDcE*O;sUR!&N59Ia9ruH-Ua?EZ{!%=J3(nHZ`q`5Zm|7B9%`G_d!9A`Ur4U z&9!RxEzQRp)6P#(kNE9Yi^(2lq?MTTo$8JiUQ8-D=4yWS;kMfM!JS_PU7X@_tK?To z$MY6g?QFJFcp?zAGM`ca>1me-^u#xb(#gl=s%>%rm>K04KX7^DE|Yv?TQ=|p0GIbs%{xq=vHafp?K8RK{-=^s zn8C|1)5Q)BPS-=C>!2)$-x(%(26)WK#>}RzEok<$V|^aaZaP*Ec(7IPtxHn-V{H6#12FW*DE(!2;`#tYveOyI6Lj(;R#z&7gx&YHJEgdPX!r(QvTWN&;*3w&n)~io;wLVh zPqfONVmGELz%GZYKP>3!a8P_!kue75=J5l%9G2tcC1O!HnFfi1j*%RO?cMarcgv7_ zEB)-ro|hRHHh2Ti+vlo0oAL@25@!hwxO$;qI|jdRH9^nr)zy(aze%B|)c^4~){LAd zd)aX7T^8RWYBaBiEW^<8S<^joA(~-%{1;j3YlO^XWNA0k(PvybqL?+HJh;&;y5-V` z8bv}Dxsvj&(9ulXAhSQ>l79UkXc?whCA8EH zT!kJvuZOJMw0fn8%1Kn{hO-0J!k5`A-eP{Ti;uH<*3!%mZw!m$Nsc~pIjBTM$BL@2 zbDLXHN`pg33sl-0a-PM^SsmqCB7uVy*ZN8}09#KL=BY3{dF1HT9YJP=YBnlggg(T- zu<6=+oO!5D?81 zz~?fZWkRB%?VPGSu*!Di4!HFU(fH0XVu>>dO3ytOKe=(3hS$%oXN1M;_8V|ednbA1 zmXqN;#1MA>zXm1gYuKw~-WYp1zSJcQKf6l1NML`}G;9pV}$ zCeFF|+}v zHBVCERvhp06N7EK3`wwo*-NP`Kl4B{PkJw#)9v9(56vcStV~HH%qo-C{H!;w!3>;d zHs8_zNg$&UTi_u(Iro9Q?<0ZM<)gXK04}Ds9HLz%Fsb<~=?1<}_g`vL!Rx~|SNGDu zS8s!>Po^*i)CuVn+hE}%PFV41`pqI1-X{f|$DQ!hCEg9&%PUuZ0rk|P} zQ@p}=%h#FOxD*^+>Vh8U?>1)63|hC;iyAC^{YdK1W})T%yj;29?hIKX$t);;_h~k@ zhsB7Kb{sF1CE0`bOOkJ)##}Tjb<$Xd{Y9oRqg$#Nl(!=t<47&N+;ps+U=*kgRR|wqRPTch+w0AN8fYRqmCB7el?7>~(HY_t zGsVyN(jB)`!dbNY8A*CHYiy&)KBu9mrVO&Y%v+Z!JkAH>o;z9$Io!JUgyyFA&D|eC z^73JeAA}{Q%GY#FNWyHoaI0?UOI6jq1dbSEIS;-Y@^U5i{S4{)`NDEy(x58inPU!+ zQkawYA>EsRRio%uVklc3h2wJ1q{)Z5$9k-Bl=Vt!nGRZ>!K8d*=e^wNVf?YW4|`s? zaFKw66lm?($9raq%d@qBti+Ad#@j%&r1}_;(bK~N%?02Ehs3?hYkwzMtjQbYN+Vv! z{vmrM#-M1n7#_Nqz7&rcXsX?j`_YylLt2}BM98MT{nCX^r6uPI2;EPHmLT7J-%Zcd zz8pxxdF}2}PrK5i+E%b^{idu@_Z66&f4Dbw=9%E%6Cs<0A7YWbd8>#gwovjk1(Hy) znszpl|4HuPL$HUx&8B@C$;j#Fz{YC3Sp-QVihmUv z(iVF;sXEyNtKv3)!tDczz^o$zO#O0*VO_4yQ4+7Cg3+Pl?y*^z=|u5;2kvel7Pwb$ zC%<{YDtSOP=hyNK1rk=Bw#q+jh?JDjNZ z#ht+|OJqGi&7YgGa(T&yU0_LGwl4v15>?>tF)4T9+D3!UZosz6_L^BeABc75c1jl! z=#q)B23MZ%47|-1Q!Ig(uuUo|Z#D7nDJ3W`esL6r9>^*2zR{hU7kLnwXBIe8hXQ!o`_GBqq#C!b|uj&I#FVdIcHj)EfJ)hZgP zug`SvlUNMo+bj@4?~yksY-JQe*n}OXok%;JQ)PHu+quaqGK@#NU{KLQjqRh&Js=7! zKq1j(C9!ZQYx_2x$V+=tj8f7sCp-&#DX+eVyw|hg~#91K;)+94nP;%Th1*^vGk+4>X8+h zGttnwlK2mgJXD!97zj#9`u}ctHg{iR#FLnT){b^E8gl3&v@(P-xG43xQOpLYONVm3 zX822#z=1y0+3|;FV$#FiK0}3zu+SR#(%q^;S3yM~rNPk{b`wQ7Pln@(ZPCgUe((Du z7YDvHi_rboQ<(#PXk85{S7>C(~A?BQGy}8_!X!B^9fNE)fyZ zF#6g26K035Xa)2jGtZf$8OPZNiHMA}4+&rUNZtuDKnKGzp}6D33+l-!>R+-7H>(uwx6bC#in}w5%7A{DKUjRm@CQ&N5=_llOdpL5IKsopAK!Mkn zy!J|0_W2bG%Bo(^PWRT3QFChw`K^t`)0(3O87J_7&U;j3TCo(%nvM(%n)K~st&MG~ zgd}6>8A`90`x8DVeehX{-PFXlAfiny%A*4%t+B8DB*z1S%95%=HuYSleN!olnvM4l zS|X4K*7_tEGLZ}=(>qPHIf%3A(R#YzMtf#a?q@H=Zrtq0(XIQ=&WNCo`dX-Do+NUM zmCCDm2F+u6j(4v_1#uz)EkBxJEdlWMR4ROYC!O=2mA=T&Zd)H^1V@4!o7-4jH~JpB z1xYmBXP*MxheUcG18N_{rYK54i^+gGZ1`rEKXI8?2@b|4(68G7;*y!PMDd z^J}Ny5yUH{-`!`W_;(<>xq*;!70zyNPWp!?716?LUB}(mN&Wxelf@7469t@UG(e`k z#HKaU^+oy9t_Gs{=*^?qPt=t7aW|^0@Z{gy1AbEADwNDL#79*6ru8Jb^1GG)+*{cR zX=O!z8GcRrCoEV4D{Q!(nGHShfBudCUI_v3lxQzYD*po-?)3gTxV!qU9op{{?c@Vx z{Vqc!zxOx)@Y)ymgL44;@7CYHI&3bxmJ|wN`8)r-G_Yt6KImW9Dn^s{X954!Yx5U0 zcL)c+=ZO8x89hw+%02=RXsuN!H zXie6WbUHnu(X2XE@k^U63g5=7(%rXoYSWKTqY<3T?JC9#Z3ae1FxSO{$|C1n$P}Ou z|31cQJYaZR=mP!{ltSKsU$E;dBw418PkYj0bJmR2I1>YJ-Rz}w_gBd97RLKZ$e9Cl zqxRFKc9}yW%f+dVbH!3Of@QLyNz%ElPnh=EvuB!BI3ntzvs)8VexXS$XLy(7RysrJ z5aaU>Jl}$af5a~US~$=;-u7s{qiC}7=v^dJ0`somORgz2kIS33$n%(Ke@(se`wPt> zp)vVpQrj58i`RjBVbspkKw7t#ba&q->4u@4=i1c+z@nG%WiC;=M+UMm81E~glZ&Md zUF@cYRl2GvTsq4X>NRayA+{T@v>di4*$KdS4h2EM?|~O6*nYW+PM7i6_I*`i1A2n) zT}|_L)2|5#{8fEG4;(;hXmaI+%@*% zDAsXeXzx@u)($j~5EfKRZ zGxdpX{1p%fdTkyH*VdblFS#-JTgC(FKvpx2vfA9RMeP-qgr=P$x%kT{)k4iN48O4s z^vSYLS#}V+Y;-}SFI~23p&Z0Hvn>MA;bwk*^n*55@XC_^WSsFj4|&(BAr7(JSMz-H zXTUES>+5YmS^fOZWP9(YLNoE?f{@EDhU3NrZQ|@{G7umvq3@9sn6Fi)Kh-#^)Oc!J zyVw_{qHwhrx-sWDK)%~GnpbLhMDE-)M@g`nV~ED@yqNZsx~EcNXyaSTd^Z5887=3t zX8=hBw%zAyI}xAL7S~5DO=`6U7&5Z=-48WzGTbJW5yCprbq+cu>-1bREU~INx?6=% zKI`eoO+inBO<2YqW24Jdn9)ThtMXXYyGX{1>Ymd#-a!6B3L)z`@Ma6MNWiJ6U?Hrh zR^F@PnHj}+f4&`kS+$e0nyO-69+d~rlO034+ z(b0?%Z4)y|u$KmLO(WXNeR>Rfb$0hE7|EPfoAjY|o2A6PWp9=&NcU@OmpHI z#a#xK#Bk&;?iE!Pr@3B-8R}GRmWm~NUNz7>>^_^Km{Shz-bA+SVb9pVRsS_`$VTG)$1KjGn*DODBGV}F$L{8C z)Zs~sAS623DK*v7_4A9++Dwlcb*VS64`Xmz$(PD@!PlNZ)f~Gc28yFh;LJ>`))nc% z9jdT0gaASRpZ2~psHrs!Qvp#_1jPo@q(!=P=|Mm`C`hkLF9D=O2pAhydau%@3!!%` zv=Bn?5CuYjP^6bo_C&q+>hsw7Lr znF#5WeBc6})GASS%~gzYf^miO@W!A<3D#q-r+Qw&^XnFC%Yte3Em+TTp{a-g!gcPX zeSeyLWxD^;h`{R$Q61M(+&J!R-iz?ITY6NKiTQF?&}+N#x&wmlw~h084WPV+zN*22 z0iLZliA0^6%XndLW#TBJCMBb=cX2n}Gu=qkW#XJu3}Abq8piVUQNgQ@2qh+7i#*6s z<*@Glm!^+^^3zd~?V?TG9hnR5QQ`T9LKt1bXp}73n^g+-7_?~=tHFcC5zo1AUi=Yb zJI{$$H;mBrv)!J*^UIiJh_5CYGu=+k&QoLfIn%s`!?qbL;Nnt&DU2lYIaFwr6o)lv zSi}HEhJTmKdnYmPfp(zK;lI;gd#x-z-Tw@u1WRi0sz8q^r2SV0cLeT33}(zsZfUaAQ{3pSPE^uLF;5ua zwQg-;o!;9y70#)1Yp%DZCX!#D!zgHOc*@kbb<7C1h{j`wR%m(yJpN@kGU@d7nDfFzv$(eJ`4vuPwLU!dX-i&}JA(G@9`Ph{KBRcrVcL(0_CD zz*6UwJw_vA6Vc^$pp3g;O$6*8!B{!}PD!5kD~9uE>h*FO`zaN^8>>^pm%9vdd|2zR zfWFXTig{{o7iC-eCz1_I1_b@gjDZB&p;?ia?-&N|sV{CHSqZr8`M2mrKegZU)t~zvcq2Z7kLMl~V`()RT2l|Q56hai9`=c64_{%1dr@}C8Wa_pBL zIsd+ufBz%NKn6IaqA~IxV#Qho0Nsu;IZ;id{Qv7xA8p_>kcj>7W#Gz0%~Wv`_o`y1P9f4gae2t9KRBJ>N5DfK zVZkpA3jSj`t{4JA$^Z0bOA}GQUY2}*+Y>1|d_SPnX}Efv$AxO3w#Y?=FjnEAva-R; zZr!0}!rP*i7}=ne6kTGi*3z%@7W1Q_Y$u2fpA>Wt|JiU?{$m{KiCi=w7#ENaSyS~c zy&2H9QT_HdnEYue04OeM-nL69bs20feC61nS9EYEn*UI929-p+SeSBv%U6#T)CrJX z4I&1QX7&TO+oLE>zCK1y-hRpb5^}^d0SjmgIZaDqOI-*rx3^tSP1!w05XFEG!H>>c z_~}2YT}TxE`DFTNgGpt8OhRdU_FD4$m%(H`VKNdYmA6#hVFCGVPxc`QpfS764b}kO zc!nCc-Xw4U5=v{8XdYw0qtT^d*r>W;)NGS!&(tQc>{_bZgNYwKR4@jrn%!BJf2X-$ zWREh8rzSNe8TOR@Ke{42i5J=89GBm2~Q3nc2lk=0S7cgym z$JBr@S7Fs@Ujk6AqAW&DFUa%I?@v7;8j@AlZd5N?9{5*TqYoaJOafsTDi1XcUl;~T z7DY(QV@%~xJ+5VL=oZt-Zq=^dZosIG^~u0q?VWS%nmnik;ZRaQ>*|RQ3=3MrMeTYz zDg(3^Cu;`rQsGZK^+Z?#Wj`yua87xC$B6b(F|t9bw?xt z;?AVn!J3pfnE@j=TsvnV z$eN^27>qd}UE>0H6r%9A9OvvF$HI#VDH#yR`O_*d=R!*%U0zv`Nni>SUTV^bA-s`h~&m!+0oI8Y}MT= z7Z1@1JhV*Fzji5-d-f%T4TFS-LVyWE&SB86U3U<655GCSIyylLxT(Pm5nk!*vqH*l zSpVC}{%MbR%*s{I#aRN>BYj%F@%kfL=; zAVd(w%3621K*yNcY#+%y&eS33g-^kmUq$5&4!uQ-_i6$)&rJ247C@YEmy4TLo$u;T z?EH@{?NdDXZkD(GxTx_Xt;3T==~~h|Pm)9jzC4}LE^_9jS?A>byi8{4@ktBNK3NSc z6q#rw$}kAuzqMSV`@WHt!&PTU-Ft-X)Fl{iwe$Y&8!v|#$K#0G+g?#uk_)O$5xvf?+JRiGHsy>u^k-DS?s#Gk(&ZK&8Ig7AS0!2y=XL_zOc?G zQKtzm2FxPlk)>g#-bOCboODq%;K!CvZBBdz400oVf4&01`6q9%LV;|7aj&@LWcy3( zE32ikr>h@B9IeN;IlYW@8@4b)z2${N@>RGI-)~Lys}9H*Hh{*$;oW%w$cnEBjpOtC z-rdo7c|Jg0JAOm9Xp}nt72Wd(?La9~fs{ic7oY%)y=Hdf|Jv_al#P^t;NMp{>SL0Z zW9h+iEwdx;4GESm5WbI6`efloPtdI$js>-R8bz;~gBN-p?qxO7W z1Y%CA0#t4<*m4?Mf=>)u947S*?DZ;LC04{W{YA1^yh2Aj&UQ!aRLA+Ew|gRV!Y7M} zF0pY^*42qOcCy<-XoRuzvrH}O0ZEw5EDHM1rFLER%?rM(K`OI*AKc5Vk>yFNfYYRQ zy5EJ-busSx3V5ow#N4_tli_{0wG6cw(GkFV_wMMBZMdA{svRXCOe8SJq|Qq^EBnL2 zkC%cE0B154)k}Gt`Pq-jmyLCa6C%!gR)!7tBK%iZz(jWeJ4Pm6TEUEp-dy1rt%jpa z!`;%fsJ^T_=^U~4cUr8PYKO!3HJz_8T+IMT?hC`VBoZmZbH?|EqXl&8N>N)A1h7P@ z3pXdKG{=l1taN5$MWIVcY0G1&OI0R8TuHcb3cwmnF#+;|@oU{ZU*G6kZ_ldqWGV#` zq#Or2dTOAyHT0`744l(+nd=z4%+QTo-2yvj(gqcya#)Kqm(li}9FtV_RtG7i?~o@T zxd6~s{g{Y|pAaaV!2U%Y@5U%S9MYLI(v}jK9BzX$9<~w5S^KoY3Nd4>Tdbb=jNb?7 zq#I(7NLVw~OD4~Llr8D4S;Zk8mv=YXy6&XORu@ee!Fp%RKQ5#N=f>R#ctXKO8Ro?> zQNGb0&C6Q{^*-gE^3J*IEfOFakK9p>k7%v4YD>IBzJb5DEOn8Z+OCteiZEk=OwpvD z@hc?21Yr4iUt-~Hy+C`@*T{X;3+DsabCh|rx$9c}P_4jyxI$;kIR(Tkekz{s_mB~8 zX*Z%}8^_Ex%GtKA>RnP1%)R>MEc~CGbSiAq4hX_o`2WT?Yi_wI1Ym~p#qUkt1vCoK z$fXG^034T!^&--=ohNGTAG6U_QWTg7^+v6yo3=8)9O#Fk&A0VS5=L{C*bg;*AkPMl z4}7NjMOv{k_2kAWvdQO-hodz#K3DQK;8Rq=;t1_=LG}s{HI*kFPu-Ar?W(JzQsv@> z&gXQ!WXwNC0Mh zaUr{G0NS@V5oZ&y%+s-)G`#sKI-{@{GME#$vf1v0SB|6uREF%WK6mB2K#c9B@WwXa z)uSo;^(4v4xmHd&rVUrKw!$VRjhq}>*~J$-c{V6Dr`yWt4GsO`*t656pS8$Jh{${1 zqevxYK_D0mt5QVVEjb2@6+DO1I_~+`j#YS}i}?&Z(S)!~d*jEmPr(_w65R1*fiCGk z5-sZIL{KfmE%Fbb|0vlx1K=YPS^Da~!|;DHF$H2 z5w~|t;>CXf4aCIoyVsMrz<)Zw6ZKqy?neJn^7&!)^hx+%Py_MTPv*ej?V;>{cSZbx z3siwsJB;7{N8Xv&xOxUQIby~l;x&gSJ(nXnJaWlq*NR*A&3}}>iiw%%6@7>QD3O-v z0yi&T?ftm|ejN(xE5zLPL8jh+44pABKL5|(jQQSU8N$|b%u&)Hq-TMos*#ajIZO9{ z^fa`W?3~~%VlEry2FW|K`my;r6Q`0yM+F{4j)&91)cA>(qWDy9cznaUdbBYbmiOIT{A>i;PGPAkI!`|l~nI&yCh3?t>H zUC)#&sSIE#QEa`Y+^hxtVE#vgfL6&JTit_bcbOa&%r~e}bhs-i2|nYjsK(5@|85U* zpnpA3ox@HsFQM--xQBvXax!$4hg5PeCd_w( zz$GU#7{s||1~oZDWz9=Yzj(kL%1Ra-kCE&Jw%(^ZbwZ=bgW-K5<%<#`{H^6O3W%?< zsPz{%pq&2zjlj%Oz$5Y1H|+Q7sWKg0KfCT~O20q{cW~g!y5+*MyKPBew=QEKTd`gH3+E5Y=5&v`+Cu{ z-DFCWUJ9A%h!U^_-KsG%#?+!OwuYvr-`DnLi#o$7s69}Gq1NjzXmE;|*e6FerdqmEBg^oKS{dLA=|9udX~@=cA`;*rzesDsw%V(?#+@T3m?FWFSm{ zOK@Gl!fbKGlKWLDxW88Xd9$#Ns*2@poz5F&3Nx<~KP!O6HhLn%Lnw>{j%I0-?VXtQ z+ENN;h}h$FvY88djy&;6oq4}iKt-i3VbNUqz9^XM7PH*3M2zIx3e@(4^i|WBnL^xv zF%ZkCO95B0?MWPm+by)o0el2OT@H00xn^mxVLtv`lbp1DHy}8PS?y^23dl(qyQPfF z_gFmnir86G7(lWv!(5jR^5P4oa48k7(>U|!udL1Ot61}dWyYP1@ErMwdeYhQ(dBUM zOx4!Nm;;byvqm^3fMD950*gM+t=BR0;Bez3m8@zAfhkIjFNZHvHM+E-EO|+qG3@d2 z!*GZG&Qn7{S~ygUj;8qM_0&i7;%*8{v;HBGoTf%xcUyhpy43g+0$wLE^A_3j?Wmhm zWoNcAcu%leBNJPv*4yR+Q*R!_icbl-^|`y@c^MWL4PENE(HcHx$$?)l><~Aoreip@ zuOFV?WL&F7%fxhBHY0~{9Bsi2lGxat@s&aIzzBeuw2Z;M;W??GM4+r%~kdoxw0$dgxTIO?xq{1Ha& z3ASBj##B3tTMQ+DNH2~sXWLWV|6;}OWaSyr*m`qJR%RsEotvW0BRsr?4%2O^=-IiZ z^vr;|k<~gw7H>~PbMlc)P=xqpp@5gtNt?UItDj4-+QoZ@;nkB@;v^thPWxE>9J}4D zse$#KH0#y*^@?d^UzB#`?W^Kb>%9w}fq{_m@{bb|gpS6Yy(q0xyaLs^#TQ*nzrDs9 zgBr6_I%9&E=2&f$eV>i>FKTi+)yHCnv1V7Sx)!Q~)Gw{E2jclhGc1F=N|w>Eo~38T z3oy#?(%P)Jf-*~j7f|A6h2}SrQfk`uSbR=0tp>m_Ja#5wM2(i_hVPeDv(**Q+5&9f zF_YrP`cf~(Kb6mplnx;q%lh%w>yT=RAQs!a^9Rqz~MdYmadT?u8ppng(x z1}$suL@+3KGOQ||qV%dt9GFYGX)jO6Y(hAXOF%DC`XnYN^KDIRy$4h|28Awzs?OH~ zZ94s0$Wk~)nPbTt%mOX5vd>Vyw0FfNx^oRX^4D&^l-gLg*s<+*hcwP0c1}USOGOO_ zC0l`n{jG>-=l#k#PXEt;Y!EsOA6&1xvmvTC(b`@>%WdS=>Vx%v&an_ts$QC=~-7c}@bKsrv$ z1)gtOGhx;%Z8bkw#68t~x?;=N)cZ|Rak`MN$BYsLL1vq;UgE13)gJ3PwJ2;kBMIns zU%qA%>*;W7i=9htO8Uz2u6H4qBRPNfScBGb(Bh7Lb`n>}#)9J}g@lET)%lI-2WLDs z-*g`MY}HX^IL3@FT2tl%^=C7_>j?ib`{vgbiyaxome1nqr(?wlou*~Dz2@LSHFOJODK6*?L-?Ka7G&#J zQfc`6YEK8XpersBcZGU$2CQR7{Nc?~-5u2q5Sw+W3EbI)ihW85wq%4-dhzMVvrT-M z665*m6+}_qxNq3Etk!Xnt)pwRwc`xnC*KgmCldj(!$-^c?nM&Z&B8Cn&{&UHi zyz%CoBSpnF<$4&9pK49{;PBoX)Iy34uTcWJAJo~iiIwyANEK_W#b0z>0jTbYNLHu$v{GJk#R*6xsR|#s#@gIyjM_%`Fn#x=Lb>Q`9-9r z12Y+v7?;u@wder$YA4kQK7pPLmo~RYG6&5jIrontO6`+8=KK?Q(*rMD3pI}ywzosA zOZAD?5;CzjRRF(*s8js;9Ir0&iy&Jj5NaD2`OWUz-nZXDI-1+WD4|3UpPZ|z9?z2Z z(p{F?=qo94*q|F#=;Z)KJI}c_anJV`qqz*aK#>PeBWx$vbTai&uQEq=bWuEcmU6G6 z1)wDMZqaE`GK{T#!`c$*Dmvpx#}Tagmdtjg;Yr_I06@KMB-~%qL5J{OOB0ElMG^xo7y%A(&gI1YR9D zk|Uf)L@r*Dqq4iT;~)n@as@vCvwh4j8~^3@KKJ}~?ua`IIyFy9pz^r+y03Q-KjmQ=9VGjO~P7(`Ra{Uc#Zd` z$3W8bF->V|r7RlN{Jk{N(AJ?aEo8sGNVvXv3cFedBe;rFpcf=24QYP)YuQL#54`1I z?`f*$n;Xa^Np7m$Ux7IS%{TA!Z0k!?RFhIG_Go_Tyq7QJ%B9D%OuN->sU+PpalBdq zhb+=-9nVUndDuk>-Ow<%WiXeRPLfTuG@Z;$&^ol=q|G(1C?9_~qVGGdk6U~C3VXol z4c&bUrMw_OXqnBws8QXgzD3&u4q0MNZ=$6HZ1-eF_$W_p@M;_B_vg|gA{+*4Kk@nY zIL?>*u3dDT>DcYY*N0El_uS~ui4b_KjI;yi`tKkhVfp1>^GtE^ov#7EK-(SHP4$|= z2(v)vy|qpVLC4l;PDbWX%rhPqP1&K&q!HXJmRDb_KSu%k-@JY;qayB$o!2TzX7ktGm$a z$KDf%1_K3$W{mUQpF3INWu{DN8asxHuDy0}^8j4Ihv}uIBtm{2?-Oi6;A1oj1`tu6 zg9#p$5vz&o8yUm?Lz3e|#YwemOHSPt+;cWHbXLC8-7Sj~yzxc(hCS&jnAQxJIk)T? zRQw44dbL>SK#@xZow!4yhaF~s=HY`FiVYJ|k!l6?Ey|w8s0NRXe$)a-ll-&b@MY0G z3o(0VOmT#14>qzpPKxeZw?*XIfPiUqR?`WF$29NVR*&!I$We}S+tvC`#W|}M5SZph z8;#25u2si*TvOT7>=C;U+wKOHFGr*VwjoN@kV@&4f&16I_cZSA=C5lwRJTNwFDD6C zrX$kV-5;R(QJ>?6(~%nO<80{cs<3|_uVROU-8dUw%#Q!7p2Vf z*wW8$I*f;aC*0*=1Wyx3>5-{R>qmsXn_3 zo7un(Ry6dVQF{!c+jb4F7kAiNs#|SNKsZs~T;5n792H8RI*kY`;xq0UEOiY15*5QC zp}2@Xg*uQz2VZ7O?+B2nJ{}U?urv}q!>d0oh+Xq8ff0(rmn`Q(I-hYGXT7GpK0BI9 z=eI~PU8uHo!q02kqNZxqu@_TXA!5;2qu<=z?I&lxW;U{bOC$8phVy7t4~EnmjY*S! zo;bZa7%I1qZ990pVB990N3Q&g64qS*m1{_y33Z4Wbv_G&?DnEh7bmdcwMEAxcWNjx zcu2wr2y1AjPWC}QkePVk{en&lArjX^s!c3OZ0SC&XhKl8dI2?7RA53ygm1PSX-Z_h z)|t{GvqAjG7T}DMKp7?^`eEQkeJFf|A|nrVrQ?pPy> zN+cWvh&Gg@&N7*+*m`O}eG`j}H%B60uu5&UM{`DTx+IN=C>+}LSckHb<8MtJ7n(Tm z+7nqy{!sOWIb?_0c0v2XR}208aTbwWYjxvS?@zvbdMz|M;O>FwA-A1ZAL!~s@E%z( z1Ht%A+{TFF$z+2D#)biV3iueW>$lt0=ec4hclhB|#*e#Msb%4%tTsC#JJGk91Dh|+ zZxWJscN<1#oz1 zT`TyAu~j7$q;SL1*-HgS7E;s!q2IL#irO5m6(m9 zb8@&BvIePShmsy@c`#}O=RJL^6%4iVxco0@5dMW^Hy64u-(E*jTgSa61HJVp4?%?o z0Ayb<@yY)Iw9ucGdqDR@*l3Dr}cQ8CJsA$UTa1R;E0mzykcldMEufNjDLo z?S7DPk?g|-;HR%I!fet#@{F=~-#`6PiA{I8A?e`Q_)P)D`{ zp|qf1_m1ya)z}1aJlkQgZ!8sa<(=&HBdC z;gJAA;ZF4wE1#FI|HH`36)5yPfV=({4*cjf+hgF~|Np9=lk$IKG%_kX#s7fH;cVwB zfoW3_rh9fS_=phfLpKZmp9>>Y9w5I>haOiH`weRQzL?>zz-Ld=70v!*83qAcN844Z zm(G7In8uVzWzRj|DeoKFGrD)0MUpkrldfggaZc09c2_N7ry%k+PRNNT|z z2fdEmz>E2GBBm@RY)@IWcHOxuR)F>me(=I(WEbf*H}3NOG`)nVPMKPR$yH+F;4#1V z@bncCKJ-^wM4(6IyLb z`Fzah#m+u2X~YD+q8B*a!)mo%!p7$Sb>&AC8BF3FoSeSwTFFvPC2mZBbncq#dhAY2 ziptJ*osdIr^?5a0U-ft?#fyAXVSy=INK zMMj%vbYjb_rV&%qI9_Ayhd^C~=ic7h#kjpaq@e#N1H<|~N0qi1Ev`5T;eALzT-D-c zO~&1vbAs5+!?xH55gnK2F`0YAwkpN zuD0Ey>8hUUgl0I!(fB6Hi0|{?efL(%*8f(ppQdwNW_q18zQ7w>MS(`H@z=5d_6~-8 zm0$dUGrVrMS|)D|;{an3A6mi~8(=PyO)u22w!e#a>B-t?NSa|cxKh81<@DdPz!jSI z`~f8D-nue@cAl_Z1K{d3ZET`ydBz%j=Z$?2+Uu^dfaoLZ{I%PSG7(Mk$x+2Kh7Jwr z0=HmV?|bMm;=cgkC-z201_ou79+^vnr1#AdtjAZR}@$vY`zZNnscc?ajEp^n_;GouzRe{ zK1(%JfE&#I&i0g+bOmtKrY)%+F6B@QimIWa>+6!4O}zhYBTcKsf%%6 zVE;lm*Ih!;%!dCb0B6Vup{Y4v$e=U?kgP;qk({uILE0xxa7K!b?XU7J(_iA%R*>+l z9!@qJE-m)hMQdyhEoRA8DlsiujthT0AU$r?KQAKKN_M)awxsy(wZL+zgHOF~$Uq6T z7w0}_LJ}OYA~YwowLo)~A~&*|GK`&_`D;3y;yY*7vgB@h_hde1aM>-|yZ7j21;*=D zU-g1^O{D9=qo<;d06wMyfJv?Fm-H+42OGn7Wd`z!0RNEV08n-cUnJLhJLa>9;|Q25 z4qYY*nW*hA^_<*E(aEVrl|Z1)xG~AY)gpc5t0MInx)>9-z@>4Jbjsyx?l|5^q+@^R zXEhz{K9yi}dVxvVEspx@x_ku>!U~|%Lv1teb>lU;8M2xxyJrQ#zrBN)ul$CGLc4#% zL-~<_?_bmd%V(p6g2I~S&Y^DpxtM`U1Bby}PD|@>R33t7OvTn{8lA#2)$*nkA-!Ht z?)@y`ttKKb-lxRzed=#esErf-dm%NcxL~H)*OW;w(##iXysE~{`roQPJ&9d>ea8EM zR%oJJD55!-)@C;xL&o|K3_4Z`Pr9>a)nHZv87)d{BBx~JHH~(#rGXV&R(e@dU7HGL{(gNyvzg)1<5II&arOgUZhvu(^ev zf-x5Rj$*p>`0~cP81d$*E-*6Xriy=%Y^$GE&yO7ebaU!Hf>e#h(va9m3K@O^FwQ_(wpB{L}GSyC}}{Se6?Gx`P7 z!c+&b&9{$R<+z+FG`v(*gNTdLQRaV|1n@9jY*LcuII}m-3pfMJqz#ibnaYjka&16@ zm1C3{PO*DBe93!!Dekk7?Gi~nhH(>unlZ z3B|t#9^kQK0P)8%IyaGXw>(e7MjYvlfxL%p{{&HOh#+b&|9%Ocj791aDSf`teu1!a zUn9-8ZUFfPsxxL$vIj$un5o$^07RXmO5m&hMnYHvG(?N)!Ba6p`(2s(I%e?>w$w>m z=-kzVg|>?KWk-%sPpT-$-3^&8pF-#gS_^~n^oycC2K6quvEU{&g-GqELJ}72>#Adr zjdCBY>u3qpo>!b6D%pksZij_&`yPKIsycl*t=|z<6O{-)(%uZ0?0*o|4u>R)$T1t_ ztogB%(=i+xbVfqbR7CL4zRERxbTO9pV`q{i3OAjt-aos_t3h|0TfZ=I!(DLJ={+U@ zDRt%6V-d|B!TGmM*S&ktBZ~cp>`Z`n$DT#B>wf8utMs1kLZkSkK%6Arpf5mfM1ClmMtTK%;)UC zVU=j;a|1uW04rv-hotx{FMBmET%BTD78SXc3B4fRhKcR%4H@F8Ug(fay1&`m{lMWb zu(iE-lsAN8*TgAWdoG{R(_Om~QYlMS-GGuSs%Q}3m=BPtu2r*j?awnd7B-lEjcJ=Y zs6zWs2>aIHdlbvOWxSUJQxoxKlGT`y2vNwyeX7TcO;gib8#)Zhv%~UUakka|pSj|8 zN7NBKg|U4(Ndhz-`f*k@x4J;X$=9ZS6%)gsoQoC5Gaz`fGo|_)LKb8Aa^^?*r%=Wc zYH|&({6?jp5I{heKiiC!uuQxE`87uTEwsP#csBBB{hq_qF-W_36WpcV5MpbY zXl--ZntkpZ|G59I76N_Sl;(UFC9(Jd5ThOfn`3()d5+OheZQ^elJXO zGk|)|vxf4z$KuXn;|iu*?*VpxWedt&8eYgRgq-oHijVL(WE-CzNty|ez{rroXcA~X z#X)R5s(Qm%K{C+(j*?nZj)xh@kwmPIUqBbxWi9D?!_pf6YdBP)(>2m(ufwA92HLA| zcOz*LHVKq*=x`mBdX;joVnejt#aYGanA%)yMO*S6LXLwC_0CSGjv?VGbE{e^!6 z8~`Z*(?86MNnlq==(v)VESx|E&AuX89^pNa#7itF%f?$v|AbqU1>=i=QcMrvHCvpp z<`>gHMFd-%(xU7g>))grJ9H$1T3Rb7>T(_~Q z?yNcN8sKmpmoDyZjT|svz}dI;@MkK%imtO*^{S zXXU&A+51J$PO{P>evGM>-?G^$j6_{_jrV zJNGzAW9<~7UQiAb|KnfLAo#+?t~a5}LPfF-_4@_o+;mdijX@FXs5>>@%TZzziPn#) z{fYt`CMG-l#XmYZ=d0PSQ>xH)`C>C)Xx<^L-9*TSI5$hS*Crb`lsfL<3nBIsZvDJE zGUgx&{HHxcmWtK7!2$vHI;(ccSd4yLxePmd`>FU36g?e6E3P#`)~65U@X4j|XSa&SwPpz<hjTsF*mEW9%xs5c>3!3PQT7crEO?- zfDB*Z9j)eIMh^YhINgTB`j4IMD;vJ6OX++VH8m{+oO2mJ(GssDTQlJ~XQnlhbxjnMIl@@`r28Q;^#=ahumWipki4~ITl!Xh`jARhPC1?Z9t?Vr7`dB zb=-eFt9mY3W|xVO9#+a=i%zoG0P0da1{YVNlx(kuoihd)miJ|u{QmY?`HmreQU}{Y z$WHlu%3op2AJVsAoA}uGrs>orj>|MITMCenw_0g3w7dU4>i~S2gzgh`YjN&gB(q}) zfSRamf;zT|v{Vx|>M6*)TbR}4Y2B2Z{fHZ;X`mC+Cyx>ivu(`J9t4W$OD)Bo?tx-r zVuit(fSo+i@+362_51k()VxRQ!3t{Oem~MjWfQo;0U`OJ_N0urU$hSqK3$IMVkJVb zoX76(AkDQO30(V`L44!1-<-^?KAIE2u6k=Ll#RXAY$DNU32?7n=WpJ&}__j-H>j`@5zn;2kGgzC;F;cqwDwEq|}?A zfj?06RcFL!WHN+BIf}BGV1OeVe5J@h!BR19+f6yvs_hqI%z0c;$tfR|Zf?=YeQ7FO zWVh=Aot02!`reTerN$k8`{7=Rg1@8N;efF;mikX~b7fRJY_;e(i zi{|FTI2nqS%d zm7?I!wN4~-J`a1i#V;h_z>?-bQ)Yga^4ZOwh#0j9T!EsVO;t9HTurg+7OQbYsGq%k`lSD|re&V|gk<}}()FZwXJ67Xw zcEGjY$H*-M%=1XN_??i_WX~KuEAZtODJ}^j?ySH;jkHkb!3R5)M*htQ*Sz@L>pjQF zM$(uiaLxz=0Fi$O^nsOe^;jBh^9=X`^KMdw%UKgXw)mZbP({-?AFgT6SShr}XN~tf<`4w^ImDrrB;BXu6^!&Vu=M@;(cbf4K_uNo z6CX;&dE(@is4&yP!(Hc3fQtCT^P{(PL4$v_*PB9t?k+`zN##ym%1ym?zrl|JB!)yG zsIFW)k&Zpg7TSMA^#;~5N{rg{282BKpPO!z7*d8mF_uZ(`#QZ59bB5|%|Oo@stb&f z;e`w-;wqv9zVZBtk<7@>*xl5DWxf{iAG3U7nh)+udM$M(#7kyNhoUUNTfFn^^Jw6y zwo}ojA`UJHo=>KFllO{h{q5CjD(`moR;NCoQ#a?Qa)~(;`6N ze8V?MP*Y5+FJQ7YB8Zgi{ zbn%3U!8x9k2EsvMp5I$&>X^4|mBmKYntL!-uPLxgD3J*t6XO@pbgymSXWqb&`wr^!{?CYBJ~3buZ9u@{)XM@ zJU`~el>{`B3EtTsf7R?6=vf(e6LranXUR|ehsx&&{L`gY)h^cC!>-FaNTwyv3tRfl znBEg&4Gn&k!Qkt_pK5wiNt_wBhv3pjYzOlzp5ucenXcyEDNy%g)wt>&|@7_?pA z*COY_zxp~$(tXB;EDw#@cP%8e_@S5UVXxFtGB+%n)z)pYj4hwPdguWs9 zN+wK#-S9@k#$ko>=ys8yPJM<>X`Jmf-^ALzp9Kf_G|dTi>T}mZilE)~S@ZStr#;3o z5v%$k4SOa^%qBofiB&%0&V~TLgNK55{KwtR-Ba+_<*P2LGK$3&2~PMv8sF+f3IO*c zR@0_U;I5At4_2SKk0%Yn3d5Him)w;k$B3=e3f!n%dk_p}16s*KtS5e7;8zPUwnLe}pxe}F~fJcSlV3kn4R6ir5PrFrSfva!duDLi{ zJ+T%wwn%9IC_=_UR7t#`vj$cd{KknVbPL~N`1|k^JGCK6SN+V_WCjRJYp#VmxtOY% z> to eliminate any potential overhead effect of the instrumentation. \ No newline at end of file From c43cd2a4e6265a69bb8b9b422c15596ac680de6a Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Tue, 26 Sep 2023 16:29:06 +0200 Subject: [PATCH 081/540] Change image extension --- docs/open-telemetry.asciidoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/open-telemetry.asciidoc b/docs/open-telemetry.asciidoc index ad50f9c28a..81205ea643 100644 --- a/docs/open-telemetry.asciidoc +++ b/docs/open-telemetry.asciidoc @@ -8,17 +8,17 @@ With that, applications https://opentelemetry.io/docs/instrumentation/ruby/manua The native instrumentation in the Ruby Client follows the https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/[OpenTelemetry Semantic Conventions for Elasticsearch]. In particular, the instrumentation in the client covers the logical Elasticsearch request layer, thus, creates a single span per request the service executes against the Ruby Client. The following image shows a resulting trace in which two different Elasticsearch requests are executed, i.e. `ping` and a search `request`: [role="screenshot"] -image::images/otel-waterfall-instrumented-without-http.jpg[alt="Distributed trace with Elasticsearch spans",align="center"] +image::images/otel-waterfall-without-http.png[alt="Distributed trace with Elasticsearch spans",align="center"] Usually, OpenTelemetry auto-instrumentation modules come with instrumentation support for HTTP-level communication. In this case, in addition to the logical Elasticsearch client requests, spans will be captured for the physical HTTP requests emitted by the client. The following image shows a trace with both, Elasticsearch spans (in blue) and the corresponding HTTP-level spans (in red): [role="screenshot"] -image::images/otel-waterfall-instrumented-with-http.jpg[alt="Distributed trace with Elasticsearch spans",align="center"] +image::images/otel-waterfall-with-http.png[alt="Distributed trace with Elasticsearch spans",align="center"] Advanced Ruby Client behavior such as nodes round-robin and request retries are revealed through the combination of logical Elasticsearch spans and the physical HTTP spans. The following example shows an `search` request in a scenario with two Elasticsearch nodes: [role="screenshot"] -image::images/otel-waterfall-retry.jpg[alt="Distributed trace with Elasticsearch spans",align="center"] +image::images/otel-waterfall-retry.png[alt="Distributed trace with Elasticsearch spans",align="center"] The first node is unavailable and results in an HTTP error, while the retry to the second node succeeds. Both HTTP requests are subsumed by the logical Elasticsearch request span (in blue). From c8a30ba78a26dd34f372d0ec57bae531da624fcc Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Tue, 26 Sep 2023 21:36:59 +0200 Subject: [PATCH 082/540] Add valid options to capture search query option --- docs/open-telemetry.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/open-telemetry.asciidoc b/docs/open-telemetry.asciidoc index 81205ea643..1be68420f1 100644 --- a/docs/open-telemetry.asciidoc +++ b/docs/open-telemetry.asciidoc @@ -50,6 +50,7 @@ With this configuration option you can enable (default) or disable the built-in Per default, the built-in OpenTelemetry instrumentation does not capture request bodies because of data privacy reasons. You can use this option to enable capturing of search queries from the the request bodies of Elasticsearch search requests in case you wish to capture this information, regardless. The options are to capture the raw search query, sanitize the query with a default list of sensitive keys, or not capture it at all. **Default:** `omit` +**Valid Options:** `omit`, `sanitize`, `raw` |============ | Environment Variable | `OTEL_INSTRUMENTATION_ELASTICSEARCH_CAPTURE_SEARCH_QUERY` From f0fa9dcc37802072e86fd9a81644012a627272e7 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Tue, 26 Sep 2023 21:41:36 +0200 Subject: [PATCH 083/540] Minor docs updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó Update docs/open-telemetry.asciidoc Co-authored-by: István Zoltán Szabó Minor change to docs --- docs/open-telemetry.asciidoc | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/open-telemetry.asciidoc b/docs/open-telemetry.asciidoc index 1be68420f1..cd5625ba8f 100644 --- a/docs/open-telemetry.asciidoc +++ b/docs/open-telemetry.asciidoc @@ -1,29 +1,30 @@ [[opentelemetry]] === Using OpenTelemetry -You can use https://opentelemetry.io/[OpenTelemetry] to monitor the performance and behavior of your Elasticsearch requests through the Ruby Client. +You can use https://opentelemetry.io/[OpenTelemetry] to monitor the performance and behavior of your {es} requests through the Ruby Client. The Ruby Client comes with built-in OpenTelemetry instrumentation that emits https://www.elastic.co/guide/en/apm/guide/current/apm-distributed-tracing.html[distributed tracing spans] by default. -With that, applications https://opentelemetry.io/docs/instrumentation/ruby/manual/[instrumented with OpenTelemetry] or using the https://opentelemetry.io/docs/instrumentation/ruby/automatic/[OpenTelemetry Ruby SDK] are inherently enriched with additional spans that contain insightful information about the execution of the Elasticsearch requests. +With that, applications https://opentelemetry.io/docs/instrumentation/ruby/manual/[instrumented with OpenTelemetry] or using the https://opentelemetry.io/docs/instrumentation/ruby/automatic/[OpenTelemetry Ruby SDK] are inherently enriched with additional spans that contain insightful information about the execution of the {es} requests. -The native instrumentation in the Ruby Client follows the https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/[OpenTelemetry Semantic Conventions for Elasticsearch]. In particular, the instrumentation in the client covers the logical Elasticsearch request layer, thus, creates a single span per request the service executes against the Ruby Client. The following image shows a resulting trace in which two different Elasticsearch requests are executed, i.e. `ping` and a search `request`: +The native instrumentation in the Ruby Client follows the https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/[OpenTelemetry Semantic Conventions for {es}]. In particular, the instrumentation in the client covers the logical layer of {es} requests. A single span per request is created that is processed by the service through the Ruby Client. The following image shows a trace that records the handling of two different {es} requests: a `ping` request and a `search` request. [role="screenshot"] image::images/otel-waterfall-without-http.png[alt="Distributed trace with Elasticsearch spans",align="center"] -Usually, OpenTelemetry auto-instrumentation modules come with instrumentation support for HTTP-level communication. In this case, in addition to the logical Elasticsearch client requests, spans will be captured for the physical HTTP requests emitted by the client. The following image shows a trace with both, Elasticsearch spans (in blue) and the corresponding HTTP-level spans (in red): +Usually, OpenTelemetry auto-instrumentation modules come with instrumentation support for HTTP-level communication. In this case, in addition to the logical {es} client requests, spans will be captured for the physical HTTP requests emitted by the client. The following image shows a trace with both, {es} spans (in blue) and the corresponding HTTP-level spans (in red): [role="screenshot"] image::images/otel-waterfall-with-http.png[alt="Distributed trace with Elasticsearch spans",align="center"] -Advanced Ruby Client behavior such as nodes round-robin and request retries are revealed through the combination of logical Elasticsearch spans and the physical HTTP spans. The following example shows an `search` request in a scenario with two Elasticsearch nodes: +Advanced Ruby Client behavior such as nodes round-robin and request retries are revealed through the combination of logical {es} spans and the physical HTTP spans. The following example shows a `search` request in a scenario with two nodes: [role="screenshot"] image::images/otel-waterfall-retry.png[alt="Distributed trace with Elasticsearch spans",align="center"] -The first node is unavailable and results in an HTTP error, while the retry to the second node succeeds. Both HTTP requests are subsumed by the logical Elasticsearch request span (in blue). +The first node is unavailable and results in an HTTP error, while the retry to the second node succeeds. Both HTTP requests are subsumed by the logical {es} request span (in blue). [discrete] ==== Setup the OpenTelemetry instrumentation + When using the https://opentelemetry.io/docs/instrumentation/ruby/manual[OpenTelemetry Ruby SDK manually] or using the https://opentelemetry.io/docs/instrumentation/ruby/automatic/[OpenTelemetry Ruby Auto-Instrumentations], the Ruby Client's OpenTelemetry instrumentation is enabled by default and uses the global OpenTelemetry SDK with the global tracer provider. You can provide a tracer provider via the Ruby Client configuration option `opentelemetry_tracer_provider` when instantiating the client. This is sometimes useful for testing or other specific use cases. [discrete] @@ -47,9 +48,10 @@ With this configuration option you can enable (default) or disable the built-in [discrete] ===== Capture search request bodies -Per default, the built-in OpenTelemetry instrumentation does not capture request bodies because of data privacy reasons. You can use this option to enable capturing of search queries from the the request bodies of Elasticsearch search requests in case you wish to capture this information, regardless. The options are to capture the raw search query, sanitize the query with a default list of sensitive keys, or not capture it at all. +Per default, the built-in OpenTelemetry instrumentation does not capture request bodies due to data privacy considerations. You can use this option to enable capturing of search queries from the request bodies of {es} search requests in case you wish to gather this information regardless. The options are to capture the raw search query, sanitize the query with a default list of sensitive keys, or not capture it at all. **Default:** `omit` + **Valid Options:** `omit`, `sanitize`, `raw` |============ @@ -57,9 +59,9 @@ Per default, the built-in OpenTelemetry instrumentation does not capture request |============ [discrete] -===== Sanitize the elasticsearch search request body +===== Sanitize the {es} search request body -You can configure the list of keys whose values are redacted when the search query is captured. The values should be separated by a comma. +You can configure the list of keys whose values are redacted when the search query is captured. Values must be comma-separated. **Default:** `nil` @@ -75,6 +77,7 @@ OTEL_RUBY_INSTRUMENTATION_ELASTICSEARCH_SEARCH_QUERY_SANITIZE_KEYS='sensitive-ke [discrete] ==== Overhead -The OpenTelemetry instrumentation (as any other monitoring approach) may come with a little overhead on CPU, memory and/or latency. The overhead may only occur when the instrumentation is enabled (default) and an OpenTelemetry SDK is active in the target application. In case that either the instrumentation is disabled or no OpenTelemetry SDK is active with the target application, there is no monitoring overhead expected when using the client. -Even when the instrumentation is enabled and is being actively used (by an OpenTelemetry SDK), in the vast majority of cases the overhead is very small and negligible. In edge cases in which there is a noticable overhead the <> to eliminate any potential overhead effect of the instrumentation. \ No newline at end of file +The OpenTelemetry instrumentation (as any other monitoring approach) may come with a slight overhead on CPU, memory, and/or latency. The overhead may only occur when the instrumentation is enabled (default) and an OpenTelemetry SDK is active in the target application. When the instrumentation is disabled or no OpenTelemetry SDK is active within the target application, monitoring overhead is not expected when using the client. + +Even in cases where the instrumentation is enabled and is actively used (by an OpenTelemetry SDK), the overhead is minimal and negligible in the vast majority of cases. In edge cases where there is a noticeable overhead, the <> to eliminate any potential impact on performance. \ No newline at end of file From 0828c677299fd66c216645438a285a42551b2e07 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 28 Sep 2023 14:25:09 +0200 Subject: [PATCH 084/540] Remove special handling for create and just use index endpoint --- elasticsearch-api/lib/elasticsearch/api/actions/create.rb | 1 - .../spec/elasticsearch/api/perform_request_spec.rb | 4 ++++ elasticsearch-api/utils/thor/templates/method.erb | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb index 8910d97cb9..43705a5771 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb @@ -48,7 +48,6 @@ def create(arguments = {}) end request_opts[:defined_params] = defined_params unless defined_params.empty? - arguments.update endpoint: 'create' if arguments[:id] index arguments.update op_type: 'create' else diff --git a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb index 87976f47ec..aac755d569 100644 --- a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb @@ -38,6 +38,10 @@ let(:client_double) do Class.new { include Elasticsearch::API }.new.tap do |client| expect(client).to receive(:perform_request) do |_, _, _, _, _, request_params| + # The create method ends up becoming an 'index' request + if expected_perform_request_params[:endpoint] == 'create' + expected_perform_request_params[:endpoint] = 'index' + end # Check that the expected hash is passed to the perform_request method expect(request_params).to eq(expected_perform_request_params) end.and_return(response_double) diff --git a/elasticsearch-api/utils/thor/templates/method.erb b/elasticsearch-api/utils/thor/templates/method.erb index 0cada63f2b..ef7218792d 100644 --- a/elasticsearch-api/utils/thor/templates/method.erb +++ b/elasticsearch-api/utils/thor/templates/method.erb @@ -34,7 +34,6 @@ module Elasticsearch <%- end %> <%- %> <%- if @spec.endpoint_name == 'create' -%> - <%= ' '*(@spec.namespace_depth+3) %>arguments.update endpoint: 'create' <%= ' '*(@spec.namespace_depth+3) %>if arguments[:id] <%= ' '*(@spec.namespace_depth+3) %> index arguments.update op_type: 'create' <%= ' '*(@spec.namespace_depth+3) %>else From 25d18c64f299c848044c778eafd087627d7deace Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 28 Sep 2023 14:25:32 +0200 Subject: [PATCH 085/540] Remove opts from args when calling perform_request directly --- elasticsearch/lib/elasticsearch.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/elasticsearch/lib/elasticsearch.rb b/elasticsearch/lib/elasticsearch.rb index 229f198394..5435c2db22 100644 --- a/elasticsearch/lib/elasticsearch.rb +++ b/elasticsearch/lib/elasticsearch.rb @@ -59,7 +59,10 @@ def method_missing(name, *args, &block) super elsif name == :perform_request # The signature for perform_request is: - # method, path, params, body, headers + # method, path, params, body, headers, opts + # The last arg is opts, which shouldn't be sent when `perform_request` is called + # directly. + args.pop if (opaque_id = args[2]&.delete(:opaque_id)) headers = args[4] || {} opaque_id = @opaque_id_prefix ? "#{@opaque_id_prefix}#{opaque_id}" : opaque_id @@ -71,6 +74,9 @@ def method_missing(name, *args, &block) @transport.perform_request(*args, &block) end else + # The last arg is opts, which shouldn't be sent when `perform_request` is called + # directly. + args.pop @transport.send(name, *args, &block) end end From f5e38454e4a70b021bc94393d1d2d4ff5e585324 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 28 Sep 2023 14:52:05 +0200 Subject: [PATCH 086/540] Transport object is the http adapter so expected args don't change --- elasticsearch/spec/unit/opaque_id_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch/spec/unit/opaque_id_spec.rb b/elasticsearch/spec/unit/opaque_id_spec.rb index 1798898b2f..39c3f06104 100644 --- a/elasticsearch/spec/unit/opaque_id_spec.rb +++ b/elasticsearch/spec/unit/opaque_id_spec.rb @@ -29,7 +29,7 @@ it 'uses x-opaque-id on a request' do client.search(opaque_id: '12345') expect(transport).to have_received(:perform_request) - .with('GET', '_search', {}, nil, { 'X-Opaque-Id' => '12345' }, { endpoint: 'search' }) + .with('GET', '_search', {}, nil, { 'X-Opaque-Id' => '12345' }) end end @@ -42,7 +42,7 @@ it 'uses x-opaque-id on a request' do expect { client.search(opaque_id: '12345') }.not_to raise_error expect(transport).to have_received(:perform_request) - .with('GET', '_search', {}, nil, { 'X-Opaque-Id' => 'elastic_cloud12345' }, { endpoint: 'search' }) + .with('GET', '_search', {}, nil, { 'X-Opaque-Id' => 'elastic_cloud12345' }) end end end From 755a6791551fd61a71422260cdefe7a04825287a Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 28 Sep 2023 15:05:38 +0200 Subject: [PATCH 087/540] Only remove the last arg if it has an endpoint key --- elasticsearch/lib/elasticsearch.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/elasticsearch/lib/elasticsearch.rb b/elasticsearch/lib/elasticsearch.rb index 5435c2db22..2b02618576 100644 --- a/elasticsearch/lib/elasticsearch.rb +++ b/elasticsearch/lib/elasticsearch.rb @@ -62,7 +62,7 @@ def method_missing(name, *args, &block) # method, path, params, body, headers, opts # The last arg is opts, which shouldn't be sent when `perform_request` is called # directly. - args.pop + args.pop if args[-1][:endpoint] if (opaque_id = args[2]&.delete(:opaque_id)) headers = args[4] || {} opaque_id = @opaque_id_prefix ? "#{@opaque_id_prefix}#{opaque_id}" : opaque_id @@ -74,9 +74,6 @@ def method_missing(name, *args, &block) @transport.perform_request(*args, &block) end else - # The last arg is opts, which shouldn't be sent when `perform_request` is called - # directly. - args.pop @transport.send(name, *args, &block) end end From db981444302d51fbeebddd15ca0f9029835ef80c Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 28 Sep 2023 15:18:14 +0200 Subject: [PATCH 088/540] Temporarily disable unit tests --- .../elasticsearch/api/perform_request_spec.rb | 168 +++++++++--------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb index aac755d569..7dd7f419e9 100644 --- a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb @@ -1,86 +1,86 @@ -# 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 +# # 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. # -# http://www.apache.org/licenses/LICENSE-2.0 +# require 'spec_helper' +# require 'elastic-transport' +# require_relative '../../../utils/endpoint_spec' +# require_relative '../../../utils/thor/generator/files_helper' # -# 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. - -require 'spec_helper' -require 'elastic-transport' -require_relative '../../../utils/endpoint_spec' -require_relative '../../../utils/thor/generator/files_helper' - -describe 'Perform request args' do - Elasticsearch::API::FilesHelper.files.each do |filepath| - spec = Elasticsearch::API::EndpointSpec.new(filepath) - next if spec.module_namespace.flatten.first == '_internal' - - # These are the path parts defined by the user in the method argument - defined_path_parts = spec.path_params.inject({}) do |params, part| - params.merge(part => 'testing') - end - - # These are the required params, we must pass them to the method even when testing - required_params = spec.required_parts.inject({}) do |params, part| - params.merge(part.to_sym => 'testing') - end - - let(:client_double) do - Class.new { include Elasticsearch::API }.new.tap do |client| - expect(client).to receive(:perform_request) do |_, _, _, _, _, request_params| - # The create method ends up becoming an 'index' request - if expected_perform_request_params[:endpoint] == 'create' - expected_perform_request_params[:endpoint] = 'index' - end - # Check that the expected hash is passed to the perform_request method - expect(request_params).to eq(expected_perform_request_params) - end.and_return(response_double) - end - end - - let(:response_double) do - double('response', status: 200, body: {}, headers: {}) - end - - context("'#{spec.endpoint_name}'") do - # The expected hash passed to perform_request contains the endpoint name and any defined path parts - let(:expected_perform_request_params) do - if defined_path_parts.empty? - { endpoint: spec.endpoint_name } - else - { endpoint: spec.endpoint_name, defined_params: defined_path_parts} - end - end - - if spec.path_parts.empty? - it "passes the endpoint id to the request" do - if spec.module_namespace.empty? - client_double.send(spec.method_name, required_params) - else - client_double.send(spec.module_namespace[0]).send(spec.method_name, required_params) - end - end - else - it "passes params to the request with the endpoint id: #{spec.path_parts.keys}" do - if spec.module_namespace.empty? - client_double.send(spec.method_name, required_params.merge(defined_path_parts)) - else - client_double.send( - spec.module_namespace[0]).send(spec.method_name, required_params.merge(defined_path_parts) - ) - end - end - end - end - end -end +# describe 'Perform request args' do +# Elasticsearch::API::FilesHelper.files.each do |filepath| +# spec = Elasticsearch::API::EndpointSpec.new(filepath) +# next if spec.module_namespace.flatten.first == '_internal' +# +# # These are the path parts defined by the user in the method argument +# defined_path_parts = spec.path_params.inject({}) do |params, part| +# params.merge(part => 'testing') +# end +# +# # These are the required params, we must pass them to the method even when testing +# required_params = spec.required_parts.inject({}) do |params, part| +# params.merge(part.to_sym => 'testing') +# end +# +# let(:client_double) do +# Class.new { include Elasticsearch::API }.new.tap do |client| +# expect(client).to receive(:perform_request) do |_, _, _, _, _, request_params| +# # The create method ends up becoming an 'index' request +# if expected_perform_request_params[:endpoint] == 'create' +# expected_perform_request_params[:endpoint] = 'index' +# end +# # Check that the expected hash is passed to the perform_request method +# expect(request_params).to eq(expected_perform_request_params) +# end.and_return(response_double) +# end +# end +# +# let(:response_double) do +# double('response', status: 200, body: {}, headers: {}) +# end +# +# context("'#{spec.endpoint_name}'") do +# # The expected hash passed to perform_request contains the endpoint name and any defined path parts +# let(:expected_perform_request_params) do +# if defined_path_parts.empty? +# { endpoint: spec.endpoint_name } +# else +# { endpoint: spec.endpoint_name, defined_params: defined_path_parts} +# end +# end +# +# if spec.path_parts.empty? +# it "passes the endpoint id to the request" do +# if spec.module_namespace.empty? +# client_double.send(spec.method_name, required_params) +# else +# client_double.send(spec.module_namespace[0]).send(spec.method_name, required_params) +# end +# end +# else +# it "passes params to the request with the endpoint id: #{spec.path_parts.keys}" do +# if spec.module_namespace.empty? +# client_double.send(spec.method_name, required_params.merge(defined_path_parts)) +# else +# client_double.send( +# spec.module_namespace[0]).send(spec.method_name, required_params.merge(defined_path_parts) +# ) +# end +# end +# end +# end +# end +# end From 8b389cf0389b5f7a2e471e0342ba4a32ee78bfee Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 28 Sep 2023 15:22:29 +0200 Subject: [PATCH 089/540] download artifacts for unit tests --- .github/workflows/main.yml | 2 +- .../elasticsearch/api/perform_request_spec.rb | 168 +++++++++--------- 2 files changed, 85 insertions(+), 85 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 202c677a68..0b61ac0562 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,4 +40,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: cd elasticsearch-api && rake download_artifacts[8.11.0-SNAPSHOT] && bundle exec rake test:spec test:platinum:unit diff --git a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb index 7dd7f419e9..aac755d569 100644 --- a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb @@ -1,86 +1,86 @@ -# # 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. +# 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 # -# require 'spec_helper' -# require 'elastic-transport' -# require_relative '../../../utils/endpoint_spec' -# require_relative '../../../utils/thor/generator/files_helper' +# http://www.apache.org/licenses/LICENSE-2.0 # -# describe 'Perform request args' do -# Elasticsearch::API::FilesHelper.files.each do |filepath| -# spec = Elasticsearch::API::EndpointSpec.new(filepath) -# next if spec.module_namespace.flatten.first == '_internal' -# -# # These are the path parts defined by the user in the method argument -# defined_path_parts = spec.path_params.inject({}) do |params, part| -# params.merge(part => 'testing') -# end -# -# # These are the required params, we must pass them to the method even when testing -# required_params = spec.required_parts.inject({}) do |params, part| -# params.merge(part.to_sym => 'testing') -# end -# -# let(:client_double) do -# Class.new { include Elasticsearch::API }.new.tap do |client| -# expect(client).to receive(:perform_request) do |_, _, _, _, _, request_params| -# # The create method ends up becoming an 'index' request -# if expected_perform_request_params[:endpoint] == 'create' -# expected_perform_request_params[:endpoint] = 'index' -# end -# # Check that the expected hash is passed to the perform_request method -# expect(request_params).to eq(expected_perform_request_params) -# end.and_return(response_double) -# end -# end -# -# let(:response_double) do -# double('response', status: 200, body: {}, headers: {}) -# end -# -# context("'#{spec.endpoint_name}'") do -# # The expected hash passed to perform_request contains the endpoint name and any defined path parts -# let(:expected_perform_request_params) do -# if defined_path_parts.empty? -# { endpoint: spec.endpoint_name } -# else -# { endpoint: spec.endpoint_name, defined_params: defined_path_parts} -# end -# end -# -# if spec.path_parts.empty? -# it "passes the endpoint id to the request" do -# if spec.module_namespace.empty? -# client_double.send(spec.method_name, required_params) -# else -# client_double.send(spec.module_namespace[0]).send(spec.method_name, required_params) -# end -# end -# else -# it "passes params to the request with the endpoint id: #{spec.path_parts.keys}" do -# if spec.module_namespace.empty? -# client_double.send(spec.method_name, required_params.merge(defined_path_parts)) -# else -# client_double.send( -# spec.module_namespace[0]).send(spec.method_name, required_params.merge(defined_path_parts) -# ) -# end -# end -# end -# end -# end -# end +# 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. + +require 'spec_helper' +require 'elastic-transport' +require_relative '../../../utils/endpoint_spec' +require_relative '../../../utils/thor/generator/files_helper' + +describe 'Perform request args' do + Elasticsearch::API::FilesHelper.files.each do |filepath| + spec = Elasticsearch::API::EndpointSpec.new(filepath) + next if spec.module_namespace.flatten.first == '_internal' + + # These are the path parts defined by the user in the method argument + defined_path_parts = spec.path_params.inject({}) do |params, part| + params.merge(part => 'testing') + end + + # These are the required params, we must pass them to the method even when testing + required_params = spec.required_parts.inject({}) do |params, part| + params.merge(part.to_sym => 'testing') + end + + let(:client_double) do + Class.new { include Elasticsearch::API }.new.tap do |client| + expect(client).to receive(:perform_request) do |_, _, _, _, _, request_params| + # The create method ends up becoming an 'index' request + if expected_perform_request_params[:endpoint] == 'create' + expected_perform_request_params[:endpoint] = 'index' + end + # Check that the expected hash is passed to the perform_request method + expect(request_params).to eq(expected_perform_request_params) + end.and_return(response_double) + end + end + + let(:response_double) do + double('response', status: 200, body: {}, headers: {}) + end + + context("'#{spec.endpoint_name}'") do + # The expected hash passed to perform_request contains the endpoint name and any defined path parts + let(:expected_perform_request_params) do + if defined_path_parts.empty? + { endpoint: spec.endpoint_name } + else + { endpoint: spec.endpoint_name, defined_params: defined_path_parts} + end + end + + if spec.path_parts.empty? + it "passes the endpoint id to the request" do + if spec.module_namespace.empty? + client_double.send(spec.method_name, required_params) + else + client_double.send(spec.module_namespace[0]).send(spec.method_name, required_params) + end + end + else + it "passes params to the request with the endpoint id: #{spec.path_parts.keys}" do + if spec.module_namespace.empty? + client_double.send(spec.method_name, required_params.merge(defined_path_parts)) + else + client_double.send( + spec.module_namespace[0]).send(spec.method_name, required_params.merge(defined_path_parts) + ) + end + end + end + end + end +end From 9dfaddc1f0c536dcab7417bc0ac50026bb08db51 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 28 Sep 2023 15:23:43 +0200 Subject: [PATCH 090/540] endpoint for creating a doc is index --- .../elasticsearch/api/actions/create_document_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb index 6779213278..545a0d7f37 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb @@ -26,7 +26,7 @@ { endpoint: 'create', op_type: 'create' }, { foo: 'bar' }, {}, - { defined_params: { id: '123', index: 'foo' }, endpoint: 'create' } + { defined_params: { id: '123', index: 'foo' }, endpoint: 'index' } ] end @@ -53,7 +53,7 @@ { endpoint: 'create', op_type: 'create' }, {}, {}, - { defined_params: { id: '123', index: 'foo' }, endpoint: 'create' } + { defined_params: { id: '123', index: 'foo' }, endpoint: 'index' } ] end @@ -81,7 +81,7 @@ { endpoint: 'create', op_type: 'create' }, { foo: 'bar' }, {}, - { defined_params: { id: 1, index: 'foo' }, endpoint: 'create' } + { defined_params: { id: 1, index: 'foo' }, endpoint: 'index' } ] end @@ -109,7 +109,7 @@ { endpoint: 'create' }, { foo: 'bar' }, {}, - { defined_params: { index: 'foo' }, endpoint: 'create' } + { defined_params: { index: 'foo' }, endpoint: 'index' } ] end From 342ef4873fc7d5bb2506d48b9cdc34b767c5d072 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 28 Sep 2023 15:28:29 +0200 Subject: [PATCH 091/540] download_artifacts rake task is in root --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0b61ac0562..2d3d84191a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,4 +40,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: cd elasticsearch-api && rake download_artifacts[8.11.0-SNAPSHOT] && bundle exec rake test:spec test:platinum:unit + run: rake elasticsearch:download_artifacts[8.11.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit From b7a1085c1c0e43156b709ae24eb7dc703f1a0892 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 28 Sep 2023 15:32:34 +0200 Subject: [PATCH 092/540] Further updates to create document spec --- .../api/actions/create_document_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb index 545a0d7f37..7175e4f15b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb @@ -23,7 +23,7 @@ [ 'PUT', 'foo/_doc/123', - { endpoint: 'create', op_type: 'create' }, + { op_type: 'create' }, { foo: 'bar' }, {}, { defined_params: { id: '123', index: 'foo' }, endpoint: 'index' } @@ -40,7 +40,7 @@ [ 'PUT', 'foo/_doc/123', - { endpoint: 'create', op_type: 'create' }, + { op_type: 'create' }, {}, {} ] @@ -50,7 +50,7 @@ [ 'PUT', 'foo/_doc/123', - { endpoint: 'create', op_type: 'create' }, + { op_type: 'create' }, {}, {}, { defined_params: { id: '123', index: 'foo' }, endpoint: 'index' } @@ -68,7 +68,7 @@ [ 'PUT', 'foo/_doc/1', - { endpoint: 'create', op_type: 'create' }, + { op_type: 'create' }, { foo: 'bar' }, {} ] @@ -78,7 +78,7 @@ [ 'PUT', 'foo/_doc/1', - { endpoint: 'create', op_type: 'create' }, + { op_type: 'create' }, { foo: 'bar' }, {}, { defined_params: { id: 1, index: 'foo' }, endpoint: 'index' } @@ -106,7 +106,7 @@ [ 'POST', 'foo/_doc', - { endpoint: 'create' }, + { }, { foo: 'bar' }, {}, { defined_params: { index: 'foo' }, endpoint: 'index' } From 922bc07494fd0dea25f4880df7ade8e7189a32a4 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 28 Sep 2023 15:47:05 +0200 Subject: [PATCH 093/540] Document client option opentelemetry_tracer_provider --- docs/basic-config.asciidoc | 51 +++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/docs/basic-config.asciidoc b/docs/basic-config.asciidoc index d23d517166..f6e8efbb0a 100644 --- a/docs/basic-config.asciidoc +++ b/docs/basic-config.asciidoc @@ -8,29 +8,30 @@ can use. [cols="<,<,<"] |=== -| **Parameter** | **Data type** | **Description** -| `adapter` | Symbol | A specific adapter for Faraday (for example, `:patron`). -| `api_key` | String, Hash | For API key Authentication. Either the base64 encoding of `id` and `api_key` joined by a colon as a string, or a hash with the `id` and `api_key` values. -| `compression` | Boolean | Whether to compress requests. Gzip compression is used. Defaults to `false`. Responses are automatically inflated if they are compressed. If a custom transport object is used, it must handle the request compression and response inflation. -| `enable_meta_header` | Boolean | Whether to enable sending the meta data header to Cloud. Defaults to `true`. -| `hosts` | String, Array | Single host passed as a string or hash, or multiple hosts passed as an array; `host` or `url` keys are also valid. -| `log` | Boolean | Whether to use the default logger. Disabled by default. -| `logger` | Object | An instance of a Logger-compatible object. -| `opaque_id_prefix` | String | Sets a prefix for X-Opaque-Id when initializing the client. This is prepended to the id you set before each request if you're using X-Opaque-Id. -| `randomize_hosts` | Boolean | Whether to shuffle connections on initialization and reload. Defaults to `false`. -| `reload_connections` | Boolean, Number | Whether to reload connections after X requests. Defaults to `false`. -| `reload_on_failure` | Boolean | Whether to reload connections after failure. Defaults to `false`. -| `request_timeout` | Integer | The request timeout to be passed to transport in options. -| `resurrect_after` | Integer | Specifies after how many seconds a dead connection should be tried again. -| `retry_on_failure` | Boolean, Number | Whether to retry X times when request fails before raising and exception. Defaults to `false`. -| `retry_on_status` | Array, Number | Specifies which status code needs to be returned to retry. -| `selector` | Constant | An instance of selector strategy implemented with {Elastic::Transport::Transport::Connections::Selector::Base}. -| `send_get_body_as` | String | Specifies the HTTP method to use for GET requests with a body. Defaults to `GET`. -| `serializer_class` | Constant | Specifies a serializer class to use. It is initialized by the transport and passed the transport instance. -| `sniffer_timeout` | Integer | Specifieds the timeout for reloading connections in seconds. Defaults to `1`. -| `trace` | Boolean | Whether to use the default tracer. Disabled by default. -| `tracer` | Object | Specifies an instance of a Logger-compatible object. -| `transport` | Object | Specifies a transport instance. -| `transport_class` | Constant | Specifies a transport class to use. It is initialized by the client and passed hosts and all arguments. -| `transport_options` | Hash | Specifies the options to be passed to the `Faraday::Connection` constructor. +| **Parameter** | **Data type** | **Description** +| `adapter` | Symbol | A specific adapter for Faraday (for example, `:patron`). +| `api_key` | String, Hash | For API key Authentication. Either the base64 encoding of `id` and `api_key` joined by a colon as a string, or a hash with the `id` and `api_key` values. +| `compression` | Boolean | Whether to compress requests. Gzip compression is used. Defaults to `false`. Responses are automatically inflated if they are compressed. If a custom transport object is used, it must handle the request compression and response inflation. +| `enable_meta_header` | Boolean | Whether to enable sending the meta data header to Cloud. Defaults to `true`. +| `hosts` | String, Array | Single host passed as a string or hash, or multiple hosts passed as an array; `host` or `url` keys are also valid. +| `log` | Boolean | Whether to use the default logger. Disabled by default. +| `logger` | Object | An instance of a Logger-compatible object. +| `opaque_id_prefix` | String | Sets a prefix for X-Opaque-Id when initializing the client. This is prepended to the id you set before each request if you're using X-Opaque-Id. +| `opentelemetry_tracer_provider` | OpenTelemetry::Trace::TracerProvider | An explicit TracerProvider to use instead of the global one with OpenTelemetry. This enables better dependency injection and simplifies testing. +| `randomize_hosts` | Boolean | Whether to shuffle connections on initialization and reload. Defaults to `false`. +| `reload_connections` | Boolean, Number | Whether to reload connections after X requests. Defaults to `false`. +| `reload_on_failure` | Boolean | Whether to reload connections after failure. Defaults to `false`. +| `request_timeout` | Integer | The request timeout to be passed to transport in options. +| `resurrect_after` | Integer | Specifies after how many seconds a dead connection should be tried again. +| `retry_on_failure` | Boolean, Number | Whether to retry X times when request fails before raising and exception. Defaults to `false`. +| `retry_on_status` | Array, Number | Specifies which status code needs to be returned to retry. +| `selector` | Constant | An instance of selector strategy implemented with {Elastic::Transport::Transport::Connections::Selector::Base}. +| `send_get_body_as` | String | Specifies the HTTP method to use for GET requests with a body. Defaults to `GET`. +| `serializer_class` | Constant | Specifies a serializer class to use. It is initialized by the transport and passed the transport instance. +| `sniffer_timeout` | Integer | Specifies the timeout for reloading connections in seconds. Defaults to `1`. +| `trace` | Boolean | Whether to use the default tracer. Disabled by default. +| `tracer` | Object | Specifies an instance of a Logger-compatible object. +| `transport` | Object | Specifies a transport instance. +| `transport_class` | Constant | Specifies a transport class to use. It is initialized by the client and passed hosts and all arguments. +| `transport_options` | Hash | Specifies the options to be passed to the `Faraday::Connection` constructor. |=== From ca6ffcdb6ba090d86e019d8503b40b889529e173 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 28 Sep 2023 16:14:04 +0200 Subject: [PATCH 094/540] Put OpenTelemetry::TracerProvider in quotes --- docs/basic-config.asciidoc | 52 +++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/basic-config.asciidoc b/docs/basic-config.asciidoc index f6e8efbb0a..d0edd7ec76 100644 --- a/docs/basic-config.asciidoc +++ b/docs/basic-config.asciidoc @@ -8,30 +8,30 @@ can use. [cols="<,<,<"] |=== -| **Parameter** | **Data type** | **Description** -| `adapter` | Symbol | A specific adapter for Faraday (for example, `:patron`). -| `api_key` | String, Hash | For API key Authentication. Either the base64 encoding of `id` and `api_key` joined by a colon as a string, or a hash with the `id` and `api_key` values. -| `compression` | Boolean | Whether to compress requests. Gzip compression is used. Defaults to `false`. Responses are automatically inflated if they are compressed. If a custom transport object is used, it must handle the request compression and response inflation. -| `enable_meta_header` | Boolean | Whether to enable sending the meta data header to Cloud. Defaults to `true`. -| `hosts` | String, Array | Single host passed as a string or hash, or multiple hosts passed as an array; `host` or `url` keys are also valid. -| `log` | Boolean | Whether to use the default logger. Disabled by default. -| `logger` | Object | An instance of a Logger-compatible object. -| `opaque_id_prefix` | String | Sets a prefix for X-Opaque-Id when initializing the client. This is prepended to the id you set before each request if you're using X-Opaque-Id. -| `opentelemetry_tracer_provider` | OpenTelemetry::Trace::TracerProvider | An explicit TracerProvider to use instead of the global one with OpenTelemetry. This enables better dependency injection and simplifies testing. -| `randomize_hosts` | Boolean | Whether to shuffle connections on initialization and reload. Defaults to `false`. -| `reload_connections` | Boolean, Number | Whether to reload connections after X requests. Defaults to `false`. -| `reload_on_failure` | Boolean | Whether to reload connections after failure. Defaults to `false`. -| `request_timeout` | Integer | The request timeout to be passed to transport in options. -| `resurrect_after` | Integer | Specifies after how many seconds a dead connection should be tried again. -| `retry_on_failure` | Boolean, Number | Whether to retry X times when request fails before raising and exception. Defaults to `false`. -| `retry_on_status` | Array, Number | Specifies which status code needs to be returned to retry. -| `selector` | Constant | An instance of selector strategy implemented with {Elastic::Transport::Transport::Connections::Selector::Base}. -| `send_get_body_as` | String | Specifies the HTTP method to use for GET requests with a body. Defaults to `GET`. -| `serializer_class` | Constant | Specifies a serializer class to use. It is initialized by the transport and passed the transport instance. -| `sniffer_timeout` | Integer | Specifies the timeout for reloading connections in seconds. Defaults to `1`. -| `trace` | Boolean | Whether to use the default tracer. Disabled by default. -| `tracer` | Object | Specifies an instance of a Logger-compatible object. -| `transport` | Object | Specifies a transport instance. -| `transport_class` | Constant | Specifies a transport class to use. It is initialized by the client and passed hosts and all arguments. -| `transport_options` | Hash | Specifies the options to be passed to the `Faraday::Connection` constructor. +| **Parameter** | **Data type** | **Description** +| `adapter` | Symbol | A specific adapter for Faraday (for example, `:patron`). +| `api_key` | String, Hash | For API key Authentication. Either the base64 encoding of `id` and `api_key` joined by a colon as a string, or a hash with the `id` and `api_key` values. +| `compression` | Boolean | Whether to compress requests. Gzip compression is used. Defaults to `false`. Responses are automatically inflated if they are compressed. If a custom transport object is used, it must handle the request compression and response inflation. +| `enable_meta_header` | Boolean | Whether to enable sending the meta data header to Cloud. Defaults to `true`. +| `hosts` | String, Array | Single host passed as a string or hash, or multiple hosts passed as an array; `host` or `url` keys are also valid. +| `log` | Boolean | Whether to use the default logger. Disabled by default. +| `logger` | Object | An instance of a Logger-compatible object. +| `opaque_id_prefix` | String | Sets a prefix for X-Opaque-Id when initializing the client. This is prepended to the id you set before each request if you're using X-Opaque-Id. +| `opentelemetry_tracer_provider` | `OpenTelemetry::Trace::TracerProvider` | An explicit TracerProvider to use instead of the global one with OpenTelemetry. This enables better dependency injection and simplifies testing. +| `randomize_hosts` | Boolean | Whether to shuffle connections on initialization and reload. Defaults to `false`. +| `reload_connections` | Boolean, Number | Whether to reload connections after X requests. Defaults to `false`. +| `reload_on_failure` | Boolean | Whether to reload connections after failure. Defaults to `false`. +| `request_timeout` | Integer | The request timeout to be passed to transport in options. +| `resurrect_after` | Integer | Specifies after how many seconds a dead connection should be tried again. +| `retry_on_failure` | Boolean, Number | Whether to retry X times when request fails before raising and exception. Defaults to `false`. +| `retry_on_status` | Array, Number | Specifies which status code needs to be returned to retry. +| `selector` | Constant | An instance of selector strategy implemented with {Elastic::Transport::Transport::Connections::Selector::Base}. +| `send_get_body_as` | String | Specifies the HTTP method to use for GET requests with a body. Defaults to `GET`. +| `serializer_class` | Constant | Specifies a serializer class to use. It is initialized by the transport and passed the transport instance. +| `sniffer_timeout` | Integer | Specifies the timeout for reloading connections in seconds. Defaults to `1`. +| `trace` | Boolean | Whether to use the default tracer. Disabled by default. +| `tracer` | Object | Specifies an instance of a Logger-compatible object. +| `transport` | Object | Specifies a transport instance. +| `transport_class` | Constant | Specifies a transport class to use. It is initialized by the client and passed hosts and all arguments. +| `transport_options` | Hash | Specifies the options to be passed to the `Faraday::Connection` constructor. |=== From d1e5b5e826bd4330a570bef0c0e262245b85d72a Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 28 Sep 2023 16:18:31 +0200 Subject: [PATCH 095/540] Inline documentation --- elasticsearch/lib/elasticsearch.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch/lib/elasticsearch.rb b/elasticsearch/lib/elasticsearch.rb index 2b02618576..04fb012759 100644 --- a/elasticsearch/lib/elasticsearch.rb +++ b/elasticsearch/lib/elasticsearch.rb @@ -61,7 +61,8 @@ def method_missing(name, *args, &block) # The signature for perform_request is: # method, path, params, body, headers, opts # The last arg is opts, which shouldn't be sent when `perform_request` is called - # directly. + # directly. Check if :endpoint is a key, which means it's the extra identifier + # used for OpenTelemetry. args.pop if args[-1][:endpoint] if (opaque_id = args[2]&.delete(:opaque_id)) headers = args[4] || {} From e039108ce7bbbe8ab816885ceb932f17e8e5c7fe Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 28 Sep 2023 16:18:50 +0200 Subject: [PATCH 096/540] Require >= 8.3 of elastic-transport --- elasticsearch/elasticsearch.gemspec | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index 7c57a9c751..9b8e612830 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -45,14 +45,7 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 2.5' - transport_version = ENV.fetch('TRANSPORT_VERSION', '8') - if ['8', 'main'].include? transport_version - s.add_dependency 'elastic-transport', '~> 8' - else - major_version = transport_version.gsub(/[0-9]+$/, '') - next_minor_version = transport_version.gsub(/[0-9]+\./, '').to_i + 1 - s.add_dependency 'elastic-transport', "~> #{transport_version}", "< #{major_version}#{next_minor_version}" - end + s.add_dependency 'elastic-transport', '~> 8.3' s.add_dependency 'elasticsearch-api', '8.11.0' From 8b1c51d00a8ad88b4eba6a74c28716ee3b8d4df5 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Fri, 29 Sep 2023 13:56:35 +0200 Subject: [PATCH 097/540] Add example of providing tracer provider to Client#new in the docs --- docs/open-telemetry.asciidoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/open-telemetry.asciidoc b/docs/open-telemetry.asciidoc index cd5625ba8f..e282546f45 100644 --- a/docs/open-telemetry.asciidoc +++ b/docs/open-telemetry.asciidoc @@ -27,6 +27,15 @@ The first node is unavailable and results in an HTTP error, while the retry to t When using the https://opentelemetry.io/docs/instrumentation/ruby/manual[OpenTelemetry Ruby SDK manually] or using the https://opentelemetry.io/docs/instrumentation/ruby/automatic/[OpenTelemetry Ruby Auto-Instrumentations], the Ruby Client's OpenTelemetry instrumentation is enabled by default and uses the global OpenTelemetry SDK with the global tracer provider. You can provide a tracer provider via the Ruby Client configuration option `opentelemetry_tracer_provider` when instantiating the client. This is sometimes useful for testing or other specific use cases. +[source,ruby] +------------------------------------ +client = Elasticsearch::Client.new( + cloud_id: '', + api_key: '', + opentelemetry_tracer_provider: tracer_provider +) +------------------------------------ + [discrete] ==== Configuring the OpenTelemetry instrumentation From b98068048d9ec463921befa1863dba645a598495 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 29 Sep 2023 18:16:47 +0100 Subject: [PATCH 098/540] Fixes checking for endpoint opts in ES perform_request --- elasticsearch/lib/elasticsearch.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/lib/elasticsearch.rb b/elasticsearch/lib/elasticsearch.rb index 04fb012759..e646d77ee8 100644 --- a/elasticsearch/lib/elasticsearch.rb +++ b/elasticsearch/lib/elasticsearch.rb @@ -63,7 +63,7 @@ def method_missing(name, *args, &block) # The last arg is opts, which shouldn't be sent when `perform_request` is called # directly. Check if :endpoint is a key, which means it's the extra identifier # used for OpenTelemetry. - args.pop if args[-1][:endpoint] + args.pop if args[-1].is_a?(Hash) && args[-1][:endpoint] if (opaque_id = args[2]&.delete(:opaque_id)) headers = args[4] || {} opaque_id = @opaque_id_prefix ? "#{@opaque_id_prefix}#{opaque_id}" : opaque_id From 75a50f4b01040a2171afcf1818f4b0749deaa8b3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 4 Oct 2023 14:14:02 +0100 Subject: [PATCH 099/540] Bumps main to 8.12.0 --- elasticsearch-api/lib/elasticsearch/api/version.rb | 2 +- elasticsearch/elasticsearch.gemspec | 2 +- elasticsearch/lib/elasticsearch/version.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index d9c8373476..4d4a8aca76 100644 --- a/elasticsearch-api/lib/elasticsearch/api/version.rb +++ b/elasticsearch-api/lib/elasticsearch/api/version.rb @@ -17,6 +17,6 @@ module Elasticsearch module API - VERSION = '8.11.0'.freeze + VERSION = '8.12.0'.freeze end end diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index 9b8e612830..9791b708ec 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -47,7 +47,7 @@ Gem::Specification.new do |s| s.add_dependency 'elastic-transport', '~> 8.3' - s.add_dependency 'elasticsearch-api', '8.11.0' + s.add_dependency 'elasticsearch-api', '8.12.0' s.add_development_dependency 'bundler' s.add_development_dependency 'byebug' unless defined?(JRUBY_VERSION) || defined?(Rubinius) diff --git a/elasticsearch/lib/elasticsearch/version.rb b/elasticsearch/lib/elasticsearch/version.rb index dd97a5edfe..08a17ccfff 100644 --- a/elasticsearch/lib/elasticsearch/version.rb +++ b/elasticsearch/lib/elasticsearch/version.rb @@ -16,5 +16,5 @@ # under the License. module Elasticsearch - VERSION = '8.11.0'.freeze + VERSION = '8.12.0'.freeze end From 3279d9b27b62f74d79376a0890ec65ce446f0aaa Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 5 Oct 2023 07:46:44 +0100 Subject: [PATCH 100/540] [API] Test Runner: Skip 'close_to' test feature --- elasticsearch-api/spec/rest_api/rest_api_tests_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/spec/rest_api/rest_api_tests_helper.rb b/elasticsearch-api/spec/rest_api/rest_api_tests_helper.rb index 6a15c5def3..c9ea316d96 100644 --- a/elasticsearch-api/spec/rest_api/rest_api_tests_helper.rb +++ b/elasticsearch-api/spec/rest_api/rest_api_tests_helper.rb @@ -97,4 +97,4 @@ end # The features to skip -REST_API_YAML_SKIP_FEATURES = ['warnings', 'node_selector'].freeze +REST_API_YAML_SKIP_FEATURES = ['warnings', 'node_selector', 'close_to'].freeze From a496d2a3a462c6c60f206cb1da2d7f8154e0a4f4 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 5 Oct 2023 06:02:47 +0000 Subject: [PATCH 101/540] [API] Sets indices data lifecycle APIs to Experimental --- .../api/actions/indices/delete_data_lifecycle.rb | 4 ++++ .../api/actions/indices/explain_data_lifecycle.rb | 4 ++++ .../elasticsearch/api/actions/indices/get_data_lifecycle.rb | 4 ++++ .../elasticsearch/api/actions/indices/put_data_lifecycle.rb | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb index 4be5e87247..c6738e84a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb @@ -23,6 +23,10 @@ module API module Indices module Actions # Deletes the data stream lifecycle of the selected data streams. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. # # @option arguments [List] :name A comma-separated list of data streams of which the data stream lifecycle will be deleted; use `*` to get all data streams # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb index f69ce9beed..d2ddca90c6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb @@ -23,6 +23,10 @@ module API module Indices module Actions # Retrieves information about the index's current data stream lifecycle, such as any potential encountered error, time since creation etc. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. # # @option arguments [String] :index The name of the index to explain # @option arguments [Boolean] :include_defaults indicates if the API should return the default values the system uses for the index's lifecycle diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb index fe6f6f4d66..da20b059c2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb @@ -23,6 +23,10 @@ module API module Indices module Actions # Returns the data stream lifecycle of the selected data streams. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. # # @option arguments [List] :name A comma-separated list of data streams to get; use `*` to get all data streams # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb index 3c637a4981..22e58eda06 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb @@ -23,6 +23,10 @@ module API module Indices module Actions # Updates the data stream lifecycle of the selected data streams. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. # # @option arguments [List] :name A comma-separated list of data streams whose lifecycle will be updated; use `*` to set the lifecycle to all data streams # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) From aab3e58a6e606e90b07372301976e164d564a3b0 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Wed, 11 Oct 2023 06:02:54 +0000 Subject: [PATCH 102/540] Auto-generated API code --- elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb index 771a5d0e6b..cf9118b224 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the csv format. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Use the `query` element to start a query. Use `time_zone` to specify an execution time zone and 'columnar' to format the answer. (*Required*) + # @option arguments [Hash] :body Use the `query` element to start a query. Use `time_zone` to specify an execution time zone and `columnar` to format the answer. (*Required*) # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html # From c8935f72a7dfdf117e4c123dfa64f622e3cf6bde Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 11 Oct 2023 13:10:04 +0100 Subject: [PATCH 103/540] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d0ed0755f..24d4bb1b73 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Elasticsearch -[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.7](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.7.yml/badge.svg?branch=8.7)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.7.yml) [![8.8](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.8.yml/badge.svg?branch=8.8)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.8.yml) [![8.9](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.9.yml/badge.svg?branch=8.9)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.9.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) +[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.9](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.9.yml/badge.svg?branch=8.9)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.9.yml) [![8.10](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.10.yml/badge.svg?branch=8.10)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.10.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) This repository contains the official [Elasticsearch](https://www.elastic.co/products/elasticsearch) Ruby client. The [`elasticsearch`](https://github.com/elasticsearch/elasticsearch-ruby/tree/main/elasticsearch) gem is a complete Elasticsearch client which uses two separate libraries: From 155cd3254ec5d59ee2231945e3cfaeefd806df28 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Fri, 13 Oct 2023 06:02:46 +0000 Subject: [PATCH 104/540] Auto-generated API code --- .../lib/elasticsearch/api/actions/inference/delete_model.rb | 2 +- .../lib/elasticsearch/api/actions/inference/get_model.rb | 2 +- .../lib/elasticsearch/api/actions/inference/inference.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put_model.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb index f861a3ca9c..9c29cf6597 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [String] :model_id The model Id # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/inference_delete_model.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-inference-api.html # def delete_model(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "inference.delete_model" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb index 48afb17671..ffa435f70b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [String] :model_id The model Id # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/inference_get_model.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-api.html # def get_model(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "inference.get_model" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb index 99f6d14e8f..31d0b009b9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The inference payload # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/inference.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/post-inference-api.html # def inference(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "inference.inference" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb index 0360716cdb..48465b63c6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The model's task and service settings # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/inference_put_model.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-inference-api.html # def put_model(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "inference.put_model" } From f282966af30e0054767b503d629447fb7cb12825 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 16 Oct 2023 13:47:05 +0100 Subject: [PATCH 105/540] [CI] Updates bumpmatrix task, removes outdated code --- rake_tasks/unified_release_tasks.rake | 1 - 1 file changed, 1 deletion(-) diff --git a/rake_tasks/unified_release_tasks.rake b/rake_tasks/unified_release_tasks.rake index d9efcfbc5d..bff94e59d8 100644 --- a/rake_tasks/unified_release_tasks.rake +++ b/rake_tasks/unified_release_tasks.rake @@ -122,7 +122,6 @@ namespace :unified_release do files = [ '.github/workflows/main.yml', - '.github/workflows/unified-release.yml', '.buildkite/pipeline.yml' ] regexp = Regexp.new(/([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}?+(-SNAPSHOT)?)/) From a2f8b099aaa99ab77cf38f4f715ce56af3ebba14 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 16 Oct 2023 13:48:06 +0100 Subject: [PATCH 106/540] [CI] Bumps STACK_VERSION to 8.12 --- .buildkite/pipeline.yml | 2 +- .github/workflows/main.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 7fbe123fae..6c397fdb7d 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -5,7 +5,7 @@ steps: env: RUBY_VERSION: "{{ matrix.ruby }}" TEST_SUITE: "{{ matrix.suite }}" - STACK_VERSION: 8.11.0-SNAPSHOT + STACK_VERSION: 8.12.0-SNAPSHOT TRANSPORT_VERSION: "{{ matrix.transport }}" RUBY_SOURCE: "{{ matrix.ruby_source }}" matrix: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d3d84191a..469237e8c5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 8.11.0-SNAPSHOT + stack-version: 8.12.0-SNAPSHOT security-enabled: false - uses: ruby/setup-ruby@v1 with: @@ -40,4 +40,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake elasticsearch:download_artifacts[8.11.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake elasticsearch:download_artifacts[8.12.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit From a244f4359e20942aac97dcf4afc7f193ae3b55ec Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 16 Oct 2023 14:31:45 +0100 Subject: [PATCH 107/540] [API] Adds profiling.status endpoint --- elasticsearch-api/lib/elasticsearch/api.rb | 3 +- .../api/actions/profiling/status.rb | 53 +++++++++++++++++++ .../elasticsearch/api/namespace/profiling.rb | 36 +++++++++++++ .../api/actions/profiling/status_spec.rb | 36 +++++++++++++ 4 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/profiling/status.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/profiling.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/profiling/status_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index b7297ae73f..db49b184a9 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -84,7 +84,8 @@ def self.included(base) Elasticsearch::API::Synonyms, Elasticsearch::API::QueryRuleset, Elasticsearch::API::Esql, - Elasticsearch::API::Inference + Elasticsearch::API::Inference, + Elasticsearch::API::Profiling end # The serializer class diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/status.rb new file mode 100644 index 0000000000..607823d8d3 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/status.rb @@ -0,0 +1,53 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Profiling + module Actions + # Returns basic information about the status of Universal Profiling. + # + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [Boolean] :wait_for_resources_created Whether to return immediately or wait until resources have been created + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html + # + def status(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "profiling.status" } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = "_profiling/status" + 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/namespace/profiling.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/profiling.rb new file mode 100644 index 0000000000..7bfc0915b6 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/profiling.rb @@ -0,0 +1,36 @@ +# 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. + +module Elasticsearch + module API + module Profiling + module Actions; end + + # Client for the "profiling" namespace (includes the {Profiling::Actions} methods) + # + class ProfilingClient + include Common::Client, Common::Client::Base, Profiling::Actions + end + + # Proxy method for {ProfilingClient}, available in the receiving object + # + def profiling + @profiling ||= ProfilingClient.new(self) + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/profiling/status_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/profiling/status_spec.rb new file mode 100644 index 0000000000..70f8bce89d --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/profiling/status_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#profiling.status' do + + let(:expected_args) do + [ + 'GET', + '_profiling/status', + {}, + nil, + {}, + { endpoint: 'profiling.status' } + ] + end + + it 'performs the request' do + expect(client_double.profiling.status).to be_a Elasticsearch::API::Response + end +end From 1bb38981b3f36070b57d807c6f79740397fd6908 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 16 Oct 2023 17:25:38 +0100 Subject: [PATCH 108/540] [CI] Get first build when can't find hash in artifacts download --- rake_tasks/elasticsearch_tasks.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake_tasks/elasticsearch_tasks.rake b/rake_tasks/elasticsearch_tasks.rake index db48b543e2..61ddce8549 100644 --- a/rake_tasks/elasticsearch_tasks.rake +++ b/rake_tasks/elasticsearch_tasks.rake @@ -88,7 +88,7 @@ namespace :elasticsearch do build_hash_artifact = artifacts['version']['builds'].find do |build| build.dig('projects', 'elasticsearch', 'commit_hash') == @build_hash - end + end || artifacts['version']['builds'].first zip_url = build_hash_artifact.dig('projects', 'elasticsearch', 'packages').select { |k, _| k =~ /rest-resources-zip/ }.map { |_, v| v['url'] }.first # Dig into the elasticsearch packages, search for the rest-resources-zip package and return the URL: From bb3560e23b99733a18f5b0fd38d5fd8ba8942d07 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Fri, 20 Oct 2023 06:02:29 +0000 Subject: [PATCH 109/540] Auto-generated API code --- elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index 25c6802d42..be135f37ca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -34,6 +34,7 @@ module Actions # @option arguments [List] :_source_includes Default list of fields to extract and return from the _source field, can be overridden on each sub-request # @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with # @option arguments [Boolean] :require_alias Sets require_alias for all incoming documents. Defaults to unset (false) + # @option arguments [Boolean] :list_executed_pipelines Sets list_executed_pipelines for all incoming documents. Defaults to unset (false) # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [String|Array] :body The operation definition and data (action-data pairs), separated by newlines. Array of Strings, Header/Data pairs, # or the conveniency "combined" format can be passed, refer to Elasticsearch::API::Utils.__bulkify documentation. From 830a5f2c1cfaa9ddaf2fe7ecc2cb82ecd6936c86 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 26 Oct 2023 11:43:55 +0100 Subject: [PATCH 110/540] [API] Test Runner: Updates wipe cluster templates convention Considers new naming convention that internal component templates contain `@`. See https://github.com/elastic/elasticsearch/commit/75d9bd7790839f14e2921aeeb38cd4537fe43950#diff-41f49d06cc74aecb5cb12c115be8754894909ff74907100547f5a20a1430653c --- elasticsearch-api/api-spec-testing/wipe_cluster.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/api-spec-testing/wipe_cluster.rb b/elasticsearch-api/api-spec-testing/wipe_cluster.rb index 0ee0f8dbae..fcbd9d4950 100644 --- a/elasticsearch-api/api-spec-testing/wipe_cluster.rb +++ b/elasticsearch-api/api-spec-testing/wipe_cluster.rb @@ -41,8 +41,7 @@ module WipeCluster 'synthetics', 'synthetics-settings', 'synthetics-mappings', '.snapshot-blob-cache', '.deprecation-indexing-template', '.deprecation-indexing-mappings', '.deprecation-indexing-settings', - 'security-index-template', 'data-streams-mappings', 'ecs@dynamic_templates', - 'search-acl-filter' + 'security-index-template', 'data-streams-mappings', 'search-acl-filter' ].freeze # Wipe Cluster, based on PHP's implementation of ESRestTestCase.java:wipeCluster() @@ -254,6 +253,8 @@ def wipe_all_templates(client) end def platinum_template?(template) + return true if template.include?('@') + platinum_prefixes = [ '.monitoring', '.watch', '.triggered-watches', '.data-frame', '.ml-', '.transform', '.deprecation', 'data-streams-mappings', '.fleet', From 7417cd93c2874b0308bbf6cd63320a1f3a304d57 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 26 Oct 2023 12:59:54 +0100 Subject: [PATCH 111/540] [API] Test Runner: Refactors ILM policies in wipe cluster --- elasticsearch-api/api-spec-testing/wipe_cluster.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/api-spec-testing/wipe_cluster.rb b/elasticsearch-api/api-spec-testing/wipe_cluster.rb index fcbd9d4950..bf5fa8d02b 100644 --- a/elasticsearch-api/api-spec-testing/wipe_cluster.rb +++ b/elasticsearch-api/api-spec-testing/wipe_cluster.rb @@ -99,7 +99,7 @@ def ensure_no_initializing_shards(client) def check_for_unexpectedly_recreated_objects(client) unexpected_ilm_policies = client.index_lifecycle_management.get_lifecycle - unexpected_ilm_policies.reject! { |k, _| PRESERVE_ILM_POLICY_IDS.include? k } + unexpected_ilm_policies.reject! { |k, _| preserve_policy?(k) } unless unexpected_ilm_policies.empty? logger.info( "Expected no ILM policies after deletions, but found #{unexpected_ilm_policies.keys.join(',')}" @@ -265,6 +265,10 @@ def platinum_template?(template) PLATINUM_TEMPLATES.include? template end + def preserve_policy?(policy) + PRESERVE_ILM_POLICY_IDS.include?(policy) || policy.include?('@') + end + def wait_for_cluster_tasks(client) start_time = Time.now.to_i count = 0 @@ -293,7 +297,7 @@ def skippable_task?(task) def delete_all_ilm_policies(client) policies = client.ilm.get_lifecycle policies.each do |policy| - client.ilm.delete_lifecycle(policy: policy[0]) unless PRESERVE_ILM_POLICY_IDS.include? policy[0] + client.ilm.delete_lifecycle(policy: policy[0]) unless preserve_policy?(policy[0]) end end From c97eecb99492c3b1caaecde9240fa6823c2cfdf7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 7 Nov 2023 09:28:00 +0000 Subject: [PATCH 112/540] [API] Test Runner: Skips knn specific tests --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 8a67ebc175..477c740bc6 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -35,3 +35,9 @@ - :file: 'cluster.desired_balance/10_basic.yml' :description: 'Test cluster_balance_stats' +- + :file: 'search.vectors/40_knn_search.yml' + :description: 'Direct kNN queries are disallowed' +- + :file: 'search.vectors/45_knn_search_byte.yml' + :description: 'Direct kNN queries are disallowed' From 4752af586131f80ec06fbbeb56de677ad13a795b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 6 Nov 2023 14:53:28 +0000 Subject: [PATCH 113/540] [DOCS] Updates Troubleshooting for adapters information --- docs/troubleshooting.asciidoc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/troubleshooting.asciidoc b/docs/troubleshooting.asciidoc index 9b889f51bd..72bd0891b1 100644 --- a/docs/troubleshooting.asciidoc +++ b/docs/troubleshooting.asciidoc @@ -21,6 +21,38 @@ When working with multiple hosts, you might want to enable the `retry_on_failure For optimal performance, use a HTTP library which supports persistent ("keep-alive") connections, such as https://github.com/toland/patron[patron] or https://github.com/typhoeus/typhoeus[Typhoeus]. Require the library (`require 'patron'`) in your code for Faraday 1.x or the adapter (`require 'faraday/patron'`) for Faraday 2.x, and it will be automatically used. +[discrete] +=== Adapter is not registered on Faraday + +If you see a message like: +``` +:adapter is not registered on Faraday::Adapter (Faraday::Error) +``` + +Then you probably need to include the adapter library in your Gemfile and require it. You might get this error when migrating from Faraday v1 to Faraday v2. The main change when using Faraday v2 is all adapters, except for the default `net_http` one, have been moved out into separate gems. This means if you're not using the default adapter and you migrate to Faraday v2, you'll need to add the adapter gems to your Gemfile. + +These are the gems required for the different adapters with Faraday 2, instead of the libraries on which they were based: + +[source,ruby] +------------------------------------ +# HTTPCLient +gem 'faraday-httpclient' + +# NetHTTPPersistent +gem 'faraday-net_http_persistent' + +# Patron +gem 'faraday-patron' + +# Typhoeus +gem 'faraday-typhoeus' +------------------------------------ + +Things should work fine if you migrate to Faraday 2 as long as you include the adapter (unless you're using the default one `net-http`), but worst case scenario, you can always lock the version of Faraday in your project to 1.x: +`gem 'faraday', '~> 1'` + +Be aware if migrating to Faraday v2 that it requires at least Ruby `2.6`, unlike Faraday v1 which requires `2.4`. + [discrete] === More Help From 0172509d6f5a281b4593f9a7e9b220a54051efd2 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 7 Nov 2023 16:22:21 +0000 Subject: [PATCH 114/540] [DOCS] Release Notes 8.11 --- CHANGELOG.md | 17 +++++++++++++++++ docs/release_notes/811.asciidoc | 24 ++++++++++++++++++++++++ docs/release_notes/index.asciidoc | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 docs/release_notes/811.asciidoc diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fcf6bfb2e..f9786f2fc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ *To see release notes for the `7.x` branch and older releases, see [CHANGELOG on the 7.17 branch](https://github.com/elastic/elasticsearch-ruby/blob/7.17/CHANGELOG.md).* +## 8.11.0 Release notes + +### Client + +* Tested versions of Ruby for 8.11.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4. +* Adds native support for *Open Telemetry*. See Open Telemetry for documentation. +* Improved documentation, now you can find more examples in Ruby in the [REST API reference](https://www.elastic.co/guide/en/elasticsearch/reference/8.11/rest-apis.html). + +### API + +New Experimental APIs: +- `esql.query` - Executes an ESQL request. +- `inference.delete_model` - Delete model in the Inference API. +- `inference.get_model` - Get a model in the Inference API. +- `inference.inference` - Perform inference on a model. +- `inference.put_model` - Configure a model for use in the Inference API. + ## 8.10.0 Release notes ### Client diff --git a/docs/release_notes/811.asciidoc b/docs/release_notes/811.asciidoc new file mode 100644 index 0000000000..43c43427de --- /dev/null +++ b/docs/release_notes/811.asciidoc @@ -0,0 +1,24 @@ +[[release_notes_8110]] +=== 8.11 Release notes + +[discrete] +[[release_notes_811_0]] +=== 8.11.0 Release notes + +[discrete] +=== Client + +* Tested versions of Ruby for 8.11.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4. +* Adds native support for *Open Telemetry*. See <> for documentation. +* Improved documentation, now you can find more examples in Ruby in the https://www.elastic.co/guide/en/elasticsearch/reference/8.11/rest-apis.html[REST API reference]. + +[discrete] +=== API + +New Experimental APIs: + +* `esql.query` - Executes an ESQL request. +* `inference.delete_model` - Delete model in the Inference API +* `inference.get_model` - Get a model in the Inference API +* `inference.inference` - Perform inference on a model +* `inference.put_model` - Configure a model for use in the Inference API diff --git a/docs/release_notes/index.asciidoc b/docs/release_notes/index.asciidoc index 43f7e8437f..9143380955 100644 --- a/docs/release_notes/index.asciidoc +++ b/docs/release_notes/index.asciidoc @@ -3,6 +3,7 @@ [discrete] === 8.x +* <> * <> * <> * <> @@ -32,6 +33,7 @@ * <> * <> +include::811.asciidoc[] include::810.asciidoc[] include::89.asciidoc[] include::88.asciidoc[] From d8cb41291a688f781768d41584118026cc83c1b8 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 7 Nov 2023 16:23:29 +0000 Subject: [PATCH 115/540] [DOCS] Adds OpenTelemetry docs to index --- docs/integrations.asciidoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/integrations.asciidoc b/docs/integrations.asciidoc index 8b81ff5042..c758d17201 100644 --- a/docs/integrations.asciidoc +++ b/docs/integrations.asciidoc @@ -6,6 +6,7 @@ the Ruby client. * <> * <> +* <> * <> * <> * <> @@ -16,6 +17,8 @@ include::transport.asciidoc[] include::api.asciidoc[] +include::open-telemetry.asciidoc[] + include::ecs.asciidoc[] include::model.asciidoc[] From 7b3cc13f6fda389d4a2e2b9df749282b94713b48 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 9 Nov 2023 11:10:35 +0000 Subject: [PATCH 116/540] [API] Test Runner: refactor in setting variables --- elasticsearch-api/api-spec-testing/test_file/task_group.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/api-spec-testing/test_file/task_group.rb b/elasticsearch-api/api-spec-testing/test_file/task_group.rb index a94578eb29..71ef01cb31 100644 --- a/elasticsearch-api/api-spec-testing/test_file/task_group.rb +++ b/elasticsearch-api/api-spec-testing/test_file/task_group.rb @@ -315,7 +315,10 @@ def set_variable(action) set_definition['set'].each do |response_key, variable_name| nested_key_chain = response_key.split('.').map do |key| # If there's a variable in the set key, get the value: - key.gsub!(key, @test.cached_values[key.gsub('$', '')]) if key.match?(/\$.+/) + if key.match?(/\$.+/) + value = @test.cached_values[key.gsub('$', '')] + key.gsub!(key, value) if value + end (key =~ /\A[-+]?[0-9]+\z/) ? key.to_i: key end From c499cdb4c8dfcf7ffaf9fd7ddb09099ffea6f10e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 9 Nov 2023 11:10:54 +0000 Subject: [PATCH 117/540] [API] Removes cluster.desired_balance test from skipped tests --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 477c740bc6..66790fcf02 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -25,16 +25,12 @@ - :file: 'tsdb/80_index_resize.yml' :description: 'clone' - - :file: 'cluster.desired_nodes/10_basic.yml' :description: 'Test update desired nodes is idempotent' - :file: 'cluster.desired_nodes/10_basic.yml' :description: 'Test update desired nodes is idempotent with different order' -- - :file: 'cluster.desired_balance/10_basic.yml' - :description: 'Test cluster_balance_stats' - :file: 'search.vectors/40_knn_search.yml' :description: 'Direct kNN queries are disallowed' From 7c3e72a5c4c21aad3b752397b0b2a5d5b537f070 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 9 Nov 2023 14:33:37 +0000 Subject: [PATCH 118/540] [CI] Artifact task remove unnecessary build_hash --- rake_tasks/elasticsearch_tasks.rake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rake_tasks/elasticsearch_tasks.rake b/rake_tasks/elasticsearch_tasks.rake index 61ddce8549..919a8a39b6 100644 --- a/rake_tasks/elasticsearch_tasks.rake +++ b/rake_tasks/elasticsearch_tasks.rake @@ -83,9 +83,8 @@ namespace :elasticsearch do exit 1 end - # Get the build hash if it hasn't been set from a running cluster - @build_hash ||= artifacts['version']['builds'].first.dig('projects', 'elasticsearch', 'commit_hash') - + # Either find the artifacts for the exact same build hash from the current running cluster or + # use the first one from the list of builds: build_hash_artifact = artifacts['version']['builds'].find do |build| build.dig('projects', 'elasticsearch', 'commit_hash') == @build_hash end || artifacts['version']['builds'].first From ed7a44e0469cba00cfc7dd0a3998e55eeaffce4f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Sat, 11 Nov 2023 06:02:27 +0000 Subject: [PATCH 119/540] [API] Documents new reopen parameter in indices.put_settings --- .../lib/elasticsearch/api/actions/indices/put_settings.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb index 0d400faade..3b65e83077 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb @@ -28,6 +28,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Boolean] :preserve_existing Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false` + # @option arguments [Boolean] :reopen Whether to close and reopen the index to apply non-dynamic settings. If set to `true` the indices to which the settings are being applied will be closed temporarily and then reopened in order to apply the changes. The default is `false` # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) From a70a0d6c8ab371d9560a058d299ce3fb8614c6bd Mon Sep 17 00:00:00 2001 From: Ellie <4158750+esenmarti@users.noreply.github.com> Date: Thu, 16 Nov 2023 14:08:48 +0100 Subject: [PATCH 120/540] Add the buildkite-pipeline to the catalog-info.yaml (#2243) --- catalog-info.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 catalog-info.yaml diff --git a/catalog-info.yaml b/catalog-info.yaml new file mode 100644 index 0000000000..a3c8efee6f --- /dev/null +++ b/catalog-info.yaml @@ -0,0 +1,19 @@ +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: buildkite-pipeline-elasticsearch-ruby +spec: + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + description: Elasticsearch Ruby Client + name: elasticsearch-ruby + spec: + repository: elastic/elasticsearch-ruby + teams: + clients-team: {} + everyone: + access_level: READ_ONLY + owner: group:clients-team + type: buildkite-pipeline From f525965c2019dbacf10faecd66b0d853295cb4e2 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 17 Nov 2023 06:02:55 +0000 Subject: [PATCH 121/540] [API] Adds simulate.ingest endpoint --- elasticsearch-api/lib/elasticsearch/api.rb | 3 +- .../api/actions/simulate/ingest.rb | 71 +++++++++++++++++++ .../elasticsearch/api/namespace/simulate.rb | 36 ++++++++++ .../api/actions/simulate/ingest_spec.rb | 35 +++++++++ 4 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/simulate.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/simulate/ingest_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index db49b184a9..73318b426f 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -85,7 +85,8 @@ def self.included(base) Elasticsearch::API::QueryRuleset, Elasticsearch::API::Esql, Elasticsearch::API::Inference, - Elasticsearch::API::Profiling + Elasticsearch::API::Profiling, + Elasticsearch::API::Simulate end # The serializer class diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb b/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb new file mode 100644 index 0000000000..3e16cdb849 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb @@ -0,0 +1,71 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Simulate + module Actions + # Simulates running ingest with example documents. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :index Default index for docs which don't provide one + # @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with if no pipeline is given for a particular document + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The simulate definition (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/simulate-ingest-api.html + # + def ingest(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "simulate.ingest" } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _index = arguments.delete(:index) + + method = Elasticsearch::API::HTTP_POST + path = if _index + "_ingest/#{Utils.__listify(_index)}/_simulate" + else + "_ingest/_simulate" + 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/namespace/simulate.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/simulate.rb new file mode 100644 index 0000000000..b5e6eb88e4 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/simulate.rb @@ -0,0 +1,36 @@ +# 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. + +module Elasticsearch + module API + module Simulate + module Actions; end + + # Client for the "simulate" namespace (includes the {Simulate::Actions} methods) + # + class SimulateClient + include Common::Client, Common::Client::Base, Simulate::Actions + end + + # Proxy method for {SimulateClient}, available in the receiving object + # + def simulate + @simulate ||= SimulateClient.new(self) + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/simulate/ingest_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/simulate/ingest_spec.rb new file mode 100644 index 0000000000..f285fdeb45 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/simulate/ingest_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.simulate#ingest' do + let(:expected_args) do + [ + 'POST', + '_ingest/foo/_simulate', + {}, + {}, + {}, + { defined_params: {index: 'foo'}, endpoint: 'simulate.ingest' } + ] + end + + it 'performs the request' do + expect(client_double.simulate.ingest(body: {}, index: 'foo')).to be_a Elasticsearch::API::Response + end +end From 7d6372f1a37b58162da5ba439d577b415b032445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Fri, 24 Nov 2023 12:03:38 +0100 Subject: [PATCH 122/540] [DOCS] Adds a signpost for downloading ES or signing-up for ESS. (#2246) --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 24d4bb1b73..272c06ffab 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ # Elasticsearch [![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.9](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.9.yml/badge.svg?branch=8.9)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.9.yml) [![8.10](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.10.yml/badge.svg?branch=8.10)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.10.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) +**[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)** +or +**[sign-up](https://cloud.elastic.co/registration?elektra=en-ess-sign-up-page)** +**for a free trial of Elastic Cloud**. + This repository contains the official [Elasticsearch](https://www.elastic.co/products/elasticsearch) Ruby client. The [`elasticsearch`](https://github.com/elasticsearch/elasticsearch-ruby/tree/main/elasticsearch) gem is a complete Elasticsearch client which uses two separate libraries: * [`elastic-transport`](https://github.com/elastic/elastic-transport-ruby) - provides the low-level code for connecting to an Elasticsearch cluster. From f7a07ec48806833931410f94b85cb17046b57fbf Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 24 Nov 2023 12:35:57 +0000 Subject: [PATCH 123/540] Update build badges in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 272c06ffab..8dc0141d1d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Elasticsearch -[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.9](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.9.yml/badge.svg?branch=8.9)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.9.yml) [![8.10](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.10.yml/badge.svg?branch=8.10)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.10.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) +[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.10](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.10.yml/badge.svg?branch=8.10)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.10.yml) [![8.11](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.11.yml/badge.svg?branch=8.11)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.11.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) **[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)** or From f151035217f1eeac2f0fea014ad0771b3c003354 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 29 Nov 2023 09:01:33 +0000 Subject: [PATCH 124/540] [API] Adds new experimental API connector.put --- elasticsearch-api/lib/elasticsearch/api.rb | 3 +- .../api/actions/connector/put.rb | 67 +++++++++++++++++++ .../elasticsearch/api/namespace/connector.rb | 36 ++++++++++ .../api/actions/connector/put_spec.rb | 43 ++++++++++++ 4 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/connector.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/put_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index 73318b426f..2548b1b82b 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -86,7 +86,8 @@ def self.included(base) Elasticsearch::API::Esql, Elasticsearch::API::Inference, Elasticsearch::API::Profiling, - Elasticsearch::API::Simulate + Elasticsearch::API::Simulate, + Elasticsearch::API::Connector end # The serializer class diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb new file mode 100644 index 0000000000..81bec4d553 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb @@ -0,0 +1,67 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Creates or updates a connector. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be created or updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The connector configuration. (*Required*) + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def put(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.put" } + + defined_params = [:connector_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}" + params = {} + + 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/namespace/connector.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/connector.rb new file mode 100644 index 0000000000..b9bed44085 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/connector.rb @@ -0,0 +1,36 @@ +# 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. + +module Elasticsearch + module API + module Connector + module Actions; end + + # Client for the "connector" namespace (includes the {Connector::Actions} methods) + # + class ConnectorClient + include Common::Client, Common::Client::Base, Connector::Actions + end + + # Proxy method for {ConnectorClient}, available in the receiving object + # + def connector + @connector ||= ConnectorClient.new(self) + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/put_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/put_spec.rb new file mode 100644 index 0000000000..632510b2e9 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/put_spec.rb @@ -0,0 +1,43 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#put' do + + let(:expected_args) do + [ + 'PUT', + '_connector/foo', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.put' + } + ] + end + + let(:body) do + {} + end + + it 'performs the request' do + expect(client_double.connector.put(body: body, connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end From b334752cd1bbc298a0932ce1e53da8120eead291 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 29 Nov 2023 09:02:00 +0000 Subject: [PATCH 125/540] [API] Updates open_point_in_time with request body --- .../lib/elasticsearch/api/actions/open_point_in_time.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb index f903756a95..041d6c821b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb @@ -30,6 +30,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [String] :keep_alive Specific the time to live for the point in time (*Required*) # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body An index_filter specified with the Query DSL # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html # @@ -47,7 +48,7 @@ def open_point_in_time(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = arguments.delete(:body) _index = arguments.delete(:index) From 2aa8ed0de6d23ed1b8f05729fe2caf226abcc2af Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 29 Nov 2023 13:00:24 +0000 Subject: [PATCH 126/540] [API] Test Runner: Compare Time values coming from ES with String representation --- elasticsearch-api/api-spec-testing/rspec_matchers.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elasticsearch-api/api-spec-testing/rspec_matchers.rb b/elasticsearch-api/api-spec-testing/rspec_matchers.rb index 93e3612d39..b999fa5837 100644 --- a/elasticsearch-api/api-spec-testing/rspec_matchers.rb +++ b/elasticsearch-api/api-spec-testing/rspec_matchers.rb @@ -245,6 +245,8 @@ def compare_hash(expected_pairs, actual_hash, test) unless compare_string(expected_value, actual_value, test, actual_hash) @mismatched_pairs.merge!(expected_key => expected_value) end + when Time + compare_string(expected_value.to_s, Time.new(actual_value).to_s, test, actual_hash) else unless expected_value == actual_value @mismatched_pairs.merge!(expected_key => expected_value) From dedb6c03e8420dcda6aee1508a48def6f6daf4f0 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 1 Dec 2023 10:00:29 +0000 Subject: [PATCH 127/540] [API] Adds experimental connector APIs: delete, get, list, update_scheduling --- .../api/actions/connector/delete.rb | 65 ++++++++++++++++++ .../api/actions/connector/get.rb | 65 ++++++++++++++++++ .../api/actions/connector/list.rb | 56 ++++++++++++++++ .../actions/connector/update_scheduling.rb | 67 +++++++++++++++++++ .../api/actions/connector/delete_spec.rb | 38 +++++++++++ .../api/actions/connector/get_spec.rb | 38 +++++++++++ .../api/actions/connector/list_spec.rb | 35 ++++++++++ .../connector/update_scheduling_spec.rb | 42 ++++++++++++ 8 files changed, 406 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/delete_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/get_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/list_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_scheduling_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb new file mode 100644 index 0000000000..f73e87f9b3 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb @@ -0,0 +1,65 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Deletes a connector. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be deleted. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.delete" } + + defined_params = [:connector_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_DELETE + path = "_connector/#{Utils.__listify(_connector_id)}" + params = {} + + 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/connector/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb new file mode 100644 index 0000000000..d9e2246855 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb @@ -0,0 +1,65 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Returns the details about a connector. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be returned. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.get" } + + defined_params = [:connector_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_GET + path = "_connector/#{Utils.__listify(_connector_id)}" + params = {} + + 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/connector/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb new file mode 100644 index 0000000000..50773243d2 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb @@ -0,0 +1,56 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Lists all connectors. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [Integer] :from Starting offset (default: 0) + # @option arguments [Integer] :size specifies a max number of results to get (default: 100) + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def list(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.list" } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = "_connector" + 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/connector/update_scheduling.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb new file mode 100644 index 0000000000..4de6714cd8 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb @@ -0,0 +1,67 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the scheduling field in the connector document. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body An object containing the connector's scheduling configuration. (*Required*) + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def update_scheduling(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.update_scheduling" } + + defined_params = [:connector_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_scheduling" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/delete_spec.rb new file mode 100644 index 0000000000..a59dc88daf --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/delete_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#delete' do + let(:expected_args) do + [ + 'DELETE', + '_connector/foo', + {}, + nil, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.delete' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.delete(connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/get_spec.rb new file mode 100644 index 0000000000..8e2b2388e4 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/get_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#get' do + let(:expected_args) do + [ + 'GET', + '_connector/foo', + {}, + nil, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.get' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.get(connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/list_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/list_spec.rb new file mode 100644 index 0000000000..426d0fbc4a --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/list_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#list' do + let(:expected_args) do + [ + 'GET', + '_connector', + {}, + nil, + {}, + { endpoint: 'connector.list' } + ] + end + + it 'performs the request' do + expect(client_double.connector.list).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_scheduling_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_scheduling_spec.rb new file mode 100644 index 0000000000..b598d033c6 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_scheduling_spec.rb @@ -0,0 +1,42 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#update_scheduling' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_scheduling', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.update_scheduling' + } + ] + end + + it 'performs the request' do + expect do + client_double.connector.update_scheduling( + connector_id: 'foo', + body: {}).to be_a Elasticsearch::API::Response + end + end +end From 520eb638ade99d944b996f8609ff3cd240d0f177 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 1 Dec 2023 10:05:26 +0000 Subject: [PATCH 128/540] [API] Adds experimental connector_sync_job APIs post and delete --- elasticsearch-api/lib/elasticsearch/api.rb | 3 +- .../api/actions/connector_sync_job/delete.rb | 66 +++++++++++++++++++ .../api/actions/connector_sync_job/post.rb | 57 ++++++++++++++++ .../api/namespace/connector_sync_job.rb | 36 ++++++++++ .../actions/connector_sync_job/delete_spec.rb | 38 +++++++++++ .../actions/connector_sync_job/post_spec.rb | 35 ++++++++++ 6 files changed, 234 insertions(+), 1 deletion(-) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/connector_sync_job.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/delete_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/post_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index 2548b1b82b..f588a4a344 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -87,7 +87,8 @@ def self.included(base) Elasticsearch::API::Inference, Elasticsearch::API::Profiling, Elasticsearch::API::Simulate, - Elasticsearch::API::Connector + Elasticsearch::API::Connector, + Elasticsearch::API::ConnectorSyncJob end # The serializer class diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb new file mode 100644 index 0000000000..dc84dbd46a --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module ConnectorSyncJob + module Actions + # Deletes a connector sync job. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be deleted. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.delete" } + + defined_params = [:connector_sync_job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, + "Required argument 'connector_sync_job_id' missing" unless arguments[:connector_sync_job_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _connector_sync_job_id = arguments.delete(:connector_sync_job_id) + + method = Elasticsearch::API::HTTP_DELETE + path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}" + params = {} + + 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/connector_sync_job/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb new file mode 100644 index 0000000000..4b820689fa --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb @@ -0,0 +1,57 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module ConnectorSyncJob + module Actions + # Creates a connector sync job. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The connector sync job data. (*Required*) + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def post(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.post" } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = "_connector/_sync_job" + params = {} + + 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/namespace/connector_sync_job.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/connector_sync_job.rb new file mode 100644 index 0000000000..d062429c5a --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/connector_sync_job.rb @@ -0,0 +1,36 @@ +# 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. + +module Elasticsearch + module API + module ConnectorSyncJob + module Actions; end + + # Client for the "connector_sync_job" namespace (includes the {ConnectorSyncJob::Actions} methods) + # + class ConnectorSyncJobClient + include Common::Client, Common::Client::Base, ConnectorSyncJob::Actions + end + + # Proxy method for {ConnectorSyncJobClient}, available in the receiving object + # + def connector_sync_job + @connector_sync_job ||= ConnectorSyncJobClient.new(self) + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/delete_spec.rb new file mode 100644 index 0000000000..29a2bb8dfc --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/delete_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector_sync_job#delete' do + let(:expected_args) do + [ + 'DELETE', + '_connector/_sync_job/foo', + {}, + nil, + {}, + { + defined_params: {connector_sync_job_id: 'foo'}, + endpoint: 'connector_sync_job.delete' + } + ] + end + + it 'performs the request' do + expect(client_double.connector_sync_job.delete(connector_sync_job_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/post_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/post_spec.rb new file mode 100644 index 0000000000..1569cd6990 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/post_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector_sync_job#post' do + let(:expected_args) do + [ + 'POST', + '_connector/_sync_job', + {}, + {}, + {}, + { endpoint: 'connector_sync_job.post' } + ] + end + + it 'performs the request' do + expect(client_double.connector_sync_job.post(body: {})).to be_a Elasticsearch::API::Response + end +end From 9f87364751e4c2cc72ba82b04c9a118380ad936a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 4 Dec 2023 09:50:46 +0000 Subject: [PATCH 129/540] [API] Adds experimental APIs in connector namespace: * check_in * update_filtering * update_pipeline --- .../api/actions/connector/check_in.rb | 65 ++++++++++++++++++ .../api/actions/connector/update_filtering.rb | 67 +++++++++++++++++++ .../api/actions/connector/update_pipeline.rb | 67 +++++++++++++++++++ .../api/actions/connector/check_in_spec.rb | 38 +++++++++++ .../connector/update_filtering_spec.rb | 38 +++++++++++ .../actions/connector/update_pipeline_spec.rb | 38 +++++++++++ 6 files changed, 313 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/check_in_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_filtering_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_pipeline_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb new file mode 100644 index 0000000000..ab4a1f97da --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb @@ -0,0 +1,65 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the last_seen timestamp in the connector document. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def check_in(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.check_in" } + + defined_params = [:connector_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_check_in" + params = {} + + 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/connector/update_filtering.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb new file mode 100644 index 0000000000..5bec93f608 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb @@ -0,0 +1,67 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the filtering field in the connector document. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body A list of connector filtering configurations. (*Required*) + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def update_filtering(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.update_filtering" } + + defined_params = [:connector_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_filtering" + params = {} + + 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/connector/update_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb new file mode 100644 index 0000000000..156352834d --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb @@ -0,0 +1,67 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the pipeline field in the connector document. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body An object with connector ingest pipeline configuration. (*Required*) + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def update_pipeline(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.update_pipeline" } + + defined_params = [:connector_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_pipeline" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/check_in_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/check_in_spec.rb new file mode 100644 index 0000000000..4a9d03ff91 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/check_in_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#check_in' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_check_in', + {}, + nil, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.check_in' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.check_in(connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_filtering_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_filtering_spec.rb new file mode 100644 index 0000000000..4eac8738dd --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_filtering_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#update_filtering' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_filtering', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.update_filtering' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.update_filtering(body: {}, connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_pipeline_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_pipeline_spec.rb new file mode 100644 index 0000000000..b686eafd2f --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_pipeline_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#update_pipeline' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_pipeline', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.update_pipeline' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.update_pipeline(body: {}, connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end From 5c0f4bf9af6ec39851eb7462bee1e2c2b27e1e69 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 4 Dec 2023 10:03:42 +0000 Subject: [PATCH 130/540] [API] Adds experimental APIs in connector_sync_job namespace * cancel * check_in --- .../api/actions/connector_sync_job/cancel.rb | 66 +++++++++++++++++++ .../actions/connector_sync_job/check_in.rb | 66 +++++++++++++++++++ .../actions/connector_sync_job/cancel_spec.rb | 38 +++++++++++ .../connector_sync_job/check_in_spec.rb | 38 +++++++++++ 4 files changed, 208 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/cancel_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/check_in_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb new file mode 100644 index 0000000000..d2fc1c19bb --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module ConnectorSyncJob + module Actions + # Cancels a connector sync job. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be canceled + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def cancel(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.cancel" } + + defined_params = [:connector_sync_job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, + "Required argument 'connector_sync_job_id' missing" unless arguments[:connector_sync_job_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _connector_sync_job_id = arguments.delete(:connector_sync_job_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_cancel" + params = {} + + 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/connector_sync_job/check_in.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb new file mode 100644 index 0000000000..329cdda829 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module ConnectorSyncJob + module Actions + # Checks in a connector sync job (refreshes 'last_seen'). + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be checked in + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def check_in(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.check_in" } + + defined_params = [:connector_sync_job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, + "Required argument 'connector_sync_job_id' missing" unless arguments[:connector_sync_job_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _connector_sync_job_id = arguments.delete(:connector_sync_job_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_check_in" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/cancel_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/cancel_spec.rb new file mode 100644 index 0000000000..4846287343 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/cancel_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector_sync_job#cancel' do + let(:expected_args) do + [ + 'PUT', + '_connector/_sync_job/foo/_cancel', + {}, + nil, + {}, + { + defined_params: {connector_sync_job_id: "foo"}, + endpoint: 'connector_sync_job.cancel' + } + ] + end + + it 'performs the request' do + expect(client_double.connector_sync_job.cancel(connector_sync_job_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/check_in_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/check_in_spec.rb new file mode 100644 index 0000000000..22dd40844a --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/check_in_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector_sync_job#check_in' do + let(:expected_args) do + [ + 'PUT', + '_connector/_sync_job/foo/_check_in', + {}, + nil, + {}, + { + defined_params: {connector_sync_job_id: "foo"}, + endpoint: 'connector_sync_job.check_in' + } + ] + end + + it 'performs the request' do + expect(client_double.connector_sync_job.check_in(connector_sync_job_id: 'foo')).to be_a Elasticsearch::API::Response + end +end From 816e140a8e1a093ecbfbae4897315567f104e58d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 5 Dec 2023 10:28:28 +0000 Subject: [PATCH 131/540] [API] Adds new experimental connector APIs * last_sync * update_configuration * update_error --- .../api/actions/connector/last_sync.rb | 67 +++++++++++++++++++ .../actions/connector/update_configuration.rb | 67 +++++++++++++++++++ .../api/actions/connector/update_error.rb | 67 +++++++++++++++++++ .../api/actions/connector/last_sync_spec.rb | 38 +++++++++++ .../connector/update_configuration_spec.rb | 38 +++++++++++ .../actions/connector/update_error_spec.rb | 38 +++++++++++ 6 files changed, 315 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/last_sync_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_configuration_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_error_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb new file mode 100644 index 0000000000..f62586cb87 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb @@ -0,0 +1,67 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the stats of last sync in the connector document. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body Object with stats related to the last connector sync run. (*Required*) + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def last_sync(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.last_sync" } + + defined_params = [:connector_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_last_sync" + params = {} + + 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/connector/update_configuration.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb new file mode 100644 index 0000000000..ba9fdc46b9 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb @@ -0,0 +1,67 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the connector configuration. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body Mapping between field names to configuration. (*Required*) + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def update_configuration(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.update_configuration" } + + defined_params = [:connector_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_configuration" + params = {} + + 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/connector/update_error.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb new file mode 100644 index 0000000000..db2bc3cbe5 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb @@ -0,0 +1,67 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the error field in the connector document. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body An object containing the connector's error. (*Required*) + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def update_error(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.update_error" } + + defined_params = [:connector_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_error" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/last_sync_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/last_sync_spec.rb new file mode 100644 index 0000000000..68cb2b635e --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/last_sync_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#last_sync' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_last_sync', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.last_sync' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.last_sync(connector_id: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_configuration_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_configuration_spec.rb new file mode 100644 index 0000000000..df3da6f546 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_configuration_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#update_configuration' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_configuration', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.update_configuration' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.update_configuration(body: {}, connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_error_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_error_spec.rb new file mode 100644 index 0000000000..6258f35b40 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_error_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#update_error' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_error', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.update_error' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.update_error(body: {}, connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end From 6c5dcbc6ab65f67db753ccdd59bd9d66a716376a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 5 Dec 2023 10:29:24 +0000 Subject: [PATCH 132/540] [API] Adds new experimental API connector_sync_job.get --- .../api/actions/connector_sync_job/get.rb | 66 +++++++++++++++++++ .../actions/connector_sync_job/get_spec.rb | 38 +++++++++++ 2 files changed, 104 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/get_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb new file mode 100644 index 0000000000..46f64bf29b --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module ConnectorSyncJob + module Actions + # Returns the details about a connector sync job. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be returned. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.get" } + + defined_params = [:connector_sync_job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, + "Required argument 'connector_sync_job_id' missing" unless arguments[:connector_sync_job_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _connector_sync_job_id = arguments.delete(:connector_sync_job_id) + + method = Elasticsearch::API::HTTP_GET + path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/get_spec.rb new file mode 100644 index 0000000000..0b6694d367 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/get_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector_sync_job#get' do + let(:expected_args) do + [ + 'GET', + '_connector/_sync_job/foo', + {}, + nil, + {}, + { + defined_params: {connector_sync_job_id: "foo"}, + endpoint: 'connector_sync_job.get' + } + ] + end + + it 'performs the request' do + expect(client_double.connector_sync_job.get(connector_sync_job_id: 'foo')).to be_a Elasticsearch::API::Response + end +end From e46282ff1c1bbd3a2e7a383eca62eb6eebc9eaa1 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 6 Dec 2023 06:27:25 +0000 Subject: [PATCH 133/540] [API] Adds new connector sync experimental APIs: error, update_stats --- .../api/actions/connector_sync_job/error.rb | 69 +++++++++++++++++++ .../connector_sync_job/update_stats.rb | 69 +++++++++++++++++++ .../actions/connector_sync_job/error_spec.rb | 38 ++++++++++ .../connector_sync_job/update_stats_spec.rb | 38 ++++++++++ 4 files changed, 214 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/error_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/update_stats_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb new file mode 100644 index 0000000000..5e446e2451 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb @@ -0,0 +1,69 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module ConnectorSyncJob + module Actions + # Sets an error for a connector sync job. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to set an error for. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The error to set in the connector sync job. (*Required*) + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def error(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.error" } + + defined_params = [:connector_sync_job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + raise ArgumentError, + "Required argument 'connector_sync_job_id' missing" unless arguments[:connector_sync_job_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_sync_job_id = arguments.delete(:connector_sync_job_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_error" + params = {} + + 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/connector_sync_job/update_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb new file mode 100644 index 0000000000..a4785fd2ee --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb @@ -0,0 +1,69 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module ConnectorSyncJob + module Actions + # Updates the stats fields in the connector sync job document. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The stats to update for the connector sync job. (*Required*) + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def update_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.update_stats" } + + defined_params = [:connector_sync_job_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + raise ArgumentError, + "Required argument 'connector_sync_job_id' missing" unless arguments[:connector_sync_job_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_sync_job_id = arguments.delete(:connector_sync_job_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_stats" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/error_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/error_spec.rb new file mode 100644 index 0000000000..8eafff58f7 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/error_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector_sync_job#error' do + let(:expected_args) do + [ + 'PUT', + '_connector/_sync_job/foo/_error', + {}, + {}, + {}, + { + defined_params: {connector_sync_job_id: "foo"}, + endpoint: 'connector_sync_job.error' + } + ] + end + + it 'performs the request' do + expect(client_double.connector_sync_job.error(connector_sync_job_id: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/update_stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/update_stats_spec.rb new file mode 100644 index 0000000000..b2219fd19d --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/update_stats_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector_sync_job#update_stats' do + let(:expected_args) do + [ + 'PUT', + '_connector/_sync_job/foo/_stats', + {}, + {}, + {}, + { + defined_params: {connector_sync_job_id: "foo"}, + endpoint: 'connector_sync_job.update_stats' + } + ] + end + + it 'performs the request' do + expect(client_double.connector_sync_job.update_stats(connector_sync_job_id: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end From 27f6367f314d370a07c6d608ecf4a3019681b240 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 6 Dec 2023 06:30:23 +0000 Subject: [PATCH 134/540] [API] Adds experimental APIs in connector namespace: post, update_name --- .../api/actions/connector/post.rb | 55 +++++++++++++++ .../api/actions/connector/update_name.rb | 67 +++++++++++++++++++ .../api/actions/connector/post_spec.rb | 35 ++++++++++ .../api/actions/connector/update_name_spec.rb | 38 +++++++++++ 4 files changed, 195 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/post_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_name_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb new file mode 100644 index 0000000000..773998afd8 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb @@ -0,0 +1,55 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Creates a connector. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The connector configuration. + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def post(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.post" } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = "_connector" + params = {} + + 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/connector/update_name.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb new file mode 100644 index 0000000000..fb9ac78bae --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb @@ -0,0 +1,67 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the name and/or description fields in the connector document. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body An object containing the connector's name and/or description. (*Required*) + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def update_name(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.update_name" } + + defined_params = [:connector_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_name" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/post_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/post_spec.rb new file mode 100644 index 0000000000..5021336770 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/post_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#post' do + let(:expected_args) do + [ + 'POST', + '_connector', + {}, + nil, + {}, + { endpoint: 'connector.post' } + ] + end + + it 'performs the request' do + expect(client_double.connector.post(connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_name_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_name_spec.rb new file mode 100644 index 0000000000..009154c688 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_name_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#update_name' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_name', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.update_name' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.update_name(connector_id: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end From 7787e411393e4bbe9e455d5c5f0eb2101a089af6 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 6 Dec 2023 09:39:00 +0000 Subject: [PATCH 135/540] [API] Test Runner: Skips esql usage test --- elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml index 4943423364..a8cbcc0b96 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml @@ -109,3 +109,6 @@ - :file: 'spatial/70_script_doc_values.yml' :description: '*' +- + :file: 'esql/60_usage.yml' + :description: 'Basic ESQL usage output (telemetry)' From fcafe07519a9c9a0323f162e87ad717b5afdc686 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 6 Dec 2023 11:42:28 +0000 Subject: [PATCH 136/540] Bumps version to 8.13.0 --- elasticsearch-api/lib/elasticsearch/api/version.rb | 2 +- elasticsearch/elasticsearch.gemspec | 2 +- elasticsearch/lib/elasticsearch/version.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index 4d4a8aca76..5db4123683 100644 --- a/elasticsearch-api/lib/elasticsearch/api/version.rb +++ b/elasticsearch-api/lib/elasticsearch/api/version.rb @@ -17,6 +17,6 @@ module Elasticsearch module API - VERSION = '8.12.0'.freeze + VERSION = '8.13.0'.freeze end end diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index 9791b708ec..9f1f649e99 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -47,7 +47,7 @@ Gem::Specification.new do |s| s.add_dependency 'elastic-transport', '~> 8.3' - s.add_dependency 'elasticsearch-api', '8.12.0' + s.add_dependency 'elasticsearch-api', '8.13.0' s.add_development_dependency 'bundler' s.add_development_dependency 'byebug' unless defined?(JRUBY_VERSION) || defined?(Rubinius) diff --git a/elasticsearch/lib/elasticsearch/version.rb b/elasticsearch/lib/elasticsearch/version.rb index 08a17ccfff..f1498f8f73 100644 --- a/elasticsearch/lib/elasticsearch/version.rb +++ b/elasticsearch/lib/elasticsearch/version.rb @@ -16,5 +16,5 @@ # under the License. module Elasticsearch - VERSION = '8.12.0'.freeze + VERSION = '8.13.0'.freeze end From 2730f8684d0842e1fb6565c26898ffe25af29be4 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 7 Dec 2023 10:50:10 +0000 Subject: [PATCH 137/540] [API] Adds experimental connector_sync_job.list endpoint --- .../api/actions/connector_sync_job/list.rb | 58 +++++++++++++++++++ .../actions/connector_sync_job/list_spec.rb | 35 +++++++++++ 2 files changed, 93 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/list_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb new file mode 100644 index 0000000000..b6957afd11 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb @@ -0,0 +1,58 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module ConnectorSyncJob + module Actions + # Lists all connector sync jobs. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [Integer] :from Starting offset (default: 0) + # @option arguments [Integer] :size specifies a max number of results to get (default: 100) + # @option arguments [String] :status Sync job status, which sync jobs are fetched for + # @option arguments [String] :connector_id Id of the connector to fetch the sync jobs for + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # + def list(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.list" } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = "_connector/_sync_job" + 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/spec/elasticsearch/api/actions/connector_sync_job/list_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/list_spec.rb new file mode 100644 index 0000000000..7459d88db3 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/list_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector_sync_job#list' do + let(:expected_args) do + [ + 'GET', + '_connector/_sync_job', + {}, + nil, + {}, + { endpoint: 'connector_sync_job.list' } + ] + end + + it 'performs the request' do + expect(client_double.connector_sync_job.list).to be_a Elasticsearch::API::Response + end +end From 173474cee8fd32b46ba78a20fb0f517c7d9afb37 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 7 Dec 2023 10:34:06 +0000 Subject: [PATCH 138/540] [DOCS] Adds doc examples for Elasticsearch Quick start guide https://www.elastic.co/guide/en/elasticsearch/reference/master/getting-started.html --- .../36b86b97feedcf5632824eefc251d6ed.asciidoc | 8 ++++++++ .../3d1ff6097e2359f927c88c2ccdb36252.asciidoc | 5 +++++ .../8575c966b004fb124c7afd6bb5827b50.asciid | 13 +++++++++++++ .../bcc75fc01b45e482638c65b8fbdf09fa.asciidoc | 7 +++++++ .../d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc | 18 ++++++++++++++++++ 5 files changed, 51 insertions(+) create mode 100644 docs/examples/guide/36b86b97feedcf5632824eefc251d6ed.asciidoc create mode 100644 docs/examples/guide/3d1ff6097e2359f927c88c2ccdb36252.asciidoc create mode 100644 docs/examples/guide/8575c966b004fb124c7afd6bb5827b50.asciid create mode 100644 docs/examples/guide/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc create mode 100644 docs/examples/guide/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc diff --git a/docs/examples/guide/36b86b97feedcf5632824eefc251d6ed.asciidoc b/docs/examples/guide/36b86b97feedcf5632824eefc251d6ed.asciidoc new file mode 100644 index 0000000000..718fd3338a --- /dev/null +++ b/docs/examples/guide/36b86b97feedcf5632824eefc251d6ed.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.search( + index: 'books', + body: { query: { match: { name: 'brave' } } } +) +puts response +---- diff --git a/docs/examples/guide/3d1ff6097e2359f927c88c2ccdb36252.asciidoc b/docs/examples/guide/3d1ff6097e2359f927c88c2ccdb36252.asciidoc new file mode 100644 index 0000000000..e6a88d209d --- /dev/null +++ b/docs/examples/guide/3d1ff6097e2359f927c88c2ccdb36252.asciidoc @@ -0,0 +1,5 @@ +[source, ruby] +---- +response = client.info +puts response +---- diff --git a/docs/examples/guide/8575c966b004fb124c7afd6bb5827b50.asciid b/docs/examples/guide/8575c966b004fb124c7afd6bb5827b50.asciid new file mode 100644 index 0000000000..e85d828755 --- /dev/null +++ b/docs/examples/guide/8575c966b004fb124c7afd6bb5827b50.asciid @@ -0,0 +1,13 @@ +[source, ruby] +---- +response = client.index( + index: 'books', + body: { + name: 'Snow Crash', + author: 'Neal Stephenson', + release_date: '1992-06-01', + page_count: 470 + } +) +puts response +---- diff --git a/docs/examples/guide/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc b/docs/examples/guide/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc new file mode 100644 index 0000000000..1847170105 --- /dev/null +++ b/docs/examples/guide/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.search( + index: 'books' +) +puts response +---- diff --git a/docs/examples/guide/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc b/docs/examples/guide/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc new file mode 100644 index 0000000000..31b2253437 --- /dev/null +++ b/docs/examples/guide/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc @@ -0,0 +1,18 @@ +[source, ruby] +---- +response = client.bulk( + body: [ + { index: { _index: 'books' } }, + { name: 'Revelation Space', author: 'Alastair Reynolds', release_date: '2000-03-15', page_count: 585}, + { index: { _index: 'books' } }, + { name: '1984', author: 'George Orwell', release_date: '1985-06-01', page_count: 328}, + { index: { _index: 'books' } }, + { name: 'Fahrenheit 451', author: 'Ray Bradbury', release_date: '1953-10-15', page_count: 227}, + { index: { _index: 'books' } }, + { name: 'Brave New World', author: 'Aldous Huxley', release_date: '1932-06-01', page_count: 268}, + { index: { _index: 'books' } }, + { name: 'The Handmaids Tale', author: 'Margaret Atwood', release_date: '1985-06-01', page_count: 311} + ] +) +puts response +---- From 65c1b58d3a17c091595226da5df8cafa52aecd20 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 7 Dec 2023 14:08:31 +0000 Subject: [PATCH 139/540] [DOCS] Fixes file name for example asciidoc --- ...bb5827b50.asciid => 8575c966b004fb124c7afd6bb5827b50.asciidoc} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/examples/guide/{8575c966b004fb124c7afd6bb5827b50.asciid => 8575c966b004fb124c7afd6bb5827b50.asciidoc} (100%) diff --git a/docs/examples/guide/8575c966b004fb124c7afd6bb5827b50.asciid b/docs/examples/guide/8575c966b004fb124c7afd6bb5827b50.asciidoc similarity index 100% rename from docs/examples/guide/8575c966b004fb124c7afd6bb5827b50.asciid rename to docs/examples/guide/8575c966b004fb124c7afd6bb5827b50.asciidoc From e9da84fcaef56e3d7034a28d52ed678fe1bf2514 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 8 Dec 2023 06:48:41 +0000 Subject: [PATCH 140/540] [DOCS] Updates generated docs --- ...02b6aa3e5652839f03de3a655854b897.asciidoc} | 2 +- .../05a09078fe1016e900e445ad4039cf97.asciidoc | 81 +++ ...08f20902821a4f7a73ce7b959c5bdbdc.asciidoc} | 2 +- ...0cee58617e75f493c5049d77be1c49f3.asciidoc} | 2 +- ...0eccea755bd4f6dd47579a9022690546.asciidoc} | 7 +- ...0f9a213d2cc4b9c2738446d5a7aee976.asciidoc} | 3 +- .../10f0c8fed98455c460c374b50ffbb204.asciidoc | 7 + .../13ecdf99114098c76b050397d9c3d4e6.asciidoc | 11 + .../14a1db30e13eb1d03cfd9710ca847ebb.asciidoc | 23 + .../165bebb9ce8b6babb72672db5b8b5976.asciidoc | 24 - .../1736545c8b5674f6d311f3277eb387f1.asciidoc | 10 + .../19c00c6b29bc7dbc5e92b3668da2da93.asciidoc | 24 + .../1c1f2a6a193d9e64c37242b2824b3031.asciidoc | 56 ++ .../1d746272a7511bf91302a15b5c58ca0e.asciidoc | 23 + .../1d9b695a17cffd910c496c9b03c75d6f.asciidoc | 26 + .../1e94a2bb95bc245bcfb87ac7d611cf49.asciidoc | 20 + ...1ed77bf308fa4ab328b36060e412f500.asciidoc} | 23 + .../2009f2d1ba0780a799a0fdce889c9739.asciidoc | 64 +++ .../20407c847adb8393ce41dc656384afc4.asciidoc | 37 ++ ...2155c920d7d860f3ee7542f2211b4fec.asciidoc} | 2 +- .../256eba7a77c8890a43afeda8ce8a3225.asciidoc | 21 + .../2646710ece0c4c843aebeacd370d0396.asciidoc | 21 + ...28543836b62b5622a402e6f7731d68f0.asciidoc} | 4 +- .../2897ccc2a3bf3d0cd89328ee4413fae5.asciidoc | 7 + .../2a71e2d7f7179dd76183d30789046808.asciidoc | 27 + .../2bc1d52efec2076dc9fc2a3a2d90e8ab.asciidoc | 18 + .../2c1e16e9ac24cfea979af2a69900d3c2.asciidoc | 11 + ...2c3207c0c985d253b2ecccc14e69e25a.asciidoc} | 2 +- .../2dad2b0c8ba503228f4b11cecca0b348.asciidoc | 10 + .../2e3d1b293da93f2a9ecfc26786ec28d6.asciidoc | 155 +++++ ...31a79a57b242713edec6795599ba0d5d.asciidoc} | 6 +- .../34c5cd33ba371fb79a793baf9f6e9fad.asciidoc | 17 + ...35f892b475a1770f18328158be7039fd.asciidoc} | 1 - .../376ff4b2b5f657481af78a778aaab57f.asciidoc | 75 +++ .../3a3adae6dbb2c0316a7d98d0a6c1d4f8.asciidoc | 42 ++ .../3afc6dacf90b42900ab571aad8a61d75.asciidoc | 41 ++ .../40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc | 52 ++ .../451e7c29b2cf738cfc822f7c175bef56.asciidoc | 22 + .../473c8ddd4e4b7814a64e5fe40d9d6dca.asciidoc | 7 + ...487f0e07fd83c05f9763e0795c525e2e.asciidoc} | 42 +- .../49c40b51da2469a6e00fea8fa6fbf56e.asciidoc | 11 + .../4b5110a21676cc0e26e050a4b4552235.asciidoc | 7 + .../4cdcc3fde5cea165a3a7567962b9bd61.asciidoc | 72 +++ .../4e3414fc712b16311f9e433dd366f49d.asciidoc | 8 + .../52be795b68e6ef3f396f35fea52d0481.asciidoc | 14 + .../571314a948e49f1f9614d36fcf79392a.asciidoc | 7 + .../5865ca8d2bcd087ed5dbee33fafee57f.asciidoc | 7 + ...5e415c490a46358643ee2aab554b4876.asciidoc} | 3 +- .../645433e8e479e5d71c100f66dd2de5d0.asciidoc | 531 ++++++++++++++++++ .../64b9baa6d7556b960b29698f3383aa31.asciidoc | 23 - .../6edfc35a66afd9b884431fccf48fdbf5.asciidoc | 20 + .../7011fcdd231804f9c3894154ae2c3fbc.asciidoc | 16 + ...72a3668ddc95d9aec47cc679d1e7afc5.asciidoc} | 16 +- .../7353d42289155bb864504fd62efc6979.asciidoc | 21 + .../744aeb2af40f519e430e21e004e3c3b7.asciidoc | 52 ++ ...74da377bccad43da2b0e276c086d26ba.asciidoc} | 5 + .../763ce1377c8dfa1ca6a042d8ee99f4f5.asciidoc | 7 + .../7c8f207e43115ea8f20d2298be5aaebc.asciidoc | 36 ++ .../7cc603d7e8373a01eae7bb0d18824632.asciidoc | 25 - .../7d3ffd32f2747efb7d0fb1f0dc617ff4.asciidoc | 26 - ...7e48648ca27024831c60b455e836c496.asciidoc} | 5 - .../7f697eb436dfa3c30dfe610d8c32d132.asciidoc | 24 - .../80edd2124a822d9f9bf22ecc49d2c2e9.asciidoc | 8 + .../87457bb3467484bec3e9df4e25942ba6.asciidoc | 9 + .../89dee10a24ea2727af5b00039a4271bd.asciidoc | 162 ++++++ .../8d064eda2199de52e5be9ee68a5b7c68.asciidoc | 23 + .../8d9b04f2a97f4229dec9e620126de049.asciidoc | 11 + .../8f7936f219500305e5b2518dbbf949ea.asciidoc | 7 + .../8fec06a98d0151c1d717a01491d0b8f0.asciidoc | 11 + .../94cd66bf93f99881c1bda547283a0357.asciidoc | 46 ++ .../96ea0e80323d6d2d99964625c004a44d.asciidoc | 11 + ...98b403c356a9b14544e9b9f646845e9f.asciidoc} | 2 +- .../990c0d794ed6f05d1620b5d49f7aff6e.asciidoc | 7 + .../9949bcc64c9cd6f4041819546d7fce78.asciidoc | 11 + .../9e563b8d5a7845f644db8d5bbf453eb6.asciidoc | 22 + .../a1f6383373084d874d3365eef2c0e96e.asciidoc | 7 - .../a2bd0782aadfd0a902d7f590ee7f49fe.asciidoc | 19 + .../a4a3c3cd09efa75168dab90105afb2e9.asciidoc | 8 + .../a547bb926c25f670078b98fbe67de3cc.asciidoc | 8 + .../a5e6ccfb6019238e6db602373b9af147.asciidoc | 8 + .../a62fda257bdc3ffdd98f39cd38d112f1.asciidoc | 29 - ...a63e0d0504e0c9313814b7f4e2641353.asciidoc} | 23 + .../a6b2815d54df34b6b8d00226e9a1af0c.asciidoc | 20 + .../a6ccac9f80c5e5efdaab992f3a32d919.asciidoc | 7 + .../ab1372270c11bcd6f36d1a13e6c69276.asciidoc | 20 + ...afa11ebb493ebbfd77acbbe50d2ce6db.asciidoc} | 2 +- .../afe30f159937b38d74c869570cfcd369.asciidoc | 17 + ...b52951b78cd5fb2f9353d1c7e6d37070.asciidoc} | 2 +- .../b6a6aa9ba20e9a019371ae268488833f.asciidoc | 7 + .../b8ff63c3d7561d27d035ef204097d631.asciidoc | 24 - .../bcdfaa4487747249699a86a0dcd22f5e.asciidoc | 35 ++ ...bd2a387e8c21bf01a1039e81d7602921.asciidoc} | 2 +- ...bf17440ac178d2ef5f5be643d033920b.asciidoc} | 5 +- .../c5cc19e48549fbc5327a9d46874bbeee.asciidoc | 21 + ...c8e2109b19d50467ab83a40006462e9f.asciidoc} | 3 +- .../cbc2b5595890f87165aab1a741b1d22c.asciidoc | 24 + .../cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc | 52 ++ .../d003ee256d24aa6000bd9dbf1d608dc5.asciidoc | 22 + .../d434219a4b2d26b22dfc0ce7969240c8.asciidoc | 29 - ...d49318764244113ad2ac4cc0f06d77ec.asciidoc} | 1 - .../d5d022fac900b3244c3d24b185bb19e0.asciidoc | 30 + .../d7a55a7c491e97079e429483085f1d58.asciidoc | 19 + ...d8ea6a1a1c546bf29f65f8c65439b156.asciidoc} | 4 +- .../d93d52b6057a7aff3d0766ca44c505e0.asciidoc | 34 ++ .../d952ac7c73219d8cabc080679e035514.asciidoc | 20 + .../d9fd6c552e904261fd52884595e28eff.asciidoc | 26 - ...dadb69a225778ecd6528924c0aa029bb.asciidoc} | 2 - .../dc3c7d755f1d1d0c5973068288017dcb.asciidoc | 22 + .../dddb6a6ebd145f8411c5b4910d332f87.asciidoc | 9 + ...e04c55476de6e785a066d3b43f66d20d.asciidoc} | 4 +- .../e26e8bfa68aa4ab265b22304c38c3aef.asciidoc | 89 +++ .../e2bcc8f4ed2b4de82729e7a5a7c8f634.asciidoc | 5 + .../e301695a514a13abd98c1fe51360fa85.asciidoc | 17 + .../e324ea1547635180c31c1adf77870ba2.asciidoc | 42 ++ .../e4d1f01c025fb797a1d87f372760eabf.asciidoc | 8 + ...e4de6035653e8202c43631f02d244661.asciidoc} | 1 + .../e80dab3e0314b7dad1bbd75b0956d9fc.asciidoc | 29 + .../e885c28e6a1ff3cc20aaa5543d84f83e.asciidoc | 49 ++ .../e95e61988dc3073a007f7b7445dd233b.asciidoc | 23 + .../ef175686e1179c4ed8fb96935895b3d0.asciidoc | 32 ++ .../efa924638043f3a6b23ccb824d757eba.asciidoc | 34 ++ .../f4ae3f3fbf07a7d39122ac5ac20b9c03.asciidoc | 25 + ...f4e38856cd6a7531e8fa8df4abe0e1c4.asciidoc} | 4 +- .../f55cfbfc93d25941fa1d28866e050902.asciidoc | 153 ----- .../f7d3d367a3d8e8ff0eca426b6ea85252.asciidoc | 15 + .../fc1907515f6a913884a9f86451e90ee8.asciidoc | 24 + .../fdada036a875d7995d5d7aba9c06361e.asciidoc | 18 + 127 files changed, 2975 insertions(+), 452 deletions(-) rename docs/examples/guide/{d29b00db13c625d4832e69635259db66.asciidoc => 02b6aa3e5652839f03de3a655854b897.asciidoc} (72%) create mode 100644 docs/examples/guide/05a09078fe1016e900e445ad4039cf97.asciidoc rename docs/examples/guide/{28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc => 08f20902821a4f7a73ce7b959c5bdbdc.asciidoc} (86%) rename docs/examples/guide/{0ac5ec27c129b9541a6ddad6aeea1276.asciidoc => 0cee58617e75f493c5049d77be1c49f3.asciidoc} (87%) rename docs/examples/guide/{0514111513bb21f69a40c6258573264f.asciidoc => 0eccea755bd4f6dd47579a9022690546.asciidoc} (63%) rename docs/examples/guide/{d6c3659339ef4f2d47425e09eccbf939.asciidoc => 0f9a213d2cc4b9c2738446d5a7aee976.asciidoc} (79%) create mode 100644 docs/examples/guide/10f0c8fed98455c460c374b50ffbb204.asciidoc create mode 100644 docs/examples/guide/13ecdf99114098c76b050397d9c3d4e6.asciidoc create mode 100644 docs/examples/guide/14a1db30e13eb1d03cfd9710ca847ebb.asciidoc delete mode 100644 docs/examples/guide/165bebb9ce8b6babb72672db5b8b5976.asciidoc create mode 100644 docs/examples/guide/1736545c8b5674f6d311f3277eb387f1.asciidoc create mode 100644 docs/examples/guide/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc create mode 100644 docs/examples/guide/1c1f2a6a193d9e64c37242b2824b3031.asciidoc create mode 100644 docs/examples/guide/1d746272a7511bf91302a15b5c58ca0e.asciidoc create mode 100644 docs/examples/guide/1d9b695a17cffd910c496c9b03c75d6f.asciidoc create mode 100644 docs/examples/guide/1e94a2bb95bc245bcfb87ac7d611cf49.asciidoc rename docs/examples/guide/{f589cb2b789b4a16ed78183f2349a735.asciidoc => 1ed77bf308fa4ab328b36060e412f500.asciidoc} (70%) create mode 100644 docs/examples/guide/2009f2d1ba0780a799a0fdce889c9739.asciidoc create mode 100644 docs/examples/guide/20407c847adb8393ce41dc656384afc4.asciidoc rename docs/examples/guide/{cd976cf523f6352ac3429a410677b768.asciidoc => 2155c920d7d860f3ee7542f2211b4fec.asciidoc} (87%) create mode 100644 docs/examples/guide/256eba7a77c8890a43afeda8ce8a3225.asciidoc create mode 100644 docs/examples/guide/2646710ece0c4c843aebeacd370d0396.asciidoc rename docs/examples/guide/{20e31b7ff08794bdf3c8f8ca3b796b1c.asciidoc => 28543836b62b5622a402e6f7731d68f0.asciidoc} (50%) create mode 100644 docs/examples/guide/2897ccc2a3bf3d0cd89328ee4413fae5.asciidoc create mode 100644 docs/examples/guide/2a71e2d7f7179dd76183d30789046808.asciidoc create mode 100644 docs/examples/guide/2bc1d52efec2076dc9fc2a3a2d90e8ab.asciidoc create mode 100644 docs/examples/guide/2c1e16e9ac24cfea979af2a69900d3c2.asciidoc rename docs/examples/guide/{27c22a152470e6a4c06e832731d9b77d.asciidoc => 2c3207c0c985d253b2ecccc14e69e25a.asciidoc} (65%) create mode 100644 docs/examples/guide/2dad2b0c8ba503228f4b11cecca0b348.asciidoc create mode 100644 docs/examples/guide/2e3d1b293da93f2a9ecfc26786ec28d6.asciidoc rename docs/examples/guide/{ff8317bbd60e9dfc6bf007028a18b531.asciidoc => 31a79a57b242713edec6795599ba0d5d.asciidoc} (72%) create mode 100644 docs/examples/guide/34c5cd33ba371fb79a793baf9f6e9fad.asciidoc rename docs/examples/guide/{f29b8edba5eabb0b05a4f74d9ae6a816.asciidoc => 35f892b475a1770f18328158be7039fd.asciidoc} (92%) create mode 100644 docs/examples/guide/376ff4b2b5f657481af78a778aaab57f.asciidoc create mode 100644 docs/examples/guide/3a3adae6dbb2c0316a7d98d0a6c1d4f8.asciidoc create mode 100644 docs/examples/guide/3afc6dacf90b42900ab571aad8a61d75.asciidoc create mode 100644 docs/examples/guide/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc create mode 100644 docs/examples/guide/451e7c29b2cf738cfc822f7c175bef56.asciidoc create mode 100644 docs/examples/guide/473c8ddd4e4b7814a64e5fe40d9d6dca.asciidoc rename docs/examples/guide/{5cbfc259df140862818c10eb8a96ba97.asciidoc => 487f0e07fd83c05f9763e0795c525e2e.asciidoc} (62%) create mode 100644 docs/examples/guide/49c40b51da2469a6e00fea8fa6fbf56e.asciidoc create mode 100644 docs/examples/guide/4b5110a21676cc0e26e050a4b4552235.asciidoc create mode 100644 docs/examples/guide/4cdcc3fde5cea165a3a7567962b9bd61.asciidoc create mode 100644 docs/examples/guide/4e3414fc712b16311f9e433dd366f49d.asciidoc create mode 100644 docs/examples/guide/52be795b68e6ef3f396f35fea52d0481.asciidoc create mode 100644 docs/examples/guide/571314a948e49f1f9614d36fcf79392a.asciidoc create mode 100644 docs/examples/guide/5865ca8d2bcd087ed5dbee33fafee57f.asciidoc rename docs/examples/guide/{f01d9bbab5b4535b9e067cde3f64ddbf.asciidoc => 5e415c490a46358643ee2aab554b4876.asciidoc} (83%) create mode 100644 docs/examples/guide/645433e8e479e5d71c100f66dd2de5d0.asciidoc delete mode 100644 docs/examples/guide/64b9baa6d7556b960b29698f3383aa31.asciidoc create mode 100644 docs/examples/guide/6edfc35a66afd9b884431fccf48fdbf5.asciidoc create mode 100644 docs/examples/guide/7011fcdd231804f9c3894154ae2c3fbc.asciidoc rename docs/examples/guide/{591bf50bb5ad3134006efe5c3f46d7a6.asciidoc => 72a3668ddc95d9aec47cc679d1e7afc5.asciidoc} (66%) create mode 100644 docs/examples/guide/7353d42289155bb864504fd62efc6979.asciidoc create mode 100644 docs/examples/guide/744aeb2af40f519e430e21e004e3c3b7.asciidoc rename docs/examples/guide/{5ca2f718f8b01684c983753bd8d92690.asciidoc => 74da377bccad43da2b0e276c086d26ba.asciidoc} (84%) create mode 100644 docs/examples/guide/763ce1377c8dfa1ca6a042d8ee99f4f5.asciidoc create mode 100644 docs/examples/guide/7c8f207e43115ea8f20d2298be5aaebc.asciidoc delete mode 100644 docs/examples/guide/7cc603d7e8373a01eae7bb0d18824632.asciidoc delete mode 100644 docs/examples/guide/7d3ffd32f2747efb7d0fb1f0dc617ff4.asciidoc rename docs/examples/guide/{9f214a468014a83809935e7b808afc53.asciidoc => 7e48648ca27024831c60b455e836c496.asciidoc} (74%) delete mode 100644 docs/examples/guide/7f697eb436dfa3c30dfe610d8c32d132.asciidoc create mode 100644 docs/examples/guide/80edd2124a822d9f9bf22ecc49d2c2e9.asciidoc create mode 100644 docs/examples/guide/87457bb3467484bec3e9df4e25942ba6.asciidoc create mode 100644 docs/examples/guide/89dee10a24ea2727af5b00039a4271bd.asciidoc create mode 100644 docs/examples/guide/8d064eda2199de52e5be9ee68a5b7c68.asciidoc create mode 100644 docs/examples/guide/8d9b04f2a97f4229dec9e620126de049.asciidoc create mode 100644 docs/examples/guide/8f7936f219500305e5b2518dbbf949ea.asciidoc create mode 100644 docs/examples/guide/8fec06a98d0151c1d717a01491d0b8f0.asciidoc create mode 100644 docs/examples/guide/94cd66bf93f99881c1bda547283a0357.asciidoc create mode 100644 docs/examples/guide/96ea0e80323d6d2d99964625c004a44d.asciidoc rename docs/examples/guide/{3466cdc16374655c73c087fcbeb82ee8.asciidoc => 98b403c356a9b14544e9b9f646845e9f.asciidoc} (92%) create mode 100644 docs/examples/guide/990c0d794ed6f05d1620b5d49f7aff6e.asciidoc create mode 100644 docs/examples/guide/9949bcc64c9cd6f4041819546d7fce78.asciidoc create mode 100644 docs/examples/guide/9e563b8d5a7845f644db8d5bbf453eb6.asciidoc delete mode 100644 docs/examples/guide/a1f6383373084d874d3365eef2c0e96e.asciidoc create mode 100644 docs/examples/guide/a2bd0782aadfd0a902d7f590ee7f49fe.asciidoc create mode 100644 docs/examples/guide/a4a3c3cd09efa75168dab90105afb2e9.asciidoc create mode 100644 docs/examples/guide/a547bb926c25f670078b98fbe67de3cc.asciidoc create mode 100644 docs/examples/guide/a5e6ccfb6019238e6db602373b9af147.asciidoc delete mode 100644 docs/examples/guide/a62fda257bdc3ffdd98f39cd38d112f1.asciidoc rename docs/examples/guide/{6f2208e90810ea6da751fe25fcf456ec.asciidoc => a63e0d0504e0c9313814b7f4e2641353.asciidoc} (75%) create mode 100644 docs/examples/guide/a6b2815d54df34b6b8d00226e9a1af0c.asciidoc create mode 100644 docs/examples/guide/a6ccac9f80c5e5efdaab992f3a32d919.asciidoc create mode 100644 docs/examples/guide/ab1372270c11bcd6f36d1a13e6c69276.asciidoc rename docs/examples/guide/{1206539c3243681232cb134f4f89bed6.asciidoc => afa11ebb493ebbfd77acbbe50d2ce6db.asciidoc} (96%) create mode 100644 docs/examples/guide/afe30f159937b38d74c869570cfcd369.asciidoc rename docs/examples/guide/{b10668cc742e666fe0eb6a53fd38a93e.asciidoc => b52951b78cd5fb2f9353d1c7e6d37070.asciidoc} (82%) create mode 100644 docs/examples/guide/b6a6aa9ba20e9a019371ae268488833f.asciidoc delete mode 100644 docs/examples/guide/b8ff63c3d7561d27d035ef204097d631.asciidoc create mode 100644 docs/examples/guide/bcdfaa4487747249699a86a0dcd22f5e.asciidoc rename docs/examples/guide/{d270e64fcf017a887687fb030b0c1986.asciidoc => bd2a387e8c21bf01a1039e81d7602921.asciidoc} (92%) rename docs/examples/guide/{dfb1ce43b4f96dcb3c8dcc8370aa9965.asciidoc => bf17440ac178d2ef5f5be643d033920b.asciidoc} (70%) create mode 100644 docs/examples/guide/c5cc19e48549fbc5327a9d46874bbeee.asciidoc rename docs/examples/guide/{66c64bffe3a15cf260baa0c0118aa4ea.asciidoc => c8e2109b19d50467ab83a40006462e9f.asciidoc} (62%) create mode 100644 docs/examples/guide/cbc2b5595890f87165aab1a741b1d22c.asciidoc create mode 100644 docs/examples/guide/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc create mode 100644 docs/examples/guide/d003ee256d24aa6000bd9dbf1d608dc5.asciidoc delete mode 100644 docs/examples/guide/d434219a4b2d26b22dfc0ce7969240c8.asciidoc rename docs/examples/guide/{c93e63f3fb62f588d62ffbbefe73212e.asciidoc => d49318764244113ad2ac4cc0f06d77ec.asciidoc} (94%) create mode 100644 docs/examples/guide/d5d022fac900b3244c3d24b185bb19e0.asciidoc create mode 100644 docs/examples/guide/d7a55a7c491e97079e429483085f1d58.asciidoc rename docs/examples/guide/{75c2bb6bbeb70d263cb9a5c588e8298e.asciidoc => d8ea6a1a1c546bf29f65f8c65439b156.asciidoc} (81%) create mode 100644 docs/examples/guide/d93d52b6057a7aff3d0766ca44c505e0.asciidoc create mode 100644 docs/examples/guide/d952ac7c73219d8cabc080679e035514.asciidoc delete mode 100644 docs/examples/guide/d9fd6c552e904261fd52884595e28eff.asciidoc rename docs/examples/guide/{6894596e924b6180bfc77428ba89769f.asciidoc => dadb69a225778ecd6528924c0aa029bb.asciidoc} (91%) create mode 100644 docs/examples/guide/dc3c7d755f1d1d0c5973068288017dcb.asciidoc create mode 100644 docs/examples/guide/dddb6a6ebd145f8411c5b4910d332f87.asciidoc rename docs/examples/guide/{c43fd2f25f78e6286fe9a5d08dc31446.asciidoc => e04c55476de6e785a066d3b43f66d20d.asciidoc} (86%) create mode 100644 docs/examples/guide/e26e8bfa68aa4ab265b22304c38c3aef.asciidoc create mode 100644 docs/examples/guide/e2bcc8f4ed2b4de82729e7a5a7c8f634.asciidoc create mode 100644 docs/examples/guide/e301695a514a13abd98c1fe51360fa85.asciidoc create mode 100644 docs/examples/guide/e324ea1547635180c31c1adf77870ba2.asciidoc create mode 100644 docs/examples/guide/e4d1f01c025fb797a1d87f372760eabf.asciidoc rename docs/examples/guide/{bd93b6f99ed785cf7520370a4cf6b834.asciidoc => e4de6035653e8202c43631f02d244661.asciidoc} (95%) create mode 100644 docs/examples/guide/e80dab3e0314b7dad1bbd75b0956d9fc.asciidoc create mode 100644 docs/examples/guide/e885c28e6a1ff3cc20aaa5543d84f83e.asciidoc create mode 100644 docs/examples/guide/e95e61988dc3073a007f7b7445dd233b.asciidoc create mode 100644 docs/examples/guide/ef175686e1179c4ed8fb96935895b3d0.asciidoc create mode 100644 docs/examples/guide/efa924638043f3a6b23ccb824d757eba.asciidoc create mode 100644 docs/examples/guide/f4ae3f3fbf07a7d39122ac5ac20b9c03.asciidoc rename docs/examples/guide/{a4709da258a667cae4199ec3a1e84b3b.asciidoc => f4e38856cd6a7531e8fa8df4abe0e1c4.asciidoc} (77%) delete mode 100644 docs/examples/guide/f55cfbfc93d25941fa1d28866e050902.asciidoc create mode 100644 docs/examples/guide/f7d3d367a3d8e8ff0eca426b6ea85252.asciidoc create mode 100644 docs/examples/guide/fc1907515f6a913884a9f86451e90ee8.asciidoc create mode 100644 docs/examples/guide/fdada036a875d7995d5d7aba9c06361e.asciidoc diff --git a/docs/examples/guide/d29b00db13c625d4832e69635259db66.asciidoc b/docs/examples/guide/02b6aa3e5652839f03de3a655854b897.asciidoc similarity index 72% rename from docs/examples/guide/d29b00db13c625d4832e69635259db66.asciidoc rename to docs/examples/guide/02b6aa3e5652839f03de3a655854b897.asciidoc index c6e932ab8e..262aa3d102 100644 --- a/docs/examples/guide/d29b00db13c625d4832e69635259db66.asciidoc +++ b/docs/examples/guide/02b6aa3e5652839f03de3a655854b897.asciidoc @@ -1,7 +1,7 @@ [source, ruby] ---- response = client.search( - index: 'sample-01*' + index: 'my-data-stream' ) puts response ---- diff --git a/docs/examples/guide/05a09078fe1016e900e445ad4039cf97.asciidoc b/docs/examples/guide/05a09078fe1016e900e445ad4039cf97.asciidoc new file mode 100644 index 0000000000..3456e7448c --- /dev/null +++ b/docs/examples/guide/05a09078fe1016e900e445ad4039cf97.asciidoc @@ -0,0 +1,81 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'clientips', + body: { + mappings: { + properties: { + client_ip: { + type: 'keyword' + }, + env: { + type: 'keyword' + } + } + } + } +) +puts response + +response = client.bulk( + index: 'clientips', + body: [ + { + index: {} + }, + { + client_ip: '172.21.0.5', + env: 'Development' + }, + { + index: {} + }, + { + client_ip: '172.21.2.113', + env: 'QA' + }, + { + index: {} + }, + { + client_ip: '172.21.2.162', + env: 'QA' + }, + { + index: {} + }, + { + client_ip: '172.21.3.15', + env: 'Production' + }, + { + index: {} + }, + { + client_ip: '172.21.3.16', + env: 'Production' + } + ] +) +puts response + +response = client.enrich.put_policy( + name: 'clientip_policy', + body: { + match: { + indices: 'clientips', + match_field: 'client_ip', + enrich_fields: [ + 'env' + ] + } + } +) +puts response + +response = client.enrich.execute_policy( + name: 'clientip_policy', + wait_for_completion: false +) +puts response +---- diff --git a/docs/examples/guide/28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc b/docs/examples/guide/08f20902821a4f7a73ce7b959c5bdbdc.asciidoc similarity index 86% rename from docs/examples/guide/28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc rename to docs/examples/guide/08f20902821a4f7a73ce7b959c5bdbdc.asciidoc index 4d8f4bffb2..b09f73849c 100644 --- a/docs/examples/guide/28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc +++ b/docs/examples/guide/08f20902821a4f7a73ce7b959c5bdbdc.asciidoc @@ -9,7 +9,7 @@ response = client.search( flags: 'ALL', case_insensitive: true, max_determinized_states: 10_000, - rewrite: 'constant_score' + rewrite: 'constant_score_blended' } } } diff --git a/docs/examples/guide/0ac5ec27c129b9541a6ddad6aeea1276.asciidoc b/docs/examples/guide/0cee58617e75f493c5049d77be1c49f3.asciidoc similarity index 87% rename from docs/examples/guide/0ac5ec27c129b9541a6ddad6aeea1276.asciidoc rename to docs/examples/guide/0cee58617e75f493c5049d77be1c49f3.asciidoc index fa698393f1..3a25f0bc33 100644 --- a/docs/examples/guide/0ac5ec27c129b9541a6ddad6aeea1276.asciidoc +++ b/docs/examples/guide/0cee58617e75f493c5049d77be1c49f3.asciidoc @@ -10,7 +10,7 @@ response = client.search( max_expansions: 50, prefix_length: 0, transpositions: true, - rewrite: 'constant_score' + rewrite: 'constant_score_blended' } } } diff --git a/docs/examples/guide/0514111513bb21f69a40c6258573264f.asciidoc b/docs/examples/guide/0eccea755bd4f6dd47579a9022690546.asciidoc similarity index 63% rename from docs/examples/guide/0514111513bb21f69a40c6258573264f.asciidoc rename to docs/examples/guide/0eccea755bd4f6dd47579a9022690546.asciidoc index 0eb49a4320..2a75495820 100644 --- a/docs/examples/guide/0514111513bb21f69a40c6258573264f.asciidoc +++ b/docs/examples/guide/0eccea755bd4f6dd47579a9022690546.asciidoc @@ -5,10 +5,9 @@ response = client.cluster.put_settings( persistent: { cluster: { remote: { - cluster_one: { - seeds: [ - '127.0.0.1:9300' - ] + my_remote: { + mode: 'proxy', + proxy_address: 'my.remote.cluster.com:9443' } } } diff --git a/docs/examples/guide/d6c3659339ef4f2d47425e09eccbf939.asciidoc b/docs/examples/guide/0f9a213d2cc4b9c2738446d5a7aee976.asciidoc similarity index 79% rename from docs/examples/guide/d6c3659339ef4f2d47425e09eccbf939.asciidoc rename to docs/examples/guide/0f9a213d2cc4b9c2738446d5a7aee976.asciidoc index d40515d969..f892a27d88 100644 --- a/docs/examples/guide/d6c3659339ef4f2d47425e09eccbf939.asciidoc +++ b/docs/examples/guide/0f9a213d2cc4b9c2738446d5a7aee976.asciidoc @@ -6,8 +6,7 @@ response = client.cluster.put_component_template( template: { settings: { 'index.lifecycle.name' => 'my-lifecycle-policy', - 'index.look_ahead_time' => '3h', - 'index.codec' => 'best_compression' + 'index.look_ahead_time' => '3h' } }, _meta: { diff --git a/docs/examples/guide/10f0c8fed98455c460c374b50ffbb204.asciidoc b/docs/examples/guide/10f0c8fed98455c460c374b50ffbb204.asciidoc new file mode 100644 index 0000000000..dc9a483dd8 --- /dev/null +++ b/docs/examples/guide/10f0c8fed98455c460c374b50ffbb204.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.indices.rollover( + alias: 'dsl-data-stream' +) +puts response +---- diff --git a/docs/examples/guide/13ecdf99114098c76b050397d9c3d4e6.asciidoc b/docs/examples/guide/13ecdf99114098c76b050397d9c3d4e6.asciidoc new file mode 100644 index 0000000000..857351e8ca --- /dev/null +++ b/docs/examples/guide/13ecdf99114098c76b050397d9c3d4e6.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.inference.inference( + task_type: 'sparse_embedding', + model_id: 'my-elser-model', + body: { + input: 'The sky above the port was the color of television tuned to a dead channel.' + } +) +puts response +---- diff --git a/docs/examples/guide/14a1db30e13eb1d03cfd9710ca847ebb.asciidoc b/docs/examples/guide/14a1db30e13eb1d03cfd9710ca847ebb.asciidoc new file mode 100644 index 0000000000..0e7714c213 --- /dev/null +++ b/docs/examples/guide/14a1db30e13eb1d03cfd9710ca847ebb.asciidoc @@ -0,0 +1,23 @@ +[source, ruby] +---- +response = client.bulk( + index: 'my-data-stream', + body: [ + { + create: {} + }, + { + "@timestamp": '2099-05-06T16:21:15.000Z', + message: '192.0.2.42 - - [06/May/2099:16:21:15 +0000] "GET /images/bg.jpg HTTP/1.0" 200 24736' + }, + { + create: {} + }, + { + "@timestamp": '2099-05-06T16:25:42.000Z', + message: '192.0.2.255 - - [06/May/2099:16:25:42 +0000] "GET /favicon.ico HTTP/1.0" 200 3638' + } + ] +) +puts response +---- diff --git a/docs/examples/guide/165bebb9ce8b6babb72672db5b8b5976.asciidoc b/docs/examples/guide/165bebb9ce8b6babb72672db5b8b5976.asciidoc deleted file mode 100644 index 7043cf07f8..0000000000 --- a/docs/examples/guide/165bebb9ce8b6babb72672db5b8b5976.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test_index', - body: { - settings: { - index: { - analysis: { - filter: { - synonym: { - type: 'synonym', - synonyms: [ - 'i-pod, i pod => ipod', - 'universe, cosmos' - ] - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1736545c8b5674f6d311f3277eb387f1.asciidoc b/docs/examples/guide/1736545c8b5674f6d311f3277eb387f1.asciidoc new file mode 100644 index 0000000000..2c07d094b6 --- /dev/null +++ b/docs/examples/guide/1736545c8b5674f6d311f3277eb387f1.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.indices.put_data_lifecycle( + name: 'my-data-stream', + body: { + data_retention: '30d' + } +) +puts response +---- diff --git a/docs/examples/guide/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc b/docs/examples/guide/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc new file mode 100644 index 0000000000..d7ed691180 --- /dev/null +++ b/docs/examples/guide/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc @@ -0,0 +1,24 @@ +[source, ruby] +---- +response = client.simulate.ingest( + body: { + docs: [ + { + _index: 'my-index', + _id: '123', + _source: { + foo: 'bar' + } + }, + { + _index: 'my-index', + _id: '456', + _source: { + foo: 'rab' + } + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/1c1f2a6a193d9e64c37242b2824b3031.asciidoc b/docs/examples/guide/1c1f2a6a193d9e64c37242b2824b3031.asciidoc new file mode 100644 index 0000000000..f133387e99 --- /dev/null +++ b/docs/examples/guide/1c1f2a6a193d9e64c37242b2824b3031.asciidoc @@ -0,0 +1,56 @@ +[source, ruby] +---- +response = client.cluster.put_component_template( + name: 'source_template', + body: { + template: { + settings: { + index: { + number_of_replicas: 2, + number_of_shards: 2, + mode: 'time_series', + routing_path: [ + 'metricset' + ] + } + }, + mappings: { + properties: { + "@timestamp": { + type: 'date' + }, + metricset: { + type: 'keyword', + time_series_dimension: true + }, + "k8s": { + properties: { + tx: { + type: 'long' + }, + rx: { + type: 'long' + } + } + } + } + } + } + } +) +puts response + +response = client.indices.put_index_template( + name: 1, + body: { + index_patterns: [ + 'k8s*' + ], + composed_of: [ + 'source_template' + ], + data_stream: {} + } +) +puts response +---- diff --git a/docs/examples/guide/1d746272a7511bf91302a15b5c58ca0e.asciidoc b/docs/examples/guide/1d746272a7511bf91302a15b5c58ca0e.asciidoc new file mode 100644 index 0000000000..91ad0a31e5 --- /dev/null +++ b/docs/examples/guide/1d746272a7511bf91302a15b5c58ca0e.asciidoc @@ -0,0 +1,23 @@ +[source, ruby] +---- +response = client.search( + index: 'passage_vectors', + body: { + fields: [ + 'full_text', + 'creation_time' + ], + _source: false, + knn: { + query_vector: [ + 0.45, + 45 + ], + field: 'paragraph.vector', + k: 2, + num_candidates: 2 + } + } +) +puts response +---- diff --git a/docs/examples/guide/1d9b695a17cffd910c496c9b03c75d6f.asciidoc b/docs/examples/guide/1d9b695a17cffd910c496c9b03c75d6f.asciidoc new file mode 100644 index 0000000000..0bfbbe2d71 --- /dev/null +++ b/docs/examples/guide/1d9b695a17cffd910c496c9b03c75d6f.asciidoc @@ -0,0 +1,26 @@ +[source, ruby] +---- +response = client.ilm.put_lifecycle( + policy: 'pre-dsl-ilm-policy', + body: { + policy: { + phases: { + hot: { + actions: { + rollover: { + max_primary_shard_size: '50gb' + } + } + }, + delete: { + min_age: '7d', + actions: { + delete: {} + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/1e94a2bb95bc245bcfb87ac7d611cf49.asciidoc b/docs/examples/guide/1e94a2bb95bc245bcfb87ac7d611cf49.asciidoc new file mode 100644 index 0000000000..95b97b0d29 --- /dev/null +++ b/docs/examples/guide/1e94a2bb95bc245bcfb87ac7d611cf49.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.search( + index: 'latency', + body: { + size: 0, + aggregations: { + load_time_outlier: { + percentiles: { + field: 'load_time', + tdigest: { + execution_hint: 'high_accuracy' + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/f589cb2b789b4a16ed78183f2349a735.asciidoc b/docs/examples/guide/1ed77bf308fa4ab328b36060e412f500.asciidoc similarity index 70% rename from docs/examples/guide/f589cb2b789b4a16ed78183f2349a735.asciidoc rename to docs/examples/guide/1ed77bf308fa4ab328b36060e412f500.asciidoc index bbe6840e4d..fb386b3b81 100644 --- a/docs/examples/guide/f589cb2b789b4a16ed78183f2349a735.asciidoc +++ b/docs/examples/guide/1ed77bf308fa4ab328b36060e412f500.asciidoc @@ -1,8 +1,30 @@ [source, ruby] ---- +response = client.indices.create( + index: 'metrics_index', + body: { + mappings: { + properties: { + network: { + properties: { + name: { + type: 'keyword' + } + } + }, + latency_histo: { + type: 'histogram' + } + } + } + } +) +puts response + response = client.index( index: 'metrics_index', id: 1, + refresh: true, body: { 'network.name' => 'net-1', latency_histo: { @@ -28,6 +50,7 @@ puts response response = client.index( index: 'metrics_index', id: 2, + refresh: true, body: { 'network.name' => 'net-2', latency_histo: { diff --git a/docs/examples/guide/2009f2d1ba0780a799a0fdce889c9739.asciidoc b/docs/examples/guide/2009f2d1ba0780a799a0fdce889c9739.asciidoc new file mode 100644 index 0000000000..c206fffad9 --- /dev/null +++ b/docs/examples/guide/2009f2d1ba0780a799a0fdce889c9739.asciidoc @@ -0,0 +1,64 @@ +[source, ruby] +---- +response = client.bulk( + index: 'passage_vectors', + refresh: true, + body: [ + { + index: { + _id: '1' + } + }, + { + full_text: 'first paragraph another paragraph', + creation_time: '2019-05-04', + paragraph: [ + { + vector: [ + 0.45, + 45 + ], + text: 'first paragraph', + paragraph_id: '1' + }, + { + vector: [ + 0.8, + 0.6 + ], + text: 'another paragraph', + paragraph_id: '2' + } + ] + }, + { + index: { + _id: '2' + } + }, + { + full_text: 'number one paragraph number two paragraph', + creation_time: '2020-05-04', + paragraph: [ + { + vector: [ + 1.2, + 4.5 + ], + text: 'number one paragraph', + paragraph_id: '1' + }, + { + vector: [ + -1, + 42 + ], + text: 'number two paragraph', + paragraph_id: '2' + } + ] + } + ] +) +puts response +---- diff --git a/docs/examples/guide/20407c847adb8393ce41dc656384afc4.asciidoc b/docs/examples/guide/20407c847adb8393ce41dc656384afc4.asciidoc new file mode 100644 index 0000000000..9d11ea16f9 --- /dev/null +++ b/docs/examples/guide/20407c847adb8393ce41dc656384afc4.asciidoc @@ -0,0 +1,37 @@ +[source, ruby] +---- +response = client.search( + index: 'passage_vectors', + body: { + fields: [ + 'creation_time', + 'full_text' + ], + _source: false, + knn: { + query_vector: [ + 0.45, + 45 + ], + field: 'paragraph.vector', + k: 2, + num_candidates: 2, + filter: { + bool: { + filter: [ + { + range: { + creation_time: { + gte: '2019-05-01', + lte: '2019-05-05' + } + } + } + ] + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/cd976cf523f6352ac3429a410677b768.asciidoc b/docs/examples/guide/2155c920d7d860f3ee7542f2211b4fec.asciidoc similarity index 87% rename from docs/examples/guide/cd976cf523f6352ac3429a410677b768.asciidoc rename to docs/examples/guide/2155c920d7d860f3ee7542f2211b4fec.asciidoc index 3d40739028..f6c627b4bc 100644 --- a/docs/examples/guide/cd976cf523f6352ac3429a410677b768.asciidoc +++ b/docs/examples/guide/2155c920d7d860f3ee7542f2211b4fec.asciidoc @@ -4,7 +4,7 @@ response = client.search( body: { query: { text_expansion: { - "": { + "": { model_id: 'the model to produce the token weights', model_text: 'the query string' } diff --git a/docs/examples/guide/256eba7a77c8890a43afeda8ce8a3225.asciidoc b/docs/examples/guide/256eba7a77c8890a43afeda8ce8a3225.asciidoc new file mode 100644 index 0000000000..f32c912892 --- /dev/null +++ b/docs/examples/guide/256eba7a77c8890a43afeda8ce8a3225.asciidoc @@ -0,0 +1,21 @@ +[source, ruby] +---- +response = client.ingest.put_pipeline( + id: 'my-text-embeddings-pipeline', + body: { + description: 'Text embedding pipeline', + processors: [ + { + inference: { + model_id: 'sentence-transformers__msmarco-minilm-l-12-v3', + target_field: 'my_embeddings', + field_map: { + my_text_field: 'text_field' + } + } + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/2646710ece0c4c843aebeacd370d0396.asciidoc b/docs/examples/guide/2646710ece0c4c843aebeacd370d0396.asciidoc new file mode 100644 index 0000000000..d8d4796cc6 --- /dev/null +++ b/docs/examples/guide/2646710ece0c4c843aebeacd370d0396.asciidoc @@ -0,0 +1,21 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'my-byte-quantized-index', + body: { + mappings: { + properties: { + my_vector: { + type: 'dense_vector', + dims: 3, + index: true, + index_options: { + type: 'int8_hnsw' + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/20e31b7ff08794bdf3c8f8ca3b796b1c.asciidoc b/docs/examples/guide/28543836b62b5622a402e6f7731d68f0.asciidoc similarity index 50% rename from docs/examples/guide/20e31b7ff08794bdf3c8f8ca3b796b1c.asciidoc rename to docs/examples/guide/28543836b62b5622a402e6f7731d68f0.asciidoc index 8b485f60f5..f2c56f82c0 100644 --- a/docs/examples/guide/20e31b7ff08794bdf3c8f8ca3b796b1c.asciidoc +++ b/docs/examples/guide/28543836b62b5622a402e6f7731d68f0.asciidoc @@ -1,8 +1,8 @@ [source, ruby] ---- response = client.indices.downsample( - index: 'sample-01', - target_index: 'sample-01-downsample', + index: '.ds-my-data-stream-2023.07.26-000001', + target_index: '.ds-my-data-stream-2023.07.26-000001-downsample', body: { fixed_interval: '1h' } diff --git a/docs/examples/guide/2897ccc2a3bf3d0cd89328ee4413fae5.asciidoc b/docs/examples/guide/2897ccc2a3bf3d0cd89328ee4413fae5.asciidoc new file mode 100644 index 0000000000..f1c4802004 --- /dev/null +++ b/docs/examples/guide/2897ccc2a3bf3d0cd89328ee4413fae5.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.async_search.get( + id: 'FklQYndoTDJ2VEFlMEVBTzFJMGhJVFEaLVlKYndBWWZSMUdicUc4WVlEaFl4ZzoxNTU=' +) +puts response +---- diff --git a/docs/examples/guide/2a71e2d7f7179dd76183d30789046808.asciidoc b/docs/examples/guide/2a71e2d7f7179dd76183d30789046808.asciidoc new file mode 100644 index 0000000000..0abe51fb52 --- /dev/null +++ b/docs/examples/guide/2a71e2d7f7179dd76183d30789046808.asciidoc @@ -0,0 +1,27 @@ +[source, ruby] +---- +response = client.bulk( + index: 'mv', + refresh: true, + body: [ + { + index: {} + }, + { + a: 1, + b: [ + 2, + 1 + ] + }, + { + index: {} + }, + { + a: 2, + b: 3 + } + ] +) +puts response +---- diff --git a/docs/examples/guide/2bc1d52efec2076dc9fc2a3a2d90e8ab.asciidoc b/docs/examples/guide/2bc1d52efec2076dc9fc2a3a2d90e8ab.asciidoc new file mode 100644 index 0000000000..854c43d58b --- /dev/null +++ b/docs/examples/guide/2bc1d52efec2076dc9fc2a3a2d90e8ab.asciidoc @@ -0,0 +1,18 @@ +[source, ruby] +---- +response = client.search( + index: 'latency', + body: { + size: 0, + aggregations: { + load_time_boxplot: { + boxplot: { + field: 'load_time', + execution_hint: 'high_accuracy' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/2c1e16e9ac24cfea979af2a69900d3c2.asciidoc b/docs/examples/guide/2c1e16e9ac24cfea979af2a69900d3c2.asciidoc new file mode 100644 index 0000000000..574ab9bc24 --- /dev/null +++ b/docs/examples/guide/2c1e16e9ac24cfea979af2a69900d3c2.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.synonyms.put_synonym_rule( + set_id: 'my-synonyms-set', + rule_id: 'test-1', + body: { + synonyms: 'hello, hi, howdy' + } +) +puts response +---- diff --git a/docs/examples/guide/27c22a152470e6a4c06e832731d9b77d.asciidoc b/docs/examples/guide/2c3207c0c985d253b2ecccc14e69e25a.asciidoc similarity index 65% rename from docs/examples/guide/27c22a152470e6a4c06e832731d9b77d.asciidoc rename to docs/examples/guide/2c3207c0c985d253b2ecccc14e69e25a.asciidoc index f7b0543284..fa59cec745 100644 --- a/docs/examples/guide/27c22a152470e6a4c06e832731d9b77d.asciidoc +++ b/docs/examples/guide/2c3207c0c985d253b2ecccc14e69e25a.asciidoc @@ -1,7 +1,7 @@ [source, ruby] ---- response = client.indices.add_block( - index: 'sample-01', + index: '.ds-my-data-stream-2023.07.26-000001', block: 'write' ) puts response diff --git a/docs/examples/guide/2dad2b0c8ba503228f4b11cecca0b348.asciidoc b/docs/examples/guide/2dad2b0c8ba503228f4b11cecca0b348.asciidoc new file mode 100644 index 0000000000..dcb81b2791 --- /dev/null +++ b/docs/examples/guide/2dad2b0c8ba503228f4b11cecca0b348.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.indices.put_data_lifecycle( + name: 'dsl-data-stream', + body: { + data_retention: '7d' + } +) +puts response +---- diff --git a/docs/examples/guide/2e3d1b293da93f2a9ecfc26786ec28d6.asciidoc b/docs/examples/guide/2e3d1b293da93f2a9ecfc26786ec28d6.asciidoc new file mode 100644 index 0000000000..b86c696ba7 --- /dev/null +++ b/docs/examples/guide/2e3d1b293da93f2a9ecfc26786ec28d6.asciidoc @@ -0,0 +1,155 @@ +[source, ruby] +---- +response = client.indices.put_index_template( + name: 'my-data-stream-template', + body: { + index_patterns: [ + 'my-data-stream*' + ], + data_stream: {}, + template: { + settings: { + index: { + mode: 'time_series', + routing_path: [ + 'kubernetes.namespace', + 'kubernetes.host', + 'kubernetes.node', + 'kubernetes.pod' + ], + number_of_replicas: 0, + number_of_shards: 2 + } + }, + mappings: { + properties: { + "@timestamp": { + type: 'date' + }, + kubernetes: { + properties: { + container: { + properties: { + cpu: { + properties: { + usage: { + properties: { + core: { + properties: { + ns: { + type: 'long' + } + } + }, + limit: { + properties: { + pct: { + type: 'float' + } + } + }, + nanocores: { + type: 'long', + time_series_metric: 'gauge' + }, + node: { + properties: { + pct: { + type: 'float' + } + } + } + } + } + } + }, + memory: { + properties: { + available: { + properties: { + bytes: { + type: 'long', + time_series_metric: 'gauge' + } + } + }, + majorpagefaults: { + type: 'long' + }, + pagefaults: { + type: 'long', + time_series_metric: 'gauge' + }, + rss: { + properties: { + bytes: { + type: 'long', + time_series_metric: 'gauge' + } + } + }, + usage: { + properties: { + bytes: { + type: 'long', + time_series_metric: 'gauge' + }, + limit: { + properties: { + pct: { + type: 'float' + } + } + }, + node: { + properties: { + pct: { + type: 'float' + } + } + } + } + }, + workingset: { + properties: { + bytes: { + type: 'long', + time_series_metric: 'gauge' + } + } + } + } + }, + name: { + type: 'keyword' + }, + start_time: { + type: 'date' + } + } + }, + host: { + type: 'keyword', + time_series_dimension: true + }, + namespace: { + type: 'keyword', + time_series_dimension: true + }, + node: { + type: 'keyword', + time_series_dimension: true + }, + pod: { + type: 'keyword', + time_series_dimension: true + } + } + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/ff8317bbd60e9dfc6bf007028a18b531.asciidoc b/docs/examples/guide/31a79a57b242713edec6795599ba0d5d.asciidoc similarity index 72% rename from docs/examples/guide/ff8317bbd60e9dfc6bf007028a18b531.asciidoc rename to docs/examples/guide/31a79a57b242713edec6795599ba0d5d.asciidoc index 710642034d..1c42569f31 100644 --- a/docs/examples/guide/ff8317bbd60e9dfc6bf007028a18b531.asciidoc +++ b/docs/examples/guide/31a79a57b242713edec6795599ba0d5d.asciidoc @@ -5,10 +5,10 @@ response = client.indices.create( body: { mappings: { properties: { - 'ml.tokens' => { - type: 'rank_features' + my_tokens: { + type: 'sparse_vector' }, - text_field: { + my_text_field: { type: 'text' } } diff --git a/docs/examples/guide/34c5cd33ba371fb79a793baf9f6e9fad.asciidoc b/docs/examples/guide/34c5cd33ba371fb79a793baf9f6e9fad.asciidoc new file mode 100644 index 0000000000..b661b1af88 --- /dev/null +++ b/docs/examples/guide/34c5cd33ba371fb79a793baf9f6e9fad.asciidoc @@ -0,0 +1,17 @@ +[source, ruby] +---- +response = client.search( + index: 'my-index', + body: { + query: { + text_expansion: { + my_tokens: { + model_id: '.elser_model_2', + model_text: 'the query string' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/f29b8edba5eabb0b05a4f74d9ae6a816.asciidoc b/docs/examples/guide/35f892b475a1770f18328158be7039fd.asciidoc similarity index 92% rename from docs/examples/guide/f29b8edba5eabb0b05a4f74d9ae6a816.asciidoc rename to docs/examples/guide/35f892b475a1770f18328158be7039fd.asciidoc index 038a8e7611..c4bdfd9750 100644 --- a/docs/examples/guide/f29b8edba5eabb0b05a4f74d9ae6a816.asciidoc +++ b/docs/examples/guide/35f892b475a1770f18328158be7039fd.asciidoc @@ -8,7 +8,6 @@ response = client.indices.create( my_vector: { type: 'dense_vector', dims: 3, - index: true, similarity: 'dot_product' } } diff --git a/docs/examples/guide/376ff4b2b5f657481af78a778aaab57f.asciidoc b/docs/examples/guide/376ff4b2b5f657481af78a778aaab57f.asciidoc new file mode 100644 index 0000000000..ebb19baedf --- /dev/null +++ b/docs/examples/guide/376ff4b2b5f657481af78a778aaab57f.asciidoc @@ -0,0 +1,75 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'my-index', + body: { + mappings: { + properties: { + nr: { + type: 'integer' + }, + state: { + type: 'keyword' + } + } + } + } +) +puts response + +response = client.bulk( + index: 'my-index', + refresh: true, + body: [ + { + index: {} + }, + { + nr: 1, + state: 'started' + }, + { + index: {} + }, + { + nr: 2, + state: 'stopped' + }, + { + index: {} + }, + { + nr: 3, + state: 'N/A' + }, + { + index: {} + }, + { + nr: 4 + } + ] +) +puts response + +response = client.search( + index: 'my-index', + filter_path: 'aggregations', + body: { + aggregations: { + my_top_metrics: { + top_metrics: { + metrics: { + field: 'state', + missing: 'N/A' + }, + sort: { + nr: 'desc' + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/3a3adae6dbb2c0316a7d98d0a6c1d4f8.asciidoc b/docs/examples/guide/3a3adae6dbb2c0316a7d98d0a6c1d4f8.asciidoc new file mode 100644 index 0000000000..24486d9f05 --- /dev/null +++ b/docs/examples/guide/3a3adae6dbb2c0316a7d98d0a6c1d4f8.asciidoc @@ -0,0 +1,42 @@ +[source, ruby] +---- +response = client.search( + index: 'quantized-image-index', + body: { + knn: { + field: 'image-vector', + query_vector: [ + 0.1, + -2 + ], + k: 15, + num_candidates: 100 + }, + fields: [ + 'title' + ], + rescore: { + window_size: 10, + query: { + rescore_query: { + script_score: { + query: { + match_all: {} + }, + script: { + source: "cosineSimilarity(params.query_vector, 'image-vector') + 1.0", + params: { + query_vector: [ + 0.1, + -2 + ] + } + } + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/3afc6dacf90b42900ab571aad8a61d75.asciidoc b/docs/examples/guide/3afc6dacf90b42900ab571aad8a61d75.asciidoc new file mode 100644 index 0000000000..6d5393c31c --- /dev/null +++ b/docs/examples/guide/3afc6dacf90b42900ab571aad8a61d75.asciidoc @@ -0,0 +1,41 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'serbian_example', + body: { + settings: { + analysis: { + filter: { + serbian_stop: { + type: 'stop', + stopwords: '_serbian_' + }, + serbian_keywords: { + type: 'keyword_marker', + keywords: [ + 'пример' + ] + }, + serbian_stemmer: { + type: 'stemmer', + language: 'serbian' + } + }, + analyzer: { + rebuilt_serbian: { + tokenizer: 'standard', + filter: [ + 'lowercase', + 'serbian_stop', + 'serbian_keywords', + 'serbian_stemmer', + 'serbian_normalization' + ] + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc b/docs/examples/guide/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc new file mode 100644 index 0000000000..ef519ed3a3 --- /dev/null +++ b/docs/examples/guide/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc @@ -0,0 +1,52 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'mv', + body: { + mappings: { + properties: { + b: { + type: 'long' + } + } + } + } +) +puts response + +response = client.bulk( + index: 'mv', + refresh: true, + body: [ + { + index: {} + }, + { + a: 1, + b: [ + 2, + 2, + 1 + ] + }, + { + index: {} + }, + { + a: 2, + b: [ + 1, + 1 + ] + } + ] +) +puts response + +response = client.esql.query( + body: { + query: 'FROM mv | EVAL b=TO_STRING(b) | LIMIT 2' + } +) +puts response +---- diff --git a/docs/examples/guide/451e7c29b2cf738cfc822f7c175bef56.asciidoc b/docs/examples/guide/451e7c29b2cf738cfc822f7c175bef56.asciidoc new file mode 100644 index 0000000000..36eb2823df --- /dev/null +++ b/docs/examples/guide/451e7c29b2cf738cfc822f7c175bef56.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.indices.put_index_template( + name: 'my-index-template', + body: { + index_patterns: [ + 'my-data-stream*' + ], + data_stream: {}, + priority: 500, + template: { + lifecycle: { + data_retention: '7d' + } + }, + _meta: { + description: 'Template with data stream lifecycle' + } + } +) +puts response +---- diff --git a/docs/examples/guide/473c8ddd4e4b7814a64e5fe40d9d6dca.asciidoc b/docs/examples/guide/473c8ddd4e4b7814a64e5fe40d9d6dca.asciidoc new file mode 100644 index 0000000000..2667da9ed5 --- /dev/null +++ b/docs/examples/guide/473c8ddd4e4b7814a64e5fe40d9d6dca.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.tasks.cancel( + task_id: '2j8UKw1bRO283PMwDugNNg:5326' +) +puts response +---- diff --git a/docs/examples/guide/5cbfc259df140862818c10eb8a96ba97.asciidoc b/docs/examples/guide/487f0e07fd83c05f9763e0795c525e2e.asciidoc similarity index 62% rename from docs/examples/guide/5cbfc259df140862818c10eb8a96ba97.asciidoc rename to docs/examples/guide/487f0e07fd83c05f9763e0795c525e2e.asciidoc index 6cfb0c7f87..c0b6f657f8 100644 --- a/docs/examples/guide/5cbfc259df140862818c10eb8a96ba97.asciidoc +++ b/docs/examples/guide/487f0e07fd83c05f9763e0795c525e2e.asciidoc @@ -4,10 +4,6 @@ response = client.indices.create( index: 'test', body: { mappings: { - dynamic: 'strict', - _source: { - enabled: false - }, properties: { my_location: { type: 'geo_point' @@ -33,30 +29,50 @@ response = client.bulk( }, { my_location: { - lat: 37.345057, - lon: -122.049982 + lat: 52.373184, + lon: 4.889187 + }, + "@timestamp": '2023-01-02T09:00:00Z' + }, + { + index: {} + }, + { + my_location: { + lat: 52.370159, + lon: 4.885057 + }, + "@timestamp": '2023-01-02T10:00:00Z' + }, + { + index: {} + }, + { + my_location: { + lat: 52.369219, + lon: 4.901618 }, - "@timestamp": '2013-09-06T16:00:36' + "@timestamp": '2023-01-02T13:00:00Z' }, { index: {} }, { my_location: { - lat: 37.345132, - lon: -122.049982 + lat: 52.374081, + lon: 4.91235 }, - "@timestamp": '2013-09-06T16:00:37Z' + "@timestamp": '2023-01-02T16:00:00Z' }, { index: {} }, { my_location: { - lat: 37.349283, - lon: -122.050501 + lat: 52.371667, + lon: 4.914722 }, - "@timestamp": '2013-09-06T16:00:37Z' + "@timestamp": '2023-01-03T12:00:00Z' } ] ) diff --git a/docs/examples/guide/49c40b51da2469a6e00fea8fa6fbf56e.asciidoc b/docs/examples/guide/49c40b51da2469a6e00fea8fa6fbf56e.asciidoc new file mode 100644 index 0000000000..f9af00a733 --- /dev/null +++ b/docs/examples/guide/49c40b51da2469a6e00fea8fa6fbf56e.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.tasks.list( + pretty: true, + detailed: true, + group_by: 'parents', + human: true, + actions: '*data/read/esql' +) +puts response +---- diff --git a/docs/examples/guide/4b5110a21676cc0e26e050a4b4552235.asciidoc b/docs/examples/guide/4b5110a21676cc0e26e050a4b4552235.asciidoc new file mode 100644 index 0000000000..2c4ab85194 --- /dev/null +++ b/docs/examples/guide/4b5110a21676cc0e26e050a4b4552235.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.synonyms.get_synonym( + id: 'my-synonyms-set' +) +puts response +---- diff --git a/docs/examples/guide/4cdcc3fde5cea165a3a7567962b9bd61.asciidoc b/docs/examples/guide/4cdcc3fde5cea165a3a7567962b9bd61.asciidoc new file mode 100644 index 0000000000..9866a59676 --- /dev/null +++ b/docs/examples/guide/4cdcc3fde5cea165a3a7567962b9bd61.asciidoc @@ -0,0 +1,72 @@ +[source, ruby] +---- +response = client.synonyms.put_synonym( + id: 'my-synonyms-set', + body: { + synonyms_set: [ + { + id: 'test-1', + synonyms: 'hello, hi' + } + ] + } +) +puts response + +response = client.indices.create( + index: 'test-index', + body: { + settings: { + analysis: { + filter: { + synonyms_filter: { + type: 'synonym_graph', + synonyms_set: 'my-synonyms-set', + updateable: true + } + }, + analyzer: { + my_index_analyzer: { + type: 'custom', + tokenizer: 'standard', + filter: [ + 'lowercase' + ] + }, + my_search_analyzer: { + type: 'custom', + tokenizer: 'standard', + filter: [ + 'lowercase', + 'synonyms_filter' + ] + } + } + } + }, + mappings: { + properties: { + title: { + type: 'text', + analyzer: 'my_index_analyzer', + search_analyzer: 'my_search_analyzer' + } + } + } + } +) +puts response + +response = client.synonyms.put_synonym( + id: 'my-synonyms-set', + body: { + synonyms_set: [ + { + id: 'test-1', + synonyms: 'hello, hi, howdy' + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/4e3414fc712b16311f9e433dd366f49d.asciidoc b/docs/examples/guide/4e3414fc712b16311f9e433dd366f49d.asciidoc new file mode 100644 index 0000000000..25434b2366 --- /dev/null +++ b/docs/examples/guide/4e3414fc712b16311f9e433dd366f49d.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.inference.delete_model( + task_type: 'sparse_embedding', + model_id: 'my-elser-model' +) +puts response +---- diff --git a/docs/examples/guide/52be795b68e6ef3f396f35fea52d0481.asciidoc b/docs/examples/guide/52be795b68e6ef3f396f35fea52d0481.asciidoc new file mode 100644 index 0000000000..3c215c3b6e --- /dev/null +++ b/docs/examples/guide/52be795b68e6ef3f396f35fea52d0481.asciidoc @@ -0,0 +1,14 @@ +[source, ruby] +---- +response = client.indices.put_index_template( + name: 'my-data-stream-template', + body: { + index_patterns: [ + 'my-data-stream*' + ], + data_stream: {}, + priority: 500 + } +) +puts response +---- diff --git a/docs/examples/guide/571314a948e49f1f9614d36fcf79392a.asciidoc b/docs/examples/guide/571314a948e49f1f9614d36fcf79392a.asciidoc new file mode 100644 index 0000000000..bf14021769 --- /dev/null +++ b/docs/examples/guide/571314a948e49f1f9614d36fcf79392a.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.async_search.get( + id: 'FjktRGJ1Y2w1U0phLTRhZnVyeUZ2MVEbWEJyeVBPQldTV3FGZGdIeUVabXBldzo5NzA4' +) +puts response +---- diff --git a/docs/examples/guide/5865ca8d2bcd087ed5dbee33fafee57f.asciidoc b/docs/examples/guide/5865ca8d2bcd087ed5dbee33fafee57f.asciidoc new file mode 100644 index 0000000000..ba4759cad5 --- /dev/null +++ b/docs/examples/guide/5865ca8d2bcd087ed5dbee33fafee57f.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.indices.explain_data_lifecycle( + index: '.ds-my-data-stream-*' +) +puts response +---- diff --git a/docs/examples/guide/f01d9bbab5b4535b9e067cde3f64ddbf.asciidoc b/docs/examples/guide/5e415c490a46358643ee2aab554b4876.asciidoc similarity index 83% rename from docs/examples/guide/f01d9bbab5b4535b9e067cde3f64ddbf.asciidoc rename to docs/examples/guide/5e415c490a46358643ee2aab554b4876.asciidoc index 7142a063e6..4b992d5fe4 100644 --- a/docs/examples/guide/f01d9bbab5b4535b9e067cde3f64ddbf.asciidoc +++ b/docs/examples/guide/5e415c490a46358643ee2aab554b4876.asciidoc @@ -5,8 +5,7 @@ response = client.cluster.allocation_explain( body: { index: 'my-index', shard: 0, - primary: false, - current_node: 'my-node' + primary: false } ) puts response diff --git a/docs/examples/guide/645433e8e479e5d71c100f66dd2de5d0.asciidoc b/docs/examples/guide/645433e8e479e5d71c100f66dd2de5d0.asciidoc new file mode 100644 index 0000000000..611047ac1d --- /dev/null +++ b/docs/examples/guide/645433e8e479e5d71c100f66dd2de5d0.asciidoc @@ -0,0 +1,531 @@ +[source, ruby] +---- +response = client.bulk( + index: 'my-data-stream', + refresh: true, + pipeline: 'my-timestamp-pipeline', + body: [ + { + create: {} + }, + { + "@timestamp": '2022-06-21T15:49:00Z', + kubernetes: { + host: 'gke-apps-0', + node: 'gke-apps-0-0', + pod: 'gke-apps-0-0-0', + container: { + cpu: { + usage: { + nanocores: 91_153, + core: { + ns: 12_828_317_850 + }, + node: { + pct: 2.77905e-05 + }, + limit: { + pct: 2.77905e-05 + } + } + }, + memory: { + available: { + bytes: 463_314_616 + }, + usage: { + bytes: 307_007_078, + node: { + pct: 0.01770037710617187 + }, + limit: { + pct: 9.923134671484496e-05 + } + }, + workingset: { + bytes: 585_236 + }, + rss: { + bytes: 102_728 + }, + pagefaults: 120_901, + majorpagefaults: 0 + }, + start_time: '2021-03-30T07:59:06Z', + name: 'container-name-44' + }, + namespace: 'namespace26' + } + }, + { + create: {} + }, + { + "@timestamp": '2022-06-21T15:45:50Z', + kubernetes: { + host: 'gke-apps-0', + node: 'gke-apps-0-0', + pod: 'gke-apps-0-0-0', + container: { + cpu: { + usage: { + nanocores: 124_501, + core: { + ns: 12_828_317_850 + }, + node: { + pct: 2.77905e-05 + }, + limit: { + pct: 2.77905e-05 + } + } + }, + memory: { + available: { + bytes: 982_546_514 + }, + usage: { + bytes: 360_035_574, + node: { + pct: 0.01770037710617187 + }, + limit: { + pct: 9.923134671484496e-05 + } + }, + workingset: { + bytes: 1_339_884 + }, + rss: { + bytes: 381_174 + }, + pagefaults: 178_473, + majorpagefaults: 0 + }, + start_time: '2021-03-30T07:59:06Z', + name: 'container-name-44' + }, + namespace: 'namespace26' + } + }, + { + create: {} + }, + { + "@timestamp": '2022-06-21T15:44:50Z', + kubernetes: { + host: 'gke-apps-0', + node: 'gke-apps-0-0', + pod: 'gke-apps-0-0-0', + container: { + cpu: { + usage: { + nanocores: 38_907, + core: { + ns: 12_828_317_850 + }, + node: { + pct: 2.77905e-05 + }, + limit: { + pct: 2.77905e-05 + } + } + }, + memory: { + available: { + bytes: 862_723_768 + }, + usage: { + bytes: 379_572_388, + node: { + pct: 0.01770037710617187 + }, + limit: { + pct: 9.923134671484496e-05 + } + }, + workingset: { + bytes: 431_227 + }, + rss: { + bytes: 386_580 + }, + pagefaults: 233_166, + majorpagefaults: 0 + }, + start_time: '2021-03-30T07:59:06Z', + name: 'container-name-44' + }, + namespace: 'namespace26' + } + }, + { + create: {} + }, + { + "@timestamp": '2022-06-21T15:44:40Z', + kubernetes: { + host: 'gke-apps-0', + node: 'gke-apps-0-0', + pod: 'gke-apps-0-0-0', + container: { + cpu: { + usage: { + nanocores: 86_706, + core: { + ns: 12_828_317_850 + }, + node: { + pct: 2.77905e-05 + }, + limit: { + pct: 2.77905e-05 + } + } + }, + memory: { + available: { + bytes: 567_160_996 + }, + usage: { + bytes: 103_266_017, + node: { + pct: 0.01770037710617187 + }, + limit: { + pct: 9.923134671484496e-05 + } + }, + workingset: { + bytes: 1_724_908 + }, + rss: { + bytes: 105_431 + }, + pagefaults: 233_166, + majorpagefaults: 0 + }, + start_time: '2021-03-30T07:59:06Z', + name: 'container-name-44' + }, + namespace: 'namespace26' + } + }, + { + create: {} + }, + { + "@timestamp": '2022-06-21T15:44:00Z', + kubernetes: { + host: 'gke-apps-0', + node: 'gke-apps-0-0', + pod: 'gke-apps-0-0-0', + container: { + cpu: { + usage: { + nanocores: 150_069, + core: { + ns: 12_828_317_850 + }, + node: { + pct: 2.77905e-05 + }, + limit: { + pct: 2.77905e-05 + } + } + }, + memory: { + available: { + bytes: 639_054_643 + }, + usage: { + bytes: 265_142_477, + node: { + pct: 0.01770037710617187 + }, + limit: { + pct: 9.923134671484496e-05 + } + }, + workingset: { + bytes: 1_786_511 + }, + rss: { + bytes: 189_235 + }, + pagefaults: 138_172, + majorpagefaults: 0 + }, + start_time: '2021-03-30T07:59:06Z', + name: 'container-name-44' + }, + namespace: 'namespace26' + } + }, + { + create: {} + }, + { + "@timestamp": '2022-06-21T15:42:40Z', + kubernetes: { + host: 'gke-apps-0', + node: 'gke-apps-0-0', + pod: 'gke-apps-0-0-0', + container: { + cpu: { + usage: { + nanocores: 82_260, + core: { + ns: 12_828_317_850 + }, + node: { + pct: 2.77905e-05 + }, + limit: { + pct: 2.77905e-05 + } + } + }, + memory: { + available: { + bytes: 854_735_585 + }, + usage: { + bytes: 309_798_052, + node: { + pct: 0.01770037710617187 + }, + limit: { + pct: 9.923134671484496e-05 + } + }, + workingset: { + bytes: 924_058 + }, + rss: { + bytes: 110_838 + }, + pagefaults: 259_073, + majorpagefaults: 0 + }, + start_time: '2021-03-30T07:59:06Z', + name: 'container-name-44' + }, + namespace: 'namespace26' + } + }, + { + create: {} + }, + { + "@timestamp": '2022-06-21T15:42:10Z', + kubernetes: { + host: 'gke-apps-0', + node: 'gke-apps-0-0', + pod: 'gke-apps-0-0-0', + container: { + cpu: { + usage: { + nanocores: 153_404, + core: { + ns: 12_828_317_850 + }, + node: { + pct: 2.77905e-05 + }, + limit: { + pct: 2.77905e-05 + } + } + }, + memory: { + available: { + bytes: 279_586_406 + }, + usage: { + bytes: 214_904_955, + node: { + pct: 0.01770037710617187 + }, + limit: { + pct: 9.923134671484496e-05 + } + }, + workingset: { + bytes: 1_047_265 + }, + rss: { + bytes: 91_914 + }, + pagefaults: 302_252, + majorpagefaults: 0 + }, + start_time: '2021-03-30T07:59:06Z', + name: 'container-name-44' + }, + namespace: 'namespace26' + } + }, + { + create: {} + }, + { + "@timestamp": '2022-06-21T15:40:20Z', + kubernetes: { + host: 'gke-apps-0', + node: 'gke-apps-0-0', + pod: 'gke-apps-0-0-0', + container: { + cpu: { + usage: { + nanocores: 125_613, + core: { + ns: 12_828_317_850 + }, + node: { + pct: 2.77905e-05 + }, + limit: { + pct: 2.77905e-05 + } + } + }, + memory: { + available: { + bytes: 822_782_853 + }, + usage: { + bytes: 100_475_044, + node: { + pct: 0.01770037710617187 + }, + limit: { + pct: 9.923134671484496e-05 + } + }, + workingset: { + bytes: 2_109_932 + }, + rss: { + bytes: 278_446 + }, + pagefaults: 74_843, + majorpagefaults: 0 + }, + start_time: '2021-03-30T07:59:06Z', + name: 'container-name-44' + }, + namespace: 'namespace26' + } + }, + { + create: {} + }, + { + "@timestamp": '2022-06-21T15:40:10Z', + kubernetes: { + host: 'gke-apps-0', + node: 'gke-apps-0-0', + pod: 'gke-apps-0-0-0', + container: { + cpu: { + usage: { + nanocores: 100_046, + core: { + ns: 12_828_317_850 + }, + node: { + pct: 2.77905e-05 + }, + limit: { + pct: 2.77905e-05 + } + } + }, + memory: { + available: { + bytes: 567_160_996 + }, + usage: { + bytes: 362_826_547, + node: { + pct: 0.01770037710617187 + }, + limit: { + pct: 9.923134671484496e-05 + } + }, + workingset: { + bytes: 1_986_724 + }, + rss: { + bytes: 402_801 + }, + pagefaults: 296_495, + majorpagefaults: 0 + }, + start_time: '2021-03-30T07:59:06Z', + name: 'container-name-44' + }, + namespace: 'namespace26' + } + }, + { + create: {} + }, + { + "@timestamp": '2022-06-21T15:38:30Z', + kubernetes: { + host: 'gke-apps-0', + node: 'gke-apps-0-0', + pod: 'gke-apps-0-0-0', + container: { + cpu: { + usage: { + nanocores: 40_018, + core: { + ns: 12_828_317_850 + }, + node: { + pct: 2.77905e-05 + }, + limit: { + pct: 2.77905e-05 + } + } + }, + memory: { + available: { + bytes: 1_062_428_344 + }, + usage: { + bytes: 265_142_477, + node: { + pct: 0.01770037710617187 + }, + limit: { + pct: 9.923134671484496e-05 + } + }, + workingset: { + bytes: 2_294_743 + }, + rss: { + bytes: 340_623 + }, + pagefaults: 224_530, + majorpagefaults: 0 + }, + start_time: '2021-03-30T07:59:06Z', + name: 'container-name-44' + }, + namespace: 'namespace26' + } + } + ] +) +puts response +---- diff --git a/docs/examples/guide/64b9baa6d7556b960b29698f3383aa31.asciidoc b/docs/examples/guide/64b9baa6d7556b960b29698f3383aa31.asciidoc deleted file mode 100644 index d17c9ffd6f..0000000000 --- a/docs/examples/guide/64b9baa6d7556b960b29698f3383aa31.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - remote: { - host: 'http://otherhost:9200' - }, - index: 'source', - size: 10, - query: { - match: { - test: 'data' - } - } - }, - dest: { - index: 'dest' - } - } -) -puts response ----- diff --git a/docs/examples/guide/6edfc35a66afd9b884431fccf48fdbf5.asciidoc b/docs/examples/guide/6edfc35a66afd9b884431fccf48fdbf5.asciidoc new file mode 100644 index 0000000000..474dddba52 --- /dev/null +++ b/docs/examples/guide/6edfc35a66afd9b884431fccf48fdbf5.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.indices.analyze( + body: { + tokenizer: 'standard', + filter: [ + 'lowercase', + { + type: 'synonym_graph', + synonyms: [ + 'pc => personal computer', + 'computer, pc, laptop' + ] + } + ], + text: 'Check how PC synonyms work' + } +) +puts response +---- diff --git a/docs/examples/guide/7011fcdd231804f9c3894154ae2c3fbc.asciidoc b/docs/examples/guide/7011fcdd231804f9c3894154ae2c3fbc.asciidoc new file mode 100644 index 0000000000..24da6ea4c5 --- /dev/null +++ b/docs/examples/guide/7011fcdd231804f9c3894154ae2c3fbc.asciidoc @@ -0,0 +1,16 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'my-index', + body: { + mappings: { + properties: { + 'text.tokens' => { + type: 'sparse_vector' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/591bf50bb5ad3134006efe5c3f46d7a6.asciidoc b/docs/examples/guide/72a3668ddc95d9aec47cc679d1e7afc5.asciidoc similarity index 66% rename from docs/examples/guide/591bf50bb5ad3134006efe5c3f46d7a6.asciidoc rename to docs/examples/guide/72a3668ddc95d9aec47cc679d1e7afc5.asciidoc index c1bc8bab2a..a5e4bdb3ea 100644 --- a/docs/examples/guide/591bf50bb5ad3134006efe5c3f46d7a6.asciidoc +++ b/docs/examples/guide/72a3668ddc95d9aec47cc679d1e7afc5.asciidoc @@ -7,20 +7,20 @@ response = client.cluster.put_settings( remote: { cluster_one: { seeds: [ - '127.0.0.1:9300' - ] + '35.238.149.1:9300' + ], + skip_unavailable: true }, cluster_two: { - mode: 'sniff', seeds: [ - '127.0.0.1:9301' + '35.238.149.2:9300' ], - 'transport.compress' => true, - skip_unavailable: true + skip_unavailable: false }, cluster_three: { - mode: 'proxy', - proxy_address: '127.0.0.1:9302' + seeds: [ + '35.238.149.3:9300' + ] } } } diff --git a/docs/examples/guide/7353d42289155bb864504fd62efc6979.asciidoc b/docs/examples/guide/7353d42289155bb864504fd62efc6979.asciidoc new file mode 100644 index 0000000000..541412dae2 --- /dev/null +++ b/docs/examples/guide/7353d42289155bb864504fd62efc6979.asciidoc @@ -0,0 +1,21 @@ +[source, ruby] +---- +response = client.search( + index: 'my-image-index', + body: { + size: 3, + query: { + knn: { + field: 'image-vector', + query_vector: [ + -5, + 9, + -12 + ], + num_candidates: 10 + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/744aeb2af40f519e430e21e004e3c3b7.asciidoc b/docs/examples/guide/744aeb2af40f519e430e21e004e3c3b7.asciidoc new file mode 100644 index 0000000000..424af94431 --- /dev/null +++ b/docs/examples/guide/744aeb2af40f519e430e21e004e3c3b7.asciidoc @@ -0,0 +1,52 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'mv', + body: { + mappings: { + properties: { + b: { + type: 'long' + } + } + } + } +) +puts response + +response = client.bulk( + index: 'mv', + refresh: true, + body: [ + { + index: {} + }, + { + a: 1, + b: [ + 2, + 2, + 1 + ] + }, + { + index: {} + }, + { + a: 2, + b: [ + 1, + 1 + ] + } + ] +) +puts response + +response = client.esql.query( + body: { + query: 'FROM mv | LIMIT 2' + } +) +puts response +---- diff --git a/docs/examples/guide/5ca2f718f8b01684c983753bd8d92690.asciidoc b/docs/examples/guide/74da377bccad43da2b0e276c086d26ba.asciidoc similarity index 84% rename from docs/examples/guide/5ca2f718f8b01684c983753bd8d92690.asciidoc rename to docs/examples/guide/74da377bccad43da2b0e276c086d26ba.asciidoc index 702f162398..2f9c916c48 100644 --- a/docs/examples/guide/5ca2f718f8b01684c983753bd8d92690.asciidoc +++ b/docs/examples/guide/74da377bccad43da2b0e276c086d26ba.asciidoc @@ -20,6 +20,11 @@ response = client.cluster.info( ) puts response +response = client.cluster.info( + target: 'script' +) +puts response + response = client.cluster.info( target: 'http,ingest' ) diff --git a/docs/examples/guide/763ce1377c8dfa1ca6a042d8ee99f4f5.asciidoc b/docs/examples/guide/763ce1377c8dfa1ca6a042d8ee99f4f5.asciidoc new file mode 100644 index 0000000000..2d38c96984 --- /dev/null +++ b/docs/examples/guide/763ce1377c8dfa1ca6a042d8ee99f4f5.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.indices.rollover( + alias: 'k9s' +) +puts response +---- diff --git a/docs/examples/guide/7c8f207e43115ea8f20d2298be5aaebc.asciidoc b/docs/examples/guide/7c8f207e43115ea8f20d2298be5aaebc.asciidoc new file mode 100644 index 0000000000..9a73648d67 --- /dev/null +++ b/docs/examples/guide/7c8f207e43115ea8f20d2298be5aaebc.asciidoc @@ -0,0 +1,36 @@ +[source, ruby] +---- +response = client.simulate.ingest( + body: { + docs: [ + { + _index: 'my-index', + _id: 'id', + _source: { + foo: 'bar' + } + }, + { + _index: 'my-index', + _id: 'id', + _source: { + foo: 'rab' + } + } + ], + pipeline_substitutions: { + "my-pipeline": { + processors: [ + { + set: { + field: 'field3', + value: 'value3' + } + } + ] + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/7cc603d7e8373a01eae7bb0d18824632.asciidoc b/docs/examples/guide/7cc603d7e8373a01eae7bb0d18824632.asciidoc deleted file mode 100644 index dd14a79356..0000000000 --- a/docs/examples/guide/7cc603d7e8373a01eae7bb0d18824632.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'elser-v1-test', - body: { - processors: [ - { - inference: { - model_id: '.elser_model_1', - target_field: 'ml', - field_map: { - text: 'text_field' - }, - inference_config: { - text_expansion: { - results_field: 'tokens' - } - } - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/7d3ffd32f2747efb7d0fb1f0dc617ff4.asciidoc b/docs/examples/guide/7d3ffd32f2747efb7d0fb1f0dc617ff4.asciidoc deleted file mode 100644 index ce117d4c25..0000000000 --- a/docs/examples/guide/7d3ffd32f2747efb7d0fb1f0dc617ff4.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test_index', - body: { - settings: { - index: { - analysis: { - filter: { - synonym: { - type: 'synonym', - format: 'wordnet', - synonyms: [ - "s(100000001,1,'abstain',v,1,0).", - "s(100000001,2,'refrain',v,1,0).", - "s(100000001,3,'desist',v,1,0)." - ] - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9f214a468014a83809935e7b808afc53.asciidoc b/docs/examples/guide/7e48648ca27024831c60b455e836c496.asciidoc similarity index 74% rename from docs/examples/guide/9f214a468014a83809935e7b808afc53.asciidoc rename to docs/examples/guide/7e48648ca27024831c60b455e836c496.asciidoc index ace423fa44..86a64fc64d 100644 --- a/docs/examples/guide/9f214a468014a83809935e7b808afc53.asciidoc +++ b/docs/examples/guide/7e48648ca27024831c60b455e836c496.asciidoc @@ -10,12 +10,7 @@ response = client.search( _id: '1' }, { - _index: 'my-index-000001', _id: '4' - }, - { - _index: 'my-index-000002', - _id: '100' } ], organic: { diff --git a/docs/examples/guide/7f697eb436dfa3c30dfe610d8c32d132.asciidoc b/docs/examples/guide/7f697eb436dfa3c30dfe610d8c32d132.asciidoc deleted file mode 100644 index a975cb57d0..0000000000 --- a/docs/examples/guide/7f697eb436dfa3c30dfe610d8c32d132.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - remote: { - host: 'http://otherhost:9200', - socket_timeout: '1m', - connect_timeout: '10s' - }, - index: 'source', - query: { - match: { - test: 'data' - } - } - }, - dest: { - index: 'dest' - } - } -) -puts response ----- diff --git a/docs/examples/guide/80edd2124a822d9f9bf22ecc49d2c2e9.asciidoc b/docs/examples/guide/80edd2124a822d9f9bf22ecc49d2c2e9.asciidoc new file mode 100644 index 0000000000..a7f8eeaa34 --- /dev/null +++ b/docs/examples/guide/80edd2124a822d9f9bf22ecc49d2c2e9.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.synonyms.get_synonym_rule( + set_id: 'my-synonyms-set', + rule_id: 'test-1' +) +puts response +---- diff --git a/docs/examples/guide/87457bb3467484bec3e9df4e25942ba6.asciidoc b/docs/examples/guide/87457bb3467484bec3e9df4e25942ba6.asciidoc new file mode 100644 index 0000000000..bfbf834e73 --- /dev/null +++ b/docs/examples/guide/87457bb3467484bec3e9df4e25942ba6.asciidoc @@ -0,0 +1,9 @@ +[source, ruby] +---- +response = client.esql.query( + body: { + query: 'FROM mv | EVAL b=MV_MIN(b) | EVAL b + 2, a + b | LIMIT 4' + } +) +puts response +---- diff --git a/docs/examples/guide/89dee10a24ea2727af5b00039a4271bd.asciidoc b/docs/examples/guide/89dee10a24ea2727af5b00039a4271bd.asciidoc new file mode 100644 index 0000000000..36b9db8182 --- /dev/null +++ b/docs/examples/guide/89dee10a24ea2727af5b00039a4271bd.asciidoc @@ -0,0 +1,162 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'tour', + body: { + mappings: { + properties: { + city: { + type: 'keyword', + time_series_dimension: true + }, + category: { + type: 'keyword' + }, + route: { + type: 'long' + }, + name: { + type: 'keyword' + }, + location: { + type: 'geo_point' + }, + "@timestamp": { + type: 'date' + } + } + }, + settings: { + index: { + mode: 'time_series', + routing_path: [ + 'city' + ], + time_series: { + start_time: '2023-01-01T00:00:00Z', + end_time: '2024-01-01T00:00:00Z' + } + } + } + } +) +puts response + +response = client.bulk( + index: 'tour', + refresh: true, + body: [ + { + index: {} + }, + { + "@timestamp": '2023-01-02T09:00:00Z', + route: 0, + location: 'POINT(4.889187 52.373184)', + city: 'Amsterdam', + category: 'Attraction', + name: 'Royal Palace Amsterdam' + }, + { + index: {} + }, + { + "@timestamp": '2023-01-02T10:00:00Z', + route: 1, + location: 'POINT(4.885057 52.370159)', + city: 'Amsterdam', + category: 'Attraction', + name: 'The Amsterdam Dungeon' + }, + { + index: {} + }, + { + "@timestamp": '2023-01-02T13:00:00Z', + route: 2, + location: 'POINT(4.901618 52.369219)', + city: 'Amsterdam', + category: 'Museum', + name: 'Museum Het Rembrandthuis' + }, + { + index: {} + }, + { + "@timestamp": '2023-01-02T16:00:00Z', + route: 3, + location: 'POINT(4.912350 52.374081)', + city: 'Amsterdam', + category: 'Museum', + name: 'NEMO Science Museum' + }, + { + index: {} + }, + { + "@timestamp": '2023-01-03T12:00:00Z', + route: 4, + location: 'POINT(4.914722 52.371667)', + city: 'Amsterdam', + category: 'Museum', + name: 'Nederlands Scheepvaartmuseum' + }, + { + index: {} + }, + { + "@timestamp": '2023-01-04T09:00:00Z', + route: 5, + location: 'POINT(4.401384 51.220292)', + city: 'Antwerp', + category: 'Attraction', + name: 'Cathedral of Our Lady' + }, + { + index: {} + }, + { + "@timestamp": '2023-01-04T12:00:00Z', + route: 6, + location: 'POINT(4.405819 51.221758)', + city: 'Antwerp', + category: 'Museum', + name: 'Snijders&Rockoxhuis' + }, + { + index: {} + }, + { + "@timestamp": '2023-01-04T15:00:00Z', + route: 7, + location: 'POINT(4.405200 51.222900)', + city: 'Antwerp', + category: 'Museum', + name: 'Letterenhuis' + }, + { + index: {} + }, + { + "@timestamp": '2023-01-05T10:00:00Z', + route: 8, + location: 'POINT(2.336389 48.861111)', + city: 'Paris', + category: 'Museum', + name: 'Musée du Louvre' + }, + { + index: {} + }, + { + "@timestamp": '2023-01-05T14:00:00Z', + route: 9, + location: 'POINT(2.327000 48.860000)', + city: 'Paris', + category: 'Museum', + name: 'Musée dOrsay' + } + ] +) +puts response +---- diff --git a/docs/examples/guide/8d064eda2199de52e5be9ee68a5b7c68.asciidoc b/docs/examples/guide/8d064eda2199de52e5be9ee68a5b7c68.asciidoc new file mode 100644 index 0000000000..8059cf7cea --- /dev/null +++ b/docs/examples/guide/8d064eda2199de52e5be9ee68a5b7c68.asciidoc @@ -0,0 +1,23 @@ +[source, ruby] +---- +response = client.ingest.put_pipeline( + id: 'my-text-embeddings-pipeline', + body: { + description: 'Text embedding pipeline', + processors: [ + { + inference: { + model_id: '.elser_model_2', + input_output: [ + { + input_field: 'my_text_field', + output_field: 'my_tokens' + } + ] + } + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/8d9b04f2a97f4229dec9e620126de049.asciidoc b/docs/examples/guide/8d9b04f2a97f4229dec9e620126de049.asciidoc new file mode 100644 index 0000000000..f474f9b86f --- /dev/null +++ b/docs/examples/guide/8d9b04f2a97f4229dec9e620126de049.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.cluster.put_settings( + body: { + persistent: { + 'logger.com.amazonaws.request' => 'DEBUG' + } + } +) +puts response +---- diff --git a/docs/examples/guide/8f7936f219500305e5b2518dbbf949ea.asciidoc b/docs/examples/guide/8f7936f219500305e5b2518dbbf949ea.asciidoc new file mode 100644 index 0000000000..8eb8cd85ab --- /dev/null +++ b/docs/examples/guide/8f7936f219500305e5b2518dbbf949ea.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.async_search.status( + id: 'FmpwbThueVB4UkRDeUxqb1l4akIza3cbWEJyeVBPQldTV3FGZGdIeUVabXBldzoyMDIw' +) +puts response +---- diff --git a/docs/examples/guide/8fec06a98d0151c1d717a01491d0b8f0.asciidoc b/docs/examples/guide/8fec06a98d0151c1d717a01491d0b8f0.asciidoc new file mode 100644 index 0000000000..6626475dae --- /dev/null +++ b/docs/examples/guide/8fec06a98d0151c1d717a01491d0b8f0.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.index( + index: 'dsl-data-stream', + body: { + "@timestamp": '2023-10-18T16:21:15.000Z', + message: '192.0.2.42 - - [06/May/2099:16:21:15 +0000] "GET /images/bg.jpg HTTP/1.0" 200 24736' + } +) +puts response +---- diff --git a/docs/examples/guide/94cd66bf93f99881c1bda547283a0357.asciidoc b/docs/examples/guide/94cd66bf93f99881c1bda547283a0357.asciidoc new file mode 100644 index 0000000000..2373173148 --- /dev/null +++ b/docs/examples/guide/94cd66bf93f99881c1bda547283a0357.asciidoc @@ -0,0 +1,46 @@ +[source, ruby] +---- +response = client.bulk( + index: 'quantized-image-index', + refresh: true, + body: [ + { + index: { + _id: '1' + } + }, + { + "image-vector": [ + 0.1, + -2 + ], + title: 'moose family' + }, + { + index: { + _id: '2' + } + }, + { + "image-vector": [ + 0.75, + -1 + ], + title: 'alpine lake' + }, + { + index: { + _id: '3' + } + }, + { + "image-vector": [ + 1.2, + 0.1 + ], + title: 'full moon' + } + ] +) +puts response +---- diff --git a/docs/examples/guide/96ea0e80323d6d2d99964625c004a44d.asciidoc b/docs/examples/guide/96ea0e80323d6d2d99964625c004a44d.asciidoc new file mode 100644 index 0000000000..3d89ed2f22 --- /dev/null +++ b/docs/examples/guide/96ea0e80323d6d2d99964625c004a44d.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.indices.put_data_lifecycle( + name: 'dsl-data-stream', + body: { + data_retention: '7d', + enabled: false + } +) +puts response +---- diff --git a/docs/examples/guide/3466cdc16374655c73c087fcbeb82ee8.asciidoc b/docs/examples/guide/98b403c356a9b14544e9b9f646845e9f.asciidoc similarity index 92% rename from docs/examples/guide/3466cdc16374655c73c087fcbeb82ee8.asciidoc rename to docs/examples/guide/98b403c356a9b14544e9b9f646845e9f.asciidoc index 64b681492b..a113257b59 100644 --- a/docs/examples/guide/3466cdc16374655c73c087fcbeb82ee8.asciidoc +++ b/docs/examples/guide/98b403c356a9b14544e9b9f646845e9f.asciidoc @@ -7,7 +7,7 @@ response = client.put_script( lang: 'mustache', source: { query: { - "multi-match": { + multi_match: { query: '{{query_string}}', fields: '[{{#text_fields}}{{user_name}}{{^last}},{{/last}}{{/text_fields}}]' } diff --git a/docs/examples/guide/990c0d794ed6f05d1620b5d49f7aff6e.asciidoc b/docs/examples/guide/990c0d794ed6f05d1620b5d49f7aff6e.asciidoc new file mode 100644 index 0000000000..1a8323c1ee --- /dev/null +++ b/docs/examples/guide/990c0d794ed6f05d1620b5d49f7aff6e.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.indices.get_data_lifecycle( + name: 'my-data-stream' +) +puts response +---- diff --git a/docs/examples/guide/9949bcc64c9cd6f4041819546d7fce78.asciidoc b/docs/examples/guide/9949bcc64c9cd6f4041819546d7fce78.asciidoc new file mode 100644 index 0000000000..5d90dfd67d --- /dev/null +++ b/docs/examples/guide/9949bcc64c9cd6f4041819546d7fce78.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.cluster.put_settings( + body: { + persistent: { + 'cluster.remote.cluster_two.skip_unavailable' => true + } + } +) +puts response +---- diff --git a/docs/examples/guide/9e563b8d5a7845f644db8d5bbf453eb6.asciidoc b/docs/examples/guide/9e563b8d5a7845f644db8d5bbf453eb6.asciidoc new file mode 100644 index 0000000000..232e0d5c9d --- /dev/null +++ b/docs/examples/guide/9e563b8d5a7845f644db8d5bbf453eb6.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.synonyms.put_synonym( + id: 'my-synonyms-set', + body: { + synonyms_set: [ + { + id: 'test-1', + synonyms: 'hello, hi' + }, + { + synonyms: 'bye, goodbye' + }, + { + id: 'test-2', + synonyms: 'test => check' + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/a1f6383373084d874d3365eef2c0e96e.asciidoc b/docs/examples/guide/a1f6383373084d874d3365eef2c0e96e.asciidoc deleted file mode 100644 index 469fc34234..0000000000 --- a/docs/examples/guide/a1f6383373084d874d3365eef2c0e96e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete( - index: 'sample-01' -) -puts response ----- diff --git a/docs/examples/guide/a2bd0782aadfd0a902d7f590ee7f49fe.asciidoc b/docs/examples/guide/a2bd0782aadfd0a902d7f590ee7f49fe.asciidoc new file mode 100644 index 0000000000..d285e699fc --- /dev/null +++ b/docs/examples/guide/a2bd0782aadfd0a902d7f590ee7f49fe.asciidoc @@ -0,0 +1,19 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'my-index', + body: { + mappings: { + properties: { + content_embedding: { + type: 'sparse_vector' + }, + content: { + type: 'text' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/a4a3c3cd09efa75168dab90105afb2e9.asciidoc b/docs/examples/guide/a4a3c3cd09efa75168dab90105afb2e9.asciidoc new file mode 100644 index 0000000000..dd0de3c74e --- /dev/null +++ b/docs/examples/guide/a4a3c3cd09efa75168dab90105afb2e9.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.inference.get_model( + task_type: 'sparse_embedding', + model_id: 'my-elser-model' +) +puts response +---- diff --git a/docs/examples/guide/a547bb926c25f670078b98fbe67de3cc.asciidoc b/docs/examples/guide/a547bb926c25f670078b98fbe67de3cc.asciidoc new file mode 100644 index 0000000000..d7ebbe1cb7 --- /dev/null +++ b/docs/examples/guide/a547bb926c25f670078b98fbe67de3cc.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.synonyms.delete_synonym_rule( + set_id: 'my-synonyms-set', + rule_id: 'test-1' +) +puts response +---- diff --git a/docs/examples/guide/a5e6ccfb6019238e6db602373b9af147.asciidoc b/docs/examples/guide/a5e6ccfb6019238e6db602373b9af147.asciidoc new file mode 100644 index 0000000000..ea47306dc2 --- /dev/null +++ b/docs/examples/guide/a5e6ccfb6019238e6db602373b9af147.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.indices.put_data_lifecycle( + name: 'my-data-stream', + body: {} +) +puts response +---- diff --git a/docs/examples/guide/a62fda257bdc3ffdd98f39cd38d112f1.asciidoc b/docs/examples/guide/a62fda257bdc3ffdd98f39cd38d112f1.asciidoc deleted file mode 100644 index bf1d52a596..0000000000 --- a/docs/examples/guide/a62fda257bdc3ffdd98f39cd38d112f1.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test_index', - body: { - settings: { - index: { - analysis: { - analyzer: { - synonym: { - tokenizer: 'whitespace', - filter: [ - 'synonym' - ] - } - }, - filter: { - synonym: { - type: 'synonym', - synonyms_path: 'analysis/synonym.txt' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6f2208e90810ea6da751fe25fcf456ec.asciidoc b/docs/examples/guide/a63e0d0504e0c9313814b7f4e2641353.asciidoc similarity index 75% rename from docs/examples/guide/6f2208e90810ea6da751fe25fcf456ec.asciidoc rename to docs/examples/guide/a63e0d0504e0c9313814b7f4e2641353.asciidoc index 5ad0bc57e0..4c99bb36fe 100644 --- a/docs/examples/guide/6f2208e90810ea6da751fe25fcf456ec.asciidoc +++ b/docs/examples/guide/a63e0d0504e0c9313814b7f4e2641353.asciidoc @@ -1,8 +1,30 @@ [source, ruby] ---- +response = client.indices.create( + index: 'metrics_index', + body: { + mappings: { + properties: { + network: { + properties: { + name: { + type: 'keyword' + } + } + }, + latency_histo: { + type: 'histogram' + } + } + } + } +) +puts response + response = client.index( index: 'metrics_index', id: 1, + refresh: true, body: { 'network.name' => 'net-1', latency_histo: { @@ -28,6 +50,7 @@ puts response response = client.index( index: 'metrics_index', id: 2, + refresh: true, body: { 'network.name' => 'net-2', latency_histo: { diff --git a/docs/examples/guide/a6b2815d54df34b6b8d00226e9a1af0c.asciidoc b/docs/examples/guide/a6b2815d54df34b6b8d00226e9a1af0c.asciidoc new file mode 100644 index 0000000000..d57dc991c2 --- /dev/null +++ b/docs/examples/guide/a6b2815d54df34b6b8d00226e9a1af0c.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'my-index', + body: { + mappings: { + properties: { + 'my_embeddings.predicted_value' => { + type: 'dense_vector', + dims: 384 + }, + my_text_field: { + type: 'text' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/a6ccac9f80c5e5efdaab992f3a32d919.asciidoc b/docs/examples/guide/a6ccac9f80c5e5efdaab992f3a32d919.asciidoc new file mode 100644 index 0000000000..657939dede --- /dev/null +++ b/docs/examples/guide/a6ccac9f80c5e5efdaab992f3a32d919.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.indices.get_data_stream( + name: 'dsl-data-stream' +) +puts response +---- diff --git a/docs/examples/guide/ab1372270c11bcd6f36d1a13e6c69276.asciidoc b/docs/examples/guide/ab1372270c11bcd6f36d1a13e6c69276.asciidoc new file mode 100644 index 0000000000..e3b2dbd0df --- /dev/null +++ b/docs/examples/guide/ab1372270c11bcd6f36d1a13e6c69276.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.async_search.submit( + index: 'my-index-000001,cluster_one:my-index-000001,cluster_two:my-index-000001', + ccs_minimize_roundtrips: true, + body: { + query: { + match: { + 'user.id' => 'kimchy' + } + }, + _source: [ + 'user.id', + 'message', + 'http.response.status_code' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/1206539c3243681232cb134f4f89bed6.asciidoc b/docs/examples/guide/afa11ebb493ebbfd77acbbe50d2ce6db.asciidoc similarity index 96% rename from docs/examples/guide/1206539c3243681232cb134f4f89bed6.asciidoc rename to docs/examples/guide/afa11ebb493ebbfd77acbbe50d2ce6db.asciidoc index b936cf7090..e90ad10592 100644 --- a/docs/examples/guide/1206539c3243681232cb134f4f89bed6.asciidoc +++ b/docs/examples/guide/afa11ebb493ebbfd77acbbe50d2ce6db.asciidoc @@ -1,7 +1,7 @@ [source, ruby] ---- response = client.search( - index: 'sample-01*', + index: 'my-data-stream', body: { size: 0, aggregations: { diff --git a/docs/examples/guide/afe30f159937b38d74c869570cfcd369.asciidoc b/docs/examples/guide/afe30f159937b38d74c869570cfcd369.asciidoc new file mode 100644 index 0000000000..69b89face8 --- /dev/null +++ b/docs/examples/guide/afe30f159937b38d74c869570cfcd369.asciidoc @@ -0,0 +1,17 @@ +[source, ruby] +---- +response = client.indices.close( + index: 'index_1' +) +puts response + +response = client.snapshot.restore( + repository: 'my_repository', + snapshot: 'snapshot_2', + wait_for_completion: true, + body: { + indices: 'index_1' + } +) +puts response +---- diff --git a/docs/examples/guide/b10668cc742e666fe0eb6a53fd38a93e.asciidoc b/docs/examples/guide/b52951b78cd5fb2f9353d1c7e6d37070.asciidoc similarity index 82% rename from docs/examples/guide/b10668cc742e666fe0eb6a53fd38a93e.asciidoc rename to docs/examples/guide/b52951b78cd5fb2f9353d1c7e6d37070.asciidoc index a20b6ae3ca..2261272f20 100644 --- a/docs/examples/guide/b10668cc742e666fe0eb6a53fd38a93e.asciidoc +++ b/docs/examples/guide/b52951b78cd5fb2f9353d1c7e6d37070.asciidoc @@ -7,7 +7,7 @@ response = client.search( 'user.id' => { value: 'ki*y', boost: 1, - rewrite: 'constant_score' + rewrite: 'constant_score_blended' } } } diff --git a/docs/examples/guide/b6a6aa9ba20e9a019371ae268488833f.asciidoc b/docs/examples/guide/b6a6aa9ba20e9a019371ae268488833f.asciidoc new file mode 100644 index 0000000000..a4f24c10ad --- /dev/null +++ b/docs/examples/guide/b6a6aa9ba20e9a019371ae268488833f.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.cluster.get_settings( + filter_path: 'persistent.cluster.remote' +) +puts response +---- diff --git a/docs/examples/guide/b8ff63c3d7561d27d035ef204097d631.asciidoc b/docs/examples/guide/b8ff63c3d7561d27d035ef204097d631.asciidoc deleted file mode 100644 index 8d98383046..0000000000 --- a/docs/examples/guide/b8ff63c3d7561d27d035ef204097d631.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test_index', - body: { - settings: { - index: { - analysis: { - filter: { - synonym: { - type: 'synonym_graph', - synonyms: [ - 'lol, laughing out loud', - 'universe, cosmos' - ] - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bcdfaa4487747249699a86a0dcd22f5e.asciidoc b/docs/examples/guide/bcdfaa4487747249699a86a0dcd22f5e.asciidoc new file mode 100644 index 0000000000..764a69f690 --- /dev/null +++ b/docs/examples/guide/bcdfaa4487747249699a86a0dcd22f5e.asciidoc @@ -0,0 +1,35 @@ +[source, ruby] +---- +response = client.simulate.ingest( + body: { + docs: [ + { + _index: 'my-index', + _id: '123', + _source: { + foo: 'bar' + } + }, + { + _index: 'my-index', + _id: '456', + _source: { + foo: 'rab' + } + } + ], + pipeline_substitutions: { + "my-pipeline": { + processors: [ + { + uppercase: { + field: 'foo' + } + } + ] + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/d270e64fcf017a887687fb030b0c1986.asciidoc b/docs/examples/guide/bd2a387e8c21bf01a1039e81d7602921.asciidoc similarity index 92% rename from docs/examples/guide/d270e64fcf017a887687fb030b0c1986.asciidoc rename to docs/examples/guide/bd2a387e8c21bf01a1039e81d7602921.asciidoc index 1d96f66248..473131f62d 100644 --- a/docs/examples/guide/d270e64fcf017a887687fb030b0c1986.asciidoc +++ b/docs/examples/guide/bd2a387e8c21bf01a1039e81d7602921.asciidoc @@ -7,7 +7,7 @@ response = client.put_script( lang: 'mustache', source: { query: { - "multi-match": { + multi_match: { query: '{{query_string}}', fields: '[{{#text_fields}}{{user_name}},{{/text_fields}}]' } diff --git a/docs/examples/guide/dfb1ce43b4f96dcb3c8dcc8370aa9965.asciidoc b/docs/examples/guide/bf17440ac178d2ef5f5be643d033920b.asciidoc similarity index 70% rename from docs/examples/guide/dfb1ce43b4f96dcb3c8dcc8370aa9965.asciidoc rename to docs/examples/guide/bf17440ac178d2ef5f5be643d033920b.asciidoc index 229b5a9ad2..fce14b1e5c 100644 --- a/docs/examples/guide/dfb1ce43b4f96dcb3c8dcc8370aa9965.asciidoc +++ b/docs/examples/guide/bf17440ac178d2ef5f5be643d033920b.asciidoc @@ -4,11 +4,12 @@ response = client.reindex( wait_for_completion: false, body: { source: { - index: 'test-data' + index: 'test-data', + size: 50 }, dest: { index: 'my-index', - pipeline: 'elser-v1-test' + pipeline: 'elser-v2-test' } } ) diff --git a/docs/examples/guide/c5cc19e48549fbc5327a9d46874bbeee.asciidoc b/docs/examples/guide/c5cc19e48549fbc5327a9d46874bbeee.asciidoc new file mode 100644 index 0000000000..fa4724efbb --- /dev/null +++ b/docs/examples/guide/c5cc19e48549fbc5327a9d46874bbeee.asciidoc @@ -0,0 +1,21 @@ +[source, ruby] +---- +response = client.search( + index: 'quantized-image-index', + body: { + knn: { + field: 'image-vector', + query_vector: [ + 0.1, + -2 + ], + k: 10, + num_candidates: 100 + }, + fields: [ + 'title' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/66c64bffe3a15cf260baa0c0118aa4ea.asciidoc b/docs/examples/guide/c8e2109b19d50467ab83a40006462e9f.asciidoc similarity index 62% rename from docs/examples/guide/66c64bffe3a15cf260baa0c0118aa4ea.asciidoc rename to docs/examples/guide/c8e2109b19d50467ab83a40006462e9f.asciidoc index 0db9a2f14a..bca712d4d5 100644 --- a/docs/examples/guide/66c64bffe3a15cf260baa0c0118aa4ea.asciidoc +++ b/docs/examples/guide/c8e2109b19d50467ab83a40006462e9f.asciidoc @@ -1,7 +1,8 @@ [source, ruby] ---- response = client.enrich.execute_policy( - name: 'my-policy' + name: 'my-policy', + wait_for_completion: false ) puts response ---- diff --git a/docs/examples/guide/cbc2b5595890f87165aab1a741b1d22c.asciidoc b/docs/examples/guide/cbc2b5595890f87165aab1a741b1d22c.asciidoc new file mode 100644 index 0000000000..e318873277 --- /dev/null +++ b/docs/examples/guide/cbc2b5595890f87165aab1a741b1d22c.asciidoc @@ -0,0 +1,24 @@ +[source, ruby] +---- +response = client.ingest.put_pipeline( + id: 'my-timestamp-pipeline', + body: { + description: 'Shifts the @timestamp to the last 15 minutes', + processors: [ + { + set: { + field: 'ingest_time', + value: '{{_ingest.timestamp}}' + } + }, + { + script: { + lang: 'painless', + source: "\n def delta = ChronoUnit.SECONDS.between(\n ZonedDateTime.parse(\"2022-06-21T15:49:00Z\"),\n ZonedDateTime.parse(ctx[\"ingest_time\"])\n );\n ctx[\"@timestamp\"] = ZonedDateTime.parse(ctx[\"@timestamp\"]).plus(delta,ChronoUnit.SECONDS).toString();\n " + } + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc b/docs/examples/guide/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc new file mode 100644 index 0000000000..9e4cc27f6e --- /dev/null +++ b/docs/examples/guide/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc @@ -0,0 +1,52 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'mv', + body: { + mappings: { + properties: { + b: { + type: 'keyword' + } + } + } + } +) +puts response + +response = client.bulk( + index: 'mv', + refresh: true, + body: [ + { + index: {} + }, + { + a: 1, + b: [ + 'foo', + 'foo', + 'bar' + ] + }, + { + index: {} + }, + { + a: 2, + b: [ + 'bar', + 'bar' + ] + } + ] +) +puts response + +response = client.esql.query( + body: { + query: 'FROM mv | LIMIT 2' + } +) +puts response +---- diff --git a/docs/examples/guide/d003ee256d24aa6000bd9dbf1d608dc5.asciidoc b/docs/examples/guide/d003ee256d24aa6000bd9dbf1d608dc5.asciidoc new file mode 100644 index 0000000000..6b7d70b4fb --- /dev/null +++ b/docs/examples/guide/d003ee256d24aa6000bd9dbf1d608dc5.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.ingest.put_pipeline( + id: 'elser-v2-test', + body: { + processors: [ + { + inference: { + model_id: '.elser_model_2', + input_output: [ + { + input_field: 'content', + output_field: 'content_embedding' + } + ] + } + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/d434219a4b2d26b22dfc0ce7969240c8.asciidoc b/docs/examples/guide/d434219a4b2d26b22dfc0ce7969240c8.asciidoc deleted file mode 100644 index 8554f0126d..0000000000 --- a/docs/examples/guide/d434219a4b2d26b22dfc0ce7969240c8.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test_index', - body: { - settings: { - index: { - analysis: { - analyzer: { - search_synonyms: { - tokenizer: 'whitespace', - filter: [ - 'graph_synonyms' - ] - } - }, - filter: { - graph_synonyms: { - type: 'synonym_graph', - synonyms_path: 'analysis/synonym.txt' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c93e63f3fb62f588d62ffbbefe73212e.asciidoc b/docs/examples/guide/d49318764244113ad2ac4cc0f06d77ec.asciidoc similarity index 94% rename from docs/examples/guide/c93e63f3fb62f588d62ffbbefe73212e.asciidoc rename to docs/examples/guide/d49318764244113ad2ac4cc0f06d77ec.asciidoc index 121073c7ba..d9ba8e8dc9 100644 --- a/docs/examples/guide/c93e63f3fb62f588d62ffbbefe73212e.asciidoc +++ b/docs/examples/guide/d49318764244113ad2ac4cc0f06d77ec.asciidoc @@ -8,7 +8,6 @@ response = client.indices.create( "image-vector": { type: 'dense_vector', dims: 3, - index: true, similarity: 'l2_norm', index_options: { type: 'hnsw', diff --git a/docs/examples/guide/d5d022fac900b3244c3d24b185bb19e0.asciidoc b/docs/examples/guide/d5d022fac900b3244c3d24b185bb19e0.asciidoc new file mode 100644 index 0000000000..def5c7a6a6 --- /dev/null +++ b/docs/examples/guide/d5d022fac900b3244c3d24b185bb19e0.asciidoc @@ -0,0 +1,30 @@ +[source, ruby] +---- +response = client.search( + index: 'my-image-index', + body: { + size: 10, + query: { + bool: { + must: { + knn: { + field: 'image-vector', + query_vector: [ + -5, + 9, + -12 + ], + num_candidates: 3 + } + }, + filter: { + term: { + "file-type": 'png' + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/d7a55a7c491e97079e429483085f1d58.asciidoc b/docs/examples/guide/d7a55a7c491e97079e429483085f1d58.asciidoc new file mode 100644 index 0000000000..2531d6787d --- /dev/null +++ b/docs/examples/guide/d7a55a7c491e97079e429483085f1d58.asciidoc @@ -0,0 +1,19 @@ +[source, ruby] +---- +response = client.indices.put_index_template( + name: 'dsl-data-stream-template', + body: { + index_patterns: [ + 'dsl-data-stream*' + ], + data_stream: {}, + priority: 500, + template: { + settings: { + 'index.lifecycle.name' => 'pre-dsl-ilm-policy' + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/75c2bb6bbeb70d263cb9a5c588e8298e.asciidoc b/docs/examples/guide/d8ea6a1a1c546bf29f65f8c65439b156.asciidoc similarity index 81% rename from docs/examples/guide/75c2bb6bbeb70d263cb9a5c588e8298e.asciidoc rename to docs/examples/guide/d8ea6a1a1c546bf29f65f8c65439b156.asciidoc index d19b25d283..35bb975b4f 100644 --- a/docs/examples/guide/75c2bb6bbeb70d263cb9a5c588e8298e.asciidoc +++ b/docs/examples/guide/d8ea6a1a1c546bf29f65f8c65439b156.asciidoc @@ -8,9 +8,7 @@ response = client.indices.create( "byte-image-vector": { type: 'dense_vector', element_type: 'byte', - dims: 2, - index: true, - similarity: 'cosine' + dims: 2 }, title: { type: 'text' diff --git a/docs/examples/guide/d93d52b6057a7aff3d0766ca44c505e0.asciidoc b/docs/examples/guide/d93d52b6057a7aff3d0766ca44c505e0.asciidoc new file mode 100644 index 0000000000..9885296749 --- /dev/null +++ b/docs/examples/guide/d93d52b6057a7aff3d0766ca44c505e0.asciidoc @@ -0,0 +1,34 @@ +[source, ruby] +---- +response = client.cluster.put_component_template( + name: 'my-aliases', + body: { + template: { + aliases: { + "my-alias": {} + } + } + } +) +puts response + +response = client.indices.put_index_template( + name: 'my-index-template', + body: { + index_patterns: [ + 'my-index-*' + ], + composed_of: [ + 'my-aliases', + 'my-mappings', + 'my-settings' + ], + template: { + aliases: { + "yet-another-alias": {} + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/d952ac7c73219d8cabc080679e035514.asciidoc b/docs/examples/guide/d952ac7c73219d8cabc080679e035514.asciidoc new file mode 100644 index 0000000000..adcc2c5c5f --- /dev/null +++ b/docs/examples/guide/d952ac7c73219d8cabc080679e035514.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.search( + index: 'my-index', + body: { + knn: { + field: 'my_embeddings.predicted_value', + k: 10, + num_candidates: 100, + query_vector_builder: { + text_embedding: { + model_id: 'sentence-transformers__msmarco-minilm-l-12-v3', + model_text: 'the query string' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/d9fd6c552e904261fd52884595e28eff.asciidoc b/docs/examples/guide/d9fd6c552e904261fd52884595e28eff.asciidoc deleted file mode 100644 index 7a95aefe96..0000000000 --- a/docs/examples/guide/d9fd6c552e904261fd52884595e28eff.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test_index', - body: { - settings: { - index: { - analysis: { - filter: { - synonym: { - type: 'synonym_graph', - format: 'wordnet', - synonyms: [ - "s(100000001,1,'abstain',v,1,0).", - "s(100000001,2,'refrain',v,1,0).", - "s(100000001,3,'desist',v,1,0)." - ] - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6894596e924b6180bfc77428ba89769f.asciidoc b/docs/examples/guide/dadb69a225778ecd6528924c0aa029bb.asciidoc similarity index 91% rename from docs/examples/guide/6894596e924b6180bfc77428ba89769f.asciidoc rename to docs/examples/guide/dadb69a225778ecd6528924c0aa029bb.asciidoc index a2364c6792..de223a33ef 100644 --- a/docs/examples/guide/6894596e924b6180bfc77428ba89769f.asciidoc +++ b/docs/examples/guide/dadb69a225778ecd6528924c0aa029bb.asciidoc @@ -8,13 +8,11 @@ response = client.indices.create( "image-vector": { type: 'dense_vector', dims: 3, - index: true, similarity: 'l2_norm' }, "title-vector": { type: 'dense_vector', dims: 5, - index: true, similarity: 'l2_norm' }, title: { diff --git a/docs/examples/guide/dc3c7d755f1d1d0c5973068288017dcb.asciidoc b/docs/examples/guide/dc3c7d755f1d1d0c5973068288017dcb.asciidoc new file mode 100644 index 0000000000..ef289cb860 --- /dev/null +++ b/docs/examples/guide/dc3c7d755f1d1d0c5973068288017dcb.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'my-image-index', + body: { + mappings: { + properties: { + "image-vector": { + type: 'dense_vector', + dims: 3, + index: true, + similarity: 'l2_norm' + }, + "file-type": { + type: 'keyword' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/dddb6a6ebd145f8411c5b4910d332f87.asciidoc b/docs/examples/guide/dddb6a6ebd145f8411c5b4910d332f87.asciidoc new file mode 100644 index 0000000000..eca8fa3a9e --- /dev/null +++ b/docs/examples/guide/dddb6a6ebd145f8411c5b4910d332f87.asciidoc @@ -0,0 +1,9 @@ +[source, ruby] +---- +response = client.esql.query( + body: { + query: 'FROM mv | EVAL b + 2, a + b | LIMIT 4' + } +) +puts response +---- diff --git a/docs/examples/guide/c43fd2f25f78e6286fe9a5d08dc31446.asciidoc b/docs/examples/guide/e04c55476de6e785a066d3b43f66d20d.asciidoc similarity index 86% rename from docs/examples/guide/c43fd2f25f78e6286fe9a5d08dc31446.asciidoc rename to docs/examples/guide/e04c55476de6e785a066d3b43f66d20d.asciidoc index 0401ea5dd1..bb2bfef424 100644 --- a/docs/examples/guide/c43fd2f25f78e6286fe9a5d08dc31446.asciidoc +++ b/docs/examples/guide/e04c55476de6e785a066d3b43f66d20d.asciidoc @@ -8,9 +8,9 @@ response = client.search( should: [ { text_expansion: { - 'ml.token' => { + content_embedding: { model_text: 'How to avoid muscle soreness after running?', - model_id: '.elser_model_1', + model_id: '.elser_model_2', boost: 1 } } diff --git a/docs/examples/guide/e26e8bfa68aa4ab265b22304c38c3aef.asciidoc b/docs/examples/guide/e26e8bfa68aa4ab265b22304c38c3aef.asciidoc new file mode 100644 index 0000000000..50f5d6690c --- /dev/null +++ b/docs/examples/guide/e26e8bfa68aa4ab265b22304c38c3aef.asciidoc @@ -0,0 +1,89 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'sample_data', + body: { + mappings: { + properties: { + client_ip: { + type: 'ip' + }, + message: { + type: 'keyword' + } + } + } + } +) +puts response + +response = client.bulk( + index: 'sample_data', + body: [ + { + index: {} + }, + { + "@timestamp": '2023-10-23T12:15:03.360Z', + client_ip: '172.21.2.162', + message: 'Connected to 10.1.0.3', + event_duration: 3_450_233 + }, + { + index: {} + }, + { + "@timestamp": '2023-10-23T12:27:28.948Z', + client_ip: '172.21.2.113', + message: 'Connected to 10.1.0.2', + event_duration: 2_764_889 + }, + { + index: {} + }, + { + "@timestamp": '2023-10-23T13:33:34.937Z', + client_ip: '172.21.0.5', + message: 'Disconnected', + event_duration: 1_232_382 + }, + { + index: {} + }, + { + "@timestamp": '2023-10-23T13:51:54.732Z', + client_ip: '172.21.3.15', + message: 'Connection error', + event_duration: 725_448 + }, + { + index: {} + }, + { + "@timestamp": '2023-10-23T13:52:55.015Z', + client_ip: '172.21.3.15', + message: 'Connection error', + event_duration: 8_268_153 + }, + { + index: {} + }, + { + "@timestamp": '2023-10-23T13:53:55.832Z', + client_ip: '172.21.3.15', + message: 'Connection error', + event_duration: 5_033_755 + }, + { + index: {} + }, + { + "@timestamp": '2023-10-23T13:55:01.543Z', + client_ip: '172.21.3.15', + message: 'Connected to 10.1.0.1', + event_duration: 1_756_467 + } + ] +) +puts response +---- diff --git a/docs/examples/guide/e2bcc8f4ed2b4de82729e7a5a7c8f634.asciidoc b/docs/examples/guide/e2bcc8f4ed2b4de82729e7a5a7c8f634.asciidoc new file mode 100644 index 0000000000..b7ffe68064 --- /dev/null +++ b/docs/examples/guide/e2bcc8f4ed2b4de82729e7a5a7c8f634.asciidoc @@ -0,0 +1,5 @@ +[source, ruby] +---- +response = client.synonyms.get_synonyms_sets +puts response +---- diff --git a/docs/examples/guide/e301695a514a13abd98c1fe51360fa85.asciidoc b/docs/examples/guide/e301695a514a13abd98c1fe51360fa85.asciidoc new file mode 100644 index 0000000000..33042f946b --- /dev/null +++ b/docs/examples/guide/e301695a514a13abd98c1fe51360fa85.asciidoc @@ -0,0 +1,17 @@ +[source, ruby] +---- +response = client.indices.put_mapping( + index: 'my-index-0001', + body: { + properties: { + 'ml.inference.summary.predicted_value' => { + type: 'dense_vector', + dims: 768, + index: true, + similarity: 'dot_product' + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/e324ea1547635180c31c1adf77870ba2.asciidoc b/docs/examples/guide/e324ea1547635180c31c1adf77870ba2.asciidoc new file mode 100644 index 0000000000..106e1b5a74 --- /dev/null +++ b/docs/examples/guide/e324ea1547635180c31c1adf77870ba2.asciidoc @@ -0,0 +1,42 @@ +[source, ruby] +---- +response = client.cluster.put_component_template( + name: 'destination_template', + body: { + template: { + settings: { + index: { + number_of_replicas: 2, + number_of_shards: 2, + mode: 'time_series', + routing_path: [ + 'metricset' + ] + } + }, + mappings: { + properties: { + "@timestamp": { + type: 'date' + }, + metricset: { + type: 'keyword', + time_series_dimension: true + }, + "k8s": { + properties: { + tx: { + type: 'long' + }, + rx: { + type: 'long' + } + } + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/e4d1f01c025fb797a1d87f372760eabf.asciidoc b/docs/examples/guide/e4d1f01c025fb797a1d87f372760eabf.asciidoc new file mode 100644 index 0000000000..143ab2ffcc --- /dev/null +++ b/docs/examples/guide/e4d1f01c025fb797a1d87f372760eabf.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.tasks.list( + human: true, + detailed: true +) +puts response +---- diff --git a/docs/examples/guide/bd93b6f99ed785cf7520370a4cf6b834.asciidoc b/docs/examples/guide/e4de6035653e8202c43631f02d244661.asciidoc similarity index 95% rename from docs/examples/guide/bd93b6f99ed785cf7520370a4cf6b834.asciidoc rename to docs/examples/guide/e4de6035653e8202c43631f02d244661.asciidoc index 96a04d2919..1b553355f5 100644 --- a/docs/examples/guide/bd93b6f99ed785cf7520370a4cf6b834.asciidoc +++ b/docs/examples/guide/e4de6035653e8202c43631f02d244661.asciidoc @@ -3,6 +3,7 @@ response = client.search( index: 'cluster_one:my-index-000001', body: { + size: 1, query: { match: { 'user.id' => 'kimchy' diff --git a/docs/examples/guide/e80dab3e0314b7dad1bbd75b0956d9fc.asciidoc b/docs/examples/guide/e80dab3e0314b7dad1bbd75b0956d9fc.asciidoc new file mode 100644 index 0000000000..e659f26462 --- /dev/null +++ b/docs/examples/guide/e80dab3e0314b7dad1bbd75b0956d9fc.asciidoc @@ -0,0 +1,29 @@ +[source, ruby] +---- +response = client.search( + index: 'passage_vectors', + body: { + fields: [ + 'creation_time', + 'full_text' + ], + _source: false, + knn: { + query_vector: [ + 0.45, + 45 + ], + field: 'paragraph.vector', + k: 2, + num_candidates: 2, + inner_hits: { + _source: false, + fields: [ + 'paragraph.text' + ] + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/e885c28e6a1ff3cc20aaa5543d84f83e.asciidoc b/docs/examples/guide/e885c28e6a1ff3cc20aaa5543d84f83e.asciidoc new file mode 100644 index 0000000000..a63df7e5e1 --- /dev/null +++ b/docs/examples/guide/e885c28e6a1ff3cc20aaa5543d84f83e.asciidoc @@ -0,0 +1,49 @@ +[source, ruby] +---- +response = client.bulk( + index: 'my-image-index', + refresh: true, + body: [ + { + index: { + _id: '1' + } + }, + { + "image-vector": [ + 1, + 5, + -20 + ], + "file-type": 'jpg' + }, + { + index: { + _id: '2' + } + }, + { + "image-vector": [ + 42, + 8, + -15 + ], + "file-type": 'png' + }, + { + index: { + _id: '3' + } + }, + { + "image-vector": [ + 15, + 11, + 23 + ], + "file-type": 'jpg' + } + ] +) +puts response +---- diff --git a/docs/examples/guide/e95e61988dc3073a007f7b7445dd233b.asciidoc b/docs/examples/guide/e95e61988dc3073a007f7b7445dd233b.asciidoc new file mode 100644 index 0000000000..3e18e16ab3 --- /dev/null +++ b/docs/examples/guide/e95e61988dc3073a007f7b7445dd233b.asciidoc @@ -0,0 +1,23 @@ +[source, ruby] +---- +response = client.indices.put_index_template( + name: 'dsl-data-stream-template', + body: { + index_patterns: [ + 'dsl-data-stream*' + ], + data_stream: {}, + priority: 500, + template: { + settings: { + 'index.lifecycle.name' => 'pre-dsl-ilm-policy', + 'index.lifecycle.prefer_ilm' => false + }, + lifecycle: { + data_retention: '7d' + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/ef175686e1179c4ed8fb96935895b3d0.asciidoc b/docs/examples/guide/ef175686e1179c4ed8fb96935895b3d0.asciidoc new file mode 100644 index 0000000000..d0055be72d --- /dev/null +++ b/docs/examples/guide/ef175686e1179c4ed8fb96935895b3d0.asciidoc @@ -0,0 +1,32 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'passage_vectors', + body: { + mappings: { + properties: { + full_text: { + type: 'text' + }, + creation_time: { + type: 'date' + }, + paragraph: { + type: 'nested', + properties: { + vector: { + type: 'dense_vector', + dims: 2 + }, + text: { + type: 'text', + index: false + } + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/efa924638043f3a6b23ccb824d757eba.asciidoc b/docs/examples/guide/efa924638043f3a6b23ccb824d757eba.asciidoc new file mode 100644 index 0000000000..c911487719 --- /dev/null +++ b/docs/examples/guide/efa924638043f3a6b23ccb824d757eba.asciidoc @@ -0,0 +1,34 @@ +[source, ruby] +---- +response = client.bulk( + index: 'mv', + refresh: true, + body: [ + { + index: {} + }, + { + a: 1, + b: [ + 2, + 1 + ] + }, + { + index: {} + }, + { + a: 2, + b: 3 + } + ] +) +puts response + +response = client.esql.query( + body: { + query: 'FROM mv | LIMIT 2' + } +) +puts response +---- diff --git a/docs/examples/guide/f4ae3f3fbf07a7d39122ac5ac20b9c03.asciidoc b/docs/examples/guide/f4ae3f3fbf07a7d39122ac5ac20b9c03.asciidoc new file mode 100644 index 0000000000..86ec87cc05 --- /dev/null +++ b/docs/examples/guide/f4ae3f3fbf07a7d39122ac5ac20b9c03.asciidoc @@ -0,0 +1,25 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'quantized-image-index', + body: { + mappings: { + properties: { + "image-vector": { + type: 'dense_vector', + element_type: 'float', + dims: 2, + index: true, + index_options: { + type: 'int8_hnsw' + } + }, + title: { + type: 'text' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/a4709da258a667cae4199ec3a1e84b3b.asciidoc b/docs/examples/guide/f4e38856cd6a7531e8fa8df4abe0e1c4.asciidoc similarity index 77% rename from docs/examples/guide/a4709da258a667cae4199ec3a1e84b3b.asciidoc rename to docs/examples/guide/f4e38856cd6a7531e8fa8df4abe0e1c4.asciidoc index 101d944eb4..89ee8479d4 100644 --- a/docs/examples/guide/a4709da258a667cae4199ec3a1e84b3b.asciidoc +++ b/docs/examples/guide/f4e38856cd6a7531e8fa8df4abe0e1c4.asciidoc @@ -5,8 +5,8 @@ response = client.search( body: { query: { text_expansion: { - 'ml.tokens' => { - model_id: '.elser_model_1', + content_embedding: { + model_id: '.elser_model_2', model_text: 'How to avoid muscle soreness after running?' } } diff --git a/docs/examples/guide/f55cfbfc93d25941fa1d28866e050902.asciidoc b/docs/examples/guide/f55cfbfc93d25941fa1d28866e050902.asciidoc deleted file mode 100644 index 8b639aa9ad..0000000000 --- a/docs/examples/guide/f55cfbfc93d25941fa1d28866e050902.asciidoc +++ /dev/null @@ -1,153 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'sample-01', - body: { - settings: { - index: { - mode: 'time_series', - time_series: { - start_time: '2022-06-10T00:00:00Z', - end_time: '2022-06-30T23:59:59Z' - }, - routing_path: [ - 'kubernetes.namespace', - 'kubernetes.host', - 'kubernetes.node', - 'kubernetes.pod' - ], - number_of_replicas: 0, - number_of_shards: 2 - } - }, - mappings: { - properties: { - "@timestamp": { - type: 'date' - }, - kubernetes: { - properties: { - container: { - properties: { - cpu: { - properties: { - usage: { - properties: { - core: { - properties: { - ns: { - type: 'long' - } - } - }, - limit: { - properties: { - pct: { - type: 'float' - } - } - }, - nanocores: { - type: 'long', - time_series_metric: 'gauge' - }, - node: { - properties: { - pct: { - type: 'float' - } - } - } - } - } - } - }, - memory: { - properties: { - available: { - properties: { - bytes: { - type: 'long', - time_series_metric: 'gauge' - } - } - }, - majorpagefaults: { - type: 'long' - }, - pagefaults: { - type: 'long', - time_series_metric: 'gauge' - }, - rss: { - properties: { - bytes: { - type: 'long', - time_series_metric: 'gauge' - } - } - }, - usage: { - properties: { - bytes: { - type: 'long', - time_series_metric: 'gauge' - }, - limit: { - properties: { - pct: { - type: 'float' - } - } - }, - node: { - properties: { - pct: { - type: 'float' - } - } - } - } - }, - workingset: { - properties: { - bytes: { - type: 'long', - time_series_metric: 'gauge' - } - } - } - } - }, - name: { - type: 'keyword' - }, - start_time: { - type: 'date' - } - } - }, - host: { - type: 'keyword', - time_series_dimension: true - }, - namespace: { - type: 'keyword', - time_series_dimension: true - }, - node: { - type: 'keyword', - time_series_dimension: true - }, - pod: { - type: 'keyword', - time_series_dimension: true - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f7d3d367a3d8e8ff0eca426b6ea85252.asciidoc b/docs/examples/guide/f7d3d367a3d8e8ff0eca426b6ea85252.asciidoc new file mode 100644 index 0000000000..7d2efe648b --- /dev/null +++ b/docs/examples/guide/f7d3d367a3d8e8ff0eca426b6ea85252.asciidoc @@ -0,0 +1,15 @@ +[source, ruby] +---- +response = client.reindex( + body: { + source: { + index: 'k8s' + }, + dest: { + index: 'k9s', + op_type: 'create' + } + } +) +puts response +---- diff --git a/docs/examples/guide/fc1907515f6a913884a9f86451e90ee8.asciidoc b/docs/examples/guide/fc1907515f6a913884a9f86451e90ee8.asciidoc new file mode 100644 index 0000000000..2d3789baf4 --- /dev/null +++ b/docs/examples/guide/fc1907515f6a913884a9f86451e90ee8.asciidoc @@ -0,0 +1,24 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'my-index', + body: { + mappings: { + _source: { + excludes: [ + 'content_embedding' + ] + }, + properties: { + content_embedding: { + type: 'sparse_vector' + }, + content: { + type: 'text' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/fdada036a875d7995d5d7aba9c06361e.asciidoc b/docs/examples/guide/fdada036a875d7995d5d7aba9c06361e.asciidoc new file mode 100644 index 0000000000..254c14a466 --- /dev/null +++ b/docs/examples/guide/fdada036a875d7995d5d7aba9c06361e.asciidoc @@ -0,0 +1,18 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'my-index-2', + body: { + mappings: { + properties: { + my_vector: { + type: 'dense_vector', + dims: 3, + index: false + } + } + } + } +) +puts response +---- From a72e926c3760f8b623f50353b7bcdb319536ff03 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 8 Dec 2023 13:43:56 +0000 Subject: [PATCH 141/540] [CI] Moves .ci/make.sh to .github/make.sh --- {.ci => .github}/make.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {.ci => .github}/make.sh (99%) diff --git a/.ci/make.sh b/.github/make.sh similarity index 99% rename from .ci/make.sh rename to .github/make.sh index 9ec3e82f25..aea07c1286 100755 --- a/.ci/make.sh +++ b/.github/make.sh @@ -3,7 +3,7 @@ # # Build entry script for elasticsearch-ruby # -# Must be called: ./.ci/make.sh +# Must be called: ./.github/make.sh # # Version: 1.1.0 # From 901ad8fd711d5a649a4580352aecb09196f1817c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 8 Dec 2023 14:09:08 +0000 Subject: [PATCH 142/540] [CI] Updates automation tasks - We're not using assemble anymore, so updated it to build_gems - Removed other outdated code --- .github/make.sh | 33 +++------------------------ .gitignore | 4 +++- rake_tasks/unified_release_tasks.rake | 31 +++++-------------------- 3 files changed, 12 insertions(+), 56 deletions(-) diff --git a/.github/make.sh b/.github/make.sh index aea07c1286..4ed41fccd9 100755 --- a/.github/make.sh +++ b/.github/make.sh @@ -34,34 +34,23 @@ STACK_VERSION=$VERSION set -euo pipefail product="elastic/elasticsearch-ruby" -output_folder=".ci/output" -codegen_folder=".ci/output" -OUTPUT_DIR="$repo/${output_folder}" -REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}" RUBY_VERSION=${RUBY_VERSION-3.1} WORKFLOW=${WORKFLOW-staging} -mkdir -p "$OUTPUT_DIR" echo -e "\033[34;1mINFO:\033[0m PRODUCT ${product}\033[0m" echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m" -echo -e "\033[34;1mINFO:\033[0m OUTPUT_DIR ${OUTPUT_DIR}\033[0m" echo -e "\033[34;1mINFO:\033[0m RUBY_VERSION ${RUBY_VERSION}\033[0m" case $CMD in clean) echo -e "\033[36;1mTARGET: clean workspace $output_folder\033[0m" - rm -rf "$output_folder" + rm -rf "/build" echo -e "\033[32;1mdone.\033[0m" exit 0 ;; assemble) - if [ -v $VERSION ]; then - echo -e "\033[31;1mTARGET: assemble -> missing version parameter\033[0m" - exit 1 - fi - echo -e "\033[36;1mTARGET: assemble artefact $VERSION\033[0m" - TASK=assemble - TASK_ARGS=("$VERSION" "$output_folder") + echo -e "\033[36;1mTARGET: assemble\033[0m" + TASK=build_gems ;; codegen) TASK=codegen @@ -74,13 +63,10 @@ case $CMD in fi echo -e "\033[36;1mTARGET: generate docs for $VERSION\033[0m" TASK=codegen - # VERSION is BRANCH here for now - TASK_ARGS=("$VERSION" "$codegen_folder") ;; examplesgen) echo -e "\033[36;1mTARGET: generate docs examples\033[0m" TASK='docs:generate' - # VERSION is BRANCH here for now TASK_ARGS=() ;; bump) @@ -134,8 +120,6 @@ docker build --no-cache --build-arg BUILDER_UID="$(id -u)" --file .buildkite/Doc echo -e "\033[34;1mINFO: running $product container\033[0m" -mkdir -p "$OUTPUT_DIR" - # Convert ARGS to comma separated string for Rake: args_string="${TASK_ARGS[*]}" args_string="${args_string// /,}" @@ -145,7 +129,6 @@ docker run \ --env "RUBY_VERSION=${RUBY_VERSION}" \ --env "WORKFLOW=${WORKFLOW}" \ --name test-runner \ - --volume "${REPO_BINDING}" \ --volume "${repo}:/usr/src/app" \ --rm \ "${product}" \ @@ -154,16 +137,6 @@ docker run \ # ------------------------------------------------------- # # Post Command tasks & checks # ------------------------------------------------------- # - -if [[ "$CMD" == "assemble" ]]; then - if compgen -G ".ci/output" > /dev/null; then - echo -e "\033[32;1mTARGET: successfully assembled client v$VERSION\033[0m" - else - echo -e "\033[31;1mTARGET: assemble failed, empty workspace!\033[0m" - exit 1 - fi -fi - if [[ "$CMD" == "docsgen" ]]; then echo "TODO" fi diff --git a/.gitignore b/.gitignore index 8227873292..eda31fc818 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,6 @@ Gemfile.lock profile/**/data/*.json .ci/output parsed_alternative_report.json -.byebug_history \ No newline at end of file +.byebug_history +build/ +*.gem \ No newline at end of file diff --git a/rake_tasks/unified_release_tasks.rake b/rake_tasks/unified_release_tasks.rake index bff94e59d8..c1eab69a19 100644 --- a/rake_tasks/unified_release_tasks.rake +++ b/rake_tasks/unified_release_tasks.rake @@ -20,43 +20,24 @@ require_relative '../elasticsearch/lib/elasticsearch/version' namespace :unified_release do desc 'Build gem releases and snapshots' - task :assemble, [:version, :output_dir] do |_, args| - if ENV['WORKFLOW'] == 'snapshot' - @zip_filename = "elasticsearch-ruby-#{args[:version]}-SNAPSHOT" - @version = "#{args[:version]}.#{Time.now.strftime('%Y%m%d%H%M%S')}-SNAPSHOT" - else - @version = args[:version] - @zip_filename = "elasticsearch-ruby-#{@version}" - end - - Rake::Task['unified_release:bump'].invoke(@version) unless @version == Elasticsearch::VERSION - - build_gems(args[:output_dir]) - create_zip_file(args[:output_dir]) - end + task :build_gems do |_, args| + output_dir = File.expand_path(__dir__ + '/../build') + require 'byebug'; byebug - def build_gems(output_dir) - raise ArgumentError, 'You must specify an output dir' unless output_dir - # Create dir if it doesn't exist dir = CURRENT_PATH.join(output_dir).to_s FileUtils.mkdir_p(dir) unless File.exist?(dir) - + version = Elasticsearch::VERSION RELEASE_TOGETHER.each do |gem| puts '-' * 80 - puts "Building #{gem} v#{@version} to #{output_dir}" + puts "Building #{gem} v#{version} to #{output_dir}" sh "cd #{CURRENT_PATH.join(gem)} " \ - "&& gem build --silent -o #{gem}-#{@version}.gem && " \ + "&& gem build --silent -o #{gem}-#{version}.gem && " \ "mv *.gem #{CURRENT_PATH.join(output_dir)}" end puts '-' * 80 end - def create_zip_file(output_dir) - sh "cd #{CURRENT_PATH.join(output_dir)} && " \ - "zip -r #{@zip_filename}.zip * " \ - end - desc 'Generate API code' task :codegen do version = YAML.load_file(File.expand_path(__dir__ + '/../.buildkite/pipeline.yml'))['steps'].first['env']['STACK_VERSION'] From 2cfcdb494d9a93827624721a0d4362f167ee1d98 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 8 Dec 2023 14:15:08 +0000 Subject: [PATCH 143/540] [CI] Renames unified_release tasks to automation --- .github/make.sh | 2 +- Rakefile | 2 +- rake_tasks/{unified_release_tasks.rake => automation.rake} | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) rename rake_tasks/{unified_release_tasks.rake => automation.rake} (97%) diff --git a/.github/make.sh b/.github/make.sh index 4ed41fccd9..d71fb727d8 100755 --- a/.github/make.sh +++ b/.github/make.sh @@ -132,7 +132,7 @@ docker run \ --volume "${repo}:/usr/src/app" \ --rm \ "${product}" \ - bundle exec rake unified_release:${TASK}["${args_string}"] + bundle exec rake automation:${TASK}["${args_string}"] # ------------------------------------------------------- # # Post Command tasks & checks diff --git a/Rakefile b/Rakefile index a372b3c4d4..6dad7b3b65 100644 --- a/Rakefile +++ b/Rakefile @@ -70,7 +70,7 @@ RELEASE_TOGETHER = [ CERT_DIR = ENV['CERT_DIR'] || '.ci/certs' # Import build task after setting constants: -import 'rake_tasks/unified_release_tasks.rake' +import 'rake_tasks/automation.rake' # TODO: Figure out "bundle exec or not" # subprojects.each { |project| $LOAD_PATH.unshift CURRENT_PATH.join(project, "lib").to_s } diff --git a/rake_tasks/unified_release_tasks.rake b/rake_tasks/automation.rake similarity index 97% rename from rake_tasks/unified_release_tasks.rake rename to rake_tasks/automation.rake index c1eab69a19..a05961d1a4 100644 --- a/rake_tasks/unified_release_tasks.rake +++ b/rake_tasks/automation.rake @@ -18,7 +18,7 @@ require 'fileutils' require_relative '../elasticsearch/lib/elasticsearch/version' -namespace :unified_release do +namespace :automation do desc 'Build gem releases and snapshots' task :build_gems do |_, args| output_dir = File.expand_path(__dir__ + '/../build') @@ -53,7 +53,7 @@ namespace :unified_release do Example: - $ rake unified_release:bump[42.0.0] + $ rake automation:bump[42.0.0] DESC task :bump, :version do |_, args| abort('[!] Required argument [version] missing') unless (version = args[:version]) @@ -96,7 +96,7 @@ namespace :unified_release do Example: - $ rake unified_release:bump_matrix[42.0.0] + $ rake automation:bump_matrix[42.0.0] DESC task :bumpmatrix, :version do |_, args| abort('[!] Required argument [version] missing') unless (version = args[:version]) From 392e2b757be8b3c21cfde39230973f864ef3a5a9 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 14 Dec 2023 08:55:29 +0000 Subject: [PATCH 144/540] [API] Adds required body argument to connector.post --- .../lib/elasticsearch/api/actions/connector/post.rb | 4 +++- .../spec/elasticsearch/api/actions/connector/post_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb index 773998afd8..1ed0940d7e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb @@ -29,13 +29,15 @@ module Actions # support SLA of official GA features. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The connector configuration. + # @option arguments [Hash] :body The connector configuration. (*Required*) # # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html # def post(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.post" } + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/post_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/post_spec.rb index 5021336770..587a1fa0a5 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector/post_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/post_spec.rb @@ -23,13 +23,13 @@ 'POST', '_connector', {}, - nil, + {}, {}, { endpoint: 'connector.post' } ] end it 'performs the request' do - expect(client_double.connector.post(connector_id: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.connector.post(connector_id: 'foo', body: {})).to be_a Elasticsearch::API::Response end end From fe909f430b2ac77710644807d1abb33457b0b8a4 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Sat, 9 Dec 2023 14:00:52 -0500 Subject: [PATCH 145/540] Don't remove opts from args --- elasticsearch/lib/elasticsearch.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/elasticsearch/lib/elasticsearch.rb b/elasticsearch/lib/elasticsearch.rb index e646d77ee8..1121ee939f 100644 --- a/elasticsearch/lib/elasticsearch.rb +++ b/elasticsearch/lib/elasticsearch.rb @@ -60,10 +60,6 @@ def method_missing(name, *args, &block) elsif name == :perform_request # The signature for perform_request is: # method, path, params, body, headers, opts - # The last arg is opts, which shouldn't be sent when `perform_request` is called - # directly. Check if :endpoint is a key, which means it's the extra identifier - # used for OpenTelemetry. - args.pop if args[-1].is_a?(Hash) && args[-1][:endpoint] if (opaque_id = args[2]&.delete(:opaque_id)) headers = args[4] || {} opaque_id = @opaque_id_prefix ? "#{@opaque_id_prefix}#{opaque_id}" : opaque_id From 500e7f92b8cff6b990142469cdf419eaa945bccc Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Sat, 9 Dec 2023 14:01:27 -0500 Subject: [PATCH 146/540] Add OTel integration test --- elasticsearch/Gemfile | 4 ++ .../spec/integration/opentelemetry_spec.rb | 55 +++++++++++++++++++ elasticsearch/spec/spec_helper.rb | 12 ++++ elasticsearch/spec/unit/opaque_id_spec.rb | 4 +- 4 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 elasticsearch/spec/integration/opentelemetry_spec.rb diff --git a/elasticsearch/Gemfile b/elasticsearch/Gemfile index 847b0cc288..6d0fccc45b 100644 --- a/elasticsearch/Gemfile +++ b/elasticsearch/Gemfile @@ -29,3 +29,7 @@ end if ENV['TRANSPORT_VERSION'] == 'main' gem 'elastic-transport', git: 'https://github.com/elastic/elastic-transport-ruby.git', branch: 'main' end + +if RUBY_VERSION >= '3.0' + gem 'opentelemetry-sdk', require: false +end diff --git a/elasticsearch/spec/integration/opentelemetry_spec.rb b/elasticsearch/spec/integration/opentelemetry_spec.rb new file mode 100644 index 0000000000..57761a9aaf --- /dev/null +++ b/elasticsearch/spec/integration/opentelemetry_spec.rb @@ -0,0 +1,55 @@ +# 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. + +if ENV['TEST_WITH_OTEL'] == 'true' + ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}" + raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/ + + require 'spec_helper' + + context 'OpenTelemetry' do + let(:exporter) { EXPORTER } + before { exporter.reset } + after { exporter.reset } + let(:span) { exporter.finished_spans[0] } + + let(:client) do + Elasticsearch::Client.new( + host: ELASTICSEARCH_URL, + user: 'elastic', + password: 'changeme' + ) + end + + after do + client.delete(index: 'myindex', id: 1); rescue + end + + context 'when a request is instrumented' do + it 'sets the span name to the endpoint id' do + client.search(body: { query: { match: {a: 1} } }) + expect(span.name).to eq 'search' + end + + it 'sets the path parts' do + client.index(index: 'myindex', id: 1, body: { title: 'Test' }) + expect(span.attributes['db.elasticsearch.path_parts.index']).to eq 'myindex' + expect(span.attributes['db.elasticsearch.path_parts.id']).to eq 1 + end + end + end +end diff --git a/elasticsearch/spec/spec_helper.rb b/elasticsearch/spec/spec_helper.rb index 0750a40696..4a505c68ff 100644 --- a/elasticsearch/spec/spec_helper.rb +++ b/elasticsearch/spec/spec_helper.rb @@ -29,3 +29,15 @@ def meta_version def jruby? defined?(JRUBY_VERSION) end + +if ENV['TEST_WITH_OTEL'] == 'true' + require 'opentelemetry-sdk' + EXPORTER = OpenTelemetry::SDK::Trace::Export::InMemorySpanExporter.new + span_processor = OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessor.new(EXPORTER) + + OpenTelemetry::SDK.configure do |c| + c.error_handler = ->(exception:, message:) { raise(exception || message) } + c.logger = Logger.new($stderr, level: ENV.fetch('OTEL_LOG_LEVEL', 'fatal').to_sym) + c.add_span_processor span_processor + end +end diff --git a/elasticsearch/spec/unit/opaque_id_spec.rb b/elasticsearch/spec/unit/opaque_id_spec.rb index 39c3f06104..09e1a5232d 100644 --- a/elasticsearch/spec/unit/opaque_id_spec.rb +++ b/elasticsearch/spec/unit/opaque_id_spec.rb @@ -29,7 +29,7 @@ it 'uses x-opaque-id on a request' do client.search(opaque_id: '12345') expect(transport).to have_received(:perform_request) - .with('GET', '_search', {}, nil, { 'X-Opaque-Id' => '12345' }) + .with('GET', '_search', {}, nil, { 'X-Opaque-Id' => '12345' }, {:endpoint=>"search"}) end end @@ -42,7 +42,7 @@ it 'uses x-opaque-id on a request' do expect { client.search(opaque_id: '12345') }.not_to raise_error expect(transport).to have_received(:perform_request) - .with('GET', '_search', {}, nil, { 'X-Opaque-Id' => 'elastic_cloud12345' }) + .with('GET', '_search', {}, nil, { 'X-Opaque-Id' => 'elastic_cloud12345' }, {:endpoint=>"search"}) end end end From 4363d0565866730fec886acadbc52957fae0f88b Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Tue, 19 Dec 2023 10:37:28 -0500 Subject: [PATCH 147/540] Add github workflow to test with otel enabled --- .github/workflows/otel.yml | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/otel.yml diff --git a/.github/workflows/otel.yml b/.github/workflows/otel.yml new file mode 100644 index 0000000000..f18910911c --- /dev/null +++ b/.github/workflows/otel.yml @@ -0,0 +1,45 @@ +name: opentelemetry +on: + push: + branches: + - main + pull_request: + branches: + - main +jobs: + test-otel: + name: 'Test Open Telemetry' + env: + TEST_ES_SERVER: http://localhost:9250 + PORT: 9250 + TEST_WITH_OTEL: true + strategy: + fail-fast: false + matrix: + ruby: [ '3.2', 'jruby-9.4' ] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Increase system limits + run: | + sudo swapoff -a + sudo sysctl -w vm.swappiness=1 + sudo sysctl -w fs.file-max=262144 + sudo sysctl -w vm.max_map_count=262144 + - uses: elastic/elastic-github-actions/elasticsearch@master + with: + stack-version: 8.12.0-SNAPSHOT + security-enabled: false + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: Build + run: | + sudo apt-get update + sudo apt-get install libcurl4-openssl-dev + rake bundle:clean + rake bundle:install + - name: elasticsearch + run: cd elasticsearch && bundle exec rake test:all + - name: elasticsearch-api + run: rake elasticsearch:download_artifacts[8.12.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit From 10d69e0eb4a1d427880cf2d88cc7f5980f64fc76 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 21 Dec 2023 06:02:45 +0000 Subject: [PATCH 148/540] [DOCS] Updates source code docs link in connector APIs --- .../lib/elasticsearch/api/actions/connector/check_in.rb | 2 +- .../lib/elasticsearch/api/actions/connector/delete.rb | 2 +- .../lib/elasticsearch/api/actions/connector/get.rb | 2 +- .../lib/elasticsearch/api/actions/connector/last_sync.rb | 2 +- .../lib/elasticsearch/api/actions/connector/list.rb | 2 +- .../lib/elasticsearch/api/actions/connector/post.rb | 2 +- .../lib/elasticsearch/api/actions/connector/put.rb | 2 +- .../elasticsearch/api/actions/connector/update_configuration.rb | 2 +- .../lib/elasticsearch/api/actions/connector/update_error.rb | 2 +- .../lib/elasticsearch/api/actions/connector/update_filtering.rb | 2 +- .../lib/elasticsearch/api/actions/connector/update_name.rb | 2 +- .../lib/elasticsearch/api/actions/connector/update_pipeline.rb | 2 +- .../elasticsearch/api/actions/connector/update_scheduling.rb | 2 +- .../lib/elasticsearch/api/actions/connector_sync_job/cancel.rb | 2 +- .../elasticsearch/api/actions/connector_sync_job/check_in.rb | 2 +- .../lib/elasticsearch/api/actions/connector_sync_job/delete.rb | 2 +- .../lib/elasticsearch/api/actions/connector_sync_job/error.rb | 2 +- .../lib/elasticsearch/api/actions/connector_sync_job/get.rb | 2 +- .../lib/elasticsearch/api/actions/connector_sync_job/list.rb | 2 +- .../lib/elasticsearch/api/actions/connector_sync_job/post.rb | 2 +- .../api/actions/connector_sync_job/update_stats.rb | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb index ab4a1f97da..604efe0a36 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :connector_id The unique identifier of the connector to be updated. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/check-in-connector-api.html # def check_in(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.check_in" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb index f73e87f9b3..0c0bb19d09 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :connector_id The unique identifier of the connector to be deleted. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-api.html # def delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.delete" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb index d9e2246855..fabde03c74 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :connector_id The unique identifier of the connector to be returned. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-api.html # def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.get" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb index f62586cb87..8992532ee2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Object with stats related to the last connector sync run. (*Required*) # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-last-sync-api.html # def last_sync(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.last_sync" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb index 50773243d2..c102b43cf6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of results to get (default: 100) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-api.html # def list(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.list" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb index 1ed0940d7e..b007cd2076 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The connector configuration. (*Required*) # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html # def post(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.post" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb index 81bec4d553..a89eb75b3c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The connector configuration. (*Required*) # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html # def put(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.put" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb index ba9fdc46b9..565f81d0e5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Mapping between field names to configuration. (*Required*) # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-configuration-api.html # def update_configuration(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.update_configuration" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb index db2bc3cbe5..f9c487f216 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object containing the connector's error. (*Required*) # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-error-api.html # def update_error(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.update_error" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb index 5bec93f608..156a1389b4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body A list of connector filtering configurations. (*Required*) # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html # def update_filtering(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.update_filtering" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb index fb9ac78bae..2098549b5f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object containing the connector's name and/or description. (*Required*) # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-name-description-api.html # def update_name(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.update_name" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb index 156352834d..e3a901a32a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object with connector ingest pipeline configuration. (*Required*) # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-pipeline-api.html # def update_pipeline(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.update_pipeline" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb index 4de6714cd8..1b7c387408 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object containing the connector's scheduling configuration. (*Required*) # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-scheduling-api.html # def update_scheduling(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.update_scheduling" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb index d2fc1c19bb..eeb92b6de5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be canceled # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cancel-connector-sync-job-api.html # def cancel(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.cancel" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb index 329cdda829..9b9a74b6a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be checked in # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/check-in-connector-sync-job-api.html # def check_in(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.check_in" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb index dc84dbd46a..0e4423a20c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be deleted. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-sync-job-api.html # def delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.delete" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb index 5e446e2451..94800e0f8c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The error to set in the connector sync job. (*Required*) # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/set-connector-sync-job-error-api.html # def error(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.error" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb index 46f64bf29b..114a44a3ec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be returned. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-sync-job-api.html # def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.get" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb index b6957afd11..20a0708f9f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [String] :connector_id Id of the connector to fetch the sync jobs for # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-sync-jobs-api.html # def list(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.list" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb index 4b820689fa..3f188997c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The connector sync job data. (*Required*) # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-sync-job-api.html # def post(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.post" } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb index a4785fd2ee..4d69d77f1d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The stats to update for the connector sync job. (*Required*) # - # @see https://www.elastic.co/guide/en/enterprise-search/current/connectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/set-connector-sync-job-stats-api.html # def update_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.update_stats" } From bfa66a6c5b1562da68ac68baa0582dbf88a6e81c Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Fri, 22 Dec 2023 06:02:55 +0000 Subject: [PATCH 149/540] [API] Adds active_only flag to security.get_api_key Co-authored-by: Fernando Briano --- .../lib/elasticsearch/api/actions/security/get_api_key.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb index 02eb2ed685..9919dcfe7b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb @@ -30,6 +30,7 @@ module Actions # @option arguments [String] :realm_name realm name of the user who created this API key to be retrieved # @option arguments [Boolean] :owner flag to query API keys owned by the currently authenticated user # @option arguments [Boolean] :with_limited_by flag to show the limited-by role descriptors of API Keys + # @option arguments [Boolean] :active_only flag to limit response to only active (not invalidated or expired) API keys # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html From 9cbec493bb624cb79cf5961b6ba16302d3eefe77 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 22 Dec 2023 09:04:16 +0000 Subject: [PATCH 150/540] [DOCS] Updates generated docs --- .../0350410d11579f4e876c798ce1eaef5b.asciidoc | 33 ++++++++++ ...2310d84ebf113f2a3ed14cc53172ae4a.asciidoc} | 2 +- .../33d480fc6812ada75756cf5337bc9092.asciidoc | 8 +++ .../342ddf9121aeddd82fea2464665e25da.asciidoc | 12 ++++ .../34d63740b58209a3d031212909743925.asciidoc | 24 +++++++ .../365256ebdfa47b449780771d9beba8d9.asciidoc | 7 ++ .../36b86b97feedcf5632824eefc251d6ed.asciidoc | 8 ++- .../370b297ed3433577adf53e64f572d89d.asciidoc | 7 ++ ...388ec2b038d3ad69378f4c2e5bc36dce.asciidoc} | 6 ++ .../405ac843a9156d3cab374e199cac87fb.asciidoc | 11 ++++ .../41175d304e660da2931764f9a4418fd3.asciidoc | 15 +++++ ...50d36787601ebba01fc6266abe3bd415.asciidoc} | 3 +- .../640621cea39cdeeb76fbc95bff31a18d.asciidoc | 19 ++++++ .../65e892a362d940e4a74965f21c15ca09.asciidoc | 17 +++++ .../6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc | 7 ++ .../8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc | 10 +++ .../8e89fee0be6a436c4e3d7c152659c47e.asciidoc | 23 +++++++ .../90083d93e46fad2524755b8d4d1306fc.asciidoc | 14 ++++ .../98f83f0dc4634e108ab0db6db347b2c7.asciidoc | 7 ++ .../9b0f34d122a4b348dc86df7410d6ebb6.asciidoc | 7 ++ .../a53ff77d83222c0e76453e630d64787e.asciidoc | 20 ++++++ .../a960b43e720b4934edb74ab4b085ca77.asciidoc | 5 ++ .../bc2feb70658f028d5d0418ae4ac9662f.asciidoc | 26 ++++++++ .../c00c9412609832ebceb9e786dd9542df.asciidoc | 11 ++++ .../c12d6e962f083c728f9397932f05202e.asciidoc | 7 ++ .../c4e29dde9a3e497c69aec02b61c0d322.asciidoc | 60 +++++++++++++++++ .../cb0f3eea39612a694d47a57aee93956f.asciidoc | 8 +++ .../cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc | 5 ++ .../ce13afc0c976c5e1f424b58e0c97fd64.asciidoc | 14 ++++ .../d03139a851888db53f8b7affd85eb495.asciidoc | 7 ++ .../d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc | 65 ++++++++++++++++--- .../e2a753029b450942a3228e3003a55a7d.asciidoc | 19 ++++++ .../e8b0d0911b179355435d02fa9057fda8.asciidoc | 22 +++++++ .../ecfd0d94dd14ef05dfa861f22544b388.asciidoc | 10 +++ .../f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc | 7 ++ .../f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc | 7 ++ 36 files changed, 519 insertions(+), 14 deletions(-) create mode 100644 docs/examples/guide/0350410d11579f4e876c798ce1eaef5b.asciidoc rename docs/examples/guide/{f743225f1abcbc341e991a0e79ea89bc.asciidoc => 2310d84ebf113f2a3ed14cc53172ae4a.asciidoc} (86%) create mode 100644 docs/examples/guide/33d480fc6812ada75756cf5337bc9092.asciidoc create mode 100644 docs/examples/guide/342ddf9121aeddd82fea2464665e25da.asciidoc create mode 100644 docs/examples/guide/34d63740b58209a3d031212909743925.asciidoc create mode 100644 docs/examples/guide/365256ebdfa47b449780771d9beba8d9.asciidoc create mode 100644 docs/examples/guide/370b297ed3433577adf53e64f572d89d.asciidoc rename docs/examples/guide/{2b23a0e5fc29fa57da48c50b41909951.asciidoc => 388ec2b038d3ad69378f4c2e5bc36dce.asciidoc} (84%) create mode 100644 docs/examples/guide/405ac843a9156d3cab374e199cac87fb.asciidoc create mode 100644 docs/examples/guide/41175d304e660da2931764f9a4418fd3.asciidoc rename docs/examples/guide/{0f9a213d2cc4b9c2738446d5a7aee976.asciidoc => 50d36787601ebba01fc6266abe3bd415.asciidoc} (73%) create mode 100644 docs/examples/guide/640621cea39cdeeb76fbc95bff31a18d.asciidoc create mode 100644 docs/examples/guide/65e892a362d940e4a74965f21c15ca09.asciidoc create mode 100644 docs/examples/guide/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc create mode 100644 docs/examples/guide/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc create mode 100644 docs/examples/guide/8e89fee0be6a436c4e3d7c152659c47e.asciidoc create mode 100644 docs/examples/guide/90083d93e46fad2524755b8d4d1306fc.asciidoc create mode 100644 docs/examples/guide/98f83f0dc4634e108ab0db6db347b2c7.asciidoc create mode 100644 docs/examples/guide/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc create mode 100644 docs/examples/guide/a53ff77d83222c0e76453e630d64787e.asciidoc create mode 100644 docs/examples/guide/a960b43e720b4934edb74ab4b085ca77.asciidoc create mode 100644 docs/examples/guide/bc2feb70658f028d5d0418ae4ac9662f.asciidoc create mode 100644 docs/examples/guide/c00c9412609832ebceb9e786dd9542df.asciidoc create mode 100644 docs/examples/guide/c12d6e962f083c728f9397932f05202e.asciidoc create mode 100644 docs/examples/guide/c4e29dde9a3e497c69aec02b61c0d322.asciidoc create mode 100644 docs/examples/guide/cb0f3eea39612a694d47a57aee93956f.asciidoc create mode 100644 docs/examples/guide/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc create mode 100644 docs/examples/guide/ce13afc0c976c5e1f424b58e0c97fd64.asciidoc create mode 100644 docs/examples/guide/d03139a851888db53f8b7affd85eb495.asciidoc create mode 100644 docs/examples/guide/e2a753029b450942a3228e3003a55a7d.asciidoc create mode 100644 docs/examples/guide/e8b0d0911b179355435d02fa9057fda8.asciidoc create mode 100644 docs/examples/guide/ecfd0d94dd14ef05dfa861f22544b388.asciidoc create mode 100644 docs/examples/guide/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc create mode 100644 docs/examples/guide/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc diff --git a/docs/examples/guide/0350410d11579f4e876c798ce1eaef5b.asciidoc b/docs/examples/guide/0350410d11579f4e876c798ce1eaef5b.asciidoc new file mode 100644 index 0000000000..4382f16605 --- /dev/null +++ b/docs/examples/guide/0350410d11579f4e876c798ce1eaef5b.asciidoc @@ -0,0 +1,33 @@ +[source, ruby] +---- +response = client.index( + index: 'my-index-000001', + id: 5, + refresh: true, + body: { + query: { + bool: { + should: [ + { + match: { + message: { + query: 'Japanese art', + _name: 'query1' + } + } + }, + { + match: { + message: { + query: 'Holand culture', + _name: 'query2' + } + } + } + ] + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/f743225f1abcbc341e991a0e79ea89bc.asciidoc b/docs/examples/guide/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc similarity index 86% rename from docs/examples/guide/f743225f1abcbc341e991a0e79ea89bc.asciidoc rename to docs/examples/guide/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc index 6ea9c7ce50..937d675bcd 100644 --- a/docs/examples/guide/f743225f1abcbc341e991a0e79ea89bc.asciidoc +++ b/docs/examples/guide/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc @@ -6,7 +6,7 @@ response = client.search( query: { text_expansion: { 'ml.tokens' => { - model_id: '.elser_model_1', + model_id: '.elser_model_2', model_text: 'How is the weather in Jamaica?' } } diff --git a/docs/examples/guide/33d480fc6812ada75756cf5337bc9092.asciidoc b/docs/examples/guide/33d480fc6812ada75756cf5337bc9092.asciidoc new file mode 100644 index 0000000000..72b2f4150e --- /dev/null +++ b/docs/examples/guide/33d480fc6812ada75756cf5337bc9092.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.connector_sync_job.list( + from: 0, + size: 2 +) +puts response +---- diff --git a/docs/examples/guide/342ddf9121aeddd82fea2464665e25da.asciidoc b/docs/examples/guide/342ddf9121aeddd82fea2464665e25da.asciidoc new file mode 100644 index 0000000000..974b1eb6e5 --- /dev/null +++ b/docs/examples/guide/342ddf9121aeddd82fea2464665e25da.asciidoc @@ -0,0 +1,12 @@ +[source, ruby] +---- +response = client.connector.put( + connector_id: 'my-connector', + body: { + index_name: 'search-google-drive', + name: 'My Connector', + service_type: 'google_drive' + } +) +puts response +---- diff --git a/docs/examples/guide/34d63740b58209a3d031212909743925.asciidoc b/docs/examples/guide/34d63740b58209a3d031212909743925.asciidoc new file mode 100644 index 0000000000..ae713fef54 --- /dev/null +++ b/docs/examples/guide/34d63740b58209a3d031212909743925.asciidoc @@ -0,0 +1,24 @@ +[source, ruby] +---- +response = client.search( + index: 'openai-embeddings', + body: { + knn: { + field: 'content_embedding', + query_vector_builder: { + text_embedding: { + model_id: 'openai_embeddings', + model_text: 'Calculate fuel cost' + } + }, + k: 10, + num_candidates: 100 + }, + _source: [ + 'id', + 'content' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/365256ebdfa47b449780771d9beba8d9.asciidoc b/docs/examples/guide/365256ebdfa47b449780771d9beba8d9.asciidoc new file mode 100644 index 0000000000..226c34ee7d --- /dev/null +++ b/docs/examples/guide/365256ebdfa47b449780771d9beba8d9.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.connector_sync_job.check_in( + connector_sync_job_id: 'my-connector-sync-job' +) +puts response +---- diff --git a/docs/examples/guide/36b86b97feedcf5632824eefc251d6ed.asciidoc b/docs/examples/guide/36b86b97feedcf5632824eefc251d6ed.asciidoc index 718fd3338a..0147fe261d 100644 --- a/docs/examples/guide/36b86b97feedcf5632824eefc251d6ed.asciidoc +++ b/docs/examples/guide/36b86b97feedcf5632824eefc251d6ed.asciidoc @@ -2,7 +2,13 @@ ---- response = client.search( index: 'books', - body: { query: { match: { name: 'brave' } } } + body: { + query: { + match: { + name: 'brave' + } + } + } ) puts response ---- diff --git a/docs/examples/guide/370b297ed3433577adf53e64f572d89d.asciidoc b/docs/examples/guide/370b297ed3433577adf53e64f572d89d.asciidoc new file mode 100644 index 0000000000..0f8fbcd7ea --- /dev/null +++ b/docs/examples/guide/370b297ed3433577adf53e64f572d89d.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.connector_sync_job.delete( + connector_sync_job_id: 'my-connector-sync-job-id' +) +puts response +---- diff --git a/docs/examples/guide/2b23a0e5fc29fa57da48c50b41909951.asciidoc b/docs/examples/guide/388ec2b038d3ad69378f4c2e5bc36dce.asciidoc similarity index 84% rename from docs/examples/guide/2b23a0e5fc29fa57da48c50b41909951.asciidoc rename to docs/examples/guide/388ec2b038d3ad69378f4c2e5bc36dce.asciidoc index a414e5a245..3ac6f22168 100644 --- a/docs/examples/guide/2b23a0e5fc29fa57da48c50b41909951.asciidoc +++ b/docs/examples/guide/388ec2b038d3ad69378f4c2e5bc36dce.asciidoc @@ -24,6 +24,12 @@ response = client.search( slop: 5, in_order: false } + }, + highlight: { + require_field_match: false, + fields: { + "*": {} + } } } ) diff --git a/docs/examples/guide/405ac843a9156d3cab374e199cac87fb.asciidoc b/docs/examples/guide/405ac843a9156d3cab374e199cac87fb.asciidoc new file mode 100644 index 0000000000..abaa0f805b --- /dev/null +++ b/docs/examples/guide/405ac843a9156d3cab374e199cac87fb.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.connector_sync_job.post( + body: { + id: 'connector-id', + job_type: 'full', + trigger_method: 'on_demand' + } +) +puts response +---- diff --git a/docs/examples/guide/41175d304e660da2931764f9a4418fd3.asciidoc b/docs/examples/guide/41175d304e660da2931764f9a4418fd3.asciidoc new file mode 100644 index 0000000000..4ea20b6a83 --- /dev/null +++ b/docs/examples/guide/41175d304e660da2931764f9a4418fd3.asciidoc @@ -0,0 +1,15 @@ +[source, ruby] +---- +response = client.connector.update_pipeline( + connector_id: 'my-connector', + body: { + pipeline: { + extract_binary_content: true, + name: 'my-connector-pipeline', + reduce_whitespace: true, + run_ml_inference: true + } + } +) +puts response +---- diff --git a/docs/examples/guide/0f9a213d2cc4b9c2738446d5a7aee976.asciidoc b/docs/examples/guide/50d36787601ebba01fc6266abe3bd415.asciidoc similarity index 73% rename from docs/examples/guide/0f9a213d2cc4b9c2738446d5a7aee976.asciidoc rename to docs/examples/guide/50d36787601ebba01fc6266abe3bd415.asciidoc index f892a27d88..71108a2766 100644 --- a/docs/examples/guide/0f9a213d2cc4b9c2738446d5a7aee976.asciidoc +++ b/docs/examples/guide/50d36787601ebba01fc6266abe3bd415.asciidoc @@ -5,8 +5,7 @@ response = client.cluster.put_component_template( body: { template: { settings: { - 'index.lifecycle.name' => 'my-lifecycle-policy', - 'index.look_ahead_time' => '3h' + 'index.lifecycle.name' => 'my-lifecycle-policy' } }, _meta: { diff --git a/docs/examples/guide/640621cea39cdeeb76fbc95bff31a18d.asciidoc b/docs/examples/guide/640621cea39cdeeb76fbc95bff31a18d.asciidoc new file mode 100644 index 0000000000..c3710d0691 --- /dev/null +++ b/docs/examples/guide/640621cea39cdeeb76fbc95bff31a18d.asciidoc @@ -0,0 +1,19 @@ +[source, ruby] +---- +response = client.connector.last_sync( + connector_id: 'my-connector', + body: { + last_access_control_sync_error: 'Houston, we have a problem!', + last_access_control_sync_scheduled_at: '2023-11-09T15:13:08.231Z', + last_access_control_sync_status: 'pending', + last_deleted_document_count: 42, + last_incremental_sync_scheduled_at: '2023-11-09T15:13:08.231Z', + last_indexed_document_count: 42, + last_sync_error: 'Houston, we have a problem!', + last_sync_scheduled_at: '2024-11-09T15:13:08.231Z', + last_sync_status: 'completed', + last_synced: '2024-11-09T15:13:08.231Z' + } +) +puts response +---- diff --git a/docs/examples/guide/65e892a362d940e4a74965f21c15ca09.asciidoc b/docs/examples/guide/65e892a362d940e4a74965f21c15ca09.asciidoc new file mode 100644 index 0000000000..41754cb744 --- /dev/null +++ b/docs/examples/guide/65e892a362d940e4a74965f21c15ca09.asciidoc @@ -0,0 +1,17 @@ +[source, ruby] +---- +response = client.reindex( + wait_for_completion: false, + body: { + source: { + index: 'test-data', + size: 50 + }, + dest: { + index: 'openai-embeddings', + pipeline: 'openai_embeddings' + } + } +) +puts response +---- diff --git a/docs/examples/guide/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc b/docs/examples/guide/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc new file mode 100644 index 0000000000..b0c88741cb --- /dev/null +++ b/docs/examples/guide/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.connector_sync_job.list( + status: 'pending' +) +puts response +---- diff --git a/docs/examples/guide/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc b/docs/examples/guide/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc new file mode 100644 index 0000000000..67333da3bb --- /dev/null +++ b/docs/examples/guide/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.connector_sync_job.error( + connector_sync_job_id: 'my-connector-sync-job', + body: { + error: 'some-error' + } +) +puts response +---- diff --git a/docs/examples/guide/8e89fee0be6a436c4e3d7c152659c47e.asciidoc b/docs/examples/guide/8e89fee0be6a436c4e3d7c152659c47e.asciidoc new file mode 100644 index 0000000000..412cbd8e26 --- /dev/null +++ b/docs/examples/guide/8e89fee0be6a436c4e3d7c152659c47e.asciidoc @@ -0,0 +1,23 @@ +[source, ruby] +---- +response = client.connector.update_scheduling( + connector_id: 'my-connector', + body: { + scheduling: { + access_control: { + enabled: true, + interval: '0 10 0 * * ?' + }, + full: { + enabled: true, + interval: '0 20 0 * * ?' + }, + incremental: { + enabled: false, + interval: '0 30 0 * * ?' + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/90083d93e46fad2524755b8d4d1306fc.asciidoc b/docs/examples/guide/90083d93e46fad2524755b8d4d1306fc.asciidoc new file mode 100644 index 0000000000..65d23a7431 --- /dev/null +++ b/docs/examples/guide/90083d93e46fad2524755b8d4d1306fc.asciidoc @@ -0,0 +1,14 @@ +[source, ruby] +---- +response = client.connector_sync_job.update_stats( + connector_sync_job_id: 'my-connector-sync-job', + body: { + deleted_document_count: 10, + indexed_document_count: 20, + indexed_document_volume: 1000, + total_document_count: 2000, + last_seen: '2023-01-02T10:00:00Z' + } +) +puts response +---- diff --git a/docs/examples/guide/98f83f0dc4634e108ab0db6db347b2c7.asciidoc b/docs/examples/guide/98f83f0dc4634e108ab0db6db347b2c7.asciidoc new file mode 100644 index 0000000000..e7035bef28 --- /dev/null +++ b/docs/examples/guide/98f83f0dc4634e108ab0db6db347b2c7.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.connector.delete( + connector_id: 'my-connector' +) +puts response +---- diff --git a/docs/examples/guide/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc b/docs/examples/guide/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc new file mode 100644 index 0000000000..1192f98675 --- /dev/null +++ b/docs/examples/guide/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.connector_sync_job.cancel( + connector_sync_job_id: 'my-connector-sync-job-id' +) +puts response +---- diff --git a/docs/examples/guide/a53ff77d83222c0e76453e630d64787e.asciidoc b/docs/examples/guide/a53ff77d83222c0e76453e630d64787e.asciidoc new file mode 100644 index 0000000000..446177b2b5 --- /dev/null +++ b/docs/examples/guide/a53ff77d83222c0e76453e630d64787e.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.ingest.put_pipeline( + id: 'openai_embeddings', + body: { + processors: [ + { + inference: { + model_id: 'openai_embeddings', + input_output: { + input_field: 'content', + output_field: 'content_embedding' + } + } + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/a960b43e720b4934edb74ab4b085ca77.asciidoc b/docs/examples/guide/a960b43e720b4934edb74ab4b085ca77.asciidoc new file mode 100644 index 0000000000..124637796e --- /dev/null +++ b/docs/examples/guide/a960b43e720b4934edb74ab4b085ca77.asciidoc @@ -0,0 +1,5 @@ +[source, ruby] +---- +response = client.connector.list +puts response +---- diff --git a/docs/examples/guide/bc2feb70658f028d5d0418ae4ac9662f.asciidoc b/docs/examples/guide/bc2feb70658f028d5d0418ae4ac9662f.asciidoc new file mode 100644 index 0000000000..4e19205736 --- /dev/null +++ b/docs/examples/guide/bc2feb70658f028d5d0418ae4ac9662f.asciidoc @@ -0,0 +1,26 @@ +[source, ruby] +---- +response = client.connector.update_configuration( + connector_id: 'my-connector', + body: { + configuration: { + service_account_credentials: { + default_value: nil, + depends_on: [], + display: 'textarea', + label: 'Google Drive service account JSON', + options: [], + order: 1, + required: true, + sensitive: true, + tooltip: 'This connectors authenticates as a service account to synchronize content from Google Drive.', + type: 'str', + ui_restrictions: [], + validations: [], + value: '...service account JSON...' + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/c00c9412609832ebceb9e786dd9542df.asciidoc b/docs/examples/guide/c00c9412609832ebceb9e786dd9542df.asciidoc new file mode 100644 index 0000000000..9de66a6634 --- /dev/null +++ b/docs/examples/guide/c00c9412609832ebceb9e786dd9542df.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.connector.update_name( + connector_id: 'my-connector', + body: { + name: 'Custom connector', + description: 'This is my customized connector' + } +) +puts response +---- diff --git a/docs/examples/guide/c12d6e962f083c728f9397932f05202e.asciidoc b/docs/examples/guide/c12d6e962f083c728f9397932f05202e.asciidoc new file mode 100644 index 0000000000..e0e1e833c0 --- /dev/null +++ b/docs/examples/guide/c12d6e962f083c728f9397932f05202e.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.connector_sync_job.list( + connector_id: 'connector-1' +) +puts response +---- diff --git a/docs/examples/guide/c4e29dde9a3e497c69aec02b61c0d322.asciidoc b/docs/examples/guide/c4e29dde9a3e497c69aec02b61c0d322.asciidoc new file mode 100644 index 0000000000..e931ec0b26 --- /dev/null +++ b/docs/examples/guide/c4e29dde9a3e497c69aec02b61c0d322.asciidoc @@ -0,0 +1,60 @@ +[source, ruby] +---- +response = client.connector.update_filtering( + connector_id: 'my-connector', + body: { + filtering: [ + { + active: { + advanced_snippet: { + created_at: '2023-11-09T15:13:08.231Z', + updated_at: '2023-11-09T15:13:08.231Z', + value: {} + }, + rules: [ + { + created_at: '2023-11-09T15:13:08.231Z', + field: '_', + id: 'DEFAULT', + order: 0, + policy: 'include', + rule: 'regex', + updated_at: '2023-11-09T15:13:08.231Z', + value: '.*' + } + ], + validation: { + errors: [], + state: 'valid' + } + }, + domain: 'DEFAULT', + draft: { + advanced_snippet: { + created_at: '2023-11-09T15:13:08.231Z', + updated_at: '2023-11-09T15:13:08.231Z', + value: {} + }, + rules: [ + { + created_at: '2023-11-09T15:13:08.231Z', + field: '_', + id: 'DEFAULT', + order: 0, + policy: 'include', + rule: 'regex', + updated_at: '2023-11-09T15:13:08.231Z', + value: '.*' + } + ], + validation: { + errors: [], + state: 'valid' + } + } + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/cb0f3eea39612a694d47a57aee93956f.asciidoc b/docs/examples/guide/cb0f3eea39612a694d47a57aee93956f.asciidoc new file mode 100644 index 0000000000..1b7674facf --- /dev/null +++ b/docs/examples/guide/cb0f3eea39612a694d47a57aee93956f.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.connector.list( + from: 0, + size: 2 +) +puts response +---- diff --git a/docs/examples/guide/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc b/docs/examples/guide/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc new file mode 100644 index 0000000000..4db8dce241 --- /dev/null +++ b/docs/examples/guide/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc @@ -0,0 +1,5 @@ +[source, ruby] +---- +response = client.connector_sync_job.list +puts response +---- diff --git a/docs/examples/guide/ce13afc0c976c5e1f424b58e0c97fd64.asciidoc b/docs/examples/guide/ce13afc0c976c5e1f424b58e0c97fd64.asciidoc new file mode 100644 index 0000000000..82556abd34 --- /dev/null +++ b/docs/examples/guide/ce13afc0c976c5e1f424b58e0c97fd64.asciidoc @@ -0,0 +1,14 @@ +[source, ruby] +---- +response = client.connector.put( + connector_id: 'my-connector', + body: { + index_name: 'search-google-drive', + name: 'My Connector', + description: 'My Connector to sync data to Elastic index from Google Drive', + service_type: 'google_drive', + language: 'english' + } +) +puts response +---- diff --git a/docs/examples/guide/d03139a851888db53f8b7affd85eb495.asciidoc b/docs/examples/guide/d03139a851888db53f8b7affd85eb495.asciidoc new file mode 100644 index 0000000000..b2689578e1 --- /dev/null +++ b/docs/examples/guide/d03139a851888db53f8b7affd85eb495.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.connector.check_in( + connector_id: 'my-connector' +) +puts response +---- diff --git a/docs/examples/guide/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc b/docs/examples/guide/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc index 31b2253437..ba6b1c7ee4 100644 --- a/docs/examples/guide/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc +++ b/docs/examples/guide/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc @@ -2,16 +2,61 @@ ---- response = client.bulk( body: [ - { index: { _index: 'books' } }, - { name: 'Revelation Space', author: 'Alastair Reynolds', release_date: '2000-03-15', page_count: 585}, - { index: { _index: 'books' } }, - { name: '1984', author: 'George Orwell', release_date: '1985-06-01', page_count: 328}, - { index: { _index: 'books' } }, - { name: 'Fahrenheit 451', author: 'Ray Bradbury', release_date: '1953-10-15', page_count: 227}, - { index: { _index: 'books' } }, - { name: 'Brave New World', author: 'Aldous Huxley', release_date: '1932-06-01', page_count: 268}, - { index: { _index: 'books' } }, - { name: 'The Handmaids Tale', author: 'Margaret Atwood', release_date: '1985-06-01', page_count: 311} + { + index: { + _index: 'books' + } + }, + { + name: 'Revelation Space', + author: 'Alastair Reynolds', + release_date: '2000-03-15', + page_count: 585 + }, + { + index: { + _index: 'books' + } + }, + { + name: '1984', + author: 'George Orwell', + release_date: '1985-06-01', + page_count: 328 + }, + { + index: { + _index: 'books' + } + }, + { + name: 'Fahrenheit 451', + author: 'Ray Bradbury', + release_date: '1953-10-15', + page_count: 227 + }, + { + index: { + _index: 'books' + } + }, + { + name: 'Brave New World', + author: 'Aldous Huxley', + release_date: '1932-06-01', + page_count: 268 + }, + { + index: { + _index: 'books' + } + }, + { + name: 'The Handmaids Tale', + author: 'Margaret Atwood', + release_date: '1985-06-01', + page_count: 311 + } ] ) puts response diff --git a/docs/examples/guide/e2a753029b450942a3228e3003a55a7d.asciidoc b/docs/examples/guide/e2a753029b450942a3228e3003a55a7d.asciidoc new file mode 100644 index 0000000000..7591a7ad90 --- /dev/null +++ b/docs/examples/guide/e2a753029b450942a3228e3003a55a7d.asciidoc @@ -0,0 +1,19 @@ +[source, ruby] +---- +response = client.indices.put_data_lifecycle( + name: 'my-weather-sensor-data-stream', + body: { + downsampling: [ + { + after: '1d', + fixed_interval: '10m' + }, + { + after: '7d', + fixed_interval: '1d' + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/e8b0d0911b179355435d02fa9057fda8.asciidoc b/docs/examples/guide/e8b0d0911b179355435d02fa9057fda8.asciidoc new file mode 100644 index 0000000000..0456abf509 --- /dev/null +++ b/docs/examples/guide/e8b0d0911b179355435d02fa9057fda8.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'openai-embeddings', + body: { + mappings: { + properties: { + content_embedding: { + type: 'dense_vector', + dims: 1536, + element_type: 'byte', + similarity: 'dot_product' + }, + content: { + type: 'text' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/ecfd0d94dd14ef05dfa861f22544b388.asciidoc b/docs/examples/guide/ecfd0d94dd14ef05dfa861f22544b388.asciidoc new file mode 100644 index 0000000000..cb49956e46 --- /dev/null +++ b/docs/examples/guide/ecfd0d94dd14ef05dfa861f22544b388.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.connector.update_error( + connector_id: 'my-connector', + body: { + error: 'Houston, we have a problem!' + } +) +puts response +---- diff --git a/docs/examples/guide/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc b/docs/examples/guide/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc new file mode 100644 index 0000000000..a4b6902fbe --- /dev/null +++ b/docs/examples/guide/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.connector.get( + connector_id: 'my-connector' +) +puts response +---- diff --git a/docs/examples/guide/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc b/docs/examples/guide/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc new file mode 100644 index 0000000000..c479d1f735 --- /dev/null +++ b/docs/examples/guide/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.connector_sync_job.get( + connector_sync_job_id: 'my-connector-sync-job' +) +puts response +---- From ed6ebe35f01b75d3807fc8592fe1bbdbb91487f0 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 22 Dec 2023 09:48:53 +0000 Subject: [PATCH 151/540] [CI][DOCS] Adds GitHub Action for docs validation comment --- .github/workflows/docs-preview.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/docs-preview.yml diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml new file mode 100644 index 0000000000..5164d643bc --- /dev/null +++ b/.github/workflows/docs-preview.yml @@ -0,0 +1,20 @@ +--- +name: docs-preview + +on: + pull_request_target: + types: [opened] + +permissions: + pull-requests: write + +jobs: + doc-preview-pr: + runs-on: ubuntu-latest + steps: + - uses: elastic/docs/.github/actions/docs-preview@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + repo: ${{ github.event.repository.name }} + preview-path: 'guide/en/elasticsearch/client/ruby-api/index.html' + pr: ${{ github.event.pull_request.number }} From 6bda6853a8a25f4ac77a2ba12cff09f921c914fe Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 27 Dec 2023 13:10:32 +0000 Subject: [PATCH 152/540] [CI] Adds Ruby 3.3 to test matrices --- .buildkite/pipeline.yml | 11 ++++++++--- .github/workflows/main.yml | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 6c397fdb7d..d742c3a666 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -14,6 +14,7 @@ steps: - "free" - "platinum" ruby: + - "3.3" - "3.2" - "3.1" - "3.0" @@ -24,6 +25,10 @@ steps: # Only run platinum once for the latest Ruby. You can use lots of combinations, check the # documentation on https://buildkite.com/docs/pipelines/build-matrix for more information. adjustments: + - with: + suite: "platinum" + ruby: "3.2" + skip: true - with: suite: "platinum" ruby: "3.1" @@ -34,17 +39,17 @@ steps: skip: true - with: suite: "free" - ruby: "3.2" + ruby: "3.3" ruby_source: "ruby" transport: "8.0" - with: suite: "free" - ruby: "3.2" + ruby: "3.3" ruby_source: "ruby" transport: "8.1" - with: suite: "free" - ruby: "3.2" + ruby: "3.3" ruby_source: "ruby" transport: "main" - with: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 469237e8c5..e402e88ded 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [ '3.0', '3.1', '3.2', 'jruby-9.3', 'jruby-9.4' ] + ruby: [ '3.0', '3.1', '3.2', '3.3', 'jruby-9.3', 'jruby-9.4' ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From b5e06118040c951e90a9cf3b824eb6356dfb3ab3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 4 Jan 2024 12:53:08 +0000 Subject: [PATCH 153/540] [CI] Fixes showing JRuby version in log-results --- .buildkite/log-results.sh | 3 ++- elasticsearch-api/spec/spec_helper.rb | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.buildkite/log-results.sh b/.buildkite/log-results.sh index 7e3f9c922a..913c2a7277 100755 --- a/.buildkite/log-results.sh +++ b/.buildkite/log-results.sh @@ -9,7 +9,7 @@ buildkite-agent artifact download "elasticsearch-api/tmp/*" . files="elasticsearch-api/tmp/*.html" for f in $files; do TEST_SUITE=`echo $f | grep -o "\(free\|platinum\)"` - RUBY_VERSION=`echo $f | grep -Po "(\d+\.)+\d+"` + RUBY_VERSION=`echo $f | grep -Po "(jruby-|\d+\.)+\d+"` EXAMPLES=`cat $f | grep -o "[0-9]\+ examples\?" | tail -1` FAILURES=`cat $f | grep -o "[0-9]\+ failures\?" | tail -1` PENDING=`cat $f | grep -o "[0-9]\+ pending" | tail -1` @@ -18,6 +18,7 @@ for f in $files; do " done +# Failed tests: files="elasticsearch-api/tmp/*.log" for f in $files; do FAILED_TESTS=`awk 'BEGIN { FS = " | "}; /\| failed \|/{ print $1 }' $f | uniq` diff --git a/elasticsearch-api/spec/spec_helper.rb b/elasticsearch-api/spec/spec_helper.rb index 32e2fa74ef..e59fefda55 100644 --- a/elasticsearch-api/spec/spec_helper.rb +++ b/elasticsearch-api/spec/spec_helper.rb @@ -59,8 +59,12 @@ def self.included(context) RSpec.configure do |config| config.include(HelperModule) config.add_formatter('documentation') - config.add_formatter('RspecJunitFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}-junit.xml") - config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}.html") + if defined?(JRUBY_VERSION) + config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-jruby-#{JRUBY_VERSION}.html") + else + config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}.html") + end + config.example_status_persistence_file_path = "tmp/#{ENV['TEST_SUITE']}-#{RUBY_VERSION}.txt" config.color_mode = :on end From c6954fc76f5f18dd91a7a75b61f9e432da421d19 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 5 Jan 2024 14:36:30 +0000 Subject: [PATCH 154/540] [CI] Renames manual integration artifact --- elasticsearch-api/spec/platinum/integration/platinum_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/spec/platinum/integration/platinum_helper.rb b/elasticsearch-api/spec/platinum/integration/platinum_helper.rb index cc48f6d697..d74421d63a 100644 --- a/elasticsearch-api/spec/platinum/integration/platinum_helper.rb +++ b/elasticsearch-api/spec/platinum/integration/platinum_helper.rb @@ -37,6 +37,6 @@ RSpec.configure do |config| config.add_formatter('documentation') - config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/platinum-integration.html") + config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/platinum-#{ENV['RUBY_VERSION']}-manual-integration.html") config.color_mode = :on end From f7e41ee7839c757e1e856a0c9df9fea453f9b907 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 5 Jan 2024 14:52:17 +0000 Subject: [PATCH 155/540] [CI] Adds branch option to docs report download --- rake_tasks/doc_generator.rake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rake_tasks/doc_generator.rake b/rake_tasks/doc_generator.rake index 49a4e1937d..1c3850916c 100644 --- a/rake_tasks/doc_generator.rake +++ b/rake_tasks/doc_generator.rake @@ -46,7 +46,7 @@ namespace :docs do end desc 'Update report' - task :update do + task :update, [:branch] do |_, args| require 'elastic-transport' github_token = File.read(File.expand_path("~/.elastic/github.token")) transport_options = { @@ -60,9 +60,11 @@ namespace :docs do transport_options:transport_options ) path = '/repos/elastic/clients-flight-recorder/contents/recordings/docs/parsed-alternative-report.json' + path = "#{path}?ref=#{args[:branch]}" if args[:branch] params = {} response = client.perform_request('GET', path, params) File.write(File.expand_path('./docs/parsed_alternative_report.json', __dir__), response.body) + puts "Downloaded report for #{args[:branch] ? args[:branch] : 'main' } branch" end def json_data From ea92c3be4c70c8bc8b43c325271329d7e3ba1f1c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 5 Jan 2024 16:04:21 +0000 Subject: [PATCH 156/540] [CI] Prepare log file for git comsumption --- rake_tasks/doc_generator.rake | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/rake_tasks/doc_generator.rake b/rake_tasks/doc_generator.rake index 1c3850916c..06aa1792e8 100644 --- a/rake_tasks/doc_generator.rake +++ b/rake_tasks/doc_generator.rake @@ -43,6 +43,7 @@ namespace :docs do generate_docs(entry) end puts "Finished generating #{entries.length} files in #{Time.now.to_i - start_time} seconds" + delete_first_log_line end desc 'Update report' @@ -123,7 +124,7 @@ namespace :docs do template.gsub(/\s+$/, '') end - def self.show_parameters(params) + def show_parameters(params) param_string = [] params.each do |k, v| value = (is_number?(v) || is_boolean?(v)) ? v : "'#{v}'" @@ -132,7 +133,7 @@ namespace :docs do param_string.join(",\n\s\s") end - def self.show_body(body) + def show_body(body) 'body: ' + JSON.pretty_generate(body) .gsub(/\"([a-z_]+)\":/,'\\1: ') # Use Ruby 2 hash syntax @@ -140,11 +141,11 @@ namespace :docs do .gsub('aggs', 'aggregations') # Replace 'aggs' with 'aggregations' for consistency end - def self.is_number?(value) + def is_number?(value) Float(value) || Integer(value) rescue false end - def self.is_boolean?(value) + def is_boolean?(value) (['false', 'true'].include? value) || value.is_a?(TrueClass) || value.is_a?(FalseClass) @@ -160,6 +161,13 @@ namespace :docs do SRC end end + + def delete_first_log_line + logfile = File.expand_path(__dir__ + '/../log/200-ok.log') + content = IO.readlines(logfile, chomp: true) + puts content.shift + File.write(logfile, content.first) + end end # From 808aea02d08894c3c89bd6cdcd6f311251604e92 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 5 Jan 2024 16:07:12 +0000 Subject: [PATCH 157/540] [CI] Adds doc task to git add files from OK response --- rake_tasks/doc_generator.rake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rake_tasks/doc_generator.rake b/rake_tasks/doc_generator.rake index 06aa1792e8..5d26cdb8d1 100644 --- a/rake_tasks/doc_generator.rake +++ b/rake_tasks/doc_generator.rake @@ -68,6 +68,11 @@ namespace :docs do puts "Downloaded report for #{args[:branch] ? args[:branch] : 'main' } branch" end + desc 'Add files from 200-ok log' + task :add_files do + `cat log/200-ok.log | xargs git add` + end + def json_data JSON.parse(File.read(SRC_FILE)) end From 320983bc6b35a7e2ab80898339ea1884eb379070 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 15 Jan 2024 08:28:48 +0000 Subject: [PATCH 158/540] [CI] Bumps test matrices to 8.13 --- .buildkite/pipeline.yml | 2 +- .github/workflows/main.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index d742c3a666..edfb6eea45 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -5,7 +5,7 @@ steps: env: RUBY_VERSION: "{{ matrix.ruby }}" TEST_SUITE: "{{ matrix.suite }}" - STACK_VERSION: 8.12.0-SNAPSHOT + STACK_VERSION: 8.13.0-SNAPSHOT TRANSPORT_VERSION: "{{ matrix.transport }}" RUBY_SOURCE: "{{ matrix.ruby_source }}" matrix: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e402e88ded..fb047683c7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 8.12.0-SNAPSHOT + stack-version: 8.13.0-SNAPSHOT security-enabled: false - uses: ruby/setup-ruby@v1 with: @@ -40,4 +40,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake elasticsearch:download_artifacts[8.12.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake elasticsearch:download_artifacts[8.13.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit From 997e3d4c2ccad5d315e8ebf427b4422398564947 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 15 Jan 2024 09:11:53 +0000 Subject: [PATCH 159/540] [API] Auto generated updates - indices.rollover - Adds :lazy (Boolean) parameter. If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams. - Promotes synonyms.delete_synonym, synonyms.delete_synonym_rule, synonyms.get_synonym, synonyms.get_synonym_rule, synonyms.get_synonyms_sets, synonyms.put_synonym, synonyms.put_synonym_rule from experimental to stable. --- elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb | 2 +- .../lib/elasticsearch/api/actions/indices/rollover.rb | 1 + .../lib/elasticsearch/api/actions/synonyms/delete_synonym.rb | 4 ---- .../elasticsearch/api/actions/synonyms/delete_synonym_rule.rb | 4 ---- .../lib/elasticsearch/api/actions/synonyms/get_synonym.rb | 4 ---- .../elasticsearch/api/actions/synonyms/get_synonym_rule.rb | 4 ---- .../elasticsearch/api/actions/synonyms/get_synonyms_sets.rb | 4 ---- .../lib/elasticsearch/api/actions/synonyms/put_synonym.rb | 4 ---- .../elasticsearch/api/actions/synonyms/put_synonym_rule.rb | 4 ---- 9 files changed, 2 insertions(+), 29 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb index cf9118b224..11993801e7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the csv format. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Use the `query` element to start a query. Use `time_zone` to specify an execution time zone and `columnar` to format the answer. (*Required*) + # @option arguments [Hash] :body Use the `query` element to start a query. Use `columnar` to format the answer. (*Required*) # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index 74f77536eb..93493218b1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -31,6 +31,7 @@ module Actions # @option arguments [Boolean] :dry_run If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the newly created rollover index before the operation returns. + # @option arguments [Boolean] :lazy If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The conditions that needs to be met for executing rollover # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb index 0758b07290..bc981d1653 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb @@ -23,10 +23,6 @@ module API module Synonyms module Actions # Deletes a synonym set - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :id The id of the synonyms set to be deleted # @option arguments [Hash] :headers Custom HTTP headers diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb index 49927c7ebb..70f3ec4a3e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb @@ -23,10 +23,6 @@ module API module Synonyms module Actions # Deletes a synonym rule in a synonym set - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :set_id The id of the synonym set to be updated # @option arguments [String] :rule_id The id of the synonym rule to be deleted diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb index 9bfe11f4ec..25f8552ab2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb @@ -23,10 +23,6 @@ module API module Synonyms module Actions # Retrieves a synonym set - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :id The name of the synonyms set to be retrieved # @option arguments [Integer] :from Starting offset diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb index 4cde607f25..6dc643791e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb @@ -23,10 +23,6 @@ module API module Synonyms module Actions # Retrieves a synonym rule from a synonym set - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :set_id The id of the synonym set to retrieve the synonym rule from # @option arguments [String] :rule_id The id of the synonym rule to retrieve diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb index 0ae03903e4..a642d90e53 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb @@ -23,10 +23,6 @@ module API module Synonyms module Actions # Retrieves a summary of all defined synonym sets - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [Integer] :from Starting offset # @option arguments [Integer] :size specifies a max number of results to get diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb index 1817b0da65..ba48454aad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb @@ -23,10 +23,6 @@ module API module Synonyms module Actions # Creates or updates a synonyms set - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :id The id of the synonyms set to be created or updated # @option arguments [Hash] :headers Custom HTTP headers diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb index 3a295a3042..2c60834b19 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb @@ -23,10 +23,6 @@ module API module Synonyms module Actions # Creates or updates a synonym rule in a synonym set - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :set_id The id of the synonym set to be updated with the synonym rule # @option arguments [String] :rule_id The id of the synonym rule to be updated or created From 8301f05c6c8f2692477ca640288524cf2c39dc32 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 15 Jan 2024 09:16:12 +0000 Subject: [PATCH 160/540] [API] Adds experimental APIs: esql.async_query, esql.async_query_get --- .../api/actions/esql/async_query.rb | 59 +++++++++++++++++ .../api/actions/esql/async_query_get.rb | 63 +++++++++++++++++++ .../api/actions/esql/async_query_get._spec.rb | 35 +++++++++++ .../api/actions/esql/async_query_spec.rb | 35 +++++++++++ 4 files changed, 192 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_get._spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb new file mode 100644 index 0000000000..26241e9992 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb @@ -0,0 +1,59 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Esql + module Actions + # Executes an ESQL request asynchronously + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml + # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the csv format. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body Use the `query` element to start a query. Use `columnar` to format the answer. (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-api.html + # + def async_query(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "esql.async_query" } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = "_query/async" + 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/async_query_get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb new file mode 100644 index 0000000000..42c1daeb27 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb @@ -0,0 +1,63 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Esql + module Actions + # Retrieves the results of a previously submitted async query request given its ID. + # + # @option arguments [String] :id The async query ID + # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response + # @option arguments [Time] :keep_alive Specify the time interval in which the results (partial or final) for this search will be available + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-get-api.html + # + def async_query_get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "esql.async_query_get" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_GET + path = "_query/async/#{Utils.__listify(_id)}" + 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/spec/elasticsearch/api/actions/esql/async_query_get._spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_get._spec.rb new file mode 100644 index 0000000000..e2b934853f --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_get._spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.esql#async_query_get' do + let(:expected_args) do + [ + 'GET', + '_query/async/foo', + {}, + nil, + {}, + { defined_params: {id: 'foo' }, endpoint: 'esql.async_query_get' } + ] + end + + it 'performs the request' do + expect(client_double.esql.async_query_get(id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_spec.rb new file mode 100644 index 0000000000..acf1666189 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.esql#async_query' do + let(:expected_args) do + [ + 'POST', + '_query/async', + {}, + {}, + {}, + { endpoint: 'esql.async_query' } + ] + end + + it 'performs the request' do + expect(client_double.esql.async_query(body: {})).to be_a Elasticsearch::API::Response + end +end From d30640e0e9e6ea240bf8f2a7ce704f22ef787976 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 15 Jan 2024 09:19:40 +0000 Subject: [PATCH 161/540] [API] Adds new profiling.flamegraph, profiling.stacktraces APIs --- .../api/actions/profiling/flamegraph.rb | 53 +++++++++++++++++++ .../api/actions/profiling/stacktraces.rb | 53 +++++++++++++++++++ .../api/actions/profiling/flamegraph_spec.rb | 35 ++++++++++++ .../api/actions/profiling/stacktraces_spec.rb | 35 ++++++++++++ 4 files changed, 176 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/profiling/flamegraph.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/profiling/stacktraces.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/profiling/flamegraph_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/profiling/stacktraces_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/flamegraph.rb b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/flamegraph.rb new file mode 100644 index 0000000000..23c54cd649 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/flamegraph.rb @@ -0,0 +1,53 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Profiling + module Actions + # Extracts a UI-optimized structure to render flamegraphs from Universal Profiling. + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The filter conditions for the flamegraph (*Required*) + # + # @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html + # + def flamegraph(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "profiling.flamegraph" } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = "_profiling/flamegraph" + params = {} + + 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/profiling/stacktraces.rb b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/stacktraces.rb new file mode 100644 index 0000000000..c9f10a4cec --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/stacktraces.rb @@ -0,0 +1,53 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Profiling + module Actions + # Extracts raw stacktrace information from Universal Profiling. + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The filter conditions for stacktraces (*Required*) + # + # @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html + # + def stacktraces(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "profiling.stacktraces" } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = "_profiling/stacktraces" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/profiling/flamegraph_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/profiling/flamegraph_spec.rb new file mode 100644 index 0000000000..df43702ba5 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/profiling/flamegraph_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.profiling#flamegraph' do + let(:expected_args) do + [ + 'POST', + '_profiling/flamegraph', + {}, + {}, + {}, + { endpoint: 'profiling.flamegraph' } + ] + end + + it 'performs the request' do + expect(client_double.profiling.flamegraph(body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/profiling/stacktraces_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/profiling/stacktraces_spec.rb new file mode 100644 index 0000000000..bc846d38b7 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/profiling/stacktraces_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.profiling#stacktraces' do + let(:expected_args) do + [ + 'POST', + '_profiling/stacktraces', + {}, + {}, + {}, + { endpoint: 'profiling.stacktraces' } + ] + end + + it 'performs the request' do + expect(client_double.profiling.stacktraces(body: {})).to be_a Elasticsearch::API::Response + end +end From 00392337c8e72282267bd42d932670714c606519 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 15 Jan 2024 11:10:47 +0000 Subject: [PATCH 162/540] [API] Test Runner: Updates template in wipe cluster --- elasticsearch-api/api-spec-testing/wipe_cluster.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/api-spec-testing/wipe_cluster.rb b/elasticsearch-api/api-spec-testing/wipe_cluster.rb index bf5fa8d02b..3d91f63e19 100644 --- a/elasticsearch-api/api-spec-testing/wipe_cluster.rb +++ b/elasticsearch-api/api-spec-testing/wipe_cluster.rb @@ -258,7 +258,7 @@ def platinum_template?(template) platinum_prefixes = [ '.monitoring', '.watch', '.triggered-watches', '.data-frame', '.ml-', '.transform', '.deprecation', 'data-streams-mappings', '.fleet', - 'behavioral_analytics-', 'profiling', 'elastic-connectors' + 'behavioral_analytics-', 'profiling', 'elastic-connectors', 'ilm-history', '.slm-history' ].freeze return true if template.start_with?(*platinum_prefixes) From 4f2f588d5219b2c8e4910ffb85fc20a2dc79d348 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 8 Jan 2024 14:48:08 +0000 Subject: [PATCH 163/540] [DOCS] Release notes 8.12 --- CHANGELOG.md | 56 ++++++++++++++++++++++++++ docs/release_notes/812.asciidoc | 65 +++++++++++++++++++++++++++++++ docs/release_notes/index.asciidoc | 2 + 3 files changed, 123 insertions(+) create mode 100644 docs/release_notes/812.asciidoc diff --git a/CHANGELOG.md b/CHANGELOG.md index f9786f2fc5..9d1cf7bda4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,60 @@ *To see release notes for the `7.x` branch and older releases, see [CHANGELOG on the 7.17 branch](https://github.com/elastic/elasticsearch-ruby/blob/7.17/CHANGELOG.md).* +## 8.12.0 Release notes + +### Client + +* Tested versions of Ruby for 8.12.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. + +### API + +API Changes: + +* `bulk` - Adds boolean `:list_executed_pipelines` parameter: Sets `list_executed_pipelines` for all incoming documents. Defaults to unset (false). +* `indices.put_settings` - Adds boolean `:reopen` parameter: Whether to close and reopen the index to apply non-dynamic settings. If set to `true` the indices to which the settings are being applied will be closed temporarily and then reopened in order to apply the changes. The default is `false`. +* `open_point_in_time` - Adds Hash `:body` parameter: an index_filter specified with the Query DSL. +* `security.get_api_key` - Adds boolean `:active_only` parameter: flag to limit response to only active (not invalidated or expired) API keys. + +#### New APIs + +New API for [Universal profiling](https://www.elastic.co/guide/en/observability/8.12/universal-profiling.html): + +* `profiling.status` - Returns basic information about the status of Universal Profiling. + + +New experimental API: + +* `simulate.ingest` - Simulates running ingest with example documents. See: https://www.elastic.co/guide/en/elasticsearch/reference/8.12/simulate-ingest-api.html + +##### Connectors API + +Version 8.12 introduces the experimental [Connectors API](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/connector-apis.html). Use the following APIs to manage connectors: + +* `connector.post` - Creates a connector. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/create-connector-api.html) +* `connector.put` - Creates or updates a connector. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/create-connector-api.html) +* `connector.delete` - Deletes a connector. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-connector-api.html) +* `connector.get` - Returns the details about a connector. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/get-connector-api.html) +* `connector.list` - Lists all connectors. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/list-connector-api.html) +* `connector.check_in` - Updates the last_seen timestamp in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/check-in-connector-api.html) +* `connector.update_configuration` - Updates the connector configuration. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-configuration-api.html) +* `connector.update_error` - Updates the error field in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-error-api.html) +* `connector.update_filtering` - Updates the filtering field in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-filtering-api.html) +* `connector.last_sync` - Updates the stats of last sync in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-last-sync-api.html) +* `connector.update_name` - Updates the name and/or description fields in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-name-description-api.html) +* `connector.update_pipeline` - Updates the pipeline field in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-pipeline-api.html) +* `connector.update_scheduling` - Updates the scheduling field in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-scheduling-api.html) + +Use the following APIs to manage sync jobs: + +* `connector_sync_job.cancel` - Cancels a connector sync job. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cancel-connector-sync-job-api.html) +* `connector_sync_job.check_in` - Checks in a connector sync job (refreshes 'last_seen'). See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/check-in-connector-sync-job-api.html) +* `connector_sync_job.delete` - Deletes a connector sync job. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-connector-sync-job-api.html) +* `connector_sync_job.error` - Sets an error for a connector sync job. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/set-connector-sync-job-error-api.html) +* `connector_sync_job.get` - Returns the details about a connector sync job. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/get-connector-sync-job-api.html) +* `connector_sync_job.list` - Lists all connector sync jobs. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/list-connector-sync-jobs-api.html) +* `connector_sync_job.post` - Creates a connector sync job. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/create-connector-sync-job-api.html) +* `connector_sync_job.update_stats` - Updates the stats fields in the connector sync job document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/set-connector-sync-job-stats-api.html) + + ## 8.11.0 Release notes diff --git a/docs/release_notes/812.asciidoc b/docs/release_notes/812.asciidoc new file mode 100644 index 0000000000..7fb1c52f6e --- /dev/null +++ b/docs/release_notes/812.asciidoc @@ -0,0 +1,65 @@ +[[release_notes_8_12]] +=== 8.12 Release notes + +[discrete] +[[release_notes_8_12_0]] +=== 8.12.0 Release notes + +[discrete] +==== Client +* Tested versions of Ruby for 8.12.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. + +[discrete] +==== API + +API Changes: + +* `bulk` - Adds boolean `:list_executed_pipelines` parameter: Sets `list_executed_pipelines` for all incoming documents. Defaults to unset (false). +* `indices.put_settings` - Adds boolean `:reopen` parameter: Whether to close and reopen the index to apply non-dynamic settings. If set to `true` the indices to which the settings are being applied will be closed temporarily and then reopened in order to apply the changes. The default is `false`. +* `open_point_in_time` - Adds Hash `:body` parameter: an index_filter specified with the Query DSL. +* `security.get_api_key` - Adds boolean `:active_only` parameter: flag to limit response to only active (not invalidated or expired) API keys. + +[discrete] +===== Connectors + +Version 8.12 introduces the experimental https://www.elastic.co/guide/en/elasticsearch/reference/8.12/connector-apis.html[Connectors API]. + +Use the following APIs to manage connectors: + +* `connector.post` - Creates a connector. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/create-connector-api.html[documentation]. +* `connector.put` - Creates or updates a connector. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/create-connector-api.html[documentation]. +* `connector.delete` - Deletes a connector. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-connector-api.html[documentation]. +* `connector.get` - Returns the details about a connector. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/get-connector-api.html[documentation]. +* `connector.list` - Lists all connectors. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/list-connector-api.html[documentation]. +* `connector.check_in` - Updates the last_seen timestamp in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/check-in-connector-api.html[documentation]. +* `connector.update_configuration` - Updates the connector configuration. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-configuration-api.html[documentation]. +* `connector.update_error` - Updates the error field in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-error-api.html[documentation]. +* `connector.update_filtering` - Updates the filtering field in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-filtering-api.html[documentation]. +* `connector.last_sync` - Updates the stats of last sync in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-last-sync-api.html[documentation]. +* `connector.update_name` - Updates the name and/or description fields in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-name-description-api.html[documentation]. +* `connector.update_pipeline` - Updates the pipeline field in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-pipeline-api.html[documentation]. +* `connector.update_scheduling` - Updates the scheduling field in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-scheduling-api.html[documentation]. + +Use the following APIs to manage sync jobs: + +* `connector_sync_job.cancel` - Cancels a connector sync job. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cancel-connector-sync-job-api.html[documentation]. +* `connector_sync_job.check_in` - Checks in a connector sync job (refreshes 'last_seen'). See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/check-in-connector-sync-job-api.html[documentation]. +* `connector_sync_job.delete` - Deletes a connector sync job. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-connector-sync-job-api.html[documentation]. +* `connector_sync_job.error` - Sets an error for a connector sync job. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/set-connector-sync-job-error-api.html[documentation]. +* `connector_sync_job.get` - Returns the details about a connector sync job. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/get-connector-sync-job-api.html[documentation]. +* `connector_sync_job.list` - Lists all connector sync jobs. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/list-connector-sync-jobs-api.html[documentation]. +* `connector_sync_job.post` - Creates a connector sync job. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/create-connector-sync-job-api.html[documentation]. +* `connector_sync_job.update_stats` - Updates the stats fields in the connector sync job document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/set-connector-sync-job-stats-api.html[documentation]. + +[discrete] +===== Profiling +New API for https://www.elastic.co/guide/en/observability/8.12/universal-profiling.html[Universal profiling]. + +* `profiling.status` - Returns basic information about the status of Universal Profiling. + + +[discrete] +===== Simulate +New experimental API: + +* `simulate.ingest` - Simulates running ingest with example documents. See: https://www.elastic.co/guide/en/elasticsearch/reference/8.12/simulate-ingest-api.html diff --git a/docs/release_notes/index.asciidoc b/docs/release_notes/index.asciidoc index 9143380955..1ea640ba71 100644 --- a/docs/release_notes/index.asciidoc +++ b/docs/release_notes/index.asciidoc @@ -3,6 +3,7 @@ [discrete] === 8.x +* <> * <> * <> * <> @@ -33,6 +34,7 @@ * <> * <> +include::812.asciidoc[] include::811.asciidoc[] include::810.asciidoc[] include::89.asciidoc[] From 074a8eba61e83b146811c06758f72d799783d946 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 18 Jan 2024 06:03:12 +0000 Subject: [PATCH 164/540] [API] Adds :drop_null_columns boolean parameter to esql APIs --- .../lib/elasticsearch/api/actions/esql/async_query.rb | 1 + .../lib/elasticsearch/api/actions/esql/async_query_get.rb | 1 + elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb | 1 + 3 files changed, 3 insertions(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb index 26241e9992..24fcb9bbc9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb @@ -30,6 +30,7 @@ module Actions # # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the csv format. + # @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. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Use the `query` element to start a query. Use `columnar` to format the answer. (*Required*) # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb index 42c1daeb27..e21e7f2d00 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb @@ -27,6 +27,7 @@ module Actions # @option arguments [String] :id The async query ID # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response # @option arguments [Time] :keep_alive Specify the time interval in which the results (partial or final) for this search will be available + # @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. # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-get-api.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb index 11993801e7..cf3348e95e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb @@ -30,6 +30,7 @@ module Actions # # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the csv format. + # @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. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Use the `query` element to start a query. Use `columnar` to format the answer. (*Required*) # From 6acc5acb0d7b8a610f7c22da9a3d4769596caa8f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 19 Jan 2024 06:02:49 +0000 Subject: [PATCH 165/540] [API] Adds require_data_stream boolean parameter to bulk and index --- elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb | 1 + elasticsearch-api/lib/elasticsearch/api/actions/index.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index be135f37ca..4257b5ded1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -34,6 +34,7 @@ module Actions # @option arguments [List] :_source_includes Default list of fields to extract and return from the _source field, can be overridden on each sub-request # @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with # @option arguments [Boolean] :require_alias Sets require_alias for all incoming documents. Defaults to unset (false) + # @option arguments [Boolean] :require_data_stream When true, requires the destination to be a data stream (existing or to-be-created). Default is false # @option arguments [Boolean] :list_executed_pipelines Sets list_executed_pipelines for all incoming documents. Defaults to unset (false) # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [String|Array] :body The operation definition and data (action-data pairs), separated by newlines. Array of Strings, Header/Data pairs, diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb index 46902ebfe8..4a1b6fb808 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb @@ -36,6 +36,7 @@ module Actions # @option arguments [Number] :if_primary_term only perform the index operation if the last operation that has changed the document has the specified primary term # @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with # @option arguments [Boolean] :require_alias When true, requires destination to be an alias. Default is false + # @option arguments [Boolean] :require_data_stream When true, requires the destination to be a data stream (existing or to-be-created). Default is false # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The document (*Required*) # From c6779eceab1c6846216aecbe55087157e1d4bf81 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 25 Jan 2024 11:46:24 +0000 Subject: [PATCH 166/540] Adds base64 dependency base64 was added to the gemspec, since starting in Ruby 3.4.0, base64 will no longer be part of the default gems and will no longer be in the standard library. base64 is used forAPI key and Cloud ID. The dependency used to be declared in transport, but it's not needed there since the implementation using it is in this codebase. --- elasticsearch/elasticsearch.gemspec | 2 +- elasticsearch/lib/elasticsearch.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index 9f1f649e99..a349cc6cbe 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -46,8 +46,8 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 2.5' s.add_dependency 'elastic-transport', '~> 8.3' - s.add_dependency 'elasticsearch-api', '8.13.0' + s.add_dependency 'base64' s.add_development_dependency 'bundler' s.add_development_dependency 'byebug' unless defined?(JRUBY_VERSION) || defined?(Rubinius) diff --git a/elasticsearch/lib/elasticsearch.rb b/elasticsearch/lib/elasticsearch.rb index 1121ee939f..f159bc1f90 100644 --- a/elasticsearch/lib/elasticsearch.rb +++ b/elasticsearch/lib/elasticsearch.rb @@ -18,6 +18,7 @@ require 'elasticsearch/version' require 'elastic/transport' require 'elasticsearch/api' +require 'base64' module Elasticsearch NOT_ELASTICSEARCH_WARNING = 'The client noticed that the server is not Elasticsearch and we do not support this unknown product.'.freeze From e584846aefb73340576f9d13eec5de1e269e4181 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 26 Jan 2024 09:38:25 +0000 Subject: [PATCH 167/540] [API] Adds connector.update_native connector.update_service_type APIs --- .../api/actions/connector/update_native.rb | 67 +++++++++++++++++++ .../actions/connector/update_service_type.rb | 67 +++++++++++++++++++ .../actions/connector/update_native_spec.rb | 38 +++++++++++ .../connector/update_service_type_spec.rb | 38 +++++++++++ 4 files changed, 210 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_native_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_service_type_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb new file mode 100644 index 0000000000..52e0015fb5 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb @@ -0,0 +1,67 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the is_native flag of the connector. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body An object containing the connector's is_native flag (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/connector-apis.html + # + def update_native(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.update_native" } + + defined_params = [:connector_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_native" + params = {} + + 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/connector/update_service_type.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb new file mode 100644 index 0000000000..8c0a7717b7 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb @@ -0,0 +1,67 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the service type of the connector. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body An object containing the connector's service type. (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/connector-apis.html + # + def update_service_type(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector.update_service_type" } + + defined_params = [:connector_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_service_type" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_native_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_native_spec.rb new file mode 100644 index 0000000000..4f4ca0d869 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_native_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#update_native' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_native', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.update_native' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.update_native(body: {}, connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_service_type_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_service_type_spec.rb new file mode 100644 index 0000000000..389c7b3515 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_service_type_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#update_service_type' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_service_type', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.update_service_type' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.update_service_type(body: {}, connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end From 104cbfab6142fe7f2d0c71879b0a332b451a929a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 26 Jan 2024 09:44:14 +0000 Subject: [PATCH 168/540] [API] Adds text_structure.test_grok_pattern API --- .../text_structure/test_grok_pattern.rb | 54 +++++++++++++++++++ .../text_structure/test_grok_pattern_spec.rb | 35 ++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/text_structure/test_grok_pattern_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb new file mode 100644 index 0000000000..c6b2f22339 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb @@ -0,0 +1,54 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module TextStructure + module Actions + # Tests a Grok pattern on some text. + # + # @option arguments [String] :ecs_compatibility Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled' + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The Grok pattern and text. (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/test-grok-pattern-api.html + # + def test_grok_pattern(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "text_structure.test_grok_pattern" } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = "_text_structure/test_grok_pattern" + 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/spec/elasticsearch/api/actions/text_structure/test_grok_pattern_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/test_grok_pattern_spec.rb new file mode 100644 index 0000000000..a541750c6a --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/test_grok_pattern_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.text_structure#test_grok_pattern' do + let(:expected_args) do + [ + 'POST', + '_text_structure/test_grok_pattern', + {}, + {}, + {}, + { endpoint: 'text_structure.test_grok_pattern' } + ] + end + + it 'performs the request' do + expect(client_double.text_structure.test_grok_pattern(body: {})).to be_a Elasticsearch::API::Response + end +end From b9d288f4182a161a74ab78cf2a3c9815301958cf Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 26 Jan 2024 09:44:28 +0000 Subject: [PATCH 169/540] [API] Migrates find_structure test to RSpec --- .../text_structure/find_structure_spec.rb} | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) rename elasticsearch-api/spec/{platinum/unit/text_structure/find_structure_test.rb => elasticsearch/api/actions/text_structure/find_structure_spec.rb} (54%) diff --git a/elasticsearch-api/spec/platinum/unit/text_structure/find_structure_test.rb b/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_structure_spec.rb similarity index 54% rename from elasticsearch-api/spec/platinum/unit/text_structure/find_structure_test.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_structure_spec.rb index 0f5ef0aca0..da6c2525a2 100644 --- a/elasticsearch-api/spec/platinum/unit/text_structure/find_structure_test.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_structure_spec.rb @@ -15,26 +15,21 @@ # specific language governing permissions and limitations # under the License. -require 'test_helper' +require 'spec_helper' -module Elasticsearch - module Test - class XPackTextStructureFindStructureTest < Minitest::Test - context "XPack Text Structure: Find structure" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_text_structure/find_structure', url) - assert_equal(params, {}) - assert_equal(body, {}) - true - end.returns(FakeResponse.new) +describe 'client.text_structure#test_grok_pattern' do + let(:expected_args) do + [ + 'POST', + '_text_structure/find_structure', + {}, + {}, + {"Content-Type"=>"application/x-ndjson"}, + { endpoint: 'text_structure.find_structure' } + ] + end - subject.text_structure.find_structure(body: {}) - end - end - end + it 'performs the request' do + expect(client_double.text_structure.find_structure(body: {})).to be_a Elasticsearch::API::Response end end From a0c893af29c4c02bc6315632e5f819b7a1e0651e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 29 Jan 2024 09:56:34 +0000 Subject: [PATCH 170/540] [API] Adds connector_secret namespace and get, post APIs --- elasticsearch-api/lib/elasticsearch/api.rb | 3 +- .../api/actions/connector_secret/get.rb | 65 +++++++++++++++++++ .../api/actions/connector_secret/post.rb | 57 ++++++++++++++++ .../api/namespace/connector_secret.rb | 36 ++++++++++ .../api/actions/connector_secret/get_spec.rb | 35 ++++++++++ .../api/actions/connector_secret/post_spec.rb | 35 ++++++++++ 6 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/get.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/post.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/connector_secret.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/get_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/post_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index f588a4a344..5c84443efd 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -88,7 +88,8 @@ def self.included(base) Elasticsearch::API::Profiling, Elasticsearch::API::Simulate, Elasticsearch::API::Connector, - Elasticsearch::API::ConnectorSyncJob + Elasticsearch::API::ConnectorSyncJob, + Elasticsearch::API::ConnectorSecret end # The serializer class diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/get.rb new file mode 100644 index 0000000000..d771793d7e --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/get.rb @@ -0,0 +1,65 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module ConnectorSecret + module Actions + # Retrieves a secret stored by Connectors. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :id The ID of the secret + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see [TODO] + # + def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector_secret.get" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_GET + path = "_connector/_secret/#{Utils.__listify(_id)}" + params = {} + + 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/connector_secret/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/post.rb new file mode 100644 index 0000000000..0678ea25a7 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/post.rb @@ -0,0 +1,57 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module ConnectorSecret + module Actions + # Creates a secret for a Connector. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The secret value to store (*Required*) + # + # @see [TODO] + # + def post(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector_secret.post" } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = "_connector/_secret" + params = {} + + 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/namespace/connector_secret.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/connector_secret.rb new file mode 100644 index 0000000000..b8796af3ae --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/connector_secret.rb @@ -0,0 +1,36 @@ +# 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. + +module Elasticsearch + module API + module ConnectorSecret + module Actions; end + + # Client for the "connector_secret" namespace (includes the {ConnectorSecret::Actions} methods) + # + class ConnectorSecretClient + include Common::Client, Common::Client::Base, ConnectorSecret::Actions + end + + # Proxy method for {ConnectorSecretClient}, available in the receiving object + # + def connector_secret + @connector_secret ||= ConnectorSecretClient.new(self) + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/get_spec.rb new file mode 100644 index 0000000000..c00840c6d1 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/get_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector_secret#get' do + let(:expected_args) do + [ + 'GET', + '_connector/_secret/foo', + {}, + nil, + {}, + { :defined_params=>{ id: 'foo' }, endpoint: 'connector_secret.get' } + ] + end + + it 'performs the request' do + expect(client_double.connector_secret.get(id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/post_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/post_spec.rb new file mode 100644 index 0000000000..fb76ee3022 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/post_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector_secret#post' do + let(:expected_args) do + [ + 'POST', + '_connector/_secret', + {}, + {}, + {}, + { endpoint: 'connector_secret.post' } + ] + end + + it 'performs the request' do + expect(client_double.connector_secret.post(body: {})).to be_a Elasticsearch::API::Response + end +end From e3937fda0a69284622a6dbfb4774ebf85cee79e8 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 30 Jan 2024 14:15:17 +0000 Subject: [PATCH 171/540] Replaces byebug with debug gem --- Gemfile | 2 +- elasticsearch-api/Gemfile | 2 +- elasticsearch-api/spec/spec_helper.rb | 2 +- elasticsearch-api/utils/Gemfile | 2 +- elasticsearch/elasticsearch.gemspec | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 745c7e626c..f5f0bbac4b 100644 --- a/Gemfile +++ b/Gemfile @@ -37,6 +37,6 @@ unless defined?(JRUBY_VERSION) || defined?(Rubinius) end group :development, :test do - gem 'byebug' unless defined?(JRUBY_VERSION) + gem 'debug' unless defined?(JRUBY_VERSION) gem 'rspec' end diff --git a/elasticsearch-api/Gemfile b/elasticsearch-api/Gemfile index 74ca453845..0b2f02be0d 100644 --- a/elasticsearch-api/Gemfile +++ b/elasticsearch-api/Gemfile @@ -30,6 +30,6 @@ group :development do if defined?(JRUBY_VERSION) gem 'pry-nav' else - gem 'pry-byebug' + gem 'debug' end end diff --git a/elasticsearch-api/spec/spec_helper.rb b/elasticsearch-api/spec/spec_helper.rb index e59fefda55..07b37b8792 100644 --- a/elasticsearch-api/spec/spec_helper.rb +++ b/elasticsearch-api/spec/spec_helper.rb @@ -22,7 +22,7 @@ if defined?(JRUBY_VERSION) require 'pry-nav' else - require 'pry-byebug' + require 'debug' end require 'yaml' require 'active_support/isolated_execution_state' unless RUBY_VERSION < '2.7.0' diff --git a/elasticsearch-api/utils/Gemfile b/elasticsearch-api/utils/Gemfile index d9fb5ce455..046609a541 100644 --- a/elasticsearch-api/utils/Gemfile +++ b/elasticsearch-api/utils/Gemfile @@ -17,8 +17,8 @@ source 'https://rubygems.org' -gem 'byebug' unless defined?(JRUBY_VERSION) gem 'coderay' +gem 'debug' unless defined?(JRUBY_VERSION) gem 'json' gem 'multi_json' gem 'pry' diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index a349cc6cbe..f5222aaa4d 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -50,7 +50,7 @@ Gem::Specification.new do |s| s.add_dependency 'base64' s.add_development_dependency 'bundler' - s.add_development_dependency 'byebug' unless defined?(JRUBY_VERSION) || defined?(Rubinius) + s.add_development_dependency 'debug' unless defined?(JRUBY_VERSION) s.add_development_dependency 'pry' s.add_development_dependency 'rake' s.add_development_dependency 'require-prof' unless defined?(JRUBY_VERSION) || defined?(Rubinius) From 6b594a122a7b50108d07a0a21d3e23b27ec2ef95 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 30 Jan 2024 13:47:25 +0000 Subject: [PATCH 172/540] [API] Code Generator: Relocates spec, specific files --- .../spec/elasticsearch/api/perform_request_spec.rb | 2 +- elasticsearch-api/utils/{ => thor}/endpoint_spec.rb | 0 elasticsearch-api/utils/{ => thor}/endpoint_specifics.rb | 0 elasticsearch-api/utils/thor/generate_source.rb | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename elasticsearch-api/utils/{ => thor}/endpoint_spec.rb (100%) rename elasticsearch-api/utils/{ => thor}/endpoint_specifics.rb (100%) diff --git a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb index aac755d569..840866ea9b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' require 'elastic-transport' -require_relative '../../../utils/endpoint_spec' +require_relative '../../../utils/thor/endpoint_spec' require_relative '../../../utils/thor/generator/files_helper' describe 'Perform request args' do diff --git a/elasticsearch-api/utils/endpoint_spec.rb b/elasticsearch-api/utils/thor/endpoint_spec.rb similarity index 100% rename from elasticsearch-api/utils/endpoint_spec.rb rename to elasticsearch-api/utils/thor/endpoint_spec.rb diff --git a/elasticsearch-api/utils/endpoint_specifics.rb b/elasticsearch-api/utils/thor/endpoint_specifics.rb similarity index 100% rename from elasticsearch-api/utils/endpoint_specifics.rb rename to elasticsearch-api/utils/thor/endpoint_specifics.rb diff --git a/elasticsearch-api/utils/thor/generate_source.rb b/elasticsearch-api/utils/thor/generate_source.rb index e0db8a6bc7..ed5b10f127 100644 --- a/elasticsearch-api/utils/thor/generate_source.rb +++ b/elasticsearch-api/utils/thor/generate_source.rb @@ -23,7 +23,7 @@ require 'coderay' require 'pry' require_relative 'generator/files_helper' -require_relative '../endpoint_spec' +require_relative './endpoint_spec' module Elasticsearch module API From c8ede6c93394f79d3aa14d06dacbc2fd77f12238 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 30 Jan 2024 14:04:06 +0000 Subject: [PATCH 173/540] [API] Code generator: Refactors build hash code into helper --- .../utils/thor/generate_source.rb | 37 ++--------- .../utils/thor/generator/build_hash_helper.rb | 64 +++++++++++++++++++ 2 files changed, 68 insertions(+), 33 deletions(-) create mode 100644 elasticsearch-api/utils/thor/generator/build_hash_helper.rb diff --git a/elasticsearch-api/utils/thor/generate_source.rb b/elasticsearch-api/utils/thor/generate_source.rb index ed5b10f127..39a0e96f2d 100644 --- a/elasticsearch-api/utils/thor/generate_source.rb +++ b/elasticsearch-api/utils/thor/generate_source.rb @@ -22,6 +22,7 @@ require 'multi_json' require 'coderay' require 'pry' +require_relative 'generator/build_hash_helper' require_relative 'generator/files_helper' require_relative './endpoint_spec' @@ -47,14 +48,10 @@ class SourceGenerator < Thor method_option :tests, type: :boolean, default: false, desc: 'Generate test files' def generate - @build_hash = if ENV['BUILD_HASH'] - File.read(File.expand_path('../../../tmp/rest-api-spec/build_hash',__dir__)) - else - original_build_hash - end - + @build_hash = BuildHashHelper.build_hash self.class.source_root File.expand_path(__dir__) generate_source + # -- Tree output print_tree if options[:verbose] end @@ -88,33 +85,7 @@ def generate_source end run_rubocop - add_hash - end - - def add_hash - Dir.glob("#{FilesHelper.output_dir}/**/*.rb").each do |file| - content = File.read(file) - new_content = content.gsub(/(^#\sunder\sthe\sLicense.\n#)/) do |_| - match = Regexp.last_match - "#{match[1]}\n#{build_hash_comment}" - end - File.open(file, 'w') { |f| f.puts new_content } - end - end - - def build_hash_comment - [ - "Auto generated from build hash #{@build_hash}", - '@see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec', - '' - ].map { |b| "# #{b}" }.join("\n").strip - end - - def original_build_hash - content = File.read("#{FilesHelper.output_dir}/info.rb") - return unless (match = content.match(/Auto generated from build hash ([a-f0-9]+)/)) - - match[1] + BuildHashHelper.add_hash(@build_hash) end # Create the hierarchy of directories based on API namespaces diff --git a/elasticsearch-api/utils/thor/generator/build_hash_helper.rb b/elasticsearch-api/utils/thor/generator/build_hash_helper.rb new file mode 100644 index 0000000000..bd5d78b59f --- /dev/null +++ b/elasticsearch-api/utils/thor/generator/build_hash_helper.rb @@ -0,0 +1,64 @@ +# 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. + +module Elasticsearch + module API + # Helper for the Elasticsearch build hash in source code docs + module BuildHashHelper + class << self + def build_hash + if ENV['BUILD_HASH'] + File.read(File.expand_path('../../../tmp/rest-api-spec/build_hash',__dir__)) + else + original_build_hash + end + end + + def add_hash(build_hash) + Dir.glob("#{FilesHelper.output_dir}/**/*.rb").each do |file| + content = File.read(file) + new_content = content.gsub(/(^#\sunder\sthe\sLicense.\n#)/) do |_| + match = Regexp.last_match + "#{match[1]}\n#{build_hash_comment(build_hash)}" + end + File.open(file, 'w') { |f| f.puts new_content } + end + end + + def build_hash_comment(build_hash) + [ + "Auto generated from build hash #{build_hash}", + '@see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec', + '' + ].map { |b| "# #{b}" }.join("\n").strip + end + + private + + def original_build_hash + content = File.read("#{FilesHelper.output_dir}/info.rb") + + return unless (match = content.match(/Auto generated from build hash ([a-f0-9]+)/)) + + match[1] + rescue + return 'Unavailable' + end + end + end + end +end From 5925c6938334084b65e03447b6212891a07d75ea Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 30 Jan 2024 14:31:32 +0000 Subject: [PATCH 174/540] [API] Code Generator: Refactors FilesHelper --- .../utils/thor/generator/files_helper.rb | 47 ++++++++++--------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/elasticsearch-api/utils/thor/generator/files_helper.rb b/elasticsearch-api/utils/thor/generator/files_helper.rb index 026a1246a6..be43abc960 100644 --- a/elasticsearch-api/utils/thor/generator/files_helper.rb +++ b/elasticsearch-api/utils/thor/generator/files_helper.rb @@ -22,37 +22,40 @@ module Elasticsearch module API # Helper with file related methods for code generation module FilesHelper + PROJECT_PATH = File.join(File.dirname(__FILE__), '..') SRC_PATH = File.join(PROJECT_PATH, '..', '..', '..', 'tmp/rest-api-spec/api/') OUTPUT_DIR = '../../elasticsearch-api/lib/elasticsearch/api/actions'.freeze TESTS_DIRECTORY = "#{PROJECT_PATH}/../../../tmp/rest-api-spec/test/free".freeze - # Only get JSON files and remove hidden files - def self.files - json_files = Dir.entries(SRC_PATH) + class << self + # Only get JSON files and remove hidden files + def files + json_files = Dir.entries(SRC_PATH) - json_files.reject do |file| - File.extname(file) != '.json' || - File.basename(file) == '_common.json' - end.map { |file| "#{SRC_PATH}#{file}" } - end + json_files.reject do |file| + File.extname(file) != '.json' || + File.basename(file) == '_common.json' + end.map { |file| "#{SRC_PATH}#{file}" } + end - # Path to directory to copy generated files - def self.output_dir - Pathname(OUTPUT_DIR) - end + # Path to directory to copy generated files + def output_dir + Pathname(OUTPUT_DIR) + end - def self.documentation_url(documentation_url) - branch = `git rev-parse --abbrev-ref HEAD` - return documentation_url.gsub(/\/(master|main)\//, "/current/") if branch == "main\n" + def documentation_url(documentation_url) + branch = `git rev-parse --abbrev-ref HEAD` + return documentation_url.gsub(/\/(master|main)\//, "/current/") if branch == "main\n" - regex = /([0-9]{1,2}\.[0-9x]{1,2})/ - version = Elasticsearch::API::VERSION.match(regex)[0] - # TODO - How do we fix this so it doesn't depend on which branch we're running from - if ENV['IGNORE_VERSION'] - documentation_url.gsub(/\/(master|main)\//, "/current/") - else - documentation_url.gsub(/\/(current|master|main)\//, "/#{version}/") + regex = /([0-9]{1,2}\.[0-9x]{1,2})/ + version = Elasticsearch::API::VERSION.match(regex)[0] + # TODO - How do we fix this so it doesn't depend on which branch we're running from + if ENV['IGNORE_VERSION'] + documentation_url.gsub(/\/(master|main)\//, "/current/") + else + documentation_url.gsub(/\/(current|master|main)\//, "/#{version}/") + end end end From 99673efeeffa4182c5438046555d393b28784600 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 30 Jan 2024 14:41:20 +0000 Subject: [PATCH 175/540] [API] Code generator: code cleanup --- elasticsearch-api/utils/thor/generate_source.rb | 9 --------- 1 file changed, 9 deletions(-) diff --git a/elasticsearch-api/utils/thor/generate_source.rb b/elasticsearch-api/utils/thor/generate_source.rb index 39a0e96f2d..2d8a5295e5 100644 --- a/elasticsearch-api/utils/thor/generate_source.rb +++ b/elasticsearch-api/utils/thor/generate_source.rb @@ -88,15 +88,6 @@ def generate_source BuildHashHelper.add_hash(@build_hash) end - # Create the hierarchy of directories based on API namespaces - # - def create_directories(key, value) - return if value['documentation'] - - empty_directory @output.join(key) - create_directory_hierarchy * value.to_a.first - end - def docs_helper(name, info) info['type'] = 'String' if info['type'] == 'enum' # Rename 'enums' to 'strings' info['type'] = 'Integer' if info['type'] == 'int' # Rename 'int' to 'Integer' From 1a81e1609ba3cc53864d80ad6ac2f656c1b44701 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 30 Jan 2024 14:49:22 +0000 Subject: [PATCH 176/540] [API] Code Generator: Refactors documentation helper functions --- .../utils/thor/generate_source.rb | 48 +------------- .../utils/thor/generator/docs_helper.rb | 62 +++++++++++++++++++ .../thor/templates/_documentation_top.erb | 4 +- 3 files changed, 67 insertions(+), 47 deletions(-) create mode 100644 elasticsearch-api/utils/thor/generator/docs_helper.rb diff --git a/elasticsearch-api/utils/thor/generate_source.rb b/elasticsearch-api/utils/thor/generate_source.rb index 2d8a5295e5..aba43f3dc7 100644 --- a/elasticsearch-api/utils/thor/generate_source.rb +++ b/elasticsearch-api/utils/thor/generate_source.rb @@ -23,6 +23,7 @@ require 'coderay' require 'pry' require_relative 'generator/build_hash_helper' +require_relative 'generator/docs_helper' require_relative 'generator/files_helper' require_relative './endpoint_spec' @@ -42,6 +43,7 @@ class SourceGenerator < Thor namespace 'code' include Thor::Actions include EndpointSpecifics + include DocsHelper desc 'generate', 'Generate source code and tests from the REST API JSON specification' method_option :verbose, type: :boolean, default: false, desc: 'Output more information' @@ -65,68 +67,24 @@ def generate_source FilesHelper.files.each do |filepath| @spec = EndpointSpec.new(filepath) say_status 'json', @spec.path, :yellow - # Don't generate code for internal APIs: next if @spec.module_namespace.flatten.first == '_internal' path_to_file = output.join(@spec.module_namespace.join('/')).join("#{@spec.method_name}.rb") dir = output.join(@spec.module_namespace.join('/')) - empty_directory(dir, verbose: false) # Write the file with the ERB template: template('templates/method.erb', path_to_file, force: true) + # Optionals: print_source_code(path_to_file) if options[:verbose] - generate_tests if options[:tests] - - puts end - run_rubocop BuildHashHelper.add_hash(@build_hash) end - def docs_helper(name, info) - info['type'] = 'String' if info['type'] == 'enum' # Rename 'enums' to 'strings' - info['type'] = 'Integer' if info['type'] == 'int' # Rename 'int' to 'Integer' - tipo = info['type'] ? info['type'].capitalize : 'String' - description = info['description'] ? info['description'].strip : '[TODO]' - options = info['options'] ? "(options: #{info['options'].join(', ').strip})" : nil - required = info['required'] ? '(*Required*)' : '' - deprecated = info['deprecated'] ? '*Deprecated*' : '' - optionals = [required, deprecated, options].join(' ').strip - - "# @option arguments [#{tipo}] :#{name} #{description} #{optionals}\n" - end - - def stability_doc_helper(stability) - return if stability == 'stable' - - if stability == 'experimental' - <<~MSG - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - MSG - elsif stability == 'beta' - <<~MSG - # This functionality is in Beta and is subject to change. The design and - # code is less mature than official GA features and is being provided - # as-is with no warranties. Beta features are not subject to the support - # SLA of official GA features. - MSG - else - <<~MSG - # This functionality is subject to potential breaking changes within a - # minor version, meaning that your referencing code may break when this - # library is upgraded. - MSG - end - end - def generate_tests copy_file 'templates/test_helper.rb', @output.join('test').join('test_helper.rb') diff --git a/elasticsearch-api/utils/thor/generator/docs_helper.rb b/elasticsearch-api/utils/thor/generator/docs_helper.rb new file mode 100644 index 0000000000..fc41b885da --- /dev/null +++ b/elasticsearch-api/utils/thor/generator/docs_helper.rb @@ -0,0 +1,62 @@ +# 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. + +module Elasticsearch + module API + # Helper with file related methods for code generation + module DocsHelper + def docs(name, info) + info['type'] = 'String' if info['type'] == 'enum' # Rename 'enums' to 'strings' + info['type'] = 'Integer' if info['type'] == 'int' # Rename 'int' to 'Integer' + tipo = info['type'] ? info['type'].capitalize : 'String' + description = info['description'] ? info['description'].strip : '[TODO]' + options = info['options'] ? "(options: #{info['options'].join(', ').strip})" : nil + required = info['required'] ? '(*Required*)' : '' + deprecated = info['deprecated'] ? '*Deprecated*' : '' + optionals = [required, deprecated, options].join(' ').strip + + "# @option arguments [#{tipo}] :#{name} #{description} #{optionals}\n" + end + + def stability_doc_helper(stability) + return if stability == 'stable' + + if stability == 'experimental' + <<~MSG + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + MSG + elsif stability == 'beta' + <<~MSG + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. + MSG + else + <<~MSG + # This functionality is subject to potential breaking changes within a + # minor version, meaning that your referencing code may break when this + # library is upgraded. + MSG + end + end + end + end +end diff --git a/elasticsearch-api/utils/thor/templates/_documentation_top.erb b/elasticsearch-api/utils/thor/templates/_documentation_top.erb index 3099dcb8f9..db7210eefe 100644 --- a/elasticsearch-api/utils/thor/templates/_documentation_top.erb +++ b/elasticsearch-api/utils/thor/templates/_documentation_top.erb @@ -25,12 +25,12 @@ <%= ' '*(@spec.namespace_depth+3) %># <%- unless @spec.path_parts.nil? || @spec.path_parts.empty? %><%# URL parts -%> <%- @spec.path_parts.each do |name, info| -%> - <%= docs_helper(name, info) -%> + <%= docs(name, info) -%> <%- end -%> <%- end -%><%# Body -%> <%# URL parameters -%> <%- @spec.params.each do |name, info| -%> - <%= docs_helper(name, info) unless (!@spec.path_parts.empty? && @spec.path_parts.keys.include?(name)) -%> + <%= docs(name, info) unless (!@spec.path_parts.empty? && @spec.path_parts.keys.include?(name)) -%> <%- end -%> # @option arguments [Hash] :headers Custom HTTP headers <%- if @spec.body -%> From d8814389d73ba360b488f56e4c7092abacfec85d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 30 Jan 2024 15:36:13 +0000 Subject: [PATCH 177/540] [API] Test Runner: Skips cluster.desired_nodes tests --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 66790fcf02..7a03e79f8b 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -31,6 +31,12 @@ - :file: 'cluster.desired_nodes/10_basic.yml' :description: 'Test update desired nodes is idempotent with different order' +- + :file: 'cluster.desired_nodes/10_basic.yml' + :description: 'Test node version must be at least the current master version' +- + :file: 'cluster.desired_nodes/10_basic.yml' + :description: 'Test node version must have content' - :file: 'search.vectors/40_knn_search.yml' :description: 'Direct kNN queries are disallowed' From 0644fe067d5d56eff23d41ff3ceb42583056d503 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 31 Jan 2024 16:41:35 +0000 Subject: [PATCH 178/540] [API] Adds connector_secret.delete --- .../api/actions/connector_secret/delete.rb | 65 +++++++++++++++++++ .../actions/connector_secret/delete_spec.rb | 35 ++++++++++ 2 files changed, 100 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/delete.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/delete_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/delete.rb new file mode 100644 index 0000000000..0b659db688 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/delete.rb @@ -0,0 +1,65 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module ConnectorSecret + module Actions + # Deletes a connector secret. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :id The ID of the secret + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see [TODO] + # + def delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "connector_secret.delete" } + + defined_params = [:id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_DELETE + path = "_connector/_secret/#{Utils.__listify(_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/delete_spec.rb new file mode 100644 index 0000000000..af1070c73b --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/delete_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector_secret#get' do + let(:expected_args) do + [ + 'DELETE', + '_connector/_secret/foo', + {}, + nil, + {}, + { :defined_params=>{ id: 'foo' }, endpoint: 'connector_secret.delete' } + ] + end + + it 'performs the request' do + expect(client_double.connector_secret.delete(id: 'foo')).to be_a Elasticsearch::API::Response + end +end From 98673d27c9c26ff5e5b109ab9e456ae0a0bb56a9 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 31 Jan 2024 16:28:11 +0000 Subject: [PATCH 179/540] Update badges in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8dc0141d1d..11e07a57b1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Elasticsearch -[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.10](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.10.yml/badge.svg?branch=8.10)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.10.yml) [![8.11](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.11.yml/badge.svg?branch=8.11)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.11.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) +[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.11](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.11.yml/badge.svg?branch=8.11)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.11.yml) [![8.12](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.12.yml/badge.svg?branch=8.12)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.12.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) **[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)** or From a76da9973bff3734906cc6001de4e031ed99360a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 1 Feb 2024 06:02:55 +0000 Subject: [PATCH 180/540] [API] Adds keep_alive boolean to async_search.status Adds jop_type List to connector_sync_job.list --- .../lib/elasticsearch/api/actions/async_search/status.rb | 3 ++- .../lib/elasticsearch/api/actions/connector_sync_job/list.rb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb index 6080a251dd..f04611a82c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb @@ -25,6 +25,7 @@ module Actions # Retrieves the status of a previously submitted async search request given its ID. # # @option arguments [String] :id The async search ID + # @option arguments [Time] :keep_alive Specify the time interval in which the results (partial or final) for this search will be available # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html @@ -49,7 +50,7 @@ def status(arguments = {}) method = Elasticsearch::API::HTTP_GET path = "_async_search/status/#{Utils.__listify(_id)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb index 20a0708f9f..a85827521d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb @@ -32,6 +32,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of results to get (default: 100) # @option arguments [String] :status Sync job status, which sync jobs are fetched for # @option arguments [String] :connector_id Id of the connector to fetch the sync jobs for + # @option arguments [List] :job_type A comma-separated list of job types # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-sync-jobs-api.html From 685171bb5a3d6642437ad9f5a94f4d8686ca2919 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 1 Feb 2024 16:08:52 +0000 Subject: [PATCH 181/540] [API] Code Generator: remove namespace depth in templates, RuboCop deals with that --- elasticsearch-api/utils/thor/endpoint_spec.rb | 3 +-- .../utils/thor/endpoint_specifics.rb | 10 ++++---- .../utils/thor/templates/_body.erb | 2 +- .../thor/templates/_documentation_top.erb | 19 +++++++-------- .../utils/thor/templates/_method_setup.erb | 10 ++++---- .../utils/thor/templates/_perform_request.erb | 2 +- .../utils/thor/templates/method.erb | 24 +++++++++---------- 7 files changed, 34 insertions(+), 36 deletions(-) diff --git a/elasticsearch-api/utils/thor/endpoint_spec.rb b/elasticsearch-api/utils/thor/endpoint_spec.rb index 748c2252a0..30a06a5562 100644 --- a/elasticsearch-api/utils/thor/endpoint_spec.rb +++ b/elasticsearch-api/utils/thor/endpoint_spec.rb @@ -32,7 +32,7 @@ def initialize(filepath) full_namespace = parse_full_namespace @namespace_depth = full_namespace.size > 0 ? full_namespace.size - 1 : 0 - @module_namespace = full_namespace[0, namespace_depth] + @module_namespace = full_namespace[0, @namespace_depth] @method_name = full_namespace.last @path_parts = parse_endpoint_parts(@spec) @@ -56,7 +56,6 @@ def initialize(filepath) :http_path, :required_parts, :http_method, - :namespace_depth, :path_params, :perform_request_opts diff --git a/elasticsearch-api/utils/thor/endpoint_specifics.rb b/elasticsearch-api/utils/thor/endpoint_specifics.rb index acda999e46..0b3cc41547 100644 --- a/elasticsearch-api/utils/thor/endpoint_specifics.rb +++ b/elasticsearch-api/utils/thor/endpoint_specifics.rb @@ -136,11 +136,11 @@ def msearch_template_body_helper def bulk_body_helper <<~SRC - if body.is_a? Array - payload = Elasticsearch::API::Utils.__bulkify(body) - else - payload = body - end + payload = if body.is_a? Array + Elasticsearch::API::Utils.__bulkify(body) + else + body + end SRC end diff --git a/elasticsearch-api/utils/thor/templates/_body.erb b/elasticsearch-api/utils/thor/templates/_body.erb index 5ffd9e96aa..6e8072b6be 100644 --- a/elasticsearch-api/utils/thor/templates/_body.erb +++ b/elasticsearch-api/utils/thor/templates/_body.erb @@ -30,5 +30,5 @@ when 'mtermvectors' <%- when 'ml.find_file_structure' %> body = Utils.__bulkify(arguments.delete(:body)) <%- else -%> - <%= ' '*(@spec.namespace_depth+3) %>body = <%= @spec.body.nil? ? 'nil' : 'arguments.delete(:body)' %> + body = <%= @spec.body.nil? ? 'nil' : 'arguments.delete(:body)' %> <%- end -%> diff --git a/elasticsearch-api/utils/thor/templates/_documentation_top.erb b/elasticsearch-api/utils/thor/templates/_documentation_top.erb index db7210eefe..eb0e6822c2 100644 --- a/elasticsearch-api/utils/thor/templates/_documentation_top.erb +++ b/elasticsearch-api/utils/thor/templates/_documentation_top.erb @@ -17,12 +17,12 @@ # under the License. %> <%- if @spec.documentation['description'] -%> - <%= ' '*(@spec.namespace_depth+3) %># <%= @spec.documentation['description'] .gsub("\n", "\n#{' '*(@spec.namespace_depth+3)}# ") -%> + # <%= @spec.documentation['description'].gsub("\n", "\n # ") -%> <%- else %> - <%= ' '*(@spec.namespace_depth+3) %># TODO: Description + # TODO: Description <%- end %> <%= stability_doc_helper(@spec.stability) -%> -<%= ' '*(@spec.namespace_depth+3) %># +# <%- unless @spec.path_parts.nil? || @spec.path_parts.empty? %><%# URL parts -%> <%- @spec.path_parts.each do |name, info| -%> <%= docs(name, info) -%> @@ -37,10 +37,9 @@ <%- if @spec.method_name == 'bulk' -%> <%= bulk_doc_helper(@spec.body['description']) -%> <%- else -%> - <%= ' '*(@spec.namespace_depth+1) + - '# @option arguments [Hash] :body ' + (@spec.body['description'] ? - @spec.body['description'].strip : 'TODO: Description') + - (@spec.body['required'] ? ' (*Required*)' : '') + "\n" + <%= '# @option arguments [Hash] :body ' + (@spec.body['description'] ? + @spec.body['description'].strip : 'TODO: Description') + + (@spec.body['required'] ? ' (*Required*)' : '') + "\n" -%> <%- end -%> <%- end -%> @@ -51,7 +50,7 @@ # Deprecated since version <%= @spec.deprecation_note['version'] %> # <% end -%> -<%= ' '*(@spec.namespace_depth+3) -%># +# <%# Documentation link -%> -<%= ' '*(@spec.namespace_depth+3) %># @see <%= @spec.documentation['url'] ? Elasticsearch::API::FilesHelper.documentation_url(@spec.documentation['url']) : "[TODO]" %> -<%= ' '*(@spec.namespace_depth+3) %># +# @see <%= @spec.documentation['url'] ? Elasticsearch::API::FilesHelper.documentation_url(@spec.documentation['url']) : "[TODO]" %> +# diff --git a/elasticsearch-api/utils/thor/templates/_method_setup.erb b/elasticsearch-api/utils/thor/templates/_method_setup.erb index 4739f7a4a6..3c74d98f43 100644 --- a/elasticsearch-api/utils/thor/templates/_method_setup.erb +++ b/elasticsearch-api/utils/thor/templates/_method_setup.erb @@ -18,19 +18,19 @@ %> <%- @spec.path_parts.each do |name, _| %> <%- unless @spec.method_name == 'get_field_mapping' && name == 'fields' %> - <%= ' '*(@spec.namespace_depth+3) + "_#{name}" %> = arguments.delete(:<%=name %>) + <%= "_#{name}" %> = arguments.delete(:<%=name %>) <%- end -%> <%- end -%> -<%= ' '*(@spec.namespace_depth+4) %>method = <%= @spec.http_method %> +method = <%= @spec.http_method %> <%- if @spec.method_name == 'termvectors' %> endpoint = arguments.delete(:endpoint) || '_termvectors' <%- end -%> -<%= ' '*(@spec.namespace_depth+4) %>path = <%= @spec.http_path %> +path = <%= @spec.http_path %> <%- if !@spec.params.empty? || needs_ignore_404?(@spec.endpoint_name) || needs_complex_ignore_404?(@spec.endpoint_name)-%> - <%= ' '*(@spec.namespace_depth+4) %>params = Utils.process_params(arguments) + params = Utils.process_params(arguments) <%- else -%> - <%= ' '*(@spec.namespace_depth+4) %>params = {} + params = {} <%- end -%> <%- @spec.specific_params.each do |param| -%> <%= param %> diff --git a/elasticsearch-api/utils/thor/templates/_perform_request.erb b/elasticsearch-api/utils/thor/templates/_perform_request.erb index fcb6bb4f03..cfd50a9d99 100644 --- a/elasticsearch-api/utils/thor/templates/_perform_request.erb +++ b/elasticsearch-api/utils/thor/templates/_perform_request.erb @@ -47,4 +47,4 @@ ) <%- end -%> <%- end -%> -<%= ' '*(@spec.namespace_depth+3) %>end +end diff --git a/elasticsearch-api/utils/thor/templates/method.erb b/elasticsearch-api/utils/thor/templates/method.erb index ef7218792d..c3d307a49c 100644 --- a/elasticsearch-api/utils/thor/templates/method.erb +++ b/elasticsearch-api/utils/thor/templates/method.erb @@ -16,14 +16,14 @@ # under the License. # module Elasticsearch -<%= ' '*(@spec.namespace_depth) %>module API +module API <%- @spec.module_namespace.each_with_index do |name, i| -%> <%= ' '*i %>module <%= module_name_helper(name) %> <%- end -%> -<%= ' '*(@spec.namespace_depth+2) %>module Actions +module Actions <%= ERB.new(File.new("./thor/templates/_documentation_top.erb").read, trim_mode: '-').result(binding) -%> <%# Method definition -%> -<%= ' '*(@spec.namespace_depth+3) -%>def <%= @spec.method_name %>(arguments = {}) +def <%= @spec.method_name %>(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "<%= @spec.endpoint_name %>" } <%- unless @spec.path_params.empty? %> defined_params =<%= @spec.path_params %>.inject({}) do |set_variables, variable| @@ -34,12 +34,12 @@ module Elasticsearch <%- end %> <%- %> <%- if @spec.endpoint_name == 'create' -%> - <%= ' '*(@spec.namespace_depth+3) %>if arguments[:id] - <%= ' '*(@spec.namespace_depth+3) %> index arguments.update op_type: 'create' - <%= ' '*(@spec.namespace_depth+3) %>else - <%= ' '*(@spec.namespace_depth+3) %> index arguments - <%= ' '*(@spec.namespace_depth+3) %>end - <%= ' '*(@spec.namespace_depth+2) %>end +if arguments[:id] + index arguments.update op_type: 'create' +else + index arguments +end +end <%- else -%> <%- if @spec.method_name == 'get_field_mapping' %> arguments = arguments.clone @@ -47,7 +47,7 @@ module Elasticsearch raise ArgumentError, "Required argument 'field' missing" unless _fields <%- else -%> <%- @spec.required_parts.each do |required| %><%# Arguments -%> - <%= ' '*(@spec.namespace_depth+3) + "raise ArgumentError, \"Required argument '#{required}' missing\" unless arguments[:#{required}]" + "\n" -%> + <%= "raise ArgumentError, \"Required argument '#{required}' missing\" unless arguments[:#{required}]" + "\n" -%> <%- end -%> arguments = arguments.clone <%- end -%> @@ -70,10 +70,10 @@ module Elasticsearch termvectors(arguments.merge endpoint: '_termvector') end <%- end -%> - <%- @spec.namespace_depth.downto(1) do |i| -%> -<%= ' '*(i-1) %>end + <%= ' '*(i-1) %>end <%- end if @spec.namespace_depth > 0 -%> + end end end From 1e5b5764ce7c29157dafbe81e681ef54c281a67b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 1 Feb 2024 16:10:13 +0000 Subject: [PATCH 182/540] [API] Code Generator: Adds -a to RuboCop to autofix moar code --- elasticsearch-api/utils/thor/generate_source.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/utils/thor/generate_source.rb b/elasticsearch-api/utils/thor/generate_source.rb index aba43f3dc7..df60b0004c 100644 --- a/elasticsearch-api/utils/thor/generate_source.rb +++ b/elasticsearch-api/utils/thor/generate_source.rb @@ -120,7 +120,7 @@ def cleanup_directory!(output) end def run_rubocop - system("rubocop -c ./thor/.rubocop.yml --format autogenconf -x #{FilesHelper::output_dir}") + system("rubocop -c ./thor/.rubocop.yml --format autogenconf -a #{FilesHelper::output_dir}") end end end From a2798c648cdfc849a3c97a8b13d868a4bcf0dc19 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 1 Feb 2024 16:19:08 +0000 Subject: [PATCH 183/540] [API] Addresses minimal RuboCop offenses in generated code --- .../api/actions/async_search/delete.rb | 5 ++--- .../api/actions/async_search/get.rb | 5 ++--- .../api/actions/async_search/status.rb | 5 ++--- .../api/actions/async_search/submit.rb | 7 +++---- .../autoscaling/delete_autoscaling_policy.rb | 5 ++--- .../autoscaling/get_autoscaling_capacity.rb | 4 ++-- .../autoscaling/get_autoscaling_policy.rb | 5 ++--- .../autoscaling/put_autoscaling_policy.rb | 5 ++--- .../lib/elasticsearch/api/actions/bulk.rb | 19 ++++++++--------- .../elasticsearch/api/actions/cat/aliases.rb | 7 +++---- .../api/actions/cat/allocation.rb | 7 +++---- .../api/actions/cat/component_templates.rb | 7 +++---- .../elasticsearch/api/actions/cat/count.rb | 7 +++---- .../api/actions/cat/fielddata.rb | 7 +++---- .../elasticsearch/api/actions/cat/health.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/help.rb | 4 ++-- .../elasticsearch/api/actions/cat/indices.rb | 7 +++---- .../elasticsearch/api/actions/cat/master.rb | 4 ++-- .../actions/cat/ml_data_frame_analytics.rb | 7 +++---- .../api/actions/cat/ml_datafeeds.rb | 7 +++---- .../elasticsearch/api/actions/cat/ml_jobs.rb | 7 +++---- .../api/actions/cat/ml_trained_models.rb | 7 +++---- .../api/actions/cat/nodeattrs.rb | 4 ++-- .../elasticsearch/api/actions/cat/nodes.rb | 4 ++-- .../api/actions/cat/pending_tasks.rb | 4 ++-- .../elasticsearch/api/actions/cat/plugins.rb | 4 ++-- .../elasticsearch/api/actions/cat/recovery.rb | 7 +++---- .../api/actions/cat/repositories.rb | 4 ++-- .../elasticsearch/api/actions/cat/segments.rb | 7 +++---- .../elasticsearch/api/actions/cat/shards.rb | 7 +++---- .../api/actions/cat/snapshots.rb | 7 +++---- .../elasticsearch/api/actions/cat/tasks.rb | 4 ++-- .../api/actions/cat/templates.rb | 7 +++---- .../api/actions/cat/thread_pool.rb | 7 +++---- .../api/actions/cat/transforms.rb | 7 +++---- .../elasticsearch/api/actions/clear_scroll.rb | 11 +++++----- .../api/actions/close_point_in_time.rb | 4 ++-- .../api/actions/cluster/allocation_explain.rb | 4 ++-- .../cluster/delete_component_template.rb | 5 ++--- .../delete_voting_config_exclusions.rb | 4 ++-- .../cluster/exists_component_template.rb | 7 +++---- .../actions/cluster/get_component_template.rb | 7 +++---- .../api/actions/cluster/get_settings.rb | 4 ++-- .../api/actions/cluster/health.rb | 7 +++---- .../elasticsearch/api/actions/cluster/info.rb | 5 ++--- .../api/actions/cluster/pending_tasks.rb | 4 ++-- .../cluster/post_voting_config_exclusions.rb | 4 ++-- .../actions/cluster/put_component_template.rb | 5 ++--- .../api/actions/cluster/put_settings.rb | 4 ++-- .../api/actions/cluster/remote_info.rb | 4 ++-- .../api/actions/cluster/reroute.rb | 4 ++-- .../api/actions/cluster/state.rb | 7 +++---- .../api/actions/cluster/stats.rb | 7 +++---- .../api/actions/connector/check_in.rb | 5 ++--- .../api/actions/connector/delete.rb | 5 ++--- .../api/actions/connector/get.rb | 5 ++--- .../api/actions/connector/last_sync.rb | 5 ++--- .../api/actions/connector/list.rb | 4 ++-- .../api/actions/connector/post.rb | 4 ++-- .../api/actions/connector/put.rb | 5 ++--- .../actions/connector/update_configuration.rb | 5 ++--- .../api/actions/connector/update_error.rb | 5 ++--- .../api/actions/connector/update_filtering.rb | 5 ++--- .../api/actions/connector/update_name.rb | 5 ++--- .../api/actions/connector/update_native.rb | 5 ++--- .../api/actions/connector/update_pipeline.rb | 5 ++--- .../actions/connector/update_scheduling.rb | 5 ++--- .../actions/connector/update_service_type.rb | 5 ++--- .../api/actions/connector_secret/delete.rb | 5 ++--- .../api/actions/connector_secret/get.rb | 5 ++--- .../api/actions/connector_secret/post.rb | 4 ++-- .../api/actions/connector_sync_job/cancel.rb | 11 +++++----- .../actions/connector_sync_job/check_in.rb | 11 +++++----- .../api/actions/connector_sync_job/delete.rb | 11 +++++----- .../api/actions/connector_sync_job/error.rb | 11 +++++----- .../api/actions/connector_sync_job/get.rb | 11 +++++----- .../api/actions/connector_sync_job/list.rb | 4 ++-- .../api/actions/connector_sync_job/post.rb | 4 ++-- .../connector_sync_job/update_stats.rb | 11 +++++----- .../lib/elasticsearch/api/actions/count.rb | 17 +++++++-------- .../lib/elasticsearch/api/actions/create.rb | 5 ++--- .../delete_auto_follow_pattern.rb | 5 ++--- .../cross_cluster_replication/follow.rb | 5 ++--- .../cross_cluster_replication/follow_info.rb | 5 ++--- .../cross_cluster_replication/follow_stats.rb | 5 ++--- .../forget_follower.rb | 5 ++--- .../get_auto_follow_pattern.rb | 7 +++---- .../pause_auto_follow_pattern.rb | 5 ++--- .../cross_cluster_replication/pause_follow.rb | 5 ++--- .../put_auto_follow_pattern.rb | 5 ++--- .../resume_auto_follow_pattern.rb | 5 ++--- .../resume_follow.rb | 5 ++--- .../cross_cluster_replication/stats.rb | 4 ++-- .../cross_cluster_replication/unfollow.rb | 5 ++--- .../dangling_indices/delete_dangling_index.rb | 5 ++--- .../dangling_indices/import_dangling_index.rb | 5 ++--- .../dangling_indices/list_dangling_indices.rb | 4 ++-- .../lib/elasticsearch/api/actions/delete.rb | 9 ++++---- .../api/actions/delete_by_query.rb | 5 ++--- .../api/actions/delete_by_query_rethrottle.rb | 5 ++--- .../api/actions/delete_script.rb | 5 ++--- .../api/actions/enrich/delete_policy.rb | 5 ++--- .../api/actions/enrich/execute_policy.rb | 5 ++--- .../api/actions/enrich/get_policy.rb | 7 +++---- .../api/actions/enrich/put_policy.rb | 5 ++--- .../elasticsearch/api/actions/enrich/stats.rb | 4 ++-- .../elasticsearch/api/actions/eql/delete.rb | 5 ++--- .../lib/elasticsearch/api/actions/eql/get.rb | 5 ++--- .../api/actions/eql/get_status.rb | 5 ++--- .../elasticsearch/api/actions/eql/search.rb | 5 ++--- .../api/actions/esql/async_query.rb | 4 ++-- .../api/actions/esql/async_query_get.rb | 5 ++--- .../elasticsearch/api/actions/esql/query.rb | 4 ++-- .../lib/elasticsearch/api/actions/exists.rb | 9 ++++---- .../api/actions/exists_source.rb | 7 +++---- .../lib/elasticsearch/api/actions/explain.rb | 7 +++---- .../api/actions/features/get_features.rb | 4 ++-- .../api/actions/features/reset_features.rb | 4 ++-- .../elasticsearch/api/actions/field_caps.rb | 17 +++++++-------- .../api/actions/fleet/delete_secret.rb | 5 ++--- .../api/actions/fleet/get_secret.rb | 5 ++--- .../api/actions/fleet/global_checkpoints.rb | 5 ++--- .../api/actions/fleet/msearch.rb | 21 ++++++++----------- .../api/actions/fleet/post_secret.rb | 4 ++-- .../elasticsearch/api/actions/fleet/search.rb | 9 ++++---- .../lib/elasticsearch/api/actions/get.rb | 9 ++++---- .../elasticsearch/api/actions/get_script.rb | 5 ++--- .../api/actions/get_script_context.rb | 4 ++-- .../api/actions/get_script_languages.rb | 4 ++-- .../elasticsearch/api/actions/get_source.rb | 5 ++--- .../api/actions/graph/explore.rb | 9 ++++---- .../api/actions/health_report.rb | 7 +++---- .../lib/elasticsearch/api/actions/index.rb | 5 ++--- .../delete_lifecycle.rb | 5 ++--- .../explain_lifecycle.rb | 5 ++--- .../get_lifecycle.rb | 7 +++---- .../index_lifecycle_management/get_status.rb | 4 ++-- .../migrate_to_data_tiers.rb | 4 ++-- .../move_to_step.rb | 5 ++--- .../put_lifecycle.rb | 5 ++--- .../remove_policy.rb | 5 ++--- .../index_lifecycle_management/retry.rb | 5 ++--- .../index_lifecycle_management/start.rb | 4 ++-- .../index_lifecycle_management/stop.rb | 4 ++-- .../api/actions/indices/add_block.rb | 5 ++--- .../api/actions/indices/analyze.rb | 17 +++++++-------- .../api/actions/indices/clear_cache.rb | 7 +++---- .../api/actions/indices/clone.rb | 5 ++--- .../api/actions/indices/close.rb | 5 ++--- .../api/actions/indices/create.rb | 5 ++--- .../api/actions/indices/create_data_stream.rb | 5 ++--- .../api/actions/indices/data_streams_stats.rb | 7 +++---- .../api/actions/indices/delete.rb | 9 ++++---- .../api/actions/indices/delete_alias.rb | 9 +++----- .../actions/indices/delete_data_lifecycle.rb | 5 ++--- .../api/actions/indices/delete_data_stream.rb | 5 ++--- .../actions/indices/delete_index_template.rb | 5 ++--- .../api/actions/indices/delete_template.rb | 9 ++++---- .../api/actions/indices/disk_usage.rb | 5 ++--- .../api/actions/indices/downsample.rb | 5 ++--- .../api/actions/indices/exists.rb | 9 ++++---- .../api/actions/indices/exists_alias.rb | 9 ++++---- .../actions/indices/exists_index_template.rb | 7 +++---- .../api/actions/indices/exists_template.rb | 9 ++++---- .../actions/indices/explain_data_lifecycle.rb | 5 ++--- .../api/actions/indices/field_usage_stats.rb | 5 ++--- .../api/actions/indices/flush.rb | 7 +++---- .../api/actions/indices/forcemerge.rb | 7 +++---- .../elasticsearch/api/actions/indices/get.rb | 5 ++--- .../api/actions/indices/get_alias.rb | 7 +++---- .../api/actions/indices/get_data_lifecycle.rb | 5 ++--- .../api/actions/indices/get_data_stream.rb | 7 +++---- .../api/actions/indices/get_field_mapping.rb | 5 ++--- .../api/actions/indices/get_index_template.rb | 7 +++---- .../api/actions/indices/get_mapping.rb | 7 +++---- .../api/actions/indices/get_settings.rb | 7 +++---- .../api/actions/indices/get_template.rb | 7 +++---- .../actions/indices/migrate_to_data_stream.rb | 5 ++--- .../api/actions/indices/modify_data_stream.rb | 4 ++-- .../elasticsearch/api/actions/indices/open.rb | 5 ++--- .../actions/indices/promote_data_stream.rb | 5 ++--- .../api/actions/indices/put_alias.rb | 9 +++----- .../api/actions/indices/put_data_lifecycle.rb | 5 ++--- .../api/actions/indices/put_index_template.rb | 5 ++--- .../api/actions/indices/put_mapping.rb | 5 ++--- .../api/actions/indices/put_settings.rb | 7 +++---- .../api/actions/indices/put_template.rb | 5 ++--- .../api/actions/indices/recovery.rb | 7 +++---- .../api/actions/indices/refresh.rb | 7 +++---- .../indices/reload_search_analyzers.rb | 5 ++--- .../api/actions/indices/resolve_index.rb | 5 ++--- .../api/actions/indices/rollover.rb | 5 ++--- .../api/actions/indices/segments.rb | 7 +++---- .../api/actions/indices/shard_stores.rb | 7 +++---- .../api/actions/indices/shrink.rb | 5 ++--- .../indices/simulate_index_template.rb | 5 ++--- .../api/actions/indices/simulate_template.rb | 7 +++---- .../api/actions/indices/split.rb | 5 ++--- .../api/actions/indices/stats.rb | 7 +++---- .../api/actions/indices/unfreeze.rb | 5 ++--- .../api/actions/indices/update_aliases.rb | 4 ++-- .../api/actions/indices/validate_query.rb | 17 +++++++-------- .../api/actions/inference/delete_model.rb | 5 ++--- .../api/actions/inference/get_model.rb | 5 ++--- .../api/actions/inference/inference.rb | 5 ++--- .../api/actions/inference/put_model.rb | 5 ++--- .../lib/elasticsearch/api/actions/info.rb | 4 ++-- .../api/actions/ingest/delete_pipeline.rb | 5 ++--- .../api/actions/ingest/geo_ip_stats.rb | 4 ++-- .../api/actions/ingest/get_pipeline.rb | 7 +++---- .../api/actions/ingest/processor_grok.rb | 4 ++-- .../api/actions/ingest/put_pipeline.rb | 5 ++--- .../api/actions/ingest/simulate.rb | 7 +++---- .../elasticsearch/api/actions/knn_search.rb | 9 ++++---- .../api/actions/license/delete.rb | 4 ++-- .../elasticsearch/api/actions/license/get.rb | 4 ++-- .../api/actions/license/get_basic_status.rb | 4 ++-- .../api/actions/license/get_trial_status.rb | 4 ++-- .../elasticsearch/api/actions/license/post.rb | 4 ++-- .../api/actions/license/post_start_basic.rb | 4 ++-- .../api/actions/license/post_start_trial.rb | 4 ++-- .../api/actions/logstash/delete_pipeline.rb | 5 ++--- .../api/actions/logstash/get_pipeline.rb | 7 +++---- .../api/actions/logstash/put_pipeline.rb | 5 ++--- .../clear_trained_model_deployment_cache.rb | 5 ++--- .../api/actions/machine_learning/close_job.rb | 5 ++--- .../machine_learning/delete_calendar.rb | 5 ++--- .../machine_learning/delete_calendar_event.rb | 5 ++--- .../machine_learning/delete_calendar_job.rb | 5 ++--- .../delete_data_frame_analytics.rb | 5 ++--- .../machine_learning/delete_datafeed.rb | 5 ++--- .../machine_learning/delete_expired_data.rb | 7 +++---- .../actions/machine_learning/delete_filter.rb | 5 ++--- .../machine_learning/delete_forecast.rb | 5 ++--- .../actions/machine_learning/delete_job.rb | 5 ++--- .../machine_learning/delete_model_snapshot.rb | 5 ++--- .../machine_learning/delete_trained_model.rb | 5 ++--- .../delete_trained_model_alias.rb | 5 ++--- .../machine_learning/estimate_model_memory.rb | 4 ++-- .../machine_learning/evaluate_data_frame.rb | 4 ++-- .../explain_data_frame_analytics.rb | 15 +++++++------ .../api/actions/machine_learning/flush_job.rb | 5 ++--- .../api/actions/machine_learning/forecast.rb | 5 ++--- .../actions/machine_learning/get_buckets.rb | 15 +++++++------ .../machine_learning/get_calendar_events.rb | 5 ++--- .../actions/machine_learning/get_calendars.rb | 15 +++++++------ .../machine_learning/get_categories.rb | 15 +++++++------ .../get_data_frame_analytics.rb | 7 +++---- .../get_data_frame_analytics_stats.rb | 7 +++---- .../machine_learning/get_datafeed_stats.rb | 7 +++---- .../actions/machine_learning/get_datafeeds.rb | 7 +++---- .../actions/machine_learning/get_filters.rb | 7 +++---- .../machine_learning/get_influencers.rb | 7 +++---- .../actions/machine_learning/get_job_stats.rb | 7 +++---- .../api/actions/machine_learning/get_jobs.rb | 7 +++---- .../machine_learning/get_memory_stats.rb | 7 +++---- .../get_model_snapshot_upgrade_stats.rb | 5 ++--- .../machine_learning/get_model_snapshots.rb | 15 +++++++------ .../machine_learning/get_overall_buckets.rb | 7 +++---- .../actions/machine_learning/get_records.rb | 7 +++---- .../machine_learning/get_trained_models.rb | 7 +++---- .../get_trained_models_stats.rb | 7 +++---- .../machine_learning/infer_trained_model.rb | 9 +++----- .../api/actions/machine_learning/info.rb | 4 ++-- .../api/actions/machine_learning/open_job.rb | 5 ++--- .../machine_learning/post_calendar_events.rb | 5 ++--- .../api/actions/machine_learning/post_data.rb | 5 ++--- .../preview_data_frame_analytics.rb | 15 +++++++------ .../machine_learning/preview_datafeed.rb | 15 +++++++------ .../actions/machine_learning/put_calendar.rb | 5 ++--- .../machine_learning/put_calendar_job.rb | 5 ++--- .../put_data_frame_analytics.rb | 5 ++--- .../actions/machine_learning/put_datafeed.rb | 5 ++--- .../actions/machine_learning/put_filter.rb | 5 ++--- .../api/actions/machine_learning/put_job.rb | 5 ++--- .../machine_learning/put_trained_model.rb | 5 ++--- .../put_trained_model_alias.rb | 5 ++--- .../put_trained_model_definition_part.rb | 5 ++--- .../put_trained_model_vocabulary.rb | 5 ++--- .../api/actions/machine_learning/reset_job.rb | 5 ++--- .../machine_learning/revert_model_snapshot.rb | 5 ++--- .../machine_learning/set_upgrade_mode.rb | 4 ++-- .../start_data_frame_analytics.rb | 5 ++--- .../machine_learning/start_datafeed.rb | 5 ++--- .../start_trained_model_deployment.rb | 5 ++--- .../stop_data_frame_analytics.rb | 5 ++--- .../actions/machine_learning/stop_datafeed.rb | 5 ++--- .../stop_trained_model_deployment.rb | 5 ++--- .../update_data_frame_analytics.rb | 5 ++--- .../machine_learning/update_datafeed.rb | 5 ++--- .../actions/machine_learning/update_filter.rb | 5 ++--- .../actions/machine_learning/update_job.rb | 5 ++--- .../machine_learning/update_model_snapshot.rb | 5 ++--- .../update_trained_model_deployment.rb | 5 ++--- .../machine_learning/upgrade_job_snapshot.rb | 5 ++--- .../api/actions/machine_learning/validate.rb | 4 ++-- .../machine_learning/validate_detector.rb | 4 ++-- .../lib/elasticsearch/api/actions/mget.rb | 7 +++---- .../api/actions/migration/deprecations.rb | 7 +++---- .../migration/get_feature_upgrade_status.rb | 4 ++-- .../actions/migration/post_feature_upgrade.rb | 4 ++-- .../api/actions/monitoring/bulk.rb | 19 ++++++++--------- .../lib/elasticsearch/api/actions/msearch.rb | 21 ++++++++----------- .../api/actions/msearch_template.rb | 17 +++++++-------- .../elasticsearch/api/actions/mtermvectors.rb | 17 +++++++-------- .../clear_repositories_metering_archive.rb | 9 +++----- .../nodes/get_repositories_metering_info.rb | 5 ++--- .../api/actions/nodes/hot_threads.rb | 7 +++---- .../elasticsearch/api/actions/nodes/info.rb | 7 +++---- .../actions/nodes/reload_secure_settings.rb | 7 +++---- .../elasticsearch/api/actions/nodes/stats.rb | 7 +++---- .../elasticsearch/api/actions/nodes/usage.rb | 7 +++---- .../api/actions/open_point_in_time.rb | 5 ++--- .../lib/elasticsearch/api/actions/ping.rb | 14 ++++++------- .../api/actions/profiling/flamegraph.rb | 4 ++-- .../api/actions/profiling/stacktraces.rb | 4 ++-- .../api/actions/profiling/status.rb | 4 ++-- .../elasticsearch/api/actions/put_script.rb | 5 ++--- .../api/actions/query_ruleset/delete.rb | 5 ++--- .../api/actions/query_ruleset/get.rb | 5 ++--- .../api/actions/query_ruleset/list.rb | 4 ++-- .../api/actions/query_ruleset/put.rb | 5 ++--- .../elasticsearch/api/actions/rank_eval.rb | 7 +++---- .../lib/elasticsearch/api/actions/reindex.rb | 4 ++-- .../api/actions/reindex_rethrottle.rb | 5 ++--- .../api/actions/render_search_template.rb | 15 +++++++------ .../api/actions/rollup/delete_job.rb | 5 ++--- .../api/actions/rollup/get_jobs.rb | 7 +++---- .../api/actions/rollup/get_rollup_caps.rb | 7 +++---- .../actions/rollup/get_rollup_index_caps.rb | 5 ++--- .../api/actions/rollup/put_job.rb | 5 ++--- .../api/actions/rollup/rollup_search.rb | 5 ++--- .../api/actions/rollup/start_job.rb | 5 ++--- .../api/actions/rollup/stop_job.rb | 5 ++--- .../api/actions/scripts_painless_execute.rb | 4 ++-- .../lib/elasticsearch/api/actions/scroll.rb | 15 +++++++------ .../lib/elasticsearch/api/actions/search.rb | 17 +++++++-------- .../api/actions/search_application/delete.rb | 5 ++--- .../delete_behavioral_analytics.rb | 5 ++--- .../api/actions/search_application/get.rb | 5 ++--- .../get_behavioral_analytics.rb | 7 +++---- .../api/actions/search_application/list.rb | 4 ++-- .../post_behavioral_analytics_event.rb | 5 ++--- .../api/actions/search_application/put.rb | 5 ++--- .../put_behavioral_analytics.rb | 5 ++--- .../search_application/render_query.rb | 5 ++--- .../api/actions/search_application/search.rb | 7 +++---- .../elasticsearch/api/actions/search_mvt.rb | 5 ++--- .../api/actions/search_shards.rb | 7 +++---- .../api/actions/search_template.rb | 7 +++---- .../searchable_snapshots/cache_stats.rb | 7 +++---- .../searchable_snapshots/clear_cache.rb | 7 +++---- .../api/actions/searchable_snapshots/mount.rb | 5 ++--- .../api/actions/searchable_snapshots/stats.rb | 7 +++---- .../actions/security/activate_user_profile.rb | 4 ++-- .../api/actions/security/authenticate.rb | 4 ++-- .../actions/security/bulk_update_api_keys.rb | 4 ++-- .../api/actions/security/change_password.rb | 7 +++---- .../actions/security/clear_api_key_cache.rb | 5 ++--- .../security/clear_cached_privileges.rb | 5 ++--- .../actions/security/clear_cached_realms.rb | 5 ++--- .../actions/security/clear_cached_roles.rb | 5 ++--- .../security/clear_cached_service_tokens.rb | 5 ++--- .../api/actions/security/create_api_key.rb | 4 ++-- .../security/create_cross_cluster_api_key.rb | 4 ++-- .../actions/security/create_service_token.rb | 5 ++--- .../api/actions/security/delete_privileges.rb | 5 ++--- .../api/actions/security/delete_role.rb | 5 ++--- .../actions/security/delete_role_mapping.rb | 5 ++--- .../actions/security/delete_service_token.rb | 5 ++--- .../api/actions/security/delete_user.rb | 5 ++--- .../api/actions/security/disable_user.rb | 5 ++--- .../actions/security/disable_user_profile.rb | 5 ++--- .../api/actions/security/enable_user.rb | 5 ++--- .../actions/security/enable_user_profile.rb | 5 ++--- .../api/actions/security/enroll_kibana.rb | 4 ++-- .../api/actions/security/enroll_node.rb | 4 ++-- .../api/actions/security/get_api_key.rb | 4 ++-- .../security/get_builtin_privileges.rb | 4 ++-- .../api/actions/security/get_privileges.rb | 7 +++---- .../api/actions/security/get_role.rb | 11 +++++----- .../api/actions/security/get_role_mapping.rb | 7 +++---- .../actions/security/get_service_accounts.rb | 7 +++---- .../security/get_service_credentials.rb | 5 ++--- .../api/actions/security/get_settings.rb | 4 ++-- .../api/actions/security/get_token.rb | 4 ++-- .../api/actions/security/get_user.rb | 11 +++++----- .../actions/security/get_user_privileges.rb | 4 ++-- .../api/actions/security/get_user_profile.rb | 5 ++--- .../api/actions/security/grant_api_key.rb | 4 ++-- .../api/actions/security/has_privileges.rb | 7 +++---- .../security/has_privileges_user_profile.rb | 4 ++-- .../actions/security/invalidate_api_key.rb | 4 ++-- .../api/actions/security/invalidate_token.rb | 4 ++-- .../api/actions/security/oidc_authenticate.rb | 4 ++-- .../api/actions/security/oidc_logout.rb | 4 ++-- .../security/oidc_prepare_authentication.rb | 4 ++-- .../api/actions/security/put_privileges.rb | 4 ++-- .../api/actions/security/put_role.rb | 5 ++--- .../api/actions/security/put_role_mapping.rb | 5 ++--- .../api/actions/security/put_user.rb | 5 ++--- .../api/actions/security/query_api_keys.rb | 4 ++-- .../api/actions/security/saml_authenticate.rb | 4 ++-- .../actions/security/saml_complete_logout.rb | 4 ++-- .../api/actions/security/saml_invalidate.rb | 4 ++-- .../api/actions/security/saml_logout.rb | 4 ++-- .../security/saml_prepare_authentication.rb | 4 ++-- .../saml_service_provider_metadata.rb | 5 ++--- .../actions/security/suggest_user_profiles.rb | 4 ++-- .../api/actions/security/update_api_key.rb | 5 ++--- .../security/update_cross_cluster_api_key.rb | 5 ++--- .../api/actions/security/update_settings.rb | 4 ++-- .../security/update_user_profile_data.rb | 5 ++--- .../api/actions/shutdown/delete_node.rb | 5 ++--- .../api/actions/shutdown/get_node.rb | 7 +++---- .../api/actions/shutdown/put_node.rb | 5 ++--- .../api/actions/simulate/ingest.rb | 7 +++---- .../actions/snapshot/cleanup_repository.rb | 5 ++--- .../api/actions/snapshot/clone.rb | 5 ++--- .../api/actions/snapshot/create.rb | 5 ++--- .../api/actions/snapshot/create_repository.rb | 5 ++--- .../api/actions/snapshot/delete.rb | 9 ++++---- .../api/actions/snapshot/delete_repository.rb | 9 ++++---- .../elasticsearch/api/actions/snapshot/get.rb | 9 ++++---- .../api/actions/snapshot/get_repository.rb | 11 +++++----- .../actions/snapshot/repository_analyze.rb | 5 ++--- .../api/actions/snapshot/restore.rb | 5 ++--- .../api/actions/snapshot/status.rb | 11 +++++----- .../api/actions/snapshot/verify_repository.rb | 5 ++--- .../delete_lifecycle.rb | 5 ++--- .../execute_lifecycle.rb | 5 ++--- .../execute_retention.rb | 4 ++-- .../get_lifecycle.rb | 7 +++---- .../get_stats.rb | 4 ++-- .../get_status.rb | 4 ++-- .../put_lifecycle.rb | 5 ++--- .../snapshot_lifecycle_management/start.rb | 4 ++-- .../snapshot_lifecycle_management/stop.rb | 4 ++-- .../api/actions/sql/clear_cursor.rb | 4 ++-- .../api/actions/sql/delete_async.rb | 5 ++--- .../api/actions/sql/get_async.rb | 5 ++--- .../api/actions/sql/get_async_status.rb | 5 ++--- .../elasticsearch/api/actions/sql/query.rb | 4 ++-- .../api/actions/sql/translate.rb | 4 ++-- .../api/actions/ssl/certificates.rb | 4 ++-- .../api/actions/synonyms/delete_synonym.rb | 5 ++--- .../actions/synonyms/delete_synonym_rule.rb | 5 ++--- .../api/actions/synonyms/get_synonym.rb | 5 ++--- .../api/actions/synonyms/get_synonym_rule.rb | 5 ++--- .../api/actions/synonyms/get_synonyms_sets.rb | 4 ++-- .../api/actions/synonyms/put_synonym.rb | 5 ++--- .../api/actions/synonyms/put_synonym_rule.rb | 5 ++--- .../elasticsearch/api/actions/tasks/cancel.rb | 7 +++---- .../elasticsearch/api/actions/tasks/get.rb | 5 ++--- .../elasticsearch/api/actions/tasks/list.rb | 4 ++-- .../elasticsearch/api/actions/terms_enum.rb | 9 ++++---- .../elasticsearch/api/actions/termvectors.rb | 19 ++++++++--------- .../actions/text_structure/find_structure.rb | 16 +++++++------- .../text_structure/test_grok_pattern.rb | 4 ++-- .../api/actions/transform/delete_transform.rb | 5 ++--- .../api/actions/transform/get_transform.rb | 7 +++---- .../actions/transform/get_transform_stats.rb | 5 ++--- .../actions/transform/preview_transform.rb | 15 +++++++------ .../api/actions/transform/put_transform.rb | 5 ++--- .../api/actions/transform/reset_transform.rb | 5 ++--- .../transform/schedule_now_transform.rb | 5 ++--- .../api/actions/transform/start_transform.rb | 5 ++--- .../api/actions/transform/stop_transform.rb | 5 ++--- .../api/actions/transform/update_transform.rb | 5 ++--- .../actions/transform/upgrade_transforms.rb | 4 ++-- .../lib/elasticsearch/api/actions/update.rb | 9 ++++---- .../api/actions/update_by_query.rb | 5 ++--- .../api/actions/update_by_query_rethrottle.rb | 5 ++--- .../api/actions/watcher/ack_watch.rb | 5 ++--- .../api/actions/watcher/activate_watch.rb | 5 ++--- .../api/actions/watcher/deactivate_watch.rb | 5 ++--- .../api/actions/watcher/delete_watch.rb | 9 ++++---- .../api/actions/watcher/execute_watch.rb | 7 +++---- .../api/actions/watcher/get_settings.rb | 4 ++-- .../api/actions/watcher/get_watch.rb | 5 ++--- .../api/actions/watcher/put_watch.rb | 5 ++--- .../api/actions/watcher/query_watches.rb | 4 ++-- .../api/actions/watcher/start.rb | 4 ++-- .../api/actions/watcher/stats.rb | 7 +++---- .../elasticsearch/api/actions/watcher/stop.rb | 4 ++-- .../api/actions/watcher/update_settings.rb | 4 ++-- .../elasticsearch/api/actions/xpack/info.rb | 4 ++-- .../elasticsearch/api/actions/xpack/usage.rb | 4 ++-- 488 files changed, 1282 insertions(+), 1659 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb index 93ade79c06..21fefe4527 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html # def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "async_search.delete" } + request_opts = { endpoint: arguments[:endpoint] || 'async_search.delete' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb index 8bac99994c..92c26c5887 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html # def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "async_search.get" } + request_opts = { endpoint: arguments[:endpoint] || 'async_search.get' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb index f04611a82c..4b2008d03d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html # def status(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "async_search.status" } + request_opts = { endpoint: arguments[:endpoint] || 'async_search.status' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb index fd709ff80c..c782d56b3e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb @@ -72,11 +72,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html # def submit(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "async_search.submit" } + request_opts = { endpoint: arguments[:endpoint] || 'async_search.submit' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -91,7 +90,7 @@ def submit(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_async_search" else - "_async_search" + '_async_search' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb index 899136eec9..e10ad043a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html # def delete_autoscaling_policy(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "autoscaling.delete_autoscaling_policy" } + request_opts = { endpoint: arguments[:endpoint] || 'autoscaling.delete_autoscaling_policy' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb index d1bf262f08..a490502822 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html # def get_autoscaling_capacity(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "autoscaling.get_autoscaling_capacity" } + request_opts = { endpoint: arguments[:endpoint] || 'autoscaling.get_autoscaling_capacity' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def get_autoscaling_capacity(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_autoscaling/capacity" + path = '_autoscaling/capacity' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb index a28add1530..e4d66d0517 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html # def get_autoscaling_policy(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "autoscaling.get_autoscaling_policy" } + request_opts = { endpoint: arguments[:endpoint] || 'autoscaling.get_autoscaling_policy' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb index 916d7263b7..cde8ca11d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html # def put_autoscaling_policy(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "autoscaling.put_autoscaling_policy" } + request_opts = { endpoint: arguments[:endpoint] || 'autoscaling.put_autoscaling_policy' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index 4257b5ded1..a78a1d3463 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -43,11 +43,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html # def bulk(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "bulk" } + request_opts = { endpoint: arguments[:endpoint] || 'bulk' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -64,17 +63,17 @@ def bulk(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_bulk" else - "_bulk" + '_bulk' end params = Utils.process_params(arguments) - if body.is_a? Array - payload = Elasticsearch::API::Utils.__bulkify(body) - else - payload = body - end + payload = if body.is_a? Array + Elasticsearch::API::Utils.__bulkify(body) + else + body + end - headers.merge!("Content-Type" => "application/x-ndjson") + headers.merge!('Content-Type' => 'application/x-ndjson') Elasticsearch::API::Response.new( perform_request(method, path, params, payload, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb index 829aad3b81..0b506b2ed0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-alias.html # def aliases(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.aliases" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.aliases' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,7 +55,7 @@ def aliases(arguments = {}) path = if _name "_cat/aliases/#{Utils.__listify(_name)}" else - "_cat/aliases" + '_cat/aliases' end params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb index 7c4dbe5c26..f37b53e12d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-allocation.html # def allocation(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.allocation" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.allocation' } - defined_params = [:node_id].inject({}) do |set_variables, variable| + defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -57,7 +56,7 @@ def allocation(arguments = {}) path = if _node_id "_cat/allocation/#{Utils.__listify(_node_id)}" else - "_cat/allocation" + '_cat/allocation' end params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb index 187b5f01cc..0765a09a55 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-component-templates.html # def component_templates(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.component_templates" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.component_templates' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,7 +55,7 @@ def component_templates(arguments = {}) path = if _name "_cat/component_templates/#{Utils.__listify(_name)}" else - "_cat/component_templates" + '_cat/component_templates' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb index 0e62564545..8afd4cade6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html # def count(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.count" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.count' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,7 +53,7 @@ def count(arguments = {}) path = if _index "_cat/count/#{Utils.__listify(_index)}" else - "_cat/count" + '_cat/count' end params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb index 18faca057b..592958c962 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html # def fielddata(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.fielddata" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.fielddata' } - defined_params = [:fields].inject({}) do |set_variables, variable| + defined_params = [:fields].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -55,7 +54,7 @@ def fielddata(arguments = {}) path = if _fields "_cat/fielddata/#{Utils.__listify(_fields)}" else - "_cat/fielddata" + '_cat/fielddata' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb index 68b7d40d08..59309d5084 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb @@ -36,7 +36,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-health.html # def health(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.health" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.health' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -44,7 +44,7 @@ def health(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_cat/health" + path = '_cat/health' params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb index cccb4a922e..0d9f22f752 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html # def help(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.help" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.help' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +39,7 @@ def help(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_cat" + path = '_cat' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb index 0b45b154ad..accc79e8cb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb @@ -42,11 +42,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html # def indices(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.indices" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.indices' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -61,7 +60,7 @@ def indices(arguments = {}) path = if _index "_cat/indices/#{Utils.__listify(_index)}" else - "_cat/indices" + '_cat/indices' end params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb index 69f1252b95..f8512afd3b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb @@ -36,7 +36,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-master.html # def master(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.master" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.master' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -44,7 +44,7 @@ def master(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_cat/master" + path = '_cat/master' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb index 147f353447..72e1f69773 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb @@ -38,11 +38,10 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html # def ml_data_frame_analytics(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.ml_data_frame_analytics" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_data_frame_analytics' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -57,7 +56,7 @@ def ml_data_frame_analytics(arguments = {}) path = if _id "_cat/ml/data_frame/analytics/#{Utils.__listify(_id)}" else - "_cat/ml/data_frame/analytics" + '_cat/ml/data_frame/analytics' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb index 32991053b3..c00d25ba2c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb @@ -37,11 +37,10 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html # def ml_datafeeds(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.ml_datafeeds" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_datafeeds' } - defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + defined_params = [:datafeed_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,7 +55,7 @@ def ml_datafeeds(arguments = {}) path = if _datafeed_id "_cat/ml/datafeeds/#{Utils.__listify(_datafeed_id)}" else - "_cat/ml/datafeeds" + '_cat/ml/datafeeds' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb index bec650d66e..0a9f41ff97 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb @@ -38,11 +38,10 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html # def ml_jobs(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.ml_jobs" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_jobs' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -57,7 +56,7 @@ def ml_jobs(arguments = {}) path = if _job_id "_cat/ml/anomaly_detectors/#{Utils.__listify(_job_id)}" else - "_cat/ml/anomaly_detectors" + '_cat/ml/anomaly_detectors' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb index 1479168a62..3af9c15a30 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb @@ -40,11 +40,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html # def ml_trained_models(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.ml_trained_models" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_trained_models' } - defined_params = [:model_id].inject({}) do |set_variables, variable| + defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -59,7 +58,7 @@ def ml_trained_models(arguments = {}) path = if _model_id "_cat/ml/trained_models/#{Utils.__listify(_model_id)}" else - "_cat/ml/trained_models" + '_cat/ml/trained_models' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb index 0e493b2228..54102162ef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb @@ -36,7 +36,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodeattrs.html # def nodeattrs(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.nodeattrs" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.nodeattrs' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -44,7 +44,7 @@ def nodeattrs(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_cat/nodeattrs" + path = '_cat/nodeattrs' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb index 6ce67f6edd..1411277c44 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb @@ -39,7 +39,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html # def nodes(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.nodes" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.nodes' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -47,7 +47,7 @@ def nodes(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_cat/nodes" + path = '_cat/nodes' params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h], escape: false) if params[:h] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb index 2edf46fd2a..67acfd7817 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb @@ -37,7 +37,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-pending-tasks.html # def pending_tasks(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.pending_tasks" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.pending_tasks' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -45,7 +45,7 @@ def pending_tasks(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_cat/pending_tasks" + path = '_cat/pending_tasks' params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb index c6a91a0115..fbde5d60ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb @@ -37,7 +37,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-plugins.html # def plugins(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.plugins" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.plugins' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -45,7 +45,7 @@ def plugins(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_cat/plugins" + path = '_cat/plugins' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb index 5068de4cf6..5e6865e47d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb @@ -39,11 +39,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html # def recovery(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.recovery" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.recovery' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -58,7 +57,7 @@ def recovery(arguments = {}) path = if _index "_cat/recovery/#{Utils.__listify(_index)}" else - "_cat/recovery" + '_cat/recovery' end params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb index c92ae9c43e..482ceff4b3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb @@ -36,7 +36,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-repositories.html # def repositories(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.repositories" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.repositories' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -44,7 +44,7 @@ def repositories(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_cat/repositories" + path = '_cat/repositories' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb index 3a33d25bab..8898f52e26 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html # def segments(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.segments" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.segments' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -55,7 +54,7 @@ def segments(arguments = {}) path = if _index "_cat/segments/#{Utils.__listify(_index)}" else - "_cat/segments" + '_cat/segments' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb index a437c3aebb..4e4cae17d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html # def shards(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.shards" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.shards' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -57,7 +56,7 @@ def shards(arguments = {}) path = if _index "_cat/shards/#{Utils.__listify(_index)}" else - "_cat/shards" + '_cat/shards' end params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb index 2bcd838cab..3ae1c00888 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html # def snapshots(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.snapshots" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.snapshots' } - defined_params = [:repository].inject({}) do |set_variables, variable| + defined_params = [:repository].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -57,7 +56,7 @@ def snapshots(arguments = {}) path = if _repository "_cat/snapshots/#{Utils.__listify(_repository)}" else - "_cat/snapshots" + '_cat/snapshots' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb index 00f392b26f..4a60aea199 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb @@ -43,7 +43,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html # def tasks(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.tasks" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.tasks' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -51,7 +51,7 @@ def tasks(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_cat/tasks" + path = '_cat/tasks' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb index 5e869541a8..42423d5f2b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html # def templates(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.templates" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.templates' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,7 +55,7 @@ def templates(arguments = {}) path = if _name "_cat/templates/#{Utils.__listify(_name)}" else - "_cat/templates" + '_cat/templates' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb index 9d14aed0ef..f3ffd705f2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb @@ -39,11 +39,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html # def thread_pool(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.thread_pool" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.thread_pool' } - defined_params = [:thread_pool_patterns].inject({}) do |set_variables, variable| + defined_params = [:thread_pool_patterns].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -58,7 +57,7 @@ def thread_pool(arguments = {}) path = if _thread_pool_patterns "_cat/thread_pool/#{Utils.__listify(_thread_pool_patterns)}" else - "_cat/thread_pool" + '_cat/thread_pool' end params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb index c22fd7201e..172e7445ae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb @@ -39,11 +39,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html # def transforms(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cat.transforms" } + request_opts = { endpoint: arguments[:endpoint] || 'cat.transforms' } - defined_params = [:transform_id].inject({}) do |set_variables, variable| + defined_params = [:transform_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -58,7 +57,7 @@ def transforms(arguments = {}) path = if _transform_id "_cat/transforms/#{Utils.__listify(_transform_id)}" else - "_cat/transforms" + '_cat/transforms' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb index d7358ac2e0..793bff1eab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html # def clear_scroll(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "clear_scroll" } + request_opts = { endpoint: arguments[:endpoint] || 'clear_scroll' } - defined_params = [:scroll_id].inject({}) do |set_variables, variable| + defined_params = [:scroll_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,16 +53,16 @@ def clear_scroll(arguments = {}) path = if _scroll_id "_search/scroll/#{Utils.__listify(_scroll_id)}" else - "_search/scroll" + '_search/scroll' end params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb index 7f8351aa25..05b7b5935a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html # def close_point_in_time(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "close_point_in_time" } + request_opts = { endpoint: arguments[:endpoint] || 'close_point_in_time' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def close_point_in_time(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_DELETE - path = "_pit" + path = '_pit' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb index aad51d651e..2f93e73d46 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb @@ -32,7 +32,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html # def allocation_explain(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.allocation_explain" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.allocation_explain' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -45,7 +45,7 @@ def allocation_explain(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_cluster/allocation/explain" + path = '_cluster/allocation/explain' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb index 7638592e21..a0a62dd669 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html # def delete_component_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.delete_component_template" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.delete_component_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb index ab01ebcd1d..4609b743de 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/voting-config-exclusions.html # def delete_voting_config_exclusions(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.delete_voting_config_exclusions" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.delete_voting_config_exclusions' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +39,7 @@ def delete_voting_config_exclusions(arguments = {}) body = nil method = Elasticsearch::API::HTTP_DELETE - path = "_cluster/voting_config_exclusions" + path = '_cluster/voting_config_exclusions' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb index 262780561b..b0ac619b26 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html # def exists_component_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.exists_component_template" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.exists_component_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -58,7 +57,7 @@ def exists_component_template(arguments = {}) ) end - alias_method :exists_component_template?, :exists_component_template + alias exists_component_template? exists_component_template end end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb index e2d3437353..51bb22bc01 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html # def get_component_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.get_component_template" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.get_component_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -52,7 +51,7 @@ def get_component_template(arguments = {}) path = if _name "_component_template/#{Utils.__listify(_name)}" else - "_component_template" + '_component_template' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb index 8db6e8d610..8cff9de9d4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb @@ -33,7 +33,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-get-settings.html # def get_settings(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.get_settings" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.get_settings' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -41,7 +41,7 @@ def get_settings(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_cluster/settings" + path = '_cluster/settings' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb index 5d535d9b31..3a585036b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb @@ -41,11 +41,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html # def health(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.health" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.health' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -60,7 +59,7 @@ def health(arguments = {}) path = if _index "_cluster/health/#{Utils.__listify(_index)}" else - "_cluster/health" + '_cluster/health' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb index 6504417445..83b2e81d83 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-info.html # def info(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.info" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.info' } - defined_params = [:target].inject({}) do |set_variables, variable| + defined_params = [:target].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb index 062d825d9a..783626ef7d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb @@ -32,7 +32,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-pending.html # def pending_tasks(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.pending_tasks" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.pending_tasks' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -40,7 +40,7 @@ def pending_tasks(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_cluster/pending_tasks" + path = '_cluster/pending_tasks' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb index 7c0f7e371c..dd9edf0cbe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb @@ -33,7 +33,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/voting-config-exclusions.html # def post_voting_config_exclusions(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.post_voting_config_exclusions" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.post_voting_config_exclusions' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -41,7 +41,7 @@ def post_voting_config_exclusions(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_cluster/voting_config_exclusions" + path = '_cluster/voting_config_exclusions' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb index c156ad28e8..e6cf352034 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html # def put_component_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.put_component_template" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.put_component_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb index f7863a5209..22854aaf9b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb @@ -33,7 +33,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html # def put_settings(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.put_settings" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.put_settings' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -43,7 +43,7 @@ def put_settings(arguments = {}) body = arguments.delete(:body) || {} method = Elasticsearch::API::HTTP_PUT - path = "_cluster/settings" + path = '_cluster/settings' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb index 7bada737f2..63d1f824f7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-remote-info.html # def remote_info(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.remote_info" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.remote_info' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def remote_info(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_remote/info" + path = '_remote/info' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb index e2dc714d5e..450384932f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb @@ -36,7 +36,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html # def reroute(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.reroute" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.reroute' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -44,7 +44,7 @@ def reroute(arguments = {}) body = arguments.delete(:body) || {} method = Elasticsearch::API::HTTP_POST - path = "_cluster/reroute" + path = '_cluster/reroute' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb index 3c3f431fb9..24d7eb487f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb @@ -39,11 +39,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html # def state(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.state" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.state' } - defined_params = [:metric, :index].inject({}) do |set_variables, variable| + defined_params = %i[metric index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -62,7 +61,7 @@ def state(arguments = {}) elsif _metric "_cluster/state/#{Utils.__listify(_metric)}" else - "_cluster/state" + '_cluster/state' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb index aaa3a3b570..917ea93bb1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html # def stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "cluster.stats" } + request_opts = { endpoint: arguments[:endpoint] || 'cluster.stats' } - defined_params = [:node_id].inject({}) do |set_variables, variable| + defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,7 +50,7 @@ def stats(arguments = {}) path = if _node_id "_cluster/stats/nodes/#{Utils.__listify(_node_id)}" else - "_cluster/stats" + '_cluster/stats' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb index 604efe0a36..e2c46f6ffd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/check-in-connector-api.html # def check_in(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.check_in" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.check_in' } - defined_params = [:connector_id].inject({}) do |set_variables, variable| + defined_params = [:connector_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb index 0c0bb19d09..1bbc2294f1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-api.html # def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.delete" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.delete' } - defined_params = [:connector_id].inject({}) do |set_variables, variable| + defined_params = [:connector_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb index fabde03c74..d71a01db6c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-api.html # def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.get" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.get' } - defined_params = [:connector_id].inject({}) do |set_variables, variable| + defined_params = [:connector_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb index 8992532ee2..1a342f408f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-last-sync-api.html # def last_sync(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.last_sync" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.last_sync' } - defined_params = [:connector_id].inject({}) do |set_variables, variable| + defined_params = [:connector_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb index c102b43cf6..712a8a7b09 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb @@ -35,7 +35,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-api.html # def list(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.list" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.list' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -43,7 +43,7 @@ def list(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_connector" + path = '_connector' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb index b007cd2076..e66f7b37c1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb @@ -34,7 +34,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html # def post(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.post" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.post' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -44,7 +44,7 @@ def post(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_connector" + path = '_connector' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb index a89eb75b3c..aa082e8b5b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html # def put(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.put" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.put' } - defined_params = [:connector_id].inject({}) do |set_variables, variable| + defined_params = [:connector_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb index 565f81d0e5..fc51bd4315 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-configuration-api.html # def update_configuration(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.update_configuration" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_configuration' } - defined_params = [:connector_id].inject({}) do |set_variables, variable| + defined_params = [:connector_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb index f9c487f216..eec511fc21 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-error-api.html # def update_error(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.update_error" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_error' } - defined_params = [:connector_id].inject({}) do |set_variables, variable| + defined_params = [:connector_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb index 156a1389b4..314a30e6d7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html # def update_filtering(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.update_filtering" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_filtering' } - defined_params = [:connector_id].inject({}) do |set_variables, variable| + defined_params = [:connector_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb index 2098549b5f..ecdac5b2a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-name-description-api.html # def update_name(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.update_name" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_name' } - defined_params = [:connector_id].inject({}) do |set_variables, variable| + defined_params = [:connector_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb index 52e0015fb5..81779e6e38 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/connector-apis.html # def update_native(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.update_native" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_native' } - defined_params = [:connector_id].inject({}) do |set_variables, variable| + defined_params = [:connector_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb index e3a901a32a..e5f7f6ee23 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-pipeline-api.html # def update_pipeline(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.update_pipeline" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_pipeline' } - defined_params = [:connector_id].inject({}) do |set_variables, variable| + defined_params = [:connector_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb index 1b7c387408..2c87061c26 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-scheduling-api.html # def update_scheduling(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.update_scheduling" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_scheduling' } - defined_params = [:connector_id].inject({}) do |set_variables, variable| + defined_params = [:connector_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb index 8c0a7717b7..62293fd450 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/connector-apis.html # def update_service_type(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector.update_service_type" } + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_service_type' } - defined_params = [:connector_id].inject({}) do |set_variables, variable| + defined_params = [:connector_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/delete.rb index 0b659db688..0349af217c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/delete.rb @@ -34,11 +34,10 @@ module Actions # @see [TODO] # def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector_secret.delete" } + request_opts = { endpoint: arguments[:endpoint] || 'connector_secret.delete' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/get.rb index d771793d7e..00f1720fc8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/get.rb @@ -34,11 +34,10 @@ module Actions # @see [TODO] # def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector_secret.get" } + request_opts = { endpoint: arguments[:endpoint] || 'connector_secret.get' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/post.rb index 0678ea25a7..938bf3317f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/post.rb @@ -34,7 +34,7 @@ module Actions # @see [TODO] # def post(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector_secret.post" } + request_opts = { endpoint: arguments[:endpoint] || 'connector_secret.post' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -44,7 +44,7 @@ def post(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_connector/_secret" + path = '_connector/_secret' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb index eeb92b6de5..8b2c068d0e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb @@ -34,16 +34,17 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cancel-connector-sync-job-api.html # def cancel(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.cancel" } + request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.cancel' } - defined_params = [:connector_sync_job_id].inject({}) do |set_variables, variable| + defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? - raise ArgumentError, - "Required argument 'connector_sync_job_id' missing" unless arguments[:connector_sync_job_id] + unless arguments[:connector_sync_job_id] + raise ArgumentError, + "Required argument 'connector_sync_job_id' missing" + end arguments = arguments.clone headers = arguments.delete(:headers) || {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb index 9b9a74b6a8..6e35d71964 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb @@ -34,16 +34,17 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/check-in-connector-sync-job-api.html # def check_in(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.check_in" } + request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.check_in' } - defined_params = [:connector_sync_job_id].inject({}) do |set_variables, variable| + defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? - raise ArgumentError, - "Required argument 'connector_sync_job_id' missing" unless arguments[:connector_sync_job_id] + unless arguments[:connector_sync_job_id] + raise ArgumentError, + "Required argument 'connector_sync_job_id' missing" + end arguments = arguments.clone headers = arguments.delete(:headers) || {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb index 0e4423a20c..d07762a238 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb @@ -34,16 +34,17 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-sync-job-api.html # def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.delete" } + request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.delete' } - defined_params = [:connector_sync_job_id].inject({}) do |set_variables, variable| + defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? - raise ArgumentError, - "Required argument 'connector_sync_job_id' missing" unless arguments[:connector_sync_job_id] + unless arguments[:connector_sync_job_id] + raise ArgumentError, + "Required argument 'connector_sync_job_id' missing" + end arguments = arguments.clone headers = arguments.delete(:headers) || {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb index 94800e0f8c..c69c0738ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb @@ -35,18 +35,19 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/set-connector-sync-job-error-api.html # def error(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.error" } + request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.error' } - defined_params = [:connector_sync_job_id].inject({}) do |set_variables, variable| + defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - raise ArgumentError, - "Required argument 'connector_sync_job_id' missing" unless arguments[:connector_sync_job_id] + unless arguments[:connector_sync_job_id] + raise ArgumentError, + "Required argument 'connector_sync_job_id' missing" + end arguments = arguments.clone headers = arguments.delete(:headers) || {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb index 114a44a3ec..cd1f8dfc9c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb @@ -34,16 +34,17 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-sync-job-api.html # def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.get" } + request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.get' } - defined_params = [:connector_sync_job_id].inject({}) do |set_variables, variable| + defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? - raise ArgumentError, - "Required argument 'connector_sync_job_id' missing" unless arguments[:connector_sync_job_id] + unless arguments[:connector_sync_job_id] + raise ArgumentError, + "Required argument 'connector_sync_job_id' missing" + end arguments = arguments.clone headers = arguments.delete(:headers) || {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb index a85827521d..871a25cc48 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb @@ -38,7 +38,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-sync-jobs-api.html # def list(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.list" } + request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.list' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +46,7 @@ def list(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_connector/_sync_job" + path = '_connector/_sync_job' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb index 3f188997c5..1548c810f0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb @@ -34,7 +34,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-sync-job-api.html # def post(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.post" } + request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.post' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -44,7 +44,7 @@ def post(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_connector/_sync_job" + path = '_connector/_sync_job' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb index 4d69d77f1d..7515774764 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb @@ -35,18 +35,19 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/set-connector-sync-job-stats-api.html # def update_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "connector_sync_job.update_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.update_stats' } - defined_params = [:connector_sync_job_id].inject({}) do |set_variables, variable| + defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - raise ArgumentError, - "Required argument 'connector_sync_job_id' missing" unless arguments[:connector_sync_job_id] + unless arguments[:connector_sync_job_id] + raise ArgumentError, + "Required argument 'connector_sync_job_id' missing" + end arguments = arguments.clone headers = arguments.delete(:headers) || {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb index 535a050ceb..393bbb7fda 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb @@ -44,18 +44,17 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html # def count(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "count" } + request_opts = { endpoint: arguments[:endpoint] || 'count' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) @@ -65,11 +64,11 @@ def count(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.__listify(_index)}/_count" - else - "_count" - end + path = if _index + "#{Utils.__listify(_index)}/_count" + else + '_count' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb index 43705a5771..b17cc55635 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb @@ -40,11 +40,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html # def create(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "create" } + request_opts = { endpoint: arguments[:endpoint] || 'create' } - defined_params = [:index, :id].inject({}) do |set_variables, variable| + defined_params = %i[index id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb index a639e7f5a8..fa6a7a5bb7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html # def delete_auto_follow_pattern(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ccr.delete_auto_follow_pattern" } + request_opts = { endpoint: arguments[:endpoint] || 'ccr.delete_auto_follow_pattern' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb index fd438741c8..ca70106723 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html # def follow(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ccr.follow" } + request_opts = { endpoint: arguments[:endpoint] || 'ccr.follow' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb index 967866ed84..4787369a2e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html # def follow_info(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ccr.follow_info" } + request_opts = { endpoint: arguments[:endpoint] || 'ccr.follow_info' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb index a8c488c062..02a3a51270 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html # def follow_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ccr.follow_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'ccr.follow_stats' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb index 751a8c88c6..ebe646a6e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html # def forget_follower(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ccr.forget_follower" } + request_opts = { endpoint: arguments[:endpoint] || 'ccr.forget_follower' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb index 0927b259f0..fc2f5a63ba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html # def get_auto_follow_pattern(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ccr.get_auto_follow_pattern" } + request_opts = { endpoint: arguments[:endpoint] || 'ccr.get_auto_follow_pattern' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -49,7 +48,7 @@ def get_auto_follow_pattern(arguments = {}) path = if _name "_ccr/auto_follow/#{Utils.__listify(_name)}" else - "_ccr/auto_follow" + '_ccr/auto_follow' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb index 51fc1a3b32..9754c6e1f9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html # def pause_auto_follow_pattern(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ccr.pause_auto_follow_pattern" } + request_opts = { endpoint: arguments[:endpoint] || 'ccr.pause_auto_follow_pattern' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb index e4cd9cb64e..6819c53855 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html # def pause_follow(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ccr.pause_follow" } + request_opts = { endpoint: arguments[:endpoint] || 'ccr.pause_follow' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb index cde2834639..77146ef674 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html # def put_auto_follow_pattern(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ccr.put_auto_follow_pattern" } + request_opts = { endpoint: arguments[:endpoint] || 'ccr.put_auto_follow_pattern' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb index a46cdab753..66459ea9ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html # def resume_auto_follow_pattern(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ccr.resume_auto_follow_pattern" } + request_opts = { endpoint: arguments[:endpoint] || 'ccr.resume_auto_follow_pattern' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb index db49d39b25..1ddfbf6337 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html # def resume_follow(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ccr.resume_follow" } + request_opts = { endpoint: arguments[:endpoint] || 'ccr.resume_follow' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb index d7544df34a..87fe68e8d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html # def stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ccr.stats" } + request_opts = { endpoint: arguments[:endpoint] || 'ccr.stats' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def stats(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_ccr/stats" + path = '_ccr/stats' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb index 907278b01c..df29ef7f57 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html # def unfollow(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ccr.unfollow" } + request_opts = { endpoint: arguments[:endpoint] || 'ccr.unfollow' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb index 9355e7885f..82810e3a02 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html # def delete_dangling_index(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "dangling_indices.delete_dangling_index" } + request_opts = { endpoint: arguments[:endpoint] || 'dangling_indices.delete_dangling_index' } - defined_params = [:index_uuid].inject({}) do |set_variables, variable| + defined_params = [:index_uuid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb index 0cb29024a6..3806639cb2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html # def import_dangling_index(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "dangling_indices.import_dangling_index" } + request_opts = { endpoint: arguments[:endpoint] || 'dangling_indices.import_dangling_index' } - defined_params = [:index_uuid].inject({}) do |set_variables, variable| + defined_params = [:index_uuid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb index 9b46a92409..a46ca9851c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html # def list_dangling_indices(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "dangling_indices.list_dangling_indices" } + request_opts = { endpoint: arguments[:endpoint] || 'dangling_indices.list_dangling_indices' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def list_dangling_indices(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_dangling" + path = '_dangling' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb index 9e84e25d55..3d0505817f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html # def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "delete" } + request_opts = { endpoint: arguments[:endpoint] || 'delete' } - defined_params = [:index, :id].inject({}) do |set_variables, variable| + defined_params = %i[index id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -63,11 +62,11 @@ def delete(arguments = {}) params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb index f587d54d86..395cd50618 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb @@ -59,11 +59,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html # def delete_by_query(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "delete_by_query" } + request_opts = { endpoint: arguments[:endpoint] || 'delete_by_query' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb index 8148dee65f..081b6efc86 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html # def delete_by_query_rethrottle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "delete_by_query_rethrottle" } + request_opts = { endpoint: arguments[:endpoint] || 'delete_by_query_rethrottle' } - defined_params = [:task_id].inject({}) do |set_variables, variable| + defined_params = [:task_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb index 2e359f44c0..9f1d8be915 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html # def delete_script(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "delete_script" } + request_opts = { endpoint: arguments[:endpoint] || 'delete_script' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb index 50578f6177..667e472f32 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html # def delete_policy(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "enrich.delete_policy" } + request_opts = { endpoint: arguments[:endpoint] || 'enrich.delete_policy' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb index e0b7423018..c06a3417bd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html # def execute_policy(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "enrich.execute_policy" } + request_opts = { endpoint: arguments[:endpoint] || 'enrich.execute_policy' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb index 6589fde2bb..262b027229 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html # def get_policy(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "enrich.get_policy" } + request_opts = { endpoint: arguments[:endpoint] || 'enrich.get_policy' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -49,7 +48,7 @@ def get_policy(arguments = {}) path = if _name "_enrich/policy/#{Utils.__listify(_name)}" else - "_enrich/policy" + '_enrich/policy' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb index fe6724d50d..c60eac2661 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html # def put_policy(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "enrich.put_policy" } + request_opts = { endpoint: arguments[:endpoint] || 'enrich.put_policy' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb index 6402becb84..7fc8597f8c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html # def stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "enrich.stats" } + request_opts = { endpoint: arguments[:endpoint] || 'enrich.stats' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def stats(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_enrich/_stats" + path = '_enrich/_stats' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb index 3b11e1a1ba..d0a794a594 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html # def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "eql.delete" } + request_opts = { endpoint: arguments[:endpoint] || 'eql.delete' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb index 87f4349841..87341090a1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html # def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "eql.get" } + request_opts = { endpoint: arguments[:endpoint] || 'eql.get' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb index 81cd4a00ad..06e4d98460 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html # def get_status(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "eql.get_status" } + request_opts = { endpoint: arguments[:endpoint] || 'eql.get_status' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb index 42597973e0..097aa24509 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html # def search(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "eql.search" } + request_opts = { endpoint: arguments[:endpoint] || 'eql.search' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb index 24fcb9bbc9..11c44df9e2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb @@ -37,7 +37,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-api.html # def async_query(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "esql.async_query" } + request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -47,7 +47,7 @@ def async_query(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_query/async" + path = '_query/async' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb index e21e7f2d00..4d59504018 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-get-api.html # def async_query_get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "esql.async_query_get" } + request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_get' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb index cf3348e95e..80c3e3513d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb @@ -37,7 +37,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html # def query(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "esql.query" } + request_opts = { endpoint: arguments[:endpoint] || 'esql.query' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -47,7 +47,7 @@ def query(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_query" + path = '_query' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb index 90a52b083b..aaf756abe1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb @@ -40,11 +40,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html # def exists(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "exists" } + request_opts = { endpoint: arguments[:endpoint] || 'exists' } - defined_params = [:index, :id].inject({}) do |set_variables, variable| + defined_params = %i[index id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -65,11 +64,11 @@ def exists(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 end end - alias_method :exists?, :exists + alias exists? exists end end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb index 028e24597f..ce01cb5e22 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb @@ -39,11 +39,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html # def exists_source(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "exists_source" } + request_opts = { endpoint: arguments[:endpoint] || 'exists_source' } - defined_params = [:index, :id].inject({}) do |set_variables, variable| + defined_params = %i[index id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -68,7 +67,7 @@ def exists_source(arguments = {}) ) end - alias_method :exists_source?, :exists_source + alias exists_source? exists_source end end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb index 25ea610e94..b78f9160a5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb @@ -43,11 +43,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html # def explain(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "explain" } + request_opts = { endpoint: arguments[:endpoint] || 'explain' } - defined_params = [:index, :id].inject({}) do |set_variables, variable| + defined_params = %i[index id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -69,7 +68,7 @@ def explain(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "#{Utils.__listify(_index)}/_explain/#{Utils.__listify(_id)}" + path = "#{Utils.__listify(_index)}/_explain/#{Utils.__listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb index 6ab52782ed..65c71bc792 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-features-api.html # def get_features(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "features.get_features" } + request_opts = { endpoint: arguments[:endpoint] || 'features.get_features' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -38,7 +38,7 @@ def get_features(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_features" + path = '_features' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb index e60eb64d60..f9ef7ac039 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb @@ -33,7 +33,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def reset_features(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "features.reset_features" } + request_opts = { endpoint: arguments[:endpoint] || 'features.reset_features' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -41,7 +41,7 @@ def reset_features(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_features/_reset" + path = '_features/_reset' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb index 671588f012..913028d5b1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb @@ -37,18 +37,17 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html # def field_caps(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "field_caps" } + request_opts = { endpoint: arguments[:endpoint] || 'field_caps' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) @@ -58,11 +57,11 @@ def field_caps(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.__listify(_index)}/_field_caps" - else - "_field_caps" - end + path = if _index + "#{Utils.__listify(_index)}/_field_caps" + else + '_field_caps' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb index 24efd95a85..8ff603ad77 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb @@ -34,11 +34,10 @@ module Actions # @see [TODO] # def delete_secret(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "fleet.delete_secret" } + request_opts = { endpoint: arguments[:endpoint] || 'fleet.delete_secret' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb index b3fe39be0f..f00f51e05c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb @@ -34,11 +34,10 @@ module Actions # @see [TODO] # def get_secret(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "fleet.get_secret" } + request_opts = { endpoint: arguments[:endpoint] || 'fleet.get_secret' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb index 4fd349e6c9..7768f2c53d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-global-checkpoints.html # def global_checkpoints(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "fleet.global_checkpoints" } + request_opts = { endpoint: arguments[:endpoint] || 'fleet.global_checkpoints' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb index 06c6eee577..0929394ce0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb @@ -35,11 +35,10 @@ module Actions # @see [TODO] # def msearch(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "fleet.msearch" } + request_opts = { endpoint: arguments[:endpoint] || 'fleet.msearch' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,33 +55,31 @@ def msearch(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_fleet/_fleet_msearch" else - "_fleet/_fleet_msearch" + '_fleet/_fleet_msearch' end params = {} - case - when body.is_a?(Array) && body.any? { |d| d.has_key? :search } + if body.is_a?(Array) && body.any? { |d| d.has_key? :search } payload = body - .inject([]) do |sum, item| + .each_with_object([]) do |item, sum| meta = item data = meta.delete(:search) sum << meta sum << data - sum end .map { |item| Elasticsearch::API.serializer.dump(item) } - payload << "" unless payload.empty? + payload << '' unless payload.empty? payload = payload.join("\n") - when body.is_a?(Array) + elsif body.is_a?(Array) payload = body.map { |d| d.is_a?(String) ? d : Elasticsearch::API.serializer.dump(d) } - payload << "" unless payload.empty? + payload << '' unless payload.empty? payload = payload.join("\n") else payload = body end - headers.merge!("Content-Type" => "application/x-ndjson") + headers.merge!('Content-Type' => 'application/x-ndjson') Elasticsearch::API::Response.new( perform_request(method, path, params, payload, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb index ef3106bc31..340520db70 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb @@ -34,7 +34,7 @@ module Actions # @see [TODO] # def post_secret(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "fleet.post_secret" } + request_opts = { endpoint: arguments[:endpoint] || 'fleet.post_secret' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -44,7 +44,7 @@ def post_secret(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_fleet/secret" + path = '_fleet/secret' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb index 04d483a423..d3f67b21dc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb @@ -38,11 +38,10 @@ module Actions # @see [TODO] # def search(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "fleet.search" } + request_opts = { endpoint: arguments[:endpoint] || 'fleet.search' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,7 +50,7 @@ def search(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) @@ -61,7 +60,7 @@ def search(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "#{Utils.__listify(_index)}/_fleet/_fleet_search" + path = "#{Utils.__listify(_index)}/_fleet/_fleet_search" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb index 6c1dfd3a1d..3b956abf07 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb @@ -41,11 +41,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html # def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "get" } + request_opts = { endpoint: arguments[:endpoint] || 'get' } - defined_params = [:index, :id].inject({}) do |set_variables, variable| + defined_params = %i[index id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -66,11 +65,11 @@ def get(arguments = {}) params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb index b78db8f9f1..d1a4baf476 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html # def get_script(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "get_script" } + request_opts = { endpoint: arguments[:endpoint] || 'get_script' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb index b11e3ae4f9..845762ab86 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb @@ -28,7 +28,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-contexts.html # def get_script_context(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "get_script_context" } + request_opts = { endpoint: arguments[:endpoint] || 'get_script_context' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -36,7 +36,7 @@ def get_script_context(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_script_context" + path = '_script_context' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb index e27b3804f3..d8f9d8d77b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb @@ -28,7 +28,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html # def get_script_languages(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "get_script_languages" } + request_opts = { endpoint: arguments[:endpoint] || 'get_script_languages' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -36,7 +36,7 @@ def get_script_languages(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_script_language" + path = '_script_language' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb index 05515f7d88..e66b8c5e6c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb @@ -39,11 +39,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html # def get_source(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "get_source" } + request_opts = { endpoint: arguments[:endpoint] || 'get_source' } - defined_params = [:index, :id].inject({}) do |set_variables, variable| + defined_params = %i[index id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb index 0c77dd803c..64306ce433 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html # def explore(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "graph.explore" } + request_opts = { endpoint: arguments[:endpoint] || 'graph.explore' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -46,7 +45,7 @@ def explore(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) @@ -56,7 +55,7 @@ def explore(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "#{Utils.__listify(_index)}/_graph/explore" + path = "#{Utils.__listify(_index)}/_graph/explore" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb index 82dec94607..7849b26638 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html # def health_report(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "health_report" } + request_opts = { endpoint: arguments[:endpoint] || 'health_report' } - defined_params = [:feature].inject({}) do |set_variables, variable| + defined_params = [:feature].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,7 +50,7 @@ def health_report(arguments = {}) path = if _feature "_health_report/#{Utils.__listify(_feature)}" else - "_health_report" + '_health_report' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb index 4a1b6fb808..d691aa13d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb @@ -43,11 +43,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html # def index(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "index" } + request_opts = { endpoint: arguments[:endpoint] || 'index' } - defined_params = [:index, :id].inject({}) do |set_variables, variable| + defined_params = %i[index id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb index f2e7ed0249..824ecf28ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html # def delete_lifecycle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ilm.delete_lifecycle" } + request_opts = { endpoint: arguments[:endpoint] || 'ilm.delete_lifecycle' } - defined_params = [:policy].inject({}) do |set_variables, variable| + defined_params = [:policy].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb index 633efe06e2..5480ccb531 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html # def explain_lifecycle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ilm.explain_lifecycle" } + request_opts = { endpoint: arguments[:endpoint] || 'ilm.explain_lifecycle' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb index 55a1f6fe2b..dc898b2659 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html # def get_lifecycle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ilm.get_lifecycle" } + request_opts = { endpoint: arguments[:endpoint] || 'ilm.get_lifecycle' } - defined_params = [:policy].inject({}) do |set_variables, variable| + defined_params = [:policy].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -49,7 +48,7 @@ def get_lifecycle(arguments = {}) path = if _policy "_ilm/policy/#{Utils.__listify(_policy)}" else - "_ilm/policy" + '_ilm/policy' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb index a11cbd711a..0cf68bc5c1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html # def get_status(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ilm.get_status" } + request_opts = { endpoint: arguments[:endpoint] || 'ilm.get_status' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def get_status(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_ilm/status" + path = '_ilm/status' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb index 0bcc6dc36a..c75e5a8bb0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html # def migrate_to_data_tiers(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ilm.migrate_to_data_tiers" } + request_opts = { endpoint: arguments[:endpoint] || 'ilm.migrate_to_data_tiers' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +39,7 @@ def migrate_to_data_tiers(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_ilm/migrate_to_data_tiers" + path = '_ilm/migrate_to_data_tiers' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb index 9d73641ae1..212cb8efc6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html # def move_to_step(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ilm.move_to_step" } + request_opts = { endpoint: arguments[:endpoint] || 'ilm.move_to_step' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb index 3eeb140997..da5fcecdfc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html # def put_lifecycle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ilm.put_lifecycle" } + request_opts = { endpoint: arguments[:endpoint] || 'ilm.put_lifecycle' } - defined_params = [:policy].inject({}) do |set_variables, variable| + defined_params = [:policy].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb index 0b1defd4d9..96eaed6977 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html # def remove_policy(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ilm.remove_policy" } + request_opts = { endpoint: arguments[:endpoint] || 'ilm.remove_policy' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb index 92bb6b6ab0..61fbb1b173 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html # def retry(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ilm.retry" } + request_opts = { endpoint: arguments[:endpoint] || 'ilm.retry' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb index 9c4ba85f90..0f30639b52 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html # def start(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ilm.start" } + request_opts = { endpoint: arguments[:endpoint] || 'ilm.start' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def start(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_ilm/start" + path = '_ilm/start' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb index 6d4ef5484d..23e0761b67 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html # def stop(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ilm.stop" } + request_opts = { endpoint: arguments[:endpoint] || 'ilm.stop' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def stop(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_ilm/stop" + path = '_ilm/stop' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb index 94e1929a99..b04cfd2b68 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-blocks.html # def add_block(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.add_block" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.add_block' } - defined_params = [:index, :block].inject({}) do |set_variables, variable| + defined_params = %i[index block].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb index fed860ea5f..00e736136e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb @@ -31,18 +31,17 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html # def analyze(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.analyze" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.analyze' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) @@ -52,11 +51,11 @@ def analyze(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.__listify(_index)}/_analyze" - else - "_analyze" - end + path = if _index + "#{Utils.__listify(_index)}/_analyze" + else + '_analyze' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb index de956c6961..0e214b6e48 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html # def clear_cache(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.clear_cache" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.clear_cache' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,7 +55,7 @@ def clear_cache(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_cache/clear" else - "_cache/clear" + '_cache/clear' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb index a36c64d4cd..fd336f75ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clone-index.html # def clone(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.clone" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.clone' } - defined_params = [:index, :target].inject({}) do |set_variables, variable| + defined_params = %i[index target].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb index cd351a1a58..e3533f1a27 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html # def close(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.close" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.close' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb index 31efb53622..0135beabd9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html # def create(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.create" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.create' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb index 7f2020c631..2462f6b966 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def create_data_stream(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.create_data_stream" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.create_data_stream' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb index e40df64d9b..4d7087632d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def data_streams_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.data_streams_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.data_streams_stats' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -49,7 +48,7 @@ def data_streams_stats(arguments = {}) path = if _name "_data_stream/#{Utils.__listify(_name)}/_stats" else - "_data_stream/_stats" + '_data_stream/_stats' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb index 5195919945..bb53aaa0cc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html # def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.delete" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.delete' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -57,11 +56,11 @@ def delete(arguments = {}) params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb index 1c27f92032..abfd6ebed6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def delete_alias(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.delete_alias" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.delete_alias' } - defined_params = [:index, :name].inject({}) do |set_variables, variable| + defined_params = %i[index name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,9 +53,7 @@ def delete_alias(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = if _index && _name - "#{Utils.__listify(_index)}/_aliases/#{Utils.__listify(_name)}" - end + path = ("#{Utils.__listify(_index)}/_aliases/#{Utils.__listify(_name)}" if _index && _name) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb index c6738e84a6..f8b248bb2a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-delete-lifecycle.html # def delete_data_lifecycle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.delete_data_lifecycle" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.delete_data_lifecycle' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb index 56d39a4881..d1e743273e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def delete_data_stream(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.delete_data_stream" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.delete_data_stream' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb index 9d7a724fea..e4e20fad6b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-template.html # def delete_index_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.delete_index_template" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.delete_index_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb index 25f78099ee..ec10ca44aa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-template-v1.html # def delete_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.delete_template" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.delete_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,11 +53,11 @@ def delete_template(arguments = {}) params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb index 4a86b132da..cd3308a1b5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb @@ -39,11 +39,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-disk-usage.html # def disk_usage(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.disk_usage" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.disk_usage' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb index 5bec9333a7..b08ac1ecee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html # def downsample(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.downsample" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.downsample' } - defined_params = [:index, :target_index].inject({}) do |set_variables, variable| + defined_params = %i[index target_index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb index aab738b7e0..34e9b34a54 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html # def exists(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.exists" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.exists' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -58,11 +57,11 @@ def exists(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 end end - alias_method :exists?, :exists + alias exists? exists end end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb index 7e487c27b7..597a9e010d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def exists_alias(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.exists_alias" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.exists_alias' } - defined_params = [:name, :index].inject({}) do |set_variables, variable| + defined_params = %i[name index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -63,11 +62,11 @@ def exists_alias(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 end end - alias_method :exists_alias?, :exists_alias + alias exists_alias? exists_alias end end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb index 941496fd7f..b7c2fbb12a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index-templates.html # def exists_index_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.exists_index_template" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.exists_index_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -59,7 +58,7 @@ def exists_index_template(arguments = {}) ) end - alias_method :exists_index_template?, :exists_index_template + alias exists_index_template? exists_index_template end end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb index 8c188674c7..3d1defc508 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-template-exists-v1.html # def exists_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.exists_template" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.exists_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -55,11 +54,11 @@ def exists_template(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 end end - alias_method :exists_template?, :exists_template + alias exists_template? exists_template end end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb index d2ddca90c6..c155af80e9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-explain-lifecycle.html # def explain_data_lifecycle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.explain_data_lifecycle" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.explain_data_lifecycle' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb index 44a15fbfb7..aaac263510 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/field-usage-stats.html # def field_usage_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.field_usage_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.field_usage_stats' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb index e9e68d9bf8..0e92583735 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html # def flush(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.flush" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.flush' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,7 +53,7 @@ def flush(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_flush" else - "_flush" + '_flush' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb index 7275f5e69e..6ea744edc3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html # def forcemerge(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.forcemerge" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.forcemerge' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,7 +55,7 @@ def forcemerge(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_forcemerge" else - "_forcemerge" + '_forcemerge' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb index 7dd7204641..33836e4e6c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html # def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.get" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.get' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb index 661b276f85..4e598e33a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def get_alias(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.get_alias" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.get_alias' } - defined_params = [:name, :index].inject({}) do |set_variables, variable| + defined_params = %i[name index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -60,7 +59,7 @@ def get_alias(arguments = {}) elsif _name "_alias/#{Utils.__listify(_name)}" else - "_alias" + '_alias' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb index da20b059c2..217c0f6a4e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-get-lifecycle.html # def get_data_lifecycle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.get_data_lifecycle" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.get_data_lifecycle' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb index 511d8dd2e3..56abc8e409 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def get_data_stream(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.get_data_stream" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.get_data_stream' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,7 +50,7 @@ def get_data_stream(arguments = {}) path = if _name "_data_stream/#{Utils.__listify(_name)}" else - "_data_stream" + '_data_stream' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb index 8ce35dd267..f4aad0249d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html # def get_field_mapping(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.get_field_mapping" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.get_field_mapping' } - defined_params = [:fields, :index].inject({}) do |set_variables, variable| + defined_params = %i[fields index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb index dd91801bb6..620537f86c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template.html # def get_index_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.get_index_template" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.get_index_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def get_index_template(arguments = {}) path = if _name "_index_template/#{Utils.__listify(_name)}" else - "_index_template" + '_index_template' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb index 12e121ea02..8160fd20b3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html # def get_mapping(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.get_mapping" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.get_mapping' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,7 +53,7 @@ def get_mapping(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_mapping" else - "_mapping" + '_mapping' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb index 80b80122bd..a388991927 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html # def get_settings(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.get_settings" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.get_settings' } - defined_params = [:index, :name].inject({}) do |set_variables, variable| + defined_params = %i[index name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -63,7 +62,7 @@ def get_settings(arguments = {}) elsif _name "_settings/#{Utils.__listify(_name)}" else - "_settings" + '_settings' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb index e11959ce17..2a19f7f48b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template-v1.html # def get_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.get_template" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.get_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -52,7 +51,7 @@ def get_template(arguments = {}) path = if _name "_template/#{Utils.__listify(_name)}" else - "_template" + '_template' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb index cc25b796e8..759d526335 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def migrate_to_data_stream(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.migrate_to_data_stream" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.migrate_to_data_stream' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb index 1b594a9f58..eb8dedc08e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def modify_data_stream(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.modify_data_stream" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.modify_data_stream' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def modify_data_stream(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_data_stream/_modify" + path = '_data_stream/_modify' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb index ad758723e1..b1b6844cc0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html # def open(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.open" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.open' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb index afab1ebf7a..dde2b8a41f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def promote_data_stream(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.promote_data_stream" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.promote_data_stream' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb index ded3ff1002..d18dce3386 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def put_alias(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.put_alias" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.put_alias' } - defined_params = [:index, :name].inject({}) do |set_variables, variable| + defined_params = %i[index name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -55,9 +54,7 @@ def put_alias(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = if _index && _name - "#{Utils.__listify(_index)}/_aliases/#{Utils.__listify(_name)}" - end + path = ("#{Utils.__listify(_index)}/_aliases/#{Utils.__listify(_name)}" if _index && _name) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb index 22e58eda06..f64a67418b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-put-lifecycle.html # def put_data_lifecycle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.put_data_lifecycle" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.put_data_lifecycle' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb index 16b2a11896..061f55edbc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-template.html # def put_index_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.put_index_template" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.put_index_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb index 1d38203329..c0c85affa7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html # def put_mapping(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.put_mapping" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.put_mapping' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb index 3b65e83077..887c817ab4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb @@ -39,11 +39,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html # def put_settings(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.put_settings" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.put_settings' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -60,7 +59,7 @@ def put_settings(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_settings" else - "_settings" + '_settings' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb index 2dbd61ff30..93888e5236 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html # def put_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.put_template" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.put_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb index 157897569b..c599681e96 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html # def recovery(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.recovery" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.recovery' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,7 +50,7 @@ def recovery(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_recovery" else - "_recovery" + '_recovery' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb index 999e3de93c..732d10d415 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html # def refresh(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.refresh" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.refresh' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -52,7 +51,7 @@ def refresh(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_refresh" else - "_refresh" + '_refresh' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb index df552335f7..3fb1dcf414 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-reload-analyzers.html # def reload_search_analyzers(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.reload_search_analyzers" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.reload_search_analyzers' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb index f68a9c866f..0f955a8aa0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-index-api.html # def resolve_index(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.resolve_index" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.resolve_index' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index 93493218b1..fe1c79258f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html # def rollover(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.rollover" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.rollover' } - defined_params = [:alias, :new_index].inject({}) do |set_variables, variable| + defined_params = %i[alias new_index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb index cd627031ef..b29bb72c65 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html # def segments(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.segments" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.segments' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def segments(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_segments" else - "_segments" + '_segments' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb index 174b35bfcd..04000d4f7e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html # def shard_stores(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.shard_stores" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.shard_stores' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def shard_stores(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_shard_stores" else - "_shard_stores" + '_shard_stores' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb index 9f046786a7..00a28b5ec1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shrink-index.html # def shrink(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.shrink" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.shrink' } - defined_params = [:index, :target].inject({}) do |set_variables, variable| + defined_params = %i[index target].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb index c7c7d90c8d..3817f9f5ca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-simulate-index.html # def simulate_index_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.simulate_index_template" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.simulate_index_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb index b71c34621d..afb1e8306f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-simulate-template.html # def simulate_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.simulate_template" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.simulate_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,7 +53,7 @@ def simulate_template(arguments = {}) path = if _name "_index_template/_simulate/#{Utils.__listify(_name)}" else - "_index_template/_simulate" + '_index_template/_simulate' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb index 5084307c94..4bd7412a9c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-split-index.html # def split(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.split" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.split' } - defined_params = [:index, :target].inject({}) do |set_variables, variable| + defined_params = %i[index target].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb index e487bac32b..c054f9434a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb @@ -40,11 +40,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html # def stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.stats" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.stats' } - defined_params = [:metric, :index].inject({}) do |set_variables, variable| + defined_params = %i[metric index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -65,7 +64,7 @@ def stats(arguments = {}) elsif _index "#{Utils.__listify(_index)}/_stats" else - "_stats" + '_stats' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb index 1b9e340037..6263d97b2b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb @@ -41,11 +41,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html # def unfreeze(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.unfreeze" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.unfreeze' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb index 07e3e8da40..e7178802bf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb @@ -32,7 +32,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def update_aliases(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.update_aliases" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.update_aliases' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,7 @@ def update_aliases(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_aliases" + path = '_aliases' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb index c82fd4d605..03a22a7bc7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb @@ -43,18 +43,17 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-validate.html # def validate_query(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "indices.validate_query" } + request_opts = { endpoint: arguments[:endpoint] || 'indices.validate_query' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) @@ -64,11 +63,11 @@ def validate_query(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.__listify(_index)}/_validate/query" - else - "_validate/query" - end + path = if _index + "#{Utils.__listify(_index)}/_validate/query" + else + '_validate/query' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb index 9c29cf6597..d8371200a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-inference-api.html # def delete_model(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "inference.delete_model" } + request_opts = { endpoint: arguments[:endpoint] || 'inference.delete_model' } - defined_params = [:task_type, :model_id].inject({}) do |set_variables, variable| + defined_params = %i[task_type model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb index ffa435f70b..16be9eabba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-api.html # def get_model(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "inference.get_model" } + request_opts = { endpoint: arguments[:endpoint] || 'inference.get_model' } - defined_params = [:task_type, :model_id].inject({}) do |set_variables, variable| + defined_params = %i[task_type model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb index 31d0b009b9..38a5024134 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/post-inference-api.html # def inference(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "inference.inference" } + request_opts = { endpoint: arguments[:endpoint] || 'inference.inference' } - defined_params = [:task_type, :model_id].inject({}) do |set_variables, variable| + defined_params = %i[task_type model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb index 48465b63c6..381f32a175 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-inference-api.html # def put_model(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "inference.put_model" } + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_model' } - defined_params = [:task_type, :model_id].inject({}) do |set_variables, variable| + defined_params = %i[task_type model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb index dd26a5b986..ca00f362a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb @@ -28,7 +28,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html # def info(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "info" } + request_opts = { endpoint: arguments[:endpoint] || 'info' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -36,7 +36,7 @@ def info(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "" + path = '' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb index 681e4c798e..d06a96d72f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-pipeline-api.html # def delete_pipeline(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ingest.delete_pipeline" } + request_opts = { endpoint: arguments[:endpoint] || 'ingest.delete_pipeline' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb index 6b9d1e5b82..6764c9cd68 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-stats-api.html # def geo_ip_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ingest.geo_ip_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'ingest.geo_ip_stats' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def geo_ip_stats(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_ingest/geoip/stats" + path = '_ingest/geoip/stats' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb index fdaba2eee3..250ff6d312 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-pipeline-api.html # def get_pipeline(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ingest.get_pipeline" } + request_opts = { endpoint: arguments[:endpoint] || 'ingest.get_pipeline' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,7 +50,7 @@ def get_pipeline(arguments = {}) path = if _id "_ingest/pipeline/#{Utils.__listify(_id)}" else - "_ingest/pipeline" + '_ingest/pipeline' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb index bb8431e65f..6dbfa81bbc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html#grok-processor-rest-get # def processor_grok(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ingest.processor_grok" } + request_opts = { endpoint: arguments[:endpoint] || 'ingest.processor_grok' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def processor_grok(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_ingest/processor/grok" + path = '_ingest/processor/grok' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb index 1da84bfe2f..0c626836e2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-pipeline-api.html # def put_pipeline(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ingest.put_pipeline" } + request_opts = { endpoint: arguments[:endpoint] || 'ingest.put_pipeline' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb index b711c8323a..8ea6e3c717 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/simulate-pipeline-api.html # def simulate(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ingest.simulate" } + request_opts = { endpoint: arguments[:endpoint] || 'ingest.simulate' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def simulate(arguments = {}) path = if _id "_ingest/pipeline/#{Utils.__listify(_id)}/_simulate" else - "_ingest/pipeline/_simulate" + '_ingest/pipeline/_simulate' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb index bc8a00adef..8a94ed0529 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html # def knn_search(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "knn_search" } + request_opts = { endpoint: arguments[:endpoint] || 'knn_search' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -48,7 +47,7 @@ def knn_search(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) @@ -58,7 +57,7 @@ def knn_search(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "#{Utils.__listify(_index)}/_knn_search" + path = "#{Utils.__listify(_index)}/_knn_search" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb index 495fb1c7b9..2be8986ab9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-license.html # def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "license.delete" } + request_opts = { endpoint: arguments[:endpoint] || 'license.delete' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def delete(arguments = {}) body = nil method = Elasticsearch::API::HTTP_DELETE - path = "_license" + path = '_license' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb index f0966f9936..ee9dc42840 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-license.html # def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "license.get" } + request_opts = { endpoint: arguments[:endpoint] || 'license.get' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +39,7 @@ def get(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_license" + path = '_license' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb index b3ac307f76..351df544dc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-basic-status.html # def get_basic_status(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "license.get_basic_status" } + request_opts = { endpoint: arguments[:endpoint] || 'license.get_basic_status' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def get_basic_status(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_license/basic_status" + path = '_license/basic_status' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb index 752c936d11..e611a4570c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trial-status.html # def get_trial_status(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "license.get_trial_status" } + request_opts = { endpoint: arguments[:endpoint] || 'license.get_trial_status' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def get_trial_status(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_license/trial_status" + path = '_license/trial_status' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb index e71d3628c1..4ff504f8d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-license.html # def post(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "license.post" } + request_opts = { endpoint: arguments[:endpoint] || 'license.post' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +39,7 @@ def post(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT - path = "_license" + path = '_license' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb index b164b4c945..c9c5b7c8f5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-basic.html # def post_start_basic(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "license.post_start_basic" } + request_opts = { endpoint: arguments[:endpoint] || 'license.post_start_basic' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -38,7 +38,7 @@ def post_start_basic(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_license/start_basic" + path = '_license/start_basic' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb index ccb31989f1..630c18035d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trial.html # def post_start_trial(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "license.post_start_trial" } + request_opts = { endpoint: arguments[:endpoint] || 'license.post_start_trial' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +39,7 @@ def post_start_trial(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_license/start_trial" + path = '_license/start_trial' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb index a7d39e7323..3b8a16c6d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html # def delete_pipeline(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "logstash.delete_pipeline" } + request_opts = { endpoint: arguments[:endpoint] || 'logstash.delete_pipeline' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb index 39b6fffc76..eaed065ef7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html # def get_pipeline(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "logstash.get_pipeline" } + request_opts = { endpoint: arguments[:endpoint] || 'logstash.get_pipeline' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -49,7 +48,7 @@ def get_pipeline(arguments = {}) path = if _id "_logstash/pipeline/#{Utils.__listify(_id)}" else - "_logstash/pipeline" + '_logstash/pipeline' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb index 4960eb8351..4e51cb3b13 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html # def put_pipeline(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "logstash.put_pipeline" } + request_opts = { endpoint: arguments[:endpoint] || 'logstash.put_pipeline' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb index 314bc96487..24d3aa5fc1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-trained-model-deployment-cache.html # def clear_trained_model_deployment_cache(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.clear_trained_model_deployment_cache" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.clear_trained_model_deployment_cache' } - defined_params = [:model_id].inject({}) do |set_variables, variable| + defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb index 5987648572..5683ec5644 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html # def close_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.close_job" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.close_job' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb index d3ec48a4fd..196d6e25b1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html # def delete_calendar(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.delete_calendar" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_calendar' } - defined_params = [:calendar_id].inject({}) do |set_variables, variable| + defined_params = [:calendar_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb index 61ba87a19f..2e9d83e657 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html # def delete_calendar_event(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.delete_calendar_event" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_calendar_event' } - defined_params = [:calendar_id, :event_id].inject({}) do |set_variables, variable| + defined_params = %i[calendar_id event_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb index 5a971fecab..f13bc4a282 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html # def delete_calendar_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.delete_calendar_job" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_calendar_job' } - defined_params = [:calendar_id, :job_id].inject({}) do |set_variables, variable| + defined_params = %i[calendar_id job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb index 31309c49df..3bb2df5542 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html # def delete_data_frame_analytics(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.delete_data_frame_analytics" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_data_frame_analytics' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb index 80c9a2fb14..d8778a21b3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html # def delete_datafeed(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.delete_datafeed" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_datafeed' } - defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + defined_params = [:datafeed_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb index 583f896ad2..5d9f381d1d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html # def delete_expired_data(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.delete_expired_data" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_expired_data' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -52,7 +51,7 @@ def delete_expired_data(arguments = {}) path = if _job_id "_ml/_delete_expired_data/#{Utils.__listify(_job_id)}" else - "_ml/_delete_expired_data" + '_ml/_delete_expired_data' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb index 69d0e3b5de..1079e0b75d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html # def delete_filter(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.delete_filter" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_filter' } - defined_params = [:filter_id].inject({}) do |set_variables, variable| + defined_params = [:filter_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb index f85736576b..0a0d52aab3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html # def delete_forecast(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.delete_forecast" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_forecast' } - defined_params = [:job_id, :forecast_id].inject({}) do |set_variables, variable| + defined_params = %i[job_id forecast_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb index 349bc2680d..7ae7b88f3f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html # def delete_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.delete_job" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_job' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb index 3ae9962ea3..85cb5b61f7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html # def delete_model_snapshot(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.delete_model_snapshot" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_model_snapshot' } - defined_params = [:job_id, :snapshot_id].inject({}) do |set_variables, variable| + defined_params = %i[job_id snapshot_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb index 1e9965b573..56ea524b30 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html # def delete_trained_model(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.delete_trained_model" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_trained_model' } - defined_params = [:model_id].inject({}) do |set_variables, variable| + defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb index 437b8e959c..cc56b05856 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html # def delete_trained_model_alias(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.delete_trained_model_alias" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_trained_model_alias' } - defined_params = [:model_id, :model_alias].inject({}) do |set_variables, variable| + defined_params = %i[model_id model_alias].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb index 895c06383f..dc40e34a56 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html # def estimate_model_memory(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.estimate_model_memory" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.estimate_model_memory' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def estimate_model_memory(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_ml/anomaly_detectors/_estimate_model_memory" + path = '_ml/anomaly_detectors/_estimate_model_memory' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb index 06435db983..957f203433 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html # def evaluate_data_frame(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.evaluate_data_frame" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.evaluate_data_frame' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def evaluate_data_frame(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_ml/data_frame/_evaluate" + path = '_ml/data_frame/_evaluate' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb index 70375bc81b..8aef4b83b4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb @@ -31,11 +31,10 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html # def explain_data_frame_analytics(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.explain_data_frame_analytics" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.explain_data_frame_analytics' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -52,11 +51,11 @@ def explain_data_frame_analytics(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _id - "_ml/data_frame/analytics/#{Utils.__listify(_id)}/_explain" - else - "_ml/data_frame/analytics/_explain" - end + path = if _id + "_ml/data_frame/analytics/#{Utils.__listify(_id)}/_explain" + else + '_ml/data_frame/analytics/_explain' + end params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb index 939763bdd2..48b8334e30 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html # def flush_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.flush_job" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.flush_job' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb index 59b13bca8f..fefe7dbdb5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html # def forecast(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.forecast" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.forecast' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb index 7b2837477b..a68322b96a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb @@ -41,11 +41,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html # def get_buckets(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_buckets" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_buckets' } - defined_params = [:job_id, :timestamp].inject({}) do |set_variables, variable| + defined_params = %i[job_id timestamp].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -66,11 +65,11 @@ def get_buckets(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _job_id && _timestamp - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/buckets/#{Utils.__listify(_timestamp)}" - else - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/buckets" - end + path = if _job_id && _timestamp + "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/buckets/#{Utils.__listify(_timestamp)}" + else + "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/buckets" + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb index 6ba6fe2dbd..d207e8872b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html # def get_calendar_events(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_calendar_events" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_calendar_events' } - defined_params = [:calendar_id].inject({}) do |set_variables, variable| + defined_params = [:calendar_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb index 2c34372306..b068075dbe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html # def get_calendars(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_calendars" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_calendars' } - defined_params = [:calendar_id].inject({}) do |set_variables, variable| + defined_params = [:calendar_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,11 +53,11 @@ def get_calendars(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _calendar_id - "_ml/calendars/#{Utils.__listify(_calendar_id)}" - else - "_ml/calendars" - end + path = if _calendar_id + "_ml/calendars/#{Utils.__listify(_calendar_id)}" + else + '_ml/calendars' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb index 93a67e38c0..4bac8ea0e6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html # def get_categories(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_categories" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_categories' } - defined_params = [:job_id, :category_id].inject({}) do |set_variables, variable| + defined_params = %i[job_id category_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -60,11 +59,11 @@ def get_categories(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _job_id && _category_id - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/categories/#{Utils.__listify(_category_id)}" - else - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/categories" - end + path = if _job_id && _category_id + "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/categories/#{Utils.__listify(_category_id)}" + else + "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/categories" + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb index 9507f68871..a6a097d654 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html # def get_data_frame_analytics(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_data_frame_analytics" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_data_frame_analytics' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def get_data_frame_analytics(arguments = {}) path = if _id "_ml/data_frame/analytics/#{Utils.__listify(_id)}" else - "_ml/data_frame/analytics" + '_ml/data_frame/analytics' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb index 6870432a04..5a12263db7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html # def get_data_frame_analytics_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_data_frame_analytics_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_data_frame_analytics_stats' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def get_data_frame_analytics_stats(arguments = {}) path = if _id "_ml/data_frame/analytics/#{Utils.__listify(_id)}/_stats" else - "_ml/data_frame/analytics/_stats" + '_ml/data_frame/analytics/_stats' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb index b3556516a9..9a527cf537 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html # def get_datafeed_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_datafeed_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_datafeed_stats' } - defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + defined_params = [:datafeed_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -50,7 +49,7 @@ def get_datafeed_stats(arguments = {}) path = if _datafeed_id "_ml/datafeeds/#{Utils.__listify(_datafeed_id)}/_stats" else - "_ml/datafeeds/_stats" + '_ml/datafeeds/_stats' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb index ef71e58d7b..f7c0d75e1a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html # def get_datafeeds(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_datafeeds" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_datafeeds' } - defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + defined_params = [:datafeed_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,7 +50,7 @@ def get_datafeeds(arguments = {}) path = if _datafeed_id "_ml/datafeeds/#{Utils.__listify(_datafeed_id)}" else - "_ml/datafeeds" + '_ml/datafeeds' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb index cda9f94fc3..740d6087d1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html # def get_filters(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_filters" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_filters' } - defined_params = [:filter_id].inject({}) do |set_variables, variable| + defined_params = [:filter_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,7 +50,7 @@ def get_filters(arguments = {}) path = if _filter_id "_ml/filters/#{Utils.__listify(_filter_id)}" else - "_ml/filters" + '_ml/filters' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb index 4b540cba82..c26cfe0ee3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb @@ -39,11 +39,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html # def get_influencers(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_influencers" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_influencers' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -62,7 +61,7 @@ def get_influencers(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/influencers" + path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/influencers" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb index 4e607b22f6..a775aa6822 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html # def get_job_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_job_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_job_stats' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -50,7 +49,7 @@ def get_job_stats(arguments = {}) path = if _job_id "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_stats" else - "_ml/anomaly_detectors/_stats" + '_ml/anomaly_detectors/_stats' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb index b62efb1b30..ed56801065 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html # def get_jobs(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_jobs" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_jobs' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,7 +50,7 @@ def get_jobs(arguments = {}) path = if _job_id "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}" else - "_ml/anomaly_detectors" + '_ml/anomaly_detectors' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb index 9db2816dad..001adaa2d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html # def get_memory_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_memory_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_memory_stats' } - defined_params = [:node_id].inject({}) do |set_variables, variable| + defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,7 +50,7 @@ def get_memory_stats(arguments = {}) path = if _node_id "_ml/memory/#{Utils.__listify(_node_id)}/_stats" else - "_ml/memory/_stats" + '_ml/memory/_stats' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb index b74c008eba..561bd95bad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html # def get_model_snapshot_upgrade_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_model_snapshot_upgrade_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_model_snapshot_upgrade_stats' } - defined_params = [:job_id, :snapshot_id].inject({}) do |set_variables, variable| + defined_params = %i[job_id snapshot_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb index 9b4aff01c5..df56a11e88 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html # def get_model_snapshots(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_model_snapshots" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_model_snapshots' } - defined_params = [:job_id, :snapshot_id].inject({}) do |set_variables, variable| + defined_params = %i[job_id snapshot_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -63,11 +62,11 @@ def get_model_snapshots(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _job_id && _snapshot_id - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/model_snapshots/#{Utils.__listify(_snapshot_id)}" - else - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/model_snapshots" - end + path = if _job_id && _snapshot_id + "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/model_snapshots/#{Utils.__listify(_snapshot_id)}" + else + "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/model_snapshots" + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb index 71501ff37c..fa40a14238 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html # def get_overall_buckets(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_overall_buckets" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_overall_buckets' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -61,7 +60,7 @@ def get_overall_buckets(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/overall_buckets" + path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/overall_buckets" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb index 7bb28cdf47..66b4f6b7df 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb @@ -39,11 +39,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html # def get_records(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_records" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_records' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -62,7 +61,7 @@ def get_records(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/records" + path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/records" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb index 083d43793a..09b7813943 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html # def get_trained_models(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_trained_models" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_trained_models' } - defined_params = [:model_id].inject({}) do |set_variables, variable| + defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -57,7 +56,7 @@ def get_trained_models(arguments = {}) path = if _model_id "_ml/trained_models/#{Utils.__listify(_model_id)}" else - "_ml/trained_models" + '_ml/trained_models' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb index 7ffd95ebfb..0d56ddb20a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html # def get_trained_models_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.get_trained_models_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.get_trained_models_stats' } - defined_params = [:model_id].inject({}) do |set_variables, variable| + defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -52,7 +51,7 @@ def get_trained_models_stats(arguments = {}) path = if _model_id "_ml/trained_models/#{Utils.__listify(_model_id)}/_stats" else - "_ml/trained_models/_stats" + '_ml/trained_models/_stats' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb index 9aa937960c..59dbc17156 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-trained-model.html # def infer_trained_model(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.infer_trained_model" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.infer_trained_model' } - defined_params = [:model_id].inject({}) do |set_variables, variable| + defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,9 +55,7 @@ def infer_trained_model(arguments = {}) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_POST - path = if _model_id - "_ml/trained_models/#{Utils.__listify(_model_id)}/deployment/_infer" - end + path = ("_ml/trained_models/#{Utils.__listify(_model_id)}/deployment/_infer" if _model_id) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb index 2988ee0c6f..c1f3d46670 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html # def info(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.info" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.info' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def info(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_ml/info" + path = '_ml/info' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb index 9e851c55e5..69ab6ad44e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html # def open_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.open_job" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.open_job' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb index 47b43c0d0e..c80bc49eab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html # def post_calendar_events(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.post_calendar_events" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.post_calendar_events' } - defined_params = [:calendar_id].inject({}) do |set_variables, variable| + defined_params = [:calendar_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb index 0d44a0d0c4..f19f58530b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html # def post_data(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.post_data" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.post_data' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb index 6b7d05fc3a..33e7ca9675 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb @@ -31,11 +31,10 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html # def preview_data_frame_analytics(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.preview_data_frame_analytics" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.preview_data_frame_analytics' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -52,11 +51,11 @@ def preview_data_frame_analytics(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _id - "_ml/data_frame/analytics/#{Utils.__listify(_id)}/_preview" - else - "_ml/data_frame/analytics/_preview" - end + path = if _id + "_ml/data_frame/analytics/#{Utils.__listify(_id)}/_preview" + else + '_ml/data_frame/analytics/_preview' + end params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb index 63476bd422..78f421329b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html # def preview_datafeed(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.preview_datafeed" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.preview_datafeed' } - defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + defined_params = [:datafeed_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,11 +53,11 @@ def preview_datafeed(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _datafeed_id - "_ml/datafeeds/#{Utils.__listify(_datafeed_id)}/_preview" - else - "_ml/datafeeds/_preview" - end + path = if _datafeed_id + "_ml/datafeeds/#{Utils.__listify(_datafeed_id)}/_preview" + else + '_ml/datafeeds/_preview' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb index b50a34edbc..6bac27c8cc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html # def put_calendar(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.put_calendar" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.put_calendar' } - defined_params = [:calendar_id].inject({}) do |set_variables, variable| + defined_params = [:calendar_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb index c9bc69fa7e..5c7b779e81 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html # def put_calendar_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.put_calendar_job" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.put_calendar_job' } - defined_params = [:calendar_id, :job_id].inject({}) do |set_variables, variable| + defined_params = %i[calendar_id job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb index 4eb754abb9..737b51a739 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html # def put_data_frame_analytics(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.put_data_frame_analytics" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.put_data_frame_analytics' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb index 967f3c49ae..55ac679569 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html # def put_datafeed(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.put_datafeed" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.put_datafeed' } - defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + defined_params = [:datafeed_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb index 6d2dabfbb2..b08ad3dc1c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html # def put_filter(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.put_filter" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.put_filter' } - defined_params = [:filter_id].inject({}) do |set_variables, variable| + defined_params = [:filter_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb index e8b0c3f2a1..d5cebda595 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html # def put_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.put_job" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.put_job' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb index 3ea00db8a6..5107273c56 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html # def put_trained_model(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.put_trained_model' } - defined_params = [:model_id].inject({}) do |set_variables, variable| + defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb index 6cc4f48d74..9da28749f1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html # def put_trained_model_alias(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model_alias" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.put_trained_model_alias' } - defined_params = [:model_id, :model_alias].inject({}) do |set_variables, variable| + defined_params = %i[model_id model_alias].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb index 38d26b78a5..5fb6155e59 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html # def put_trained_model_definition_part(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model_definition_part" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.put_trained_model_definition_part' } - defined_params = [:model_id, :part].inject({}) do |set_variables, variable| + defined_params = %i[model_id part].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb index cd9d3545a9..f080f5f763 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html # def put_trained_model_vocabulary(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.put_trained_model_vocabulary" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.put_trained_model_vocabulary' } - defined_params = [:model_id].inject({}) do |set_variables, variable| + defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb index f07bcef8db..a5ce0e1b20 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html # def reset_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.reset_job" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.reset_job' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb index 8081ea7094..80f70b212a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html # def revert_model_snapshot(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.revert_model_snapshot" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.revert_model_snapshot' } - defined_params = [:job_id, :snapshot_id].inject({}) do |set_variables, variable| + defined_params = %i[job_id snapshot_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb index a95855ff9a..08bba48120 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html # def set_upgrade_mode(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.set_upgrade_mode" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.set_upgrade_mode' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +39,7 @@ def set_upgrade_mode(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_ml/set_upgrade_mode" + path = '_ml/set_upgrade_mode' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb index 92a6bbd34b..f54893de3d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html # def start_data_frame_analytics(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.start_data_frame_analytics" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.start_data_frame_analytics' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb index 1187f6d2b9..ec6b3957df 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html # def start_datafeed(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.start_datafeed" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.start_datafeed' } - defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + defined_params = [:datafeed_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb index 956e913092..9a63f004ab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trained-model-deployment.html # def start_trained_model_deployment(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.start_trained_model_deployment" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.start_trained_model_deployment' } - defined_params = [:model_id].inject({}) do |set_variables, variable| + defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb index 14192254c4..142085941a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html # def stop_data_frame_analytics(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.stop_data_frame_analytics" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.stop_data_frame_analytics' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb index 4bd4ef7a1e..dd7e8f0ad3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html # def stop_datafeed(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.stop_datafeed" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.stop_datafeed' } - defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + defined_params = [:datafeed_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb index 4b6024bb65..df59c9fb7a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-trained-model-deployment.html # def stop_trained_model_deployment(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.stop_trained_model_deployment" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.stop_trained_model_deployment' } - defined_params = [:model_id].inject({}) do |set_variables, variable| + defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb index 5e883d540d..fe5c713b46 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html # def update_data_frame_analytics(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.update_data_frame_analytics" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.update_data_frame_analytics' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb index 792b8dade7..34dc4dc9e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html # def update_datafeed(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.update_datafeed" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.update_datafeed' } - defined_params = [:datafeed_id].inject({}) do |set_variables, variable| + defined_params = [:datafeed_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb index c98c6c65a1..a540151478 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html # def update_filter(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.update_filter" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.update_filter' } - defined_params = [:filter_id].inject({}) do |set_variables, variable| + defined_params = [:filter_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb index d8ea774ca0..6ed25d906e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html # def update_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.update_job" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.update_job' } - defined_params = [:job_id].inject({}) do |set_variables, variable| + defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb index 8dec4ccb72..06c73a0dcc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html # def update_model_snapshot(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.update_model_snapshot" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.update_model_snapshot' } - defined_params = [:job_id, :snapshot_id].inject({}) do |set_variables, variable| + defined_params = %i[job_id snapshot_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb index 25878d7de7..2b08fa5dc5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-trained-model-deployment.html # def update_trained_model_deployment(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.update_trained_model_deployment" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.update_trained_model_deployment' } - defined_params = [:model_id].inject({}) do |set_variables, variable| + defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb index 3ab0ae2582..7d21a2afd3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html # def upgrade_job_snapshot(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.upgrade_job_snapshot" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.upgrade_job_snapshot' } - defined_params = [:job_id, :snapshot_id].inject({}) do |set_variables, variable| + defined_params = %i[job_id snapshot_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb index 6f1fc68595..66a4a8a394 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html # def validate(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.validate" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.validate' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def validate(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_ml/anomaly_detectors/_validate" + path = '_ml/anomaly_detectors/_validate' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb index fd99c712bb..77f97b9c46 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html # def validate_detector(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ml.validate_detector" } + request_opts = { endpoint: arguments[:endpoint] || 'ml.validate_detector' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def validate_detector(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_ml/anomaly_detectors/_validate/detector" + path = '_ml/anomaly_detectors/_validate/detector' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb index c9076967b3..ada183568f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb @@ -39,11 +39,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html # def mget(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "mget" } + request_opts = { endpoint: arguments[:endpoint] || 'mget' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -60,7 +59,7 @@ def mget(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_mget" else - "_mget" + '_mget' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb index 45f90274d5..561bfa4c0d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html # def deprecations(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "migration.deprecations" } + request_opts = { endpoint: arguments[:endpoint] || 'migration.deprecations' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -49,7 +48,7 @@ def deprecations(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_migration/deprecations" else - "_migration/deprecations" + '_migration/deprecations' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb index 165a7d2f33..b5263b949f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html # def get_feature_upgrade_status(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "migration.get_feature_upgrade_status" } + request_opts = { endpoint: arguments[:endpoint] || 'migration.get_feature_upgrade_status' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def get_feature_upgrade_status(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_migration/system_features" + path = '_migration/system_features' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb index 08766c3cb2..64f31d63d6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html # def post_feature_upgrade(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "migration.post_feature_upgrade" } + request_opts = { endpoint: arguments[:endpoint] || 'migration.post_feature_upgrade' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def post_feature_upgrade(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_migration/system_features" + path = '_migration/system_features' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb index 1dd391bc7e..fe2526af71 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb @@ -40,11 +40,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/monitor-elasticsearch-cluster.html # def bulk(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "monitoring.bulk" } + request_opts = { endpoint: arguments[:endpoint] || 'monitoring.bulk' } - defined_params = [:type].inject({}) do |set_variables, variable| + defined_params = [:type].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -61,17 +60,17 @@ def bulk(arguments = {}) path = if _type "_monitoring/#{Utils.__listify(_type)}/bulk" else - "_monitoring/bulk" + '_monitoring/bulk' end params = Utils.process_params(arguments) - if body.is_a? Array - payload = Elasticsearch::API::Utils.__bulkify(body) - else - payload = body - end + payload = if body.is_a? Array + Elasticsearch::API::Utils.__bulkify(body) + else + body + end - headers.merge!("Content-Type" => "application/x-ndjson") + headers.merge!('Content-Type' => 'application/x-ndjson') Elasticsearch::API::Response.new( perform_request(method, path, params, payload, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb index 7922036d28..e53eebd21b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html # def msearch(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "msearch" } + request_opts = { endpoint: arguments[:endpoint] || 'msearch' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -58,33 +57,31 @@ def msearch(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_msearch" else - "_msearch" + '_msearch' end params = Utils.process_params(arguments) - case - when body.is_a?(Array) && body.any? { |d| d.has_key? :search } + if body.is_a?(Array) && body.any? { |d| d.has_key? :search } payload = body - .inject([]) do |sum, item| + .each_with_object([]) do |item, sum| meta = item data = meta.delete(:search) sum << meta sum << data - sum end .map { |item| Elasticsearch::API.serializer.dump(item) } - payload << "" unless payload.empty? + payload << '' unless payload.empty? payload = payload.join("\n") - when body.is_a?(Array) + elsif body.is_a?(Array) payload = body.map { |d| d.is_a?(String) ? d : Elasticsearch::API.serializer.dump(d) } - payload << "" unless payload.empty? + payload << '' unless payload.empty? payload = payload.join("\n") else payload = body end - headers.merge!("Content-Type" => "application/x-ndjson") + headers.merge!('Content-Type' => 'application/x-ndjson') Elasticsearch::API::Response.new( perform_request(method, path, params, payload, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb index a341972c7a..9f8c741f39 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html # def msearch_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "msearch_template" } + request_opts = { endpoint: arguments[:endpoint] || 'msearch_template' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,21 +55,19 @@ def msearch_template(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_msearch/template" else - "_msearch/template" + '_msearch/template' end params = Utils.process_params(arguments) - case - when body.is_a?(Array) + if body.is_a?(Array) payload = body.map { |d| d.is_a?(String) ? d : Elasticsearch::API.serializer.dump(d) } - payload << "" unless payload.empty? - payload = payload.join(" -") + payload << '' unless payload.empty? + payload = payload.join("\n") else payload = body end - headers.merge!("Content-Type" => "application/x-ndjson") + headers.merge!('Content-Type' => 'application/x-ndjson') Elasticsearch::API::Response.new( perform_request(method, path, params, payload, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb index 69a42f269e..2621ff9d51 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb @@ -42,11 +42,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html # def mtermvectors(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "mtermvectors" } + request_opts = { endpoint: arguments[:endpoint] || 'mtermvectors' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,7 +53,7 @@ def mtermvectors(arguments = {}) headers = arguments.delete(:headers) || {} body = if (ids = arguments.delete(:ids)) - { :ids => ids } + { ids: ids } else arguments.delete(:body) end @@ -67,11 +66,11 @@ def mtermvectors(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.__listify(_index)}/_mtermvectors" - else - "_mtermvectors" - end + path = if _index + "#{Utils.__listify(_index)}/_mtermvectors" + else + '_mtermvectors' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb index 21c94a185d..9d26816ac4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb @@ -35,18 +35,15 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html # def clear_repositories_metering_archive(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "nodes.clear_repositories_metering_archive" } + request_opts = { endpoint: arguments[:endpoint] || 'nodes.clear_repositories_metering_archive' } - defined_params = [:node_id, :max_archive_version].inject({}) do |set_variables, variable| + defined_params = %i[node_id max_archive_version].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] - - raise ArgumentError, - "Required argument 'max_archive_version' missing" unless arguments[:max_archive_version] + raise ArgumentError, "Required argument 'max_archive_version' missing" unless arguments[:max_archive_version] arguments = arguments.clone headers = arguments.delete(:headers) || {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb index 1d5c846fed..9afe42fab4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html # def get_repositories_metering_info(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "nodes.get_repositories_metering_info" } + request_opts = { endpoint: arguments[:endpoint] || 'nodes.get_repositories_metering_info' } - defined_params = [:node_id].inject({}) do |set_variables, variable| + defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb index 6755bb1b67..20465247db 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html # def hot_threads(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "nodes.hot_threads" } + request_opts = { endpoint: arguments[:endpoint] || 'nodes.hot_threads' } - defined_params = [:node_id].inject({}) do |set_variables, variable| + defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,7 +55,7 @@ def hot_threads(arguments = {}) path = if _node_id "_nodes/#{Utils.__listify(_node_id)}/hot_threads" else - "_nodes/hot_threads" + '_nodes/hot_threads' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb index 03e1d34bc3..0fb3986309 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html # def info(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "nodes.info" } + request_opts = { endpoint: arguments[:endpoint] || 'nodes.info' } - defined_params = [:node_id, :metric].inject({}) do |set_variables, variable| + defined_params = %i[node_id metric].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -58,7 +57,7 @@ def info(arguments = {}) elsif _metric "_nodes/#{Utils.__listify(_metric)}" else - "_nodes" + '_nodes' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb index 3dbc232e0a..8c7ed792db 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/secure-settings.html#reloadable-secure-settings # def reload_secure_settings(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "nodes.reload_secure_settings" } + request_opts = { endpoint: arguments[:endpoint] || 'nodes.reload_secure_settings' } - defined_params = [:node_id].inject({}) do |set_variables, variable| + defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,7 +50,7 @@ def reload_secure_settings(arguments = {}) path = if _node_id "_nodes/#{Utils.__listify(_node_id)}/reload_secure_settings" else - "_nodes/reload_secure_settings" + '_nodes/reload_secure_settings' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb index 924f0cbd29..318d8c217c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb @@ -41,11 +41,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html # def stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "nodes.stats" } + request_opts = { endpoint: arguments[:endpoint] || 'nodes.stats' } - defined_params = [:node_id, :metric, :index_metric].inject({}) do |set_variables, variable| + defined_params = %i[node_id metric index_metric].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -72,7 +71,7 @@ def stats(arguments = {}) elsif _metric "_nodes/stats/#{Utils.__listify(_metric)}" else - "_nodes/stats" + '_nodes/stats' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb index 05d29c9052..9d5150ab6c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-usage.html # def usage(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "nodes.usage" } + request_opts = { endpoint: arguments[:endpoint] || 'nodes.usage' } - defined_params = [:node_id, :metric].inject({}) do |set_variables, variable| + defined_params = %i[node_id metric].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -57,7 +56,7 @@ def usage(arguments = {}) elsif _metric "_nodes/usage/#{Utils.__listify(_metric)}" else - "_nodes/usage" + '_nodes/usage' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb index 041d6c821b..3324db458f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html # def open_point_in_time(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "open_point_in_time" } + request_opts = { endpoint: arguments[:endpoint] || 'open_point_in_time' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb index 5f62c14bb3..7f8dd0bbf8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb @@ -28,7 +28,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html # def ping(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ping" } + request_opts = { endpoint: arguments[:endpoint] || 'ping' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -36,17 +36,15 @@ def ping(arguments = {}) body = nil method = Elasticsearch::API::HTTP_HEAD - path = "" + path = '' params = {} begin - perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 rescue Exception => e - if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not *Found|404|ConnectionFailed/i - false - else - raise e - end + raise e unless e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not *Found|404|ConnectionFailed/i + + false end end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/flamegraph.rb b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/flamegraph.rb index 23c54cd649..a809de4a9e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/flamegraph.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/flamegraph.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html # def flamegraph(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "profiling.flamegraph" } + request_opts = { endpoint: arguments[:endpoint] || 'profiling.flamegraph' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def flamegraph(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_profiling/flamegraph" + path = '_profiling/flamegraph' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/stacktraces.rb b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/stacktraces.rb index c9f10a4cec..5d2e78c2e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/stacktraces.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/stacktraces.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html # def stacktraces(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "profiling.stacktraces" } + request_opts = { endpoint: arguments[:endpoint] || 'profiling.stacktraces' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def stacktraces(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_profiling/stacktraces" + path = '_profiling/stacktraces' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/status.rb index 607823d8d3..78c74a494a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/status.rb @@ -32,7 +32,7 @@ module Actions # @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html # def status(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "profiling.status" } + request_opts = { endpoint: arguments[:endpoint] || 'profiling.status' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -40,7 +40,7 @@ def status(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_profiling/status" + path = '_profiling/status' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb index 8f55cf16db..b720d74044 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html # def put_script(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "put_script" } + request_opts = { endpoint: arguments[:endpoint] || 'put_script' } - defined_params = [:id, :context].inject({}) do |set_variables, variable| + defined_params = %i[id context].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb index d89ce3cf90..5a43c14046 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-ruleset.html # def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "query_ruleset.delete" } + request_opts = { endpoint: arguments[:endpoint] || 'query_ruleset.delete' } - defined_params = [:ruleset_id].inject({}) do |set_variables, variable| + defined_params = [:ruleset_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb index fea65f17c5..426572a806 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-ruleset.html # def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "query_ruleset.get" } + request_opts = { endpoint: arguments[:endpoint] || 'query_ruleset.get' } - defined_params = [:ruleset_id].inject({}) do |set_variables, variable| + defined_params = [:ruleset_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb index e552975586..18df19e9dd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb @@ -35,7 +35,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-query-rulesets.html # def list(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "query_ruleset.list" } + request_opts = { endpoint: arguments[:endpoint] || 'query_ruleset.list' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -43,7 +43,7 @@ def list(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_query_rules" + path = '_query_rules' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb index 75bda0f38c..03eba510ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-ruleset.html # def put(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "query_ruleset.put" } + request_opts = { endpoint: arguments[:endpoint] || 'query_ruleset.put' } - defined_params = [:ruleset_id].inject({}) do |set_variables, variable| + defined_params = [:ruleset_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb index 2ce15dade8..f9477705e7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-rank-eval.html # def rank_eval(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "rank_eval" } + request_opts = { endpoint: arguments[:endpoint] || 'rank_eval' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -55,7 +54,7 @@ def rank_eval(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_rank_eval" else - "_rank_eval" + '_rank_eval' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb index d3d1e10244..1447568931 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb @@ -39,7 +39,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html # def reindex(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "reindex" } + request_opts = { endpoint: arguments[:endpoint] || 'reindex' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,7 +49,7 @@ def reindex(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_reindex" + path = '_reindex' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb index 3686472394..e528d3b6ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html # def reindex_rethrottle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "reindex_rethrottle" } + request_opts = { endpoint: arguments[:endpoint] || 'reindex_rethrottle' } - defined_params = [:task_id].inject({}) do |set_variables, variable| + defined_params = [:task_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb index 26ff15d9d9..90de6aaea6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html # def render_search_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "render_search_template" } + request_opts = { endpoint: arguments[:endpoint] || 'render_search_template' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,11 +50,11 @@ def render_search_template(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _id - "_render/template/#{Utils.__listify(_id)}" - else - "_render/template" - end + path = if _id + "_render/template/#{Utils.__listify(_id)}" + else + '_render/template' + end params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb index 4ba53ada9c..fe87cfa556 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-delete-job.html # def delete_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "rollup.delete_job" } + request_opts = { endpoint: arguments[:endpoint] || 'rollup.delete_job' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb index ca5e9f4d57..4344386526 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-job.html # def get_jobs(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "rollup.get_jobs" } + request_opts = { endpoint: arguments[:endpoint] || 'rollup.get_jobs' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def get_jobs(arguments = {}) path = if _id "_rollup/job/#{Utils.__listify(_id)}" else - "_rollup/job" + '_rollup/job' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb index 201e95b897..93ac86cec1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-caps.html # def get_rollup_caps(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "rollup.get_rollup_caps" } + request_opts = { endpoint: arguments[:endpoint] || 'rollup.get_rollup_caps' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def get_rollup_caps(arguments = {}) path = if _id "_rollup/data/#{Utils.__listify(_id)}" else - "_rollup/data" + '_rollup/data' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb index e404838673..d530edc59f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-index-caps.html # def get_rollup_index_caps(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "rollup.get_rollup_index_caps" } + request_opts = { endpoint: arguments[:endpoint] || 'rollup.get_rollup_index_caps' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb index db75a21541..1286e65c2b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-put-job.html # def put_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "rollup.put_job" } + request_opts = { endpoint: arguments[:endpoint] || 'rollup.put_job' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb index 3589c2a597..597524c347 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-search.html # def rollup_search(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "rollup.rollup_search" } + request_opts = { endpoint: arguments[:endpoint] || 'rollup.rollup_search' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb index 22e81b2ba1..d1108d1ba3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-start-job.html # def start_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "rollup.start_job" } + request_opts = { endpoint: arguments[:endpoint] || 'rollup.start_job' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb index 6c0b1d89ef..f33070a4db 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-stop-job.html # def stop_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "rollup.stop_job" } + request_opts = { endpoint: arguments[:endpoint] || 'rollup.stop_job' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb index 6fdef5a87e..e9cc67da66 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb @@ -33,7 +33,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html # def scripts_painless_execute(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "scripts_painless_execute" } + request_opts = { endpoint: arguments[:endpoint] || 'scripts_painless_execute' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -46,7 +46,7 @@ def scripts_painless_execute(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_scripts/painless/_execute" + path = '_scripts/painless/_execute' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb index 5c21fc763c..2885c09a83 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-scroll # def scroll(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "scroll" } + request_opts = { endpoint: arguments[:endpoint] || 'scroll' } - defined_params = [:scroll_id].inject({}) do |set_variables, variable| + defined_params = [:scroll_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -58,11 +57,11 @@ def scroll(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _scroll_id - "_search/scroll/#{Utils.__listify(_scroll_id)}" - else - "_search/scroll" - end + path = if _scroll_id + "_search/scroll/#{Utils.__listify(_scroll_id)}" + else + '_search/scroll' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb index 9a11ea7cd3..af314d82db 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb @@ -75,18 +75,17 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html # def search(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search" } + request_opts = { endpoint: arguments[:endpoint] || 'search' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) @@ -96,11 +95,11 @@ def search(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.__listify(_index)}/_search" - else - "_search" - end + path = if _index + "#{Utils.__listify(_index)}/_search" + else + '_search' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb index af7907c674..165e1093dd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-search-application.html # def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search_application.delete" } + request_opts = { endpoint: arguments[:endpoint] || 'search_application.delete' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb index 6c28810474..38ab030e26 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-analytics-collection.html # def delete_behavioral_analytics(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search_application.delete_behavioral_analytics" } + request_opts = { endpoint: arguments[:endpoint] || 'search_application.delete_behavioral_analytics' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb index 36524d4bdc..a860983d7f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-search-application.html # def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search_application.get" } + request_opts = { endpoint: arguments[:endpoint] || 'search_application.get' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb index 718fb8a860..03162964b8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-analytics-collection.html # def get_behavioral_analytics(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search_application.get_behavioral_analytics" } + request_opts = { endpoint: arguments[:endpoint] || 'search_application.get_behavioral_analytics' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def get_behavioral_analytics(arguments = {}) path = if _name "_application/analytics/#{Utils.__listify(_name)}" else - "_application/analytics" + '_application/analytics' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb index 0ba111f144..e16653f8d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb @@ -36,7 +36,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-search-applications.html # def list(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search_application.list" } + request_opts = { endpoint: arguments[:endpoint] || 'search_application.list' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -44,7 +44,7 @@ def list(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_application/search_application" + path = '_application/search_application' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb index 30cafd6534..73ddcf543e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb @@ -37,11 +37,10 @@ module Actions # @see http://todo.com/tbd # def post_behavioral_analytics_event(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search_application.post_behavioral_analytics_event" } + request_opts = { endpoint: arguments[:endpoint] || 'search_application.post_behavioral_analytics_event' } - defined_params = [:collection_name, :event_type].inject({}) do |set_variables, variable| + defined_params = %i[collection_name event_type].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb index 85a587a130..4b71715586 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-search-application.html # def put(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search_application.put" } + request_opts = { endpoint: arguments[:endpoint] || 'search_application.put' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb index 47cab7053c..b04054239f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-analytics-collection.html # def put_behavioral_analytics(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search_application.put_behavioral_analytics" } + request_opts = { endpoint: arguments[:endpoint] || 'search_application.put_behavioral_analytics' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb index b5632ad4b5..b6d21c350a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-render-query.html # def render_query(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search_application.render_query" } + request_opts = { endpoint: arguments[:endpoint] || 'search_application.render_query' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb index 33cfa788ba..5d87a7e533 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-search.html # def search(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search_application.search" } + request_opts = { endpoint: arguments[:endpoint] || 'search_application.search' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -58,7 +57,7 @@ def search(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_application/search_application/#{Utils.__listify(_name)}/_search" + path = "_application/search_application/#{Utils.__listify(_name)}/_search" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb index f92b796d46..80bde3ce4f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb @@ -45,11 +45,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-vector-tile-api.html # def search_mvt(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search_mvt" } + request_opts = { endpoint: arguments[:endpoint] || 'search_mvt' } - defined_params = [:index, :field, :zoom, :x, :y].inject({}) do |set_variables, variable| + defined_params = %i[index field zoom x y].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb index 1bcdfacff7..7ee7019db6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html # def search_shards(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search_shards" } + request_opts = { endpoint: arguments[:endpoint] || 'search_shards' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,7 +53,7 @@ def search_shards(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_search_shards" else - "_search_shards" + '_search_shards' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb index 2e435da6c0..5b67dfb582 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb @@ -43,11 +43,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html # def search_template(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "search_template" } + request_opts = { endpoint: arguments[:endpoint] || 'search_template' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -64,7 +63,7 @@ def search_template(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_search/template" else - "_search/template" + '_search/template' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb index 66e25f74e2..89b16a6c14 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html # def cache_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "searchable_snapshots.cache_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'searchable_snapshots.cache_stats' } - defined_params = [:node_id].inject({}) do |set_variables, variable| + defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def cache_stats(arguments = {}) path = if _node_id "_searchable_snapshots/#{Utils.__listify(_node_id)}/cache/stats" else - "_searchable_snapshots/cache/stats" + '_searchable_snapshots/cache/stats' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb index 1f2f944b7d..a7d0b6a246 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html # def clear_cache(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "searchable_snapshots.clear_cache" } + request_opts = { endpoint: arguments[:endpoint] || 'searchable_snapshots.clear_cache' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,7 +55,7 @@ def clear_cache(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_searchable_snapshots/cache/clear" else - "_searchable_snapshots/cache/clear" + '_searchable_snapshots/cache/clear' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb index 5a3cd48741..e8238c98b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-mount-snapshot.html # def mount(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "searchable_snapshots.mount" } + request_opts = { endpoint: arguments[:endpoint] || 'searchable_snapshots.mount' } - defined_params = [:repository, :snapshot].inject({}) do |set_variables, variable| + defined_params = %i[repository snapshot].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb index b0eda79745..eafb705ad0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html # def stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "searchable_snapshots.stats" } + request_opts = { endpoint: arguments[:endpoint] || 'searchable_snapshots.stats' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -50,7 +49,7 @@ def stats(arguments = {}) path = if _index "#{Utils.__listify(_index)}/_searchable_snapshots/stats" else - "_searchable_snapshots/stats" + '_searchable_snapshots/stats' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb index 042f04d939..776e2a88b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-activate-user-profile.html # def activate_user_profile(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.activate_user_profile" } + request_opts = { endpoint: arguments[:endpoint] || 'security.activate_user_profile' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def activate_user_profile(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/profile/_activate" + path = '_security/profile/_activate' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb index c220700bc5..03f02c57ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html # def authenticate(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.authenticate" } + request_opts = { endpoint: arguments[:endpoint] || 'security.authenticate' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def authenticate(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_security/_authenticate" + path = '_security/_authenticate' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb index c285a8d7f4..bf311c01f4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-update-api-keys.html # def bulk_update_api_keys(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.bulk_update_api_keys" } + request_opts = { endpoint: arguments[:endpoint] || 'security.bulk_update_api_keys' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def bulk_update_api_keys(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/api_key/_bulk_update" + path = '_security/api_key/_bulk_update' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb index 989a7ac0e0..186861cdb7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html # def change_password(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.change_password" } + request_opts = { endpoint: arguments[:endpoint] || 'security.change_password' } - defined_params = [:username].inject({}) do |set_variables, variable| + defined_params = [:username].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def change_password(arguments = {}) path = if _username "_security/user/#{Utils.__listify(_username)}/_password" else - "_security/user/_password" + '_security/user/_password' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb index b6ed47e3b0..8eb36221f1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-api-key-cache.html # def clear_api_key_cache(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.clear_api_key_cache" } + request_opts = { endpoint: arguments[:endpoint] || 'security.clear_api_key_cache' } - defined_params = [:ids].inject({}) do |set_variables, variable| + defined_params = [:ids].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb index ee2d4132b7..2b6ff2d79e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-privilege-cache.html # def clear_cached_privileges(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.clear_cached_privileges" } + request_opts = { endpoint: arguments[:endpoint] || 'security.clear_cached_privileges' } - defined_params = [:application].inject({}) do |set_variables, variable| + defined_params = [:application].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb index ef22a86a66..9f427c62e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html # def clear_cached_realms(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.clear_cached_realms" } + request_opts = { endpoint: arguments[:endpoint] || 'security.clear_cached_realms' } - defined_params = [:realms].inject({}) do |set_variables, variable| + defined_params = [:realms].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb index ec47a610a7..8e253de2d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html # def clear_cached_roles(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.clear_cached_roles" } + request_opts = { endpoint: arguments[:endpoint] || 'security.clear_cached_roles' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb index 908af0205f..e2d0d96d0b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html # def clear_cached_service_tokens(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.clear_cached_service_tokens" } + request_opts = { endpoint: arguments[:endpoint] || 'security.clear_cached_service_tokens' } - defined_params = [:namespace, :service, :name].inject({}) do |set_variables, variable| + defined_params = %i[namespace service name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb index 94c1d3f1bd..eb05c11c87 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html # def create_api_key(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.create_api_key" } + request_opts = { endpoint: arguments[:endpoint] || 'security.create_api_key' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -41,7 +41,7 @@ def create_api_key(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT - path = "_security/api_key" + path = '_security/api_key' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb index f951ab3d38..2a951c385a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb @@ -34,7 +34,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-cross-cluster-api-key.html # def create_cross_cluster_api_key(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.create_cross_cluster_api_key" } + request_opts = { endpoint: arguments[:endpoint] || 'security.create_cross_cluster_api_key' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -44,7 +44,7 @@ def create_cross_cluster_api_key(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/cross_cluster/api_key" + path = '_security/cross_cluster/api_key' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb index b6bc6db240..9ebfacea38 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html # def create_service_token(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.create_service_token" } + request_opts = { endpoint: arguments[:endpoint] || 'security.create_service_token' } - defined_params = [:namespace, :service, :name].inject({}) do |set_variables, variable| + defined_params = %i[namespace service name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb index f589a1f6a8..fa4260b296 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html # def delete_privileges(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.delete_privileges" } + request_opts = { endpoint: arguments[:endpoint] || 'security.delete_privileges' } - defined_params = [:application, :name].inject({}) do |set_variables, variable| + defined_params = %i[application name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb index 8da0c68a5e..81a755ea5a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html # def delete_role(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.delete_role" } + request_opts = { endpoint: arguments[:endpoint] || 'security.delete_role' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb index d6f9aa3d84..57cc5f4258 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html # def delete_role_mapping(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.delete_role_mapping" } + request_opts = { endpoint: arguments[:endpoint] || 'security.delete_role_mapping' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb index 6825b5ecab..e1e956f288 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html # def delete_service_token(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.delete_service_token" } + request_opts = { endpoint: arguments[:endpoint] || 'security.delete_service_token' } - defined_params = [:namespace, :service, :name].inject({}) do |set_variables, variable| + defined_params = %i[namespace service name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb index c031bf9571..6c60f97ffc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html # def delete_user(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.delete_user" } + request_opts = { endpoint: arguments[:endpoint] || 'security.delete_user' } - defined_params = [:username].inject({}) do |set_variables, variable| + defined_params = [:username].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb index 58f4da420c..cd15f71593 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html # def disable_user(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.disable_user" } + request_opts = { endpoint: arguments[:endpoint] || 'security.disable_user' } - defined_params = [:username].inject({}) do |set_variables, variable| + defined_params = [:username].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb index abd0b86ec9..890f6959c9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user-profile.html # def disable_user_profile(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.disable_user_profile" } + request_opts = { endpoint: arguments[:endpoint] || 'security.disable_user_profile' } - defined_params = [:uid].inject({}) do |set_variables, variable| + defined_params = [:uid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb index 6cf13e3eab..e6dadc479f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html # def enable_user(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.enable_user" } + request_opts = { endpoint: arguments[:endpoint] || 'security.enable_user' } - defined_params = [:username].inject({}) do |set_variables, variable| + defined_params = [:username].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb index fa3ea55eaf..c494854720 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user-profile.html # def enable_user_profile(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.enable_user_profile" } + request_opts = { endpoint: arguments[:endpoint] || 'security.enable_user_profile' } - defined_params = [:uid].inject({}) do |set_variables, variable| + defined_params = [:uid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb index 300252229c..9c16f925ef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-kibana-enrollment.html # def enroll_kibana(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.enroll_kibana" } + request_opts = { endpoint: arguments[:endpoint] || 'security.enroll_kibana' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def enroll_kibana(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_security/enroll/kibana" + path = '_security/enroll/kibana' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb index 7a26df20f2..2a9dc5c0af 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-node-enrollment.html # def enroll_node(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.enroll_node" } + request_opts = { endpoint: arguments[:endpoint] || 'security.enroll_node' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def enroll_node(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_security/enroll/node" + path = '_security/enroll/node' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb index 9919dcfe7b..c45377aa6e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb @@ -36,7 +36,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html # def get_api_key(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.get_api_key" } + request_opts = { endpoint: arguments[:endpoint] || 'security.get_api_key' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -44,7 +44,7 @@ def get_api_key(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_security/api_key" + path = '_security/api_key' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb index c224e24702..aac95e8a75 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html # def get_builtin_privileges(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.get_builtin_privileges" } + request_opts = { endpoint: arguments[:endpoint] || 'security.get_builtin_privileges' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def get_builtin_privileges(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_security/privilege/_builtin" + path = '_security/privilege/_builtin' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb index 797c6603e5..08b6a96c22 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html # def get_privileges(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.get_privileges" } + request_opts = { endpoint: arguments[:endpoint] || 'security.get_privileges' } - defined_params = [:application, :name].inject({}) do |set_variables, variable| + defined_params = %i[application name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,7 +53,7 @@ def get_privileges(arguments = {}) elsif _application "_security/privilege/#{Utils.__listify(_application)}" else - "_security/privilege" + '_security/privilege' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb index c429bde772..9b8f533987 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html # def get_role(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.get_role" } + request_opts = { endpoint: arguments[:endpoint] || 'security.get_role' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -49,16 +48,16 @@ def get_role(arguments = {}) path = if _name "_security/role/#{Utils.__listify(_name)}" else - "_security/role" + '_security/role' end params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb index c652b62846..2c6a79f930 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html # def get_role_mapping(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.get_role_mapping" } + request_opts = { endpoint: arguments[:endpoint] || 'security.get_role_mapping' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -49,7 +48,7 @@ def get_role_mapping(arguments = {}) path = if _name "_security/role_mapping/#{Utils.__listify(_name)}" else - "_security/role_mapping" + '_security/role_mapping' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb index ba3393dc48..4bf5a17cf6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html # def get_service_accounts(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.get_service_accounts" } + request_opts = { endpoint: arguments[:endpoint] || 'security.get_service_accounts' } - defined_params = [:namespace, :service].inject({}) do |set_variables, variable| + defined_params = %i[namespace service].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,7 +53,7 @@ def get_service_accounts(arguments = {}) elsif _namespace "_security/service/#{Utils.__listify(_namespace)}" else - "_security/service" + '_security/service' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb index a63897e466..b66a44c054 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html # def get_service_credentials(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.get_service_credentials" } + request_opts = { endpoint: arguments[:endpoint] || 'security.get_service_credentials' } - defined_params = [:namespace, :service].inject({}) do |set_variables, variable| + defined_params = %i[namespace service].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb index 1e7ce4dc06..75a65b7f77 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-settings.html # def get_settings(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.get_settings" } + request_opts = { endpoint: arguments[:endpoint] || 'security.get_settings' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def get_settings(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_security/settings" + path = '_security/settings' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb index bc93d79207..bbe77102bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html # def get_token(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.get_token" } + request_opts = { endpoint: arguments[:endpoint] || 'security.get_token' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def get_token(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/oauth2/token" + path = '_security/oauth2/token' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb index 2ad61c4770..94efebad8b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html # def get_user(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.get_user" } + request_opts = { endpoint: arguments[:endpoint] || 'security.get_user' } - defined_params = [:username].inject({}) do |set_variables, variable| + defined_params = [:username].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -50,16 +49,16 @@ def get_user(arguments = {}) path = if _username "_security/user/#{Utils.__listify(_username)}" else - "_security/user" + '_security/user' end params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb index 5d47137301..926460dc99 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html # def get_user_privileges(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.get_user_privileges" } + request_opts = { endpoint: arguments[:endpoint] || 'security.get_user_privileges' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def get_user_privileges(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_security/user/_privileges" + path = '_security/user/_privileges' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb index a3a8dffc97..85033b4a4d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-profile.html # def get_user_profile(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.get_user_profile" } + request_opts = { endpoint: arguments[:endpoint] || 'security.get_user_profile' } - defined_params = [:uid].inject({}) do |set_variables, variable| + defined_params = [:uid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb index 4a415b7ead..19567099a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html # def grant_api_key(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.grant_api_key" } + request_opts = { endpoint: arguments[:endpoint] || 'security.grant_api_key' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -41,7 +41,7 @@ def grant_api_key(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/api_key/grant" + path = '_security/api_key/grant' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb index 5e7646cf72..db564b4390 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html # def has_privileges(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.has_privileges" } + request_opts = { endpoint: arguments[:endpoint] || 'security.has_privileges' } - defined_params = [:user].inject({}) do |set_variables, variable| + defined_params = [:user].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -52,7 +51,7 @@ def has_privileges(arguments = {}) path = if _user "_security/user/#{Utils.__listify(_user)}/_has_privileges" else - "_security/user/_has_privileges" + '_security/user/_has_privileges' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb index 5bfcfdf1e0..f65160e35c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges-user-profile.html # def has_privileges_user_profile(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.has_privileges_user_profile" } + request_opts = { endpoint: arguments[:endpoint] || 'security.has_privileges_user_profile' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def has_privileges_user_profile(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/profile/_has_privileges" + path = '_security/profile/_has_privileges' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb index 9f2ba723f6..4bc0e103fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html # def invalidate_api_key(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.invalidate_api_key" } + request_opts = { endpoint: arguments[:endpoint] || 'security.invalidate_api_key' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def invalidate_api_key(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_DELETE - path = "_security/api_key" + path = '_security/api_key' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb index 8e04a19169..dcae33c44c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html # def invalidate_token(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.invalidate_token" } + request_opts = { endpoint: arguments[:endpoint] || 'security.invalidate_token' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def invalidate_token(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_DELETE - path = "_security/oauth2/token" + path = '_security/oauth2/token' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb index d17b93d883..e100fc59b2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-authenticate.html # def oidc_authenticate(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.oidc_authenticate" } + request_opts = { endpoint: arguments[:endpoint] || 'security.oidc_authenticate' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def oidc_authenticate(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/oidc/authenticate" + path = '_security/oidc/authenticate' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb index b1f3959b43..e39f9d4b34 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-logout.html # def oidc_logout(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.oidc_logout" } + request_opts = { endpoint: arguments[:endpoint] || 'security.oidc_logout' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def oidc_logout(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/oidc/logout" + path = '_security/oidc/logout' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb index 83cfc90cd5..2d9247ecd4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-prepare-authentication.html # def oidc_prepare_authentication(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.oidc_prepare_authentication" } + request_opts = { endpoint: arguments[:endpoint] || 'security.oidc_prepare_authentication' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def oidc_prepare_authentication(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/oidc/prepare" + path = '_security/oidc/prepare' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb index 2deddf2d18..0e4b52836e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html # def put_privileges(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.put_privileges" } + request_opts = { endpoint: arguments[:endpoint] || 'security.put_privileges' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -41,7 +41,7 @@ def put_privileges(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT - path = "_security/privilege" + path = '_security/privilege' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb index 48b9c13a98..a0e102ee73 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html # def put_role(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.put_role" } + request_opts = { endpoint: arguments[:endpoint] || 'security.put_role' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb index ddac43d1dd..4e238c2d0b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html # def put_role_mapping(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.put_role_mapping" } + request_opts = { endpoint: arguments[:endpoint] || 'security.put_role_mapping' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb index 7ca37ac984..453d00ef59 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html # def put_user(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.put_user" } + request_opts = { endpoint: arguments[:endpoint] || 'security.put_user' } - defined_params = [:username].inject({}) do |set_variables, variable| + defined_params = [:username].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb index 61886c6caa..0e59af95fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html # def query_api_keys(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.query_api_keys" } + request_opts = { endpoint: arguments[:endpoint] || 'security.query_api_keys' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -44,7 +44,7 @@ def query_api_keys(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_security/_query/api_key" + path = '_security/_query/api_key' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb index 7b42482994..7d0486ca5c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html # def saml_authenticate(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.saml_authenticate" } + request_opts = { endpoint: arguments[:endpoint] || 'security.saml_authenticate' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def saml_authenticate(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/saml/authenticate" + path = '_security/saml/authenticate' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb index 74c0fafebe..7d0db5fec3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html # def saml_complete_logout(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.saml_complete_logout" } + request_opts = { endpoint: arguments[:endpoint] || 'security.saml_complete_logout' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def saml_complete_logout(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/saml/complete_logout" + path = '_security/saml/complete_logout' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb index 0f69bcb70a..28951664e4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html # def saml_invalidate(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.saml_invalidate" } + request_opts = { endpoint: arguments[:endpoint] || 'security.saml_invalidate' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def saml_invalidate(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/saml/invalidate" + path = '_security/saml/invalidate' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb index e6e224e464..17bccc2ddd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html # def saml_logout(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.saml_logout" } + request_opts = { endpoint: arguments[:endpoint] || 'security.saml_logout' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def saml_logout(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/saml/logout" + path = '_security/saml/logout' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb index f54a34c374..81bec3685d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html # def saml_prepare_authentication(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.saml_prepare_authentication" } + request_opts = { endpoint: arguments[:endpoint] || 'security.saml_prepare_authentication' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def saml_prepare_authentication(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/saml/prepare" + path = '_security/saml/prepare' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb index a341f17e5b..cecd339eee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html # def saml_service_provider_metadata(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.saml_service_provider_metadata" } + request_opts = { endpoint: arguments[:endpoint] || 'security.saml_service_provider_metadata' } - defined_params = [:realm_name].inject({}) do |set_variables, variable| + defined_params = [:realm_name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb index e22046a53d..566b2c9d3a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-suggest-user-profile.html # def suggest_user_profiles(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.suggest_user_profiles" } + request_opts = { endpoint: arguments[:endpoint] || 'security.suggest_user_profiles' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -44,7 +44,7 @@ def suggest_user_profiles(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_security/profile/_suggest" + path = '_security/profile/_suggest' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb index be6bc88d17..dad4b51305 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-api-key.html # def update_api_key(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.update_api_key" } + request_opts = { endpoint: arguments[:endpoint] || 'security.update_api_key' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb index ea7dae4b34..126160b605 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html # def update_cross_cluster_api_key(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.update_cross_cluster_api_key" } + request_opts = { endpoint: arguments[:endpoint] || 'security.update_cross_cluster_api_key' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb index a880c51b53..0e1ea86024 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-settings.html # def update_settings(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.update_settings" } + request_opts = { endpoint: arguments[:endpoint] || 'security.update_settings' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def update_settings(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT - path = "_security/settings" + path = '_security/settings' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb index 6a7ee5eb13..271f147120 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-user-profile-data.html # def update_user_profile_data(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.update_user_profile_data" } + request_opts = { endpoint: arguments[:endpoint] || 'security.update_user_profile_data' } - defined_params = [:uid].inject({}) do |set_variables, variable| + defined_params = [:uid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb index 3732724564..f56dad05b3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current # def delete_node(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "shutdown.delete_node" } + request_opts = { endpoint: arguments[:endpoint] || 'shutdown.delete_node' } - defined_params = [:node_id].inject({}) do |set_variables, variable| + defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb index ab0c9abfe5..f7d62070cb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current # def get_node(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "shutdown.get_node" } + request_opts = { endpoint: arguments[:endpoint] || 'shutdown.get_node' } - defined_params = [:node_id].inject({}) do |set_variables, variable| + defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -49,7 +48,7 @@ def get_node(arguments = {}) path = if _node_id "_nodes/#{Utils.__listify(_node_id)}/shutdown" else - "_nodes/shutdown" + '_nodes/shutdown' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb index 5161108fe9..a8f49a550a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current # def put_node(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "shutdown.put_node" } + request_opts = { endpoint: arguments[:endpoint] || 'shutdown.put_node' } - defined_params = [:node_id].inject({}) do |set_variables, variable| + defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb b/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb index 3e16cdb849..19ee6beeed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/simulate-ingest-api.html # def ingest(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "simulate.ingest" } + request_opts = { endpoint: arguments[:endpoint] || 'simulate.ingest' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -57,7 +56,7 @@ def ingest(arguments = {}) path = if _index "_ingest/#{Utils.__listify(_index)}/_simulate" else - "_ingest/_simulate" + '_ingest/_simulate' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb index 59e9e598ec..dfc7b63c8c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clean-up-snapshot-repo-api.html # def cleanup_repository(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "snapshot.cleanup_repository" } + request_opts = { endpoint: arguments[:endpoint] || 'snapshot.cleanup_repository' } - defined_params = [:repository].inject({}) do |set_variables, variable| + defined_params = [:repository].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb index 5217fc0e84..4771ebf213 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def clone(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "snapshot.clone" } + request_opts = { endpoint: arguments[:endpoint] || 'snapshot.clone' } - defined_params = [:repository, :snapshot, :target_snapshot].inject({}) do |set_variables, variable| + defined_params = %i[repository snapshot target_snapshot].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb index 22646b3699..7b6e01d725 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def create(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "snapshot.create" } + request_opts = { endpoint: arguments[:endpoint] || 'snapshot.create' } - defined_params = [:repository, :snapshot].inject({}) do |set_variables, variable| + defined_params = %i[repository snapshot].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb index d80e6f62af..aa94f85ffe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def create_repository(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "snapshot.create_repository" } + request_opts = { endpoint: arguments[:endpoint] || 'snapshot.create_repository' } - defined_params = [:repository].inject({}) do |set_variables, variable| + defined_params = [:repository].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb index 0ea575a5b2..73072d871e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "snapshot.delete" } + request_opts = { endpoint: arguments[:endpoint] || 'snapshot.delete' } - defined_params = [:repository, :snapshot].inject({}) do |set_variables, variable| + defined_params = %i[repository snapshot].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -57,11 +56,11 @@ def delete(arguments = {}) params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb index d7954ac39d..c6168a3ff7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def delete_repository(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "snapshot.delete_repository" } + request_opts = { endpoint: arguments[:endpoint] || 'snapshot.delete_repository' } - defined_params = [:repository].inject({}) do |set_variables, variable| + defined_params = [:repository].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,11 +53,11 @@ def delete_repository(arguments = {}) params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb index 655557acdb..fcb5af696b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb @@ -44,11 +44,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "snapshot.get" } + request_opts = { endpoint: arguments[:endpoint] || 'snapshot.get' } - defined_params = [:repository, :snapshot].inject({}) do |set_variables, variable| + defined_params = %i[repository snapshot].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -69,11 +68,11 @@ def get(arguments = {}) params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb index c51f3fb950..83f3983f5d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def get_repository(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "snapshot.get_repository" } + request_opts = { endpoint: arguments[:endpoint] || 'snapshot.get_repository' } - defined_params = [:repository].inject({}) do |set_variables, variable| + defined_params = [:repository].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,16 +50,16 @@ def get_repository(arguments = {}) path = if _repository "_snapshot/#{Utils.__listify(_repository)}" else - "_snapshot" + '_snapshot' end params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb index f598d91d89..575313a411 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb @@ -41,11 +41,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def repository_analyze(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "snapshot.repository_analyze" } + request_opts = { endpoint: arguments[:endpoint] || 'snapshot.repository_analyze' } - defined_params = [:repository].inject({}) do |set_variables, variable| + defined_params = [:repository].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb index a1cf7693f6..02e05a2114 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def restore(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "snapshot.restore" } + request_opts = { endpoint: arguments[:endpoint] || 'snapshot.restore' } - defined_params = [:repository, :snapshot].inject({}) do |set_variables, variable| + defined_params = %i[repository snapshot].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb index 7fb7fd6391..d6fa97d5ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def status(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "snapshot.status" } + request_opts = { endpoint: arguments[:endpoint] || 'snapshot.status' } - defined_params = [:repository, :snapshot].inject({}) do |set_variables, variable| + defined_params = %i[repository snapshot].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,16 +55,16 @@ def status(arguments = {}) elsif _repository "_snapshot/#{Utils.__listify(_repository)}/_status" else - "_snapshot/_status" + '_snapshot/_status' end params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb index 4bec5a4c3b..335d962d3c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def verify_repository(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "snapshot.verify_repository" } + request_opts = { endpoint: arguments[:endpoint] || 'snapshot.verify_repository' } - defined_params = [:repository].inject({}) do |set_variables, variable| + defined_params = [:repository].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb index f615613bc5..5a9f45b135 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html # def delete_lifecycle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "slm.delete_lifecycle" } + request_opts = { endpoint: arguments[:endpoint] || 'slm.delete_lifecycle' } - defined_params = [:policy_id].inject({}) do |set_variables, variable| + defined_params = [:policy_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb index 33fdba4799..910f03a94c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html # def execute_lifecycle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "slm.execute_lifecycle" } + request_opts = { endpoint: arguments[:endpoint] || 'slm.execute_lifecycle' } - defined_params = [:policy_id].inject({}) do |set_variables, variable| + defined_params = [:policy_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb index 3dee31ebd7..e7ee4d4e3c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html # def execute_retention(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "slm.execute_retention" } + request_opts = { endpoint: arguments[:endpoint] || 'slm.execute_retention' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def execute_retention(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_slm/_execute_retention" + path = '_slm/_execute_retention' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb index d6b9049420..56a4c31795 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html # def get_lifecycle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "slm.get_lifecycle" } + request_opts = { endpoint: arguments[:endpoint] || 'slm.get_lifecycle' } - defined_params = [:policy_id].inject({}) do |set_variables, variable| + defined_params = [:policy_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -49,7 +48,7 @@ def get_lifecycle(arguments = {}) path = if _policy_id "_slm/policy/#{Utils.__listify(_policy_id)}" else - "_slm/policy" + '_slm/policy' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb index eec5225fab..9f86cb46c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-stats.html # def get_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "slm.get_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'slm.get_stats' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def get_stats(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_slm/stats" + path = '_slm/stats' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb index cec2686bff..c0fc5de920 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html # def get_status(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "slm.get_status" } + request_opts = { endpoint: arguments[:endpoint] || 'slm.get_status' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def get_status(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_slm/status" + path = '_slm/status' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb index ef447beae7..0107fe34f6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html # def put_lifecycle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "slm.put_lifecycle" } + request_opts = { endpoint: arguments[:endpoint] || 'slm.put_lifecycle' } - defined_params = [:policy_id].inject({}) do |set_variables, variable| + defined_params = [:policy_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb index cec8014bbd..38c9580774 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html # def start(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "slm.start" } + request_opts = { endpoint: arguments[:endpoint] || 'slm.start' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def start(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_slm/start" + path = '_slm/start' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb index 65a328f832..e5e7c8ebbb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html # def stop(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "slm.stop" } + request_opts = { endpoint: arguments[:endpoint] || 'slm.stop' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def stop(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_slm/stop" + path = '_slm/stop' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb index 3223c0cde9..c9ff2560fe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-sql-cursor-api.html # def clear_cursor(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "sql.clear_cursor" } + request_opts = { endpoint: arguments[:endpoint] || 'sql.clear_cursor' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def clear_cursor(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_sql/close" + path = '_sql/close' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb index 40d7f6de40..06b0b77f9d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-async-sql-search-api.html # def delete_async(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "sql.delete_async" } + request_opts = { endpoint: arguments[:endpoint] || 'sql.delete_async' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb index e565509613..c1eb5685ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-api.html # def get_async(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "sql.get_async" } + request_opts = { endpoint: arguments[:endpoint] || 'sql.get_async' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb index 61ae0b5dbb..a217d9fdae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-status-api.html # def get_async_status(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "sql.get_async_status" } + request_opts = { endpoint: arguments[:endpoint] || 'sql.get_async_status' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb index 0d9c874ece..7a187a5107 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html # def query(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "sql.query" } + request_opts = { endpoint: arguments[:endpoint] || 'sql.query' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -41,7 +41,7 @@ def query(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_sql" + path = '_sql' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb index 31bce125fa..1f872caf67 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html # def translate(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "sql.translate" } + request_opts = { endpoint: arguments[:endpoint] || 'sql.translate' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def translate(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_sql/translate" + path = '_sql/translate' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb index f257e88d3b..004f33c185 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html # def certificates(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "ssl.certificates" } + request_opts = { endpoint: arguments[:endpoint] || 'ssl.certificates' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def certificates(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_ssl/certificates" + path = '_ssl/certificates' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb index bc981d1653..9d91211e7a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonyms-set.html # def delete_synonym(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "synonyms.delete_synonym" } + request_opts = { endpoint: arguments[:endpoint] || 'synonyms.delete_synonym' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb index 70f3ec4a3e..26183609b4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonym-rule.html # def delete_synonym_rule(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "synonyms.delete_synonym_rule" } + request_opts = { endpoint: arguments[:endpoint] || 'synonyms.delete_synonym_rule' } - defined_params = [:set_id, :rule_id].inject({}) do |set_variables, variable| + defined_params = %i[set_id rule_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb index 25f8552ab2..c09fddeac4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonyms-set.html # def get_synonym(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "synonyms.get_synonym" } + request_opts = { endpoint: arguments[:endpoint] || 'synonyms.get_synonym' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb index 6dc643791e..59769ec746 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonym-rule.html # def get_synonym_rule(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "synonyms.get_synonym_rule" } + request_opts = { endpoint: arguments[:endpoint] || 'synonyms.get_synonym_rule' } - defined_params = [:set_id, :rule_id].inject({}) do |set_variables, variable| + defined_params = %i[set_id rule_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb index a642d90e53..3580303fb4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-synonyms-sets.html # def get_synonyms_sets(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "synonyms.get_synonyms_sets" } + request_opts = { endpoint: arguments[:endpoint] || 'synonyms.get_synonyms_sets' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +39,7 @@ def get_synonyms_sets(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_synonyms" + path = '_synonyms' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb index ba48454aad..99a76d6515 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonyms-set.html # def put_synonym(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "synonyms.put_synonym" } + request_opts = { endpoint: arguments[:endpoint] || 'synonyms.put_synonym' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb index 2c60834b19..cc7804380e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonym-rule.html # def put_synonym_rule(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "synonyms.put_synonym_rule" } + request_opts = { endpoint: arguments[:endpoint] || 'synonyms.put_synonym_rule' } - defined_params = [:set_id, :rule_id].inject({}) do |set_variables, variable| + defined_params = %i[set_id rule_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb index 8dde233be7..9ce81d2afc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html # def cancel(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "tasks.cancel" } + request_opts = { endpoint: arguments[:endpoint] || 'tasks.cancel' } - defined_params = [:task_id].inject({}) do |set_variables, variable| + defined_params = [:task_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -57,7 +56,7 @@ def cancel(arguments = {}) path = if _task_id "_tasks/#{Utils.__listify(_task_id)}/_cancel" else - "_tasks/_cancel" + '_tasks/_cancel' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb index e5ea28eb70..49f700537a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html # def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "tasks.get" } + request_opts = { endpoint: arguments[:endpoint] || 'tasks.get' } - defined_params = [:task_id].inject({}) do |set_variables, variable| + defined_params = [:task_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb index dfa6dc4195..52c522cbea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb @@ -40,7 +40,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html # def list(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "tasks.list" } + request_opts = { endpoint: arguments[:endpoint] || 'tasks.list' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -48,7 +48,7 @@ def list(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_tasks" + path = '_tasks' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb index 554edc11e2..93cbc80f7e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html # def terms_enum(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "terms_enum" } + request_opts = { endpoint: arguments[:endpoint] || 'terms_enum' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -43,7 +42,7 @@ def terms_enum(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) @@ -53,7 +52,7 @@ def terms_enum(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "#{Utils.__listify(_index)}/_terms_enum" + path = "#{Utils.__listify(_index)}/_terms_enum" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb index 9be51977b9..15a420c24d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb @@ -42,11 +42,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html # def termvectors(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "termvectors" } + request_opts = { endpoint: arguments[:endpoint] || 'termvectors' } - defined_params = [:index, :id].inject({}) do |set_variables, variable| + defined_params = %i[index id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -55,7 +54,7 @@ def termvectors(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) @@ -68,11 +67,11 @@ def termvectors(arguments = {}) end endpoint = arguments.delete(:endpoint) || '_termvectors' - path = if _index && _id - "#{Utils.__listify(_index)}/_termvectors/#{Utils.__listify(_id)}" - else - "#{Utils.__listify(_index)}/_termvectors" - end + path = if _index && _id + "#{Utils.__listify(_index)}/_termvectors/#{Utils.__listify(_id)}" + else + "#{Utils.__listify(_index)}/_termvectors" + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( @@ -83,7 +82,7 @@ def termvectors(arguments = {}) # Deprecated: Use the plural version, {#termvectors} # def termvector(arguments = {}) - termvectors(arguments.merge endpoint: '_termvector') + termvectors(arguments.merge(endpoint: '_termvector')) end end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb index cff8f5f5bf..099d91ebc5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb @@ -45,7 +45,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html # def find_structure(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "text_structure.find_structure" } + request_opts = { endpoint: arguments[:endpoint] || 'text_structure.find_structure' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -55,16 +55,16 @@ def find_structure(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_text_structure/find_structure" + path = '_text_structure/find_structure' params = Utils.process_params(arguments) - if body.is_a? Array - payload = Elasticsearch::API::Utils.__bulkify(body) - else - payload = body - end + payload = if body.is_a? Array + Elasticsearch::API::Utils.__bulkify(body) + else + body + end - headers.merge!("Content-Type" => "application/x-ndjson") + headers.merge!('Content-Type' => 'application/x-ndjson') Elasticsearch::API::Response.new( perform_request(method, path, params, payload, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb index c6b2f22339..9591889cf6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/test-grok-pattern-api.html # def test_grok_pattern(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "text_structure.test_grok_pattern" } + request_opts = { endpoint: arguments[:endpoint] || 'text_structure.test_grok_pattern' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -41,7 +41,7 @@ def test_grok_pattern(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_text_structure/test_grok_pattern" + path = '_text_structure/test_grok_pattern' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb index 5e73bf1195..9bf20808c6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html # def delete_transform(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "transform.delete_transform" } + request_opts = { endpoint: arguments[:endpoint] || 'transform.delete_transform' } - defined_params = [:transform_id].inject({}) do |set_variables, variable| + defined_params = [:transform_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb index 86b185d634..5065124f1e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html # def get_transform(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "transform.get_transform" } + request_opts = { endpoint: arguments[:endpoint] || 'transform.get_transform' } - defined_params = [:transform_id].inject({}) do |set_variables, variable| + defined_params = [:transform_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def get_transform(arguments = {}) path = if _transform_id "_transform/#{Utils.__listify(_transform_id)}" else - "_transform" + '_transform' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb index 5c4f992307..abdf7014d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html # def get_transform_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "transform.get_transform_stats" } + request_opts = { endpoint: arguments[:endpoint] || 'transform.get_transform_stats' } - defined_params = [:transform_id].inject({}) do |set_variables, variable| + defined_params = [:transform_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb index dffd9196f1..8ab4f59a7c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html # def preview_transform(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "transform.preview_transform" } + request_opts = { endpoint: arguments[:endpoint] || 'transform.preview_transform' } - defined_params = [:transform_id].inject({}) do |set_variables, variable| + defined_params = [:transform_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,11 +52,11 @@ def preview_transform(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _transform_id - "_transform/#{Utils.__listify(_transform_id)}/_preview" - else - "_transform/_preview" - end + path = if _transform_id + "_transform/#{Utils.__listify(_transform_id)}/_preview" + else + '_transform/_preview' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb index c369208ce6..222912fe22 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html # def put_transform(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "transform.put_transform" } + request_opts = { endpoint: arguments[:endpoint] || 'transform.put_transform' } - defined_params = [:transform_id].inject({}) do |set_variables, variable| + defined_params = [:transform_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb index a031fb6394..dab3b5e94e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/reset-transform.html # def reset_transform(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "transform.reset_transform" } + request_opts = { endpoint: arguments[:endpoint] || 'transform.reset_transform' } - defined_params = [:transform_id].inject({}) do |set_variables, variable| + defined_params = [:transform_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb index c4a1514c7f..74716246b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/schedule-now-transform.html # def schedule_now_transform(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "transform.schedule_now_transform" } + request_opts = { endpoint: arguments[:endpoint] || 'transform.schedule_now_transform' } - defined_params = [:transform_id].inject({}) do |set_variables, variable| + defined_params = [:transform_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb index 6eebc7557b..4f18b6a0b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html # def start_transform(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "transform.start_transform" } + request_opts = { endpoint: arguments[:endpoint] || 'transform.start_transform' } - defined_params = [:transform_id].inject({}) do |set_variables, variable| + defined_params = [:transform_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb index ced1794eb3..00a4c41355 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html # def stop_transform(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "transform.stop_transform" } + request_opts = { endpoint: arguments[:endpoint] || 'transform.stop_transform' } - defined_params = [:transform_id].inject({}) do |set_variables, variable| + defined_params = [:transform_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb index f60762fb2f..44e04a7ee1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html # def update_transform(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "transform.update_transform" } + request_opts = { endpoint: arguments[:endpoint] || 'transform.update_transform' } - defined_params = [:transform_id].inject({}) do |set_variables, variable| + defined_params = [:transform_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb index b5e6509e3e..b2d1a84cd6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/upgrade-transforms.html # def upgrade_transforms(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "transform.upgrade_transforms" } + request_opts = { endpoint: arguments[:endpoint] || 'transform.upgrade_transforms' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +39,7 @@ def upgrade_transforms(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_transform/_upgrade" + path = '_transform/_upgrade' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb index 3c819b32b7..8039f1a25b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb @@ -43,11 +43,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html # def update(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "update" } + request_opts = { endpoint: arguments[:endpoint] || 'update' } - defined_params = [:index, :id].inject({}) do |set_variables, variable| + defined_params = %i[index id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -69,11 +68,11 @@ def update(arguments = {}) params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb index dea4533e4f..fb65ca3564 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb @@ -62,11 +62,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html # def update_by_query(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "update_by_query" } + request_opts = { endpoint: arguments[:endpoint] || 'update_by_query' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb index 753a28f863..801ed1bcd4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html # def update_by_query_rethrottle(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "update_by_query_rethrottle" } + request_opts = { endpoint: arguments[:endpoint] || 'update_by_query_rethrottle' } - defined_params = [:task_id].inject({}) do |set_variables, variable| + defined_params = [:task_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb index b25cf966fc..6539662686 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html # def ack_watch(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "watcher.ack_watch" } + request_opts = { endpoint: arguments[:endpoint] || 'watcher.ack_watch' } - defined_params = [:watch_id, :action_id].inject({}) do |set_variables, variable| + defined_params = %i[watch_id action_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb index 0ceb96bc3c..739a1d774d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html # def activate_watch(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "watcher.activate_watch" } + request_opts = { endpoint: arguments[:endpoint] || 'watcher.activate_watch' } - defined_params = [:watch_id].inject({}) do |set_variables, variable| + defined_params = [:watch_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb index 6684b81b3e..645558f549 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html # def deactivate_watch(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "watcher.deactivate_watch" } + request_opts = { endpoint: arguments[:endpoint] || 'watcher.deactivate_watch' } - defined_params = [:watch_id].inject({}) do |set_variables, variable| + defined_params = [:watch_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb index 74d8859cdf..8a6ae856d7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html # def delete_watch(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "watcher.delete_watch" } + request_opts = { endpoint: arguments[:endpoint] || 'watcher.delete_watch' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -52,11 +51,11 @@ def delete_watch(arguments = {}) params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found { + Utils.__rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) - } + end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb index a295f1fccc..72d49ad08b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html # def execute_watch(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "watcher.execute_watch" } + request_opts = { endpoint: arguments[:endpoint] || 'watcher.execute_watch' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,7 +50,7 @@ def execute_watch(arguments = {}) path = if _id "_watcher/watch/#{Utils.__listify(_id)}/_execute" else - "_watcher/watch/_execute" + '_watcher/watch/_execute' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb index 843bfb5865..730ad3ed93 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-settings.html # def get_settings(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "watcher.get_settings" } + request_opts = { endpoint: arguments[:endpoint] || 'watcher.get_settings' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def get_settings(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_watcher/settings" + path = '_watcher/settings' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb index 13bab26cde..bb2f184baa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html # def get_watch(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "watcher.get_watch" } + request_opts = { endpoint: arguments[:endpoint] || 'watcher.get_watch' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb index fb7199e437..111294f4e5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html # def put_watch(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "watcher.put_watch" } + request_opts = { endpoint: arguments[:endpoint] || 'watcher.put_watch' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb index a02065c959..83d9bc0570 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-query-watches.html # def query_watches(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "watcher.query_watches" } + request_opts = { endpoint: arguments[:endpoint] || 'watcher.query_watches' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -43,7 +43,7 @@ def query_watches(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_watcher/_query/watches" + path = '_watcher/_query/watches' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb index 80d284a2d0..a02d5a04d4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html # def start(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "watcher.start" } + request_opts = { endpoint: arguments[:endpoint] || 'watcher.start' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def start(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_watcher/_start" + path = '_watcher/_start' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb index 2a7f6d983b..4ef01863df 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html # def stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "watcher.stats" } + request_opts = { endpoint: arguments[:endpoint] || 'watcher.stats' } - defined_params = [:metric].inject({}) do |set_variables, variable| + defined_params = [:metric].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -50,7 +49,7 @@ def stats(arguments = {}) path = if _metric "_watcher/stats/#{Utils.__listify(_metric)}" else - "_watcher/stats" + '_watcher/stats' end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb index 853529315c..5ebecfbdf7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb @@ -29,7 +29,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html # def stop(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "watcher.stop" } + request_opts = { endpoint: arguments[:endpoint] || 'watcher.stop' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -37,7 +37,7 @@ def stop(arguments = {}) body = nil method = Elasticsearch::API::HTTP_POST - path = "_watcher/_stop" + path = '_watcher/_stop' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb index 5b710e14bc..bac6c47c04 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-update-settings.html # def update_settings(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "watcher.update_settings" } + request_opts = { endpoint: arguments[:endpoint] || 'watcher.update_settings' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -40,7 +40,7 @@ def update_settings(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT - path = "_watcher/settings" + path = '_watcher/settings' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb index 47a259db47..6074bf9ac0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb @@ -31,7 +31,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html # def info(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "xpack.info" } + request_opts = { endpoint: arguments[:endpoint] || 'xpack.info' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -39,7 +39,7 @@ def info(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_xpack" + path = '_xpack' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb index 567974ce92..2317ef931e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb @@ -30,7 +30,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html # def usage(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "xpack.usage" } + request_opts = { endpoint: arguments[:endpoint] || 'xpack.usage' } arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -38,7 +38,7 @@ def usage(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_xpack/usage" + path = '_xpack/usage' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( From 6062d11d5531e3d48adfead4f3f7f583cf785cdf Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 2 Feb 2024 06:03:02 +0000 Subject: [PATCH 184/540] [API] Adds connector.update_api_key_id endpoint --- .../actions/connector/update_api_key_id.rb | 66 +++++++++++++++++++ .../connector/update_api_key_id_spec.rb | 38 +++++++++++ 2 files changed, 104 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_api_key_id_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb new file mode 100644 index 0000000000..9e6002aab7 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the API key id and/or API key secret id fields in the connector document. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body An object containing the connector's API key id and/or Connector Secret document id for that API key. (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/connector-apis.html + # + def update_api_key_id(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_api_key_id' } + + defined_params = [:connector_id].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 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_api_key_id" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_api_key_id_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_api_key_id_spec.rb new file mode 100644 index 0000000000..ecc638fafb --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_api_key_id_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#check_in' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_api_key_id', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.update_api_key_id' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.update_api_key_id(body: {}, connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end From 1fce4bf11f803290110064ca34a6f23e22bf1d25 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 5 Feb 2024 14:46:15 +0000 Subject: [PATCH 185/540] [API] Adds connector.update_index_name and update_status endpoints --- .../actions/connector/update_index_name.rb | 66 +++++++++++++++++++ .../api/actions/connector/update_status.rb | 66 +++++++++++++++++++ .../connector/update_index_name_spec.rb | 38 +++++++++++ .../actions/connector/update_status_spec.rb | 38 +++++++++++ 4 files changed, 208 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_index_name_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_status_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb new file mode 100644 index 0000000000..7a9d948009 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the index name of the connector. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body An object containing the connector's index name. (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/connector-apis.html + # + def update_index_name(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_index_name' } + + defined_params = [:connector_id].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 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_index_name" + params = {} + + 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/connector/update_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb new file mode 100644 index 0000000000..a0fefabdc1 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the status of the connector. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body An object containing the connector's status. (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/connector-apis.html + # + def update_status(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_status' } + + defined_params = [:connector_id].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 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_status" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_index_name_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_index_name_spec.rb new file mode 100644 index 0000000000..e1e80ebc85 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_index_name_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#update_index_name' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_index_name', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.update_index_name' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.update_index_name(body: {}, connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_status_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_status_spec.rb new file mode 100644 index 0000000000..5f91621acb --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_status_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#update_status' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_status', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.update_status' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.update_status(body: {}, connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end From a581488b7fd000a87057ad6c4ecc613159a1cff9 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 5 Feb 2024 14:47:54 +0000 Subject: [PATCH 186/540] [API] Adds security.query_user endpoint --- .../api/actions/security/query_user.rb | 56 +++++++++++++++++++ .../api/actions/security/query_user_spec.rb | 49 ++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/security/query_user_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb new file mode 100644 index 0000000000..4dd6e411f6 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb @@ -0,0 +1,56 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Security + module Actions + # Retrieves information for Users using a subset of query DSL + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body From, size, query, sort and search_after + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-user.html + # + def query_user(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.query_user' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = if body + Elasticsearch::API::HTTP_POST + else + Elasticsearch::API::HTTP_GET + end + + path = '_security/_query/user' + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/query_user_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/query_user_spec.rb new file mode 100644 index 0000000000..d8b6aec98b --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/query_user_spec.rb @@ -0,0 +1,49 @@ +# 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. + +require 'spec_helper' + +describe 'client#security#query_user' do + let(:expected_args) do + [ + method, + '_security/_query/user', + {}, + body, + {}, + { endpoint: 'security.query_user' } + ] + end + + let(:body) { nil } + let(:method) { 'GET' } + + it 'performs the request' do + expect(client_double.security.query_user).to be_a Elasticsearch::API::Response + end + + context 'when body is specified' do + let(:body) do + { size: 1, query: 'test' } + end + let(:method) { 'POST' } + + it 'performs the request' do + expect(client_double.security.query_user(body: body)).to be_a Elasticsearch::API::Response + end + end +end From 150f3fb264a4c8f475352326160e84b8dce3de1b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 5 Feb 2024 16:50:41 +0000 Subject: [PATCH 187/540] [API] Test runner: Migrates query user test to manual --- .../integration/security/users_query_spec.rb | 49 +++++++++++++++++++ .../spec/rest_api/skipped_tests_platinum.yml | 3 ++ 2 files changed, 52 insertions(+) create mode 100644 elasticsearch-api/spec/platinum/integration/security/users_query_spec.rb diff --git a/elasticsearch-api/spec/platinum/integration/security/users_query_spec.rb b/elasticsearch-api/spec/platinum/integration/security/users_query_spec.rb new file mode 100644 index 0000000000..8eaf047410 --- /dev/null +++ b/elasticsearch-api/spec/platinum/integration/security/users_query_spec.rb @@ -0,0 +1,49 @@ +# 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. + +require_relative '../platinum_helper' + +describe 'security/Query User' do + before do + ADMIN_CLIENT.security.put_user( + username: "query_users_test", + body: { + password: "x-pack-test-password", + roles: [ "manage_users_role" ], + full_name: "Read User" + } + ) + end + + it 'queries users' do + response = ADMIN_CLIENT.security.query_user(body: {}) + expect(response.status).to eq 200 + expect(response['count']).to be > 0 + expect(response['total']).to be > 0 + end + + it 'queries user and finds created one' do + body = { + query: { wildcard: { username: 'query_users_*' } } + } + response = ADMIN_CLIENT.security.query_user(body: body) + expect(response.status).to eq 200 + expect(response['count']).to be 1 + expect(response['total']).to be 1 + expect(response['users'].first['username']).to eq 'query_users_test' + end +end diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml index a8cbcc0b96..8b831df9ba 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml @@ -112,3 +112,6 @@ - :file: 'esql/60_usage.yml' :description: 'Basic ESQL usage output (telemetry)' +- + :file: 'users/40_query.yml' + :description: 'Test query user' From 9a36732addd49a9e4ceff0728eb77a47e7bb99a5 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Mon, 5 Feb 2024 13:39:15 +0100 Subject: [PATCH 188/540] Drop runtime dependency on base64 --- elasticsearch-api/api-spec-testing/test_file/task_group.rb | 2 ++ .../integration/api_key/api_key_invalidation_spec.rb | 1 + elasticsearch/elasticsearch.gemspec | 4 ++-- elasticsearch/lib/elasticsearch.rb | 7 ++++--- elasticsearch/spec/unit/api_key_spec.rb | 1 + 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/elasticsearch-api/api-spec-testing/test_file/task_group.rb b/elasticsearch-api/api-spec-testing/test_file/task_group.rb index 71ef01cb31..7c8eb10728 100644 --- a/elasticsearch-api/api-spec-testing/test_file/task_group.rb +++ b/elasticsearch-api/api-spec-testing/test_file/task_group.rb @@ -15,6 +15,8 @@ # specific language governing permissions and limitations # under the License. +require 'base64' + module Elasticsearch module RestAPIYAMLTests class TestFile diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_invalidation_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_invalidation_spec.rb index 5162a77830..5464412f4d 100644 --- a/elasticsearch-api/spec/platinum/integration/api_key/api_key_invalidation_spec.rb +++ b/elasticsearch-api/spec/platinum/integration/api_key/api_key_invalidation_spec.rb @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. +require 'base64' require_relative '../platinum_helper' describe 'API keys API invalidation' do diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index f5222aaa4d..f9faec60eb 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -47,8 +47,8 @@ Gem::Specification.new do |s| s.add_dependency 'elastic-transport', '~> 8.3' s.add_dependency 'elasticsearch-api', '8.13.0' - s.add_dependency 'base64' - + + s.add_development_dependency 'base64' s.add_development_dependency 'bundler' s.add_development_dependency 'debug' unless defined?(JRUBY_VERSION) s.add_development_dependency 'pry' diff --git a/elasticsearch/lib/elasticsearch.rb b/elasticsearch/lib/elasticsearch.rb index f159bc1f90..6b1639f383 100644 --- a/elasticsearch/lib/elasticsearch.rb +++ b/elasticsearch/lib/elasticsearch.rb @@ -18,7 +18,6 @@ require 'elasticsearch/version' require 'elastic/transport' require 'elasticsearch/api' -require 'base64' module Elasticsearch NOT_ELASTICSEARCH_WARNING = 'The client noticed that the server is not Elasticsearch and we do not support this unknown product.'.freeze @@ -108,7 +107,8 @@ def verify_elasticsearch(*args, &block) def setup_cloud_host(cloud_id, user, password, port) name = cloud_id.split(':')[0] - cloud_url, elasticsearch_instance = Base64.decode64(cloud_id.gsub("#{name}:", '')).split('$') + base64_decoded = cloud_id.gsub("#{name}:", '').unpack1('m') + cloud_url, elasticsearch_instance = base64_decoded.split('$') if cloud_url.include?(':') url, port = cloud_url.split(':') @@ -150,7 +150,8 @@ def setup_cloud(arguments) # Credentials is the base64 encoding of id and api_key joined by a colon # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html def encode(api_key) - Base64.strict_encode64([api_key[:id], api_key[:api_key]].join(':')) + credentials = [api_key[:id], api_key[:api_key]].join(':') + [credentials].pack('m0') end def elasticsearch_validation_request diff --git a/elasticsearch/spec/unit/api_key_spec.rb b/elasticsearch/spec/unit/api_key_spec.rb index cc43f65604..176d1b57b6 100644 --- a/elasticsearch/spec/unit/api_key_spec.rb +++ b/elasticsearch/spec/unit/api_key_spec.rb @@ -16,6 +16,7 @@ # under the License. require 'spec_helper' +require 'base64' describe Elasticsearch::Client do context 'when using API Key' do From 1cea4b6ffb37a74080951806a07ce6f545086036 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 6 Feb 2024 11:26:31 +0000 Subject: [PATCH 189/540] [API] Adds index_name and connector_name parameters to connector.list --- .../lib/elasticsearch/api/actions/connector/list.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb index 712a8a7b09..c979e7b9ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb @@ -30,6 +30,8 @@ module Actions # # @option arguments [Integer] :from Starting offset (default: 0) # @option arguments [Integer] :size specifies a max number of results to get (default: 100) + # @option arguments [String] :index_name connector index name(s) to fetch connector documents for + # @option arguments [String] :connector_name connector name(s) to fetch connector documents for # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-api.html From 06fba79c4e669b87b71d3dbad12764760a8533cb Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 6 Feb 2024 11:27:00 +0000 Subject: [PATCH 190/540] [API] Code generator: termvectors code cleanup --- elasticsearch-api/utils/thor/templates/_method_setup.erb | 2 +- elasticsearch-api/utils/thor/templates/method.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/utils/thor/templates/_method_setup.erb b/elasticsearch-api/utils/thor/templates/_method_setup.erb index 3c74d98f43..0e4f14658e 100644 --- a/elasticsearch-api/utils/thor/templates/_method_setup.erb +++ b/elasticsearch-api/utils/thor/templates/_method_setup.erb @@ -24,7 +24,7 @@ method = <%= @spec.http_method %> <%- if @spec.method_name == 'termvectors' %> - endpoint = arguments.delete(:endpoint) || '_termvectors' + arguments.delete(:endpoint) <%- end -%> path = <%= @spec.http_path %> <%- if !@spec.params.empty? || needs_ignore_404?(@spec.endpoint_name) || needs_complex_ignore_404?(@spec.endpoint_name)-%> diff --git a/elasticsearch-api/utils/thor/templates/method.erb b/elasticsearch-api/utils/thor/templates/method.erb index c3d307a49c..5a2a121d24 100644 --- a/elasticsearch-api/utils/thor/templates/method.erb +++ b/elasticsearch-api/utils/thor/templates/method.erb @@ -63,11 +63,11 @@ end alias_method :<%= @spec.method_name %>?, :<%= @spec.method_name %> <%- end -%> <%- if @spec.method_name == 'termvectors' %> - # Deprecated: Use the plural version, {#termvectors} # def termvector(arguments={}) - termvectors(arguments.merge endpoint: '_termvector') + warn "[DEPRECATION] `termvector` is deprecated. Please use the plural version, `termvectors` instead." + termvectors(arguments.merge(endpoint: '_termvector')) end <%- end -%> <%- @spec.namespace_depth.downto(1) do |i| -%> From ddf8ec6859dc2b739b3cebf3cfae5323e35ced70 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 6 Feb 2024 11:28:44 +0000 Subject: [PATCH 191/540] [API] warn: termvector is deprecated, use plural version termvectors instead --- elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb index 15a420c24d..8b834d9ab6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb @@ -66,7 +66,7 @@ def termvectors(arguments = {}) Elasticsearch::API::HTTP_GET end - endpoint = arguments.delete(:endpoint) || '_termvectors' + arguments.delete(:endpoint) path = if _index && _id "#{Utils.__listify(_index)}/_termvectors/#{Utils.__listify(_id)}" else @@ -82,6 +82,7 @@ def termvectors(arguments = {}) # Deprecated: Use the plural version, {#termvectors} # def termvector(arguments = {}) + warn '[DEPRECATION] `termvector` is deprecated. Please use the plural version, `termvectors` instead.' termvectors(arguments.merge(endpoint: '_termvector')) end end From 282b9109888edf28541947f866a43f5b8b4d6fb9 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 6 Feb 2024 14:08:13 +0000 Subject: [PATCH 192/540] [API] Skips tsdb test failing for Ruby 3.1 only --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 7a03e79f8b..7303ec8ee8 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -43,3 +43,6 @@ - :file: 'search.vectors/45_knn_search_byte.yml' :description: 'Direct kNN queries are disallowed' +- + :file: 'tsdb/25_id_generation.yml' + :description: 'generates a consistent id' From 51e81d36d5a405217dab9b6dc056e354fe9acc9b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 7 Feb 2024 08:32:49 +0000 Subject: [PATCH 193/540] [DOCS] Updates source code docs for connector.list and test_grok_pattern --- .../lib/elasticsearch/api/actions/connector/list.rb | 8 +++++--- .../api/actions/text_structure/test_grok_pattern.rb | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb index c979e7b9ea..115f7745ab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb @@ -29,9 +29,11 @@ module Actions # support SLA of official GA features. # # @option arguments [Integer] :from Starting offset (default: 0) - # @option arguments [Integer] :size specifies a max number of results to get (default: 100) - # @option arguments [String] :index_name connector index name(s) to fetch connector documents for - # @option arguments [String] :connector_name connector name(s) to fetch connector documents for + # @option arguments [Integer] :size Specifies a max number of results to get (default: 100) + # @option arguments [List] :index_name A comma-separated list of connector index names to fetch connector documents for + # @option arguments [List] :connector_name A comma-separated list of connector names to fetch connector documents for + # @option arguments [List] :service_type A comma-separated list of connector service types to fetch connector documents for + # @option arguments [String] :query A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-api.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb index 9591889cf6..49fad35ecd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The Grok pattern and text. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/test-grok-pattern-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/test-grok-pattern.html # def test_grok_pattern(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'text_structure.test_grok_pattern' } From 3af92c0e7c002514aee0f6e16770497945e1761b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 7 Feb 2024 08:34:03 +0000 Subject: [PATCH 194/540] [API] Inference API: Renames model_id to inference_id --- .../api/actions/inference/delete_model.rb | 19 +++++++++++-------- .../api/actions/inference/get_model.rb | 19 +++++++++++-------- .../api/actions/inference/inference.rb | 19 +++++++++++-------- .../api/actions/inference/put_model.rb | 19 +++++++++++-------- .../actions/inference/delete_model_spec.rb | 4 ++-- .../api/actions/inference/get_model_spec.rb | 4 ++-- .../api/actions/inference/inference_spec.rb | 4 ++-- .../api/actions/inference/put_model_spec.rb | 4 ++-- 8 files changed, 52 insertions(+), 40 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb index d8371200a0..1b16a6732f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb @@ -28,8 +28,8 @@ module Actions # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :task_type The model task type - # @option arguments [String] :model_id The model Id + # @option arguments [String] :inference_id The model Id + # @option arguments [String] :task_type The task type # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-inference-api.html @@ -37,25 +37,28 @@ module Actions def delete_model(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.delete_model' } - defined_params = %i[task_type model_id].each_with_object({}) do |variable, set_variables| + defined_params = %i[inference_id task_type].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 'task_type' missing" unless arguments[:task_type] - raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - _task_type = arguments.delete(:task_type) + _inference_id = arguments.delete(:inference_id) - _model_id = arguments.delete(:model_id) + _task_type = arguments.delete(:task_type) method = Elasticsearch::API::HTTP_DELETE - path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_model_id)}" + path = if _task_type && _inference_id + "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}" + else + "_inference/#{Utils.__listify(_inference_id)}" + end params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb index 16be9eabba..d25e4a484d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb @@ -28,8 +28,8 @@ module Actions # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :task_type The model task type - # @option arguments [String] :model_id The model Id + # @option arguments [String] :inference_id The inference Id + # @option arguments [String] :task_type The task type # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-api.html @@ -37,25 +37,28 @@ module Actions def get_model(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.get_model' } - defined_params = %i[task_type model_id].each_with_object({}) do |variable, set_variables| + defined_params = %i[inference_id task_type].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 'task_type' missing" unless arguments[:task_type] - raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - _task_type = arguments.delete(:task_type) + _inference_id = arguments.delete(:inference_id) - _model_id = arguments.delete(:model_id) + _task_type = arguments.delete(:task_type) method = Elasticsearch::API::HTTP_GET - path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_model_id)}" + path = if _task_type && _inference_id + "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}" + else + "_inference/#{Utils.__listify(_inference_id)}" + end params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb index 38a5024134..a0bcf51145 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb @@ -28,8 +28,8 @@ module Actions # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :task_type The model task type - # @option arguments [String] :model_id The model Id + # @option arguments [String] :inference_id The inference Id + # @option arguments [String] :task_type The task type # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The inference payload # @@ -38,25 +38,28 @@ module Actions def inference(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.inference' } - defined_params = %i[task_type model_id].each_with_object({}) do |variable, set_variables| + defined_params = %i[inference_id task_type].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 'task_type' missing" unless arguments[:task_type] - raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - _task_type = arguments.delete(:task_type) + _inference_id = arguments.delete(:inference_id) - _model_id = arguments.delete(:model_id) + _task_type = arguments.delete(:task_type) method = Elasticsearch::API::HTTP_POST - path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_model_id)}" + path = if _task_type && _inference_id + "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}" + else + "_inference/#{Utils.__listify(_inference_id)}" + end params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb index 381f32a175..a86e2be1b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb @@ -28,8 +28,8 @@ module Actions # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :task_type The model task type - # @option arguments [String] :model_id The model Id + # @option arguments [String] :inference_id The inference Id + # @option arguments [String] :task_type The task type # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The model's task and service settings # @@ -38,25 +38,28 @@ module Actions def put_model(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.put_model' } - defined_params = %i[task_type model_id].each_with_object({}) do |variable, set_variables| + defined_params = %i[inference_id task_type].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 'task_type' missing" unless arguments[:task_type] - raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - _task_type = arguments.delete(:task_type) + _inference_id = arguments.delete(:inference_id) - _model_id = arguments.delete(:model_id) + _task_type = arguments.delete(:task_type) method = Elasticsearch::API::HTTP_PUT - path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_model_id)}" + path = if _task_type && _inference_id + "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}" + else + "_inference/#{Utils.__listify(_inference_id)}" + end params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb index a1becfc918..109e0da862 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb @@ -25,12 +25,12 @@ {}, nil, {}, - { defined_params: { model_id: 'bar', task_type: 'foo' }, + { defined_params: { inference_id: 'bar', task_type: 'foo' }, endpoint: 'inference.delete_model' } ] end it 'performs the request' do - expect(client_double.inference.delete_model(task_type: 'foo', model_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.delete_model(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb index ef55c4d589..21a76d089b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb @@ -25,12 +25,12 @@ {}, nil, {}, - { defined_params: { model_id: 'bar', task_type: 'foo' }, + { defined_params: { inference_id: 'bar', task_type: 'foo' }, endpoint: 'inference.get_model' } ] end it 'performs the request' do - expect(client_double.inference.get_model(task_type: 'foo', model_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.get_model(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb index fbca8fbbcf..c87efa07b4 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb @@ -25,12 +25,12 @@ {}, nil, {}, - { defined_params: { model_id: 'bar', task_type: 'foo' }, + { defined_params: { inference_id: 'bar', task_type: 'foo' }, endpoint: 'inference.inference' } ] end it 'performs the request' do - expect(client_double.inference.inference(task_type: 'foo', model_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.inference(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb index cc9fc45661..a699e5d394 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb @@ -25,12 +25,12 @@ {}, nil, {}, - { defined_params: { model_id: 'bar', task_type: 'foo' }, + { defined_params: { inference_id: 'bar', task_type: 'foo' }, endpoint: 'inference.put_model' } ] end it 'performs the request' do - expect(client_double.inference.put_model(task_type: 'foo', model_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.put_model(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response end end From 2ea3f5f208fcd127783894c688a6d0af92d6c910 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 7 Feb 2024 08:38:29 +0000 Subject: [PATCH 195/540] [API] Adds connector_secret.get endpoint --- .../api/actions/connector_secret/put.rb | 66 +++++++++++++++++++ .../api/actions/connector_secret/put_spec.rb | 35 ++++++++++ 2 files changed, 101 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/put.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/put_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/put.rb new file mode 100644 index 0000000000..cfd34c4952 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/put.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module ConnectorSecret + module Actions + # Creates or updates a secret for a Connector. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :id The unique identifier of the connector secret to be created or updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The secret value to store (*Required*) + # + # @see [TODO] + # + def put(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector_secret.put' } + + defined_params = [:id].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 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/_secret/#{Utils.__listify(_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/put_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/put_spec.rb new file mode 100644 index 0000000000..5b28bb72f2 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/put_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector_secret#get' do + let(:expected_args) do + [ + 'PUT', + '_connector/_secret/foo', + {}, + {}, + {}, + { :defined_params=>{ id: 'foo' }, endpoint: 'connector_secret.put' } + ] + end + + it 'performs the request' do + expect(client_double.connector_secret.put(id: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end From 5736474a68f43eba65f854cfbf7a80d4c790c304 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 7 Feb 2024 10:55:10 +0000 Subject: [PATCH 196/540] [CI] Update Stack version in OTel tests --- .github/workflows/otel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/otel.yml b/.github/workflows/otel.yml index f18910911c..a9bd4c4024 100644 --- a/.github/workflows/otel.yml +++ b/.github/workflows/otel.yml @@ -28,7 +28,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 8.12.0-SNAPSHOT + stack-version: 8.13.0-SNAPSHOT security-enabled: false - uses: ruby/setup-ruby@v1 with: @@ -42,4 +42,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake elasticsearch:download_artifacts[8.12.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake elasticsearch:download_artifacts[8.13.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit From 72f812485b379544f5c6380c9c1a975b7307fe2a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 8 Feb 2024 06:03:16 +0000 Subject: [PATCH 197/540] [API] Adds with_profile_uid boolean parameter to security.query_user --- .../lib/elasticsearch/api/actions/security/query_user.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb index 4dd6e411f6..a4df6bb7ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb @@ -24,6 +24,7 @@ module Security module Actions # Retrieves information for Users using a subset of query DSL # + # @option arguments [Boolean] :with_profile_uid flag to retrieve profile uid (if exists) associated with the user # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body From, size, query, sort and search_after # @@ -44,7 +45,7 @@ def query_user(arguments = {}) end path = '_security/_query/user' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From c70c02d88d675c68b9d4313cba5ac1da4b97c13a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 9 Feb 2024 10:18:16 +0000 Subject: [PATCH 198/540] [API] Adds include_empty_fields boolean parameter to field_caps --- elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb index 913028d5b1..0ad6237bb3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb @@ -31,6 +31,7 @@ module Actions # @option arguments [Boolean] :include_unmapped Indicates whether unmapped fields should be included in the response. # @option arguments [List] :filters An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent # @option arguments [List] :types Only return results for fields that have one of the types in the list + # @option arguments [Boolean] :include_empty_fields Include empty fields in result # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An index filter specified with the Query DSL # From 607c2839000b5620a50f5a24cb740bea0a3b4472 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 9 Feb 2024 10:24:48 +0000 Subject: [PATCH 199/540] [API] Adds indices.resolve_cluster endpoint --- .../api/actions/indices/resolve_cluster.rb | 64 +++++++++++++++++++ .../actions/indices/resolve_cluster_spec.rb | 51 +++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/indices/resolve_cluster_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb new file mode 100644 index 0000000000..9f399ef567 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb @@ -0,0 +1,64 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Indices + module Actions + # Resolves the specified index expressions to return information about each cluster, including the local cluster, if included. + # + # @option arguments [List] :name A comma-separated list of cluster:index names or wildcard expressions + # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) + # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled + # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-cluster-api.html + # + def resolve_cluster(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'indices.resolve_cluster' } + + 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_GET + path = "_resolve/cluster/#{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/spec/elasticsearch/api/actions/indices/resolve_cluster_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/resolve_cluster_spec.rb new file mode 100644 index 0000000000..3da0771413 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/resolve_cluster_spec.rb @@ -0,0 +1,51 @@ +# 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. + +require 'spec_helper' + +describe 'client.indices#delete_alias' do + + let(:expected_args) do + [ + 'GET', + '_resolve/cluster/foo', + {}, + nil, + {}, + { defined_params: { name: 'foo'}, endpoint: 'indices.resolve_cluster' } + ] + end + + context 'when there is no name specified' do + let(:client) do + Class.new { include Elasticsearch::API }.new + end + + it 'raises an exception' do + expect { + client.indices.resolve_cluster + }.to raise_exception(ArgumentError) + end + end + + + context 'when name is specified' do + it 'performs the request' do + expect(client_double.indices.resolve_cluster(name: 'foo')).to be_a Elasticsearch::API::Response + end + end +end From ed8e8359d3f24dd807380a645d2d7c99fc99ccd1 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 9 Feb 2024 10:25:05 +0000 Subject: [PATCH 200/540] [API] Test Runner: Skips one resolve cluster test --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 7303ec8ee8..c4e518fa02 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -46,3 +46,6 @@ - :file: 'tsdb/25_id_generation.yml' :description: 'generates a consistent id' +- + :file: 'indices.resolve_cluster/10_basic_resolve_cluster.yml' + :description: 'Resolve cluster using alias and index that does not exist' From 05df8f9d9c8e54a6b041b74b4afd7053dce7bc5b Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Tue, 13 Feb 2024 12:38:00 +0100 Subject: [PATCH 201/540] Update docs for corrected environment variable --- docs/open-telemetry.asciidoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/open-telemetry.asciidoc b/docs/open-telemetry.asciidoc index e282546f45..87fd86206b 100644 --- a/docs/open-telemetry.asciidoc +++ b/docs/open-telemetry.asciidoc @@ -64,13 +64,15 @@ Per default, the built-in OpenTelemetry instrumentation does not capture request **Valid Options:** `omit`, `sanitize`, `raw` |============ -| Environment Variable | `OTEL_INSTRUMENTATION_ELASTICSEARCH_CAPTURE_SEARCH_QUERY` +| Environment Variable | `OTEL_RUBY_INSTRUMENTATION_ELASTICSEARCH_CAPTURE_SEARCH_QUERY` |============ [discrete] ===== Sanitize the {es} search request body You can configure the list of keys whose values are redacted when the search query is captured. Values must be comma-separated. +Note in v8.3.0 and v8.3.1, the environment variable `OTEL_INSTRUMENTATION_ELASTICSEARCH_CAPTURE_SEARCH_QUERY` was available +but is now deprecated in favor of the environment variable including `RUBY`. **Default:** `nil` From c89a42dc84b118205b9da4e07dba0c045a64ae21 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 13 Feb 2024 14:14:20 +0000 Subject: [PATCH 202/540] [API] Migrates api_key_with_aggs test to manual integration --- .../api_key/api_key_query_with_aggs_spec.rb | 120 ++++++++++++++++++ .../spec/rest_api/skipped_tests_platinum.yml | 3 + 2 files changed, 123 insertions(+) create mode 100644 elasticsearch-api/spec/platinum/integration/api_key/api_key_query_with_aggs_spec.rb diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_query_with_aggs_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_query_with_aggs_spec.rb new file mode 100644 index 0000000000..c17120d444 --- /dev/null +++ b/elasticsearch-api/spec/platinum/integration/api_key/api_key_query_with_aggs_spec.rb @@ -0,0 +1,120 @@ +# 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. + +require_relative '../platinum_helper' + +describe 'API keys' do + before do + ADMIN_CLIENT.security.put_role( + name: 'admin_role', + body: { cluster: ['manage_api_key'] } + ) + ADMIN_CLIENT.security.put_role( + name: 'user_role', + body: { + cluster: ['manage_own_api_key'], + } + ) + ADMIN_CLIENT.security.put_user( + username: 'api_key_manager', + body: { + password: 'x-pack-test-password', + roles: [ 'admin_role' ], + full_name: 'API key manager' + } + ) + + ADMIN_CLIENT.security.put_user( + username: 'api_key_user', + body: { + password: 'x-pack-test-password', + roles: [ 'user_role' ], + full_name: 'API key user' + } + ) + end + after do + ADMIN_CLIENT.security.delete_role(name: "admin_role", ignore: 404) + ADMIN_CLIENT.security.delete_role(name: "user_role", ignore: 404) + ADMIN_CLIENT.security.delete_user(username: "api_key_user", ignore: 404) + ADMIN_CLIENT.security.delete_user(username: "api_key_manager", ignore: 404) + end + + def client(headers) + Elasticsearch::Client.new( + host: "https://#{HOST_URI.host}:#{HOST_URI.port}", + transport_options: TRANSPORT_OPTIONS.merge(headers: headers) + ) + end + + let(:manager_auth) do + { Authorization: "Basic YXBpX2tleV9tYW5hZ2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } + end + let(:user_auth) do + { Authorization: "Basic YXBpX2tleV9tYW5hZ2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } + end + + it 'queries api key with args' do + # api_key_manager authorization: + client = client(manager_auth) + response = client.security.create_api_key( + body: { + name: 'manager-api-key', + expiration: '10d', + metadata: { + letter: 'a', + number: 42 + } + } + ) + expect(response.status).to eq 200 + id = response['id'] + api_key = response['api_key'] + expect(response['encoded']).to eq Base64.strict_encode64("#{id}:#{api_key}") + + client = client(user_auth) + response = client.security.create_api_key( + body: { + name: 'user-api-key', + expiration: '1d', + metadata: { + letter: 'a', + number: 1 + } + } + ) + expect(response.status).to eq 200 + id = response['id'] + api_key = response['api_key'] + expect(response['encoded']).to eq Base64.strict_encode64("#{id}:#{api_key}") + + response = client.security.query_api_keys( + body: { + size: 0, + aggs: { + my_buckets: { + composite: { + sources: [{ key_name: { terms: { field: "name" } } } ] + } + } + } + } + ) + expect(response.dig('aggregations', 'my_buckets', 'buckets').find { |a| a.dig('key', 'key_name') == 'manager-api-key'}) + expect(response.dig('aggregations', 'my_buckets', 'buckets').find { |a| a.dig('key', 'key_name') == 'user-api-key'}) + end +end diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml index 8b831df9ba..65ad2bdc74 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml @@ -115,3 +115,6 @@ - :file: 'users/40_query.yml' :description: 'Test query user' +- + :file: 'api_key/21_query_with_aggs.yml' + :description: 'Test composite aggs api key' From c9bb4295aa947e34a25fcdffb32c34ca186a7015 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 14 Feb 2024 16:48:08 +0000 Subject: [PATCH 203/540] Bumps version to 8.14.0 --- elasticsearch-api/lib/elasticsearch/api/version.rb | 2 +- elasticsearch/elasticsearch.gemspec | 2 +- elasticsearch/lib/elasticsearch/version.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index 5db4123683..e43ee587d7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/version.rb +++ b/elasticsearch-api/lib/elasticsearch/api/version.rb @@ -17,6 +17,6 @@ module Elasticsearch module API - VERSION = '8.13.0'.freeze + VERSION = '8.14.0'.freeze end end diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index f9faec60eb..1b32349b05 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -46,7 +46,7 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 2.5' s.add_dependency 'elastic-transport', '~> 8.3' - s.add_dependency 'elasticsearch-api', '8.13.0' + s.add_dependency 'elasticsearch-api', '8.14.0' s.add_development_dependency 'base64' s.add_development_dependency 'bundler' diff --git a/elasticsearch/lib/elasticsearch/version.rb b/elasticsearch/lib/elasticsearch/version.rb index f1498f8f73..099a40a401 100644 --- a/elasticsearch/lib/elasticsearch/version.rb +++ b/elasticsearch/lib/elasticsearch/version.rb @@ -16,5 +16,5 @@ # under the License. module Elasticsearch - VERSION = '8.13.0'.freeze + VERSION = '8.14.0'.freeze end From fc5c65d4d09d9300552d6f4b948d357435c95015 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Thu, 15 Feb 2024 06:06:44 +0000 Subject: [PATCH 204/540] Auto-generated API code --- .../elasticsearch/api/actions/connector/update_index_name.rb | 2 +- .../elasticsearch/api/actions/connector/update_service_type.rb | 2 +- .../lib/elasticsearch/api/actions/connector/update_status.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb index 7a9d948009..ce76d01503 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object containing the connector's index name. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/connector-apis.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-index-name-api.html # def update_index_name(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_index_name' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb index 62293fd450..757b43c8ec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object containing the connector's service type. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/connector-apis.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-service-type-api.html # def update_service_type(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_service_type' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb index a0fefabdc1..8b1ef81f37 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object containing the connector's status. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/connector-apis.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-status-api.html # def update_status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_status' } From 7b8d4f604d88f3dff216dfd9732ab74ae7449958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 19 Feb 2024 16:04:11 +0100 Subject: [PATCH 205/540] [DOCS] Reviews troubleshooting docs. --- docs/troubleshooting.asciidoc | 60 ++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 12 deletions(-) diff --git a/docs/troubleshooting.asciidoc b/docs/troubleshooting.asciidoc index 72bd0891b1..a2e6a19e05 100644 --- a/docs/troubleshooting.asciidoc +++ b/docs/troubleshooting.asciidoc @@ -1,9 +1,20 @@ [[troubleshooting]] == Troubleshooting -The client provides several options for logging that can help when things go wrong. Check out the extensive documentation on <>. +Use the information in this section to troubleshoot common problems and find +answers for frequently asked questions. -If you are having trouble sending a request to {es} with the client, we suggest enabling `tracing` on the client and testing the cURL command that appears in your terminal: + +[discrete] +[[ruby-ts-logging]] +=== Logging + +The client provides several options for logging that can help when things go +wrong. Check out the extensive documentation on <>. + +If you are having trouble sending a request to {es} with the client, we suggest +enabling `tracing` on the client and testing the cURL command that appears in +your terminal: [source,rb] ---------------------------- @@ -13,15 +24,27 @@ curl -X GET -H 'x-elastic-client-meta: es=8.9.0,rb=3.2.2,t=8.2.1,fd=2.7.4,nh=0.3 ransport-ruby/8.2.1 (RUBY_VERSION: 3.2.2; linux x86_64; Faraday v2.7.4), Content-Type: application/json' 'http://localhost:9200//?pretty' ---------------------------- -Testing the cURL command can help find out if there's a connection issue or if the issue is in the client code. +Testing the cURL command can help find out if there's a connection issue or if +the issue is in the client code. + [discrete] -=== Connection -When working with multiple hosts, you might want to enable the `retry_on_failure` or `retry_on_status` options to perform a failed request on another node (refer to <>). +[[ruby-ts-connection]] +=== Troubleshooting connection issues + +When working with multiple hosts, you might want to enable the +`retry_on_failure` or `retry_on_status` options to perform a failed request on +another node (refer to <>). + +For optimal performance, use a HTTP library which supports persistent +("keep-alive") connections, such as https://github.com/toland/patron[patron] or +https://github.com/typhoeus/typhoeus[Typhoeus]. Require the library +(`require 'patron'`) in your code for Faraday 1.x or the adapter +(`require 'faraday/patron'`) for Faraday 2.x, and it will be automatically used. -For optimal performance, use a HTTP library which supports persistent ("keep-alive") connections, such as https://github.com/toland/patron[patron] or https://github.com/typhoeus/typhoeus[Typhoeus]. Require the library (`require 'patron'`) in your code for Faraday 1.x or the adapter (`require 'faraday/patron'`) for Faraday 2.x, and it will be automatically used. [discrete] +[[ruby-ts-adapter]] === Adapter is not registered on Faraday If you see a message like: @@ -29,9 +52,15 @@ If you see a message like: :adapter is not registered on Faraday::Adapter (Faraday::Error) ``` -Then you probably need to include the adapter library in your Gemfile and require it. You might get this error when migrating from Faraday v1 to Faraday v2. The main change when using Faraday v2 is all adapters, except for the default `net_http` one, have been moved out into separate gems. This means if you're not using the default adapter and you migrate to Faraday v2, you'll need to add the adapter gems to your Gemfile. +Then you might need to include the adapter library in your Gemfile and require +it. You might get this error when migrating from Faraday v1 to Faraday v2. The +main change when using Faraday v2 is all adapters, except for the default +`net_http` one, have been moved out into separate gems. This means if you're not +using the default adapter and you migrate to Faraday v2, you'll need to add the +adapter gems to your Gemfile. -These are the gems required for the different adapters with Faraday 2, instead of the libraries on which they were based: +These are the gems required for the different adapters with Faraday 2, instead +of the libraries on which they were based: [source,ruby] ------------------------------------ @@ -48,14 +77,21 @@ gem 'faraday-patron' gem 'faraday-typhoeus' ------------------------------------ -Things should work fine if you migrate to Faraday 2 as long as you include the adapter (unless you're using the default one `net-http`), but worst case scenario, you can always lock the version of Faraday in your project to 1.x: +Migrating to Faraday 2 solves the issue as long as the adapter is included +(unless you're using the default one `net-http`). Alternatively, you can lock +the version of Faraday in your project to 1.x: `gem 'faraday', '~> 1'` -Be aware if migrating to Faraday v2 that it requires at least Ruby `2.6`, unlike Faraday v1 which requires `2.4`. +IMPORTANT: Migrating to Faraday v2 requires at least Ruby `2.6`. Faraday v1 +requires `2.4`. [discrete] === More Help -If you need more help, you can hop on our https://discuss.elastic.co/[Elastic community forums] and get answers from the experts in the community, including people from Elastic. +If you need more help, visit the +https://discuss.elastic.co/[Elastic community forums] and get answers from the +experts in the community, including people from Elastic. -If you find a bug, have feedback, or find any other issue using the client, please https://github.com/elastic/elasticsearch-ruby/issues/new/choose[submit an issue] on GitHub. +If you find a bug, have feedback, or find any other issue using the client, +https://github.com/elastic/elasticsearch-ruby/issues/new/choose[submit an issue] +on GitHub. \ No newline at end of file From e509e81e4de90c3f5f51b08d43123bf1b09dc11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Wed, 21 Feb 2024 13:48:03 +0100 Subject: [PATCH 206/540] [DOCS] Adds compatibility matrix to the Install section (#2316) * [DOCS] Adds compatibility matrix to the Install section and README Co-authored-by: Fernando Briano --- README.md | 11 ++++++++++- docs/installation.asciidoc | 24 +++++++++++++++++++++--- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 11e07a57b1..f83785aab4 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,16 @@ Please see their respective READMEs for information and documentation. We follow Ruby’s own maintenance policy and officially support all currently maintained versions per [Ruby Maintenance Branches](https://www.ruby-lang.org/en/downloads/branches/). -Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of Elasticsearch. Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made. +Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of Elasticsearch without breaking. +It does not mean that the client automatically supports new features of newer Elasticsearch versions; it is only possible after a release of a new client version. +For example, a 8.12 client version won't automatically support the new features of the 8.13 version of Elasticsearch, the 8.13 client version is required for that. +Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made. + +| Gem Version | | Elasticsearch Version | Supported | +|-------------|---|------------------------|-----------| +| 7.x | → | 7.x | 7.17 | +| 8.x | → | 8.x | 8.x | +| main | → | main | | ## Development diff --git a/docs/installation.asciidoc b/docs/installation.asciidoc index dd3c2d2ac8..15ce2f60a8 100644 --- a/docs/installation.asciidoc +++ b/docs/installation.asciidoc @@ -38,6 +38,24 @@ gem 'elasticsearch', '~> 7.0' [discrete] === {es} and Ruby Version Compatibility -The {es} client is compatible with currently maintained Ruby versions. We follow Ruby’s own maintenance policy and officially support all currently maintained versions per https://www.ruby-lang.org/en/downloads/branches/[Ruby Maintenance Branches]. - -Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of {es}. Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made. +The {es} client is compatible with currently maintained Ruby versions. We follow +Ruby’s own maintenance policy and officially support all currently maintained +versions per +https://www.ruby-lang.org/en/downloads/branches/[Ruby Maintenance Branches]. + +Language clients are forward compatible; meaning that clients support +communicating with greater or equal minor versions of {es} without breaking. It +does not mean that the client automatically supports new features of newer {es} +versions; it is only possible after a release of a new client version. For +example, a 8.12 client version won't automatically support the new features of +the 8.13 version of {es}, the 8.13 client version is required for that. +{es} language clients are only backwards compatible with default distributions +and without guarantees made. + +|=== +| Gem Version | | {es} Version | Supported + +| 7.x | → | 7.x | 7.17 +| 8.x | → | 8.x | 8.x +| main | → | main | +|=== \ No newline at end of file From 8ab11fb822765bbee9e6202f026ad0f48703118d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 21 Feb 2024 14:41:39 +0000 Subject: [PATCH 207/540] [CI] Passes STACK_VERSION to docker run --- .buildkite/run-client.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.buildkite/run-client.sh b/.buildkite/run-client.sh index 4f758a026a..ef89d07104 100755 --- a/.buildkite/run-client.sh +++ b/.buildkite/run-client.sh @@ -30,6 +30,7 @@ docker run \ --env "ELASTIC_USER=elastic" \ --env "BUILDKITE=true" \ --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ + --env "STACK_VERSION=${STACK_VERSION}" \ --volume $repo:/usr/src/app \ --name elasticsearch-ruby \ --rm \ From 14be5c9f5f6b3a03c56194a516790a9778d46691 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 22 Feb 2024 12:35:46 +0000 Subject: [PATCH 208/540] [CI] Adds otel tests to bumpmatrix automation --- rake_tasks/automation.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/rake_tasks/automation.rake b/rake_tasks/automation.rake index a05961d1a4..ec510d3dbe 100644 --- a/rake_tasks/automation.rake +++ b/rake_tasks/automation.rake @@ -103,6 +103,7 @@ namespace :automation do files = [ '.github/workflows/main.yml', + '.github/workflows/otel.yml', '.buildkite/pipeline.yml' ] regexp = Regexp.new(/([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}?+(-SNAPSHOT)?)/) From 8990beb37ca05e28dd2db031d527e1192d17dd3e Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Thu, 22 Feb 2024 13:19:23 +0000 Subject: [PATCH 209/540] Bumps stack to version 8.14.0-SNAPSHOT --- .buildkite/pipeline.yml | 2 +- .github/workflows/main.yml | 4 ++-- .github/workflows/otel.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index edfb6eea45..2035b94136 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -5,7 +5,7 @@ steps: env: RUBY_VERSION: "{{ matrix.ruby }}" TEST_SUITE: "{{ matrix.suite }}" - STACK_VERSION: 8.13.0-SNAPSHOT + STACK_VERSION: 8.14.0-SNAPSHOT TRANSPORT_VERSION: "{{ matrix.transport }}" RUBY_SOURCE: "{{ matrix.ruby_source }}" matrix: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fb047683c7..ecc6cdb80f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 8.13.0-SNAPSHOT + stack-version: 8.14.0-SNAPSHOT security-enabled: false - uses: ruby/setup-ruby@v1 with: @@ -40,4 +40,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake elasticsearch:download_artifacts[8.13.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake elasticsearch:download_artifacts[8.14.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit diff --git a/.github/workflows/otel.yml b/.github/workflows/otel.yml index a9bd4c4024..dd773a041e 100644 --- a/.github/workflows/otel.yml +++ b/.github/workflows/otel.yml @@ -28,7 +28,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 8.13.0-SNAPSHOT + stack-version: 8.14.0-SNAPSHOT security-enabled: false - uses: ruby/setup-ruby@v1 with: @@ -42,4 +42,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake elasticsearch:download_artifacts[8.13.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake elasticsearch:download_artifacts[8.14.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit From 331a817b1afede172024ad24126f3b7e1e8b9579 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 6 Mar 2024 18:18:54 +0000 Subject: [PATCH 210/540] [API] Adds text_structure APIS find_field_structure and find_message_structure --- .../text_structure/find_field_structure.rb | 64 +++++++++++++++++++ .../text_structure/find_message_structure.rb | 64 +++++++++++++++++++ .../find_field_structure_spec.rb | 35 ++++++++++ .../find_message_structure_spec.rb | 35 ++++++++++ .../text_structure/find_structure_spec.rb | 2 +- 5 files changed, 199 insertions(+), 1 deletion(-) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_field_structure_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_message_structure_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb new file mode 100644 index 0000000000..8464acff62 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb @@ -0,0 +1,64 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module TextStructure + module Actions + # Finds the structure of a text field in an index. + # + # @option arguments [String] :index The index containing the analyzed field (*Required*) + # @option arguments [String] :field The field that should be analyzed (*Required*) + # @option arguments [Integer] :documents_to_sample How many documents should be included in the analysis + # @option arguments [Time] :timeout Timeout after which the analysis will be aborted + # @option arguments [String] :format Optional parameter to specify the high level file format (options: ndjson, xml, delimited, semi_structured_text) + # @option arguments [List] :column_names Optional parameter containing a comma separated list of the column names for a delimited file + # @option arguments [String] :delimiter Optional parameter to specify the delimiter character for a delimited file - must be a single character + # @option arguments [String] :quote Optional parameter to specify the quote character for a delimited file - must be a single character + # @option arguments [Boolean] :should_trim_fields Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them + # @option arguments [String] :grok_pattern Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file + # @option arguments [String] :ecs_compatibility Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled' + # @option arguments [String] :timestamp_field Optional parameter to specify the timestamp field in the file + # @option arguments [String] :timestamp_format Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format + # @option arguments [Boolean] :explain Whether to include a commentary on how the structure was derived + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-field-structure.html + # + def find_field_structure(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'text_structure.find_field_structure' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = '_text_structure/find_field_structure' + 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/text_structure/find_message_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb new file mode 100644 index 0000000000..fcd7456472 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb @@ -0,0 +1,64 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module TextStructure + module Actions + # Finds the structure of a list of messages. The messages must contain data that is suitable to be ingested into Elasticsearch. + # + # @option arguments [Time] :timeout Timeout after which the analysis will be aborted + # @option arguments [String] :format Optional parameter to specify the high level file format (options: ndjson, xml, delimited, semi_structured_text) + # @option arguments [List] :column_names Optional parameter containing a comma separated list of the column names for a delimited file + # @option arguments [String] :delimiter Optional parameter to specify the delimiter character for a delimited file - must be a single character + # @option arguments [String] :quote Optional parameter to specify the quote character for a delimited file - must be a single character + # @option arguments [Boolean] :should_trim_fields Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them + # @option arguments [String] :grok_pattern Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file + # @option arguments [String] :ecs_compatibility Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled' + # @option arguments [String] :timestamp_field Optional parameter to specify the timestamp field in the file + # @option arguments [String] :timestamp_format Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format + # @option arguments [Boolean] :explain Whether to include a commentary on how the structure was derived + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body JSON object with one field [messages], containing an array of messages to be analyzed (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-message-structure.html + # + def find_message_structure(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'text_structure.find_message_structure' } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = '_text_structure/find_message_structure' + 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/spec/elasticsearch/api/actions/text_structure/find_field_structure_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_field_structure_spec.rb new file mode 100644 index 0000000000..e9adf509e1 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_field_structure_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.text_structure#test_grok_pattern' do + let(:expected_args) do + [ + 'GET', + '_text_structure/find_field_structure', + {}, + nil, + {}, + { endpoint: 'text_structure.find_field_structure' } + ] + end + + it 'performs the request' do + expect(client_double.text_structure.find_field_structure).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_message_structure_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_message_structure_spec.rb new file mode 100644 index 0000000000..086d55d8be --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_message_structure_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.text_structure#test_grok_pattern' do + let(:expected_args) do + [ + 'POST', + '_text_structure/find_message_structure', + {}, + {}, + {}, + { endpoint: 'text_structure.find_message_structure' } + ] + end + + it 'performs the request' do + expect(client_double.text_structure.find_message_structure(body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_structure_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_structure_spec.rb index da6c2525a2..e6d18a9ad7 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_structure_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_structure_spec.rb @@ -24,7 +24,7 @@ '_text_structure/find_structure', {}, {}, - {"Content-Type"=>"application/x-ndjson"}, + { 'Content-Type' => 'application/x-ndjson' }, { endpoint: 'text_structure.find_structure' } ] end From 5bafd4a91be5fecfca903a13efae79027376dae0 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 6 Mar 2024 09:52:25 +0000 Subject: [PATCH 211/540] [CI] Updates JRuby on buildkite pipeline --- .buildkite/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 2035b94136..28c8765f47 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -54,7 +54,7 @@ steps: transport: "main" - with: suite: "free" - ruby: "9.3" + ruby: "9.4" ruby_source: "jruby" transport: "8.2" command: ./.buildkite/run-tests.sh From f61c0addadc91fbcc8e98a40f7a777a576f22b27 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 6 Mar 2024 15:16:02 +0000 Subject: [PATCH 212/540] [CI] Removes unnecessary txt from formatters --- elasticsearch-api/spec/spec_helper.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/elasticsearch-api/spec/spec_helper.rb b/elasticsearch-api/spec/spec_helper.rb index 07b37b8792..51bc6d868a 100644 --- a/elasticsearch-api/spec/spec_helper.rb +++ b/elasticsearch-api/spec/spec_helper.rb @@ -64,7 +64,6 @@ def self.included(context) else config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}.html") end - config.example_status_persistence_file_path = "tmp/#{ENV['TEST_SUITE']}-#{RUBY_VERSION}.txt" config.color_mode = :on end From 59baea8e6647031c08b07163f9c3ac0a3b1c26ef Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 6 Mar 2024 15:19:34 +0000 Subject: [PATCH 213/540] Reverts "[CI] Removes log formatter for RSpec in API" Brings back the log formatter for test name results in Buildkite This reverts commit 5570fe79f5bc3984d540cbe8338b89e9319e5361. --- elasticsearch-api/spec/rspec_formatter.rb | 31 +++++++++++++++++++++++ elasticsearch-api/spec/spec_helper.rb | 4 +++ 2 files changed, 35 insertions(+) create mode 100644 elasticsearch-api/spec/rspec_formatter.rb diff --git a/elasticsearch-api/spec/rspec_formatter.rb b/elasticsearch-api/spec/rspec_formatter.rb new file mode 100644 index 0000000000..644def111f --- /dev/null +++ b/elasticsearch-api/spec/rspec_formatter.rb @@ -0,0 +1,31 @@ +# 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. + +class RSpecCustomFormatter < RSpec::Core::Formatters::JsonFormatter + RSpec::Core::Formatters.register self + + LOGFILE = File.new("tmp/rspec-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}.log", 'w') + + def close(_notification) + @output_hash[:examples].map do |example| + regexp = /\S+\/\S+/ + filename = example[:full_description].match(/\S+\/\S+/)[0] + log ="#{filename} | #{example[:status]} | #{example[:run_time]} | #{example[:full_description]}\n" + File.write(LOGFILE, log, mode: 'a') + end + end +end diff --git a/elasticsearch-api/spec/spec_helper.rb b/elasticsearch-api/spec/spec_helper.rb index 51bc6d868a..e2ad892f05 100644 --- a/elasticsearch-api/spec/spec_helper.rb +++ b/elasticsearch-api/spec/spec_helper.rb @@ -64,6 +64,10 @@ def self.included(context) else config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}.html") end + if ENV['BUILDKITE'] + require_relative "./rspec_formatter.rb" + config.add_formatter('RSpecCustomFormatter') + end config.color_mode = :on end From 7d56748e678322e9496495136a91929e705b9868 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 6 Mar 2024 18:04:07 +0000 Subject: [PATCH 214/540] [CI] Test Runner: Adds more tasks to skippable tasks - 'create persistent task' - 'finish persistent task (success)' --- elasticsearch-api/api-spec-testing/wipe_cluster.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/api-spec-testing/wipe_cluster.rb b/elasticsearch-api/api-spec-testing/wipe_cluster.rb index 3d91f63e19..22cb1c01fe 100644 --- a/elasticsearch-api/api-spec-testing/wipe_cluster.rb +++ b/elasticsearch-api/api-spec-testing/wipe_cluster.rb @@ -286,7 +286,8 @@ def wait_for_cluster_tasks(client) def skippable_task?(task) names = ['health-node', 'cluster:monitor/tasks/lists', 'create-index-template-v2', - 'remove-component-template'] + 'remove-component-template', 'create persistent task', + 'finish persistent task'] if task.is_a?(String) names.select { |n| task.match? n }.any? elsif task.is_a?(Hash) From d59334775f68a277ca730c8ca119f4cbd805db73 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 6 Mar 2024 19:13:30 +0000 Subject: [PATCH 215/540] [CI] Test Runner: Adds .kibana-reporting to PLATINUM_TEMPLATES --- elasticsearch-api/api-spec-testing/wipe_cluster.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/api-spec-testing/wipe_cluster.rb b/elasticsearch-api/api-spec-testing/wipe_cluster.rb index 22cb1c01fe..a3cf59ae77 100644 --- a/elasticsearch-api/api-spec-testing/wipe_cluster.rb +++ b/elasticsearch-api/api-spec-testing/wipe_cluster.rb @@ -41,7 +41,8 @@ module WipeCluster 'synthetics', 'synthetics-settings', 'synthetics-mappings', '.snapshot-blob-cache', '.deprecation-indexing-template', '.deprecation-indexing-mappings', '.deprecation-indexing-settings', - 'security-index-template', 'data-streams-mappings', 'search-acl-filter' + 'security-index-template', 'data-streams-mappings', 'search-acl-filter', + '.kibana-reporting' ].freeze # Wipe Cluster, based on PHP's implementation of ESRestTestCase.java:wipeCluster() From 5c87e0c383d88c2a26b8dfce49759e830c92b518 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 7 Mar 2024 10:35:26 +0000 Subject: [PATCH 216/540] [API] Adds manual integration tests for free test suite To have better control over tests and reimplement ones which need very specific conditions so are skipped in the YAML test runner. In particular health report is migrated to this new setup. These will go away once we migrate to the new client yaml tests. --- elasticsearch-api/Rakefile | 8 ++++-- .../spec/free/integration/health_spec.rb | 28 +++++++++++++++++++ .../spec/free/integration/spec_helper.rb | 28 +++++++++++++++++++ .../spec/rest_api/skipped_tests_free.yml | 3 ++ 4 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 elasticsearch-api/spec/free/integration/health_spec.rb create mode 100644 elasticsearch-api/spec/free/integration/spec_helper.rb diff --git a/elasticsearch-api/Rakefile b/elasticsearch-api/Rakefile index acbe366852..56767a648a 100644 --- a/elasticsearch-api/Rakefile +++ b/elasticsearch-api/Rakefile @@ -67,9 +67,11 @@ namespace :test do desc 'Run Platinum Integration Specs' RSpec::Core::RakeTask.new(:integration) do |t| - exit(0) unless ENV['TEST_SUITE'] == 'platinum' - - t.pattern = 'spec/platinum/integration/**/*_spec.rb' + t.pattern = if ENV['TEST_SUITE'] == 'platinum' + 'spec/platinum/integration/**/*_spec.rb' + else + 'spec/free/integration/**/*_spec.rb' + end t.ruby_opts = '-W0' end end diff --git a/elasticsearch-api/spec/free/integration/health_spec.rb b/elasticsearch-api/spec/free/integration/health_spec.rb new file mode 100644 index 0000000000..1f76467e68 --- /dev/null +++ b/elasticsearch-api/spec/free/integration/health_spec.rb @@ -0,0 +1,28 @@ +# 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. +# TODO: These tests won't be necessary once we migrate to the new YAML tests +require_relative './spec_helper' + +describe "Health basic test" do + it 'performs the request' do + response = CLIENT.health_report + expect(response.status).to eq 200 + expect(response['cluster_name']).not_to be_nil + expect(response.dig('indicators', 'master_is_stable', 'symptom')).to eq 'The cluster has a stable master node' + expect(response.dig('indicators', 'master_is_stable', 'status')).to eq 'green' + end +end diff --git a/elasticsearch-api/spec/free/integration/spec_helper.rb b/elasticsearch-api/spec/free/integration/spec_helper.rb new file mode 100644 index 0000000000..81c38c0ca4 --- /dev/null +++ b/elasticsearch-api/spec/free/integration/spec_helper.rb @@ -0,0 +1,28 @@ +# 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. +require 'elasticsearch' + +host = ENV['TEST_ES_SERVER'] || 'http://localhost:9200' +raise URI::InvalidURIError unless host =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/ + +test_suite = ENV['TEST_SUITE'] || 'free' +password = ENV['ELASTIC_PASSWORD'] || 'changeme' +uri = URI.parse(host) +transport_options = {} +host = "http://elastic:#{password}@#{uri.host}:#{uri.port}".freeze + +CLIENT = Elasticsearch::Client.new(host: host, transport_options: transport_options) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index c4e518fa02..e21f095ed0 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -49,3 +49,6 @@ - :file: 'indices.resolve_cluster/10_basic_resolve_cluster.yml' :description: 'Resolve cluster using alias and index that does not exist' +- + :file: 'health/10_basic.yml' # Migrated to written manually + :description: 'cluster health basic test' From 0f070b45364de4323b25b821096cd093c008040d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 13 Mar 2024 16:01:24 +0000 Subject: [PATCH 217/540] [API] Test Runner: Supports new skip by feature in YAML tests --- elasticsearch-api/api-spec-testing/test_file/test.rb | 2 +- elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/api-spec-testing/test_file/test.rb b/elasticsearch-api/api-spec-testing/test_file/test.rb index d62d58c44e..32364a4056 100644 --- a/elasticsearch-api/api-spec-testing/test_file/test.rb +++ b/elasticsearch-api/api-spec-testing/test_file/test.rb @@ -71,7 +71,7 @@ def split_and_parse_key(key) end end - attr_reader :description, :test_file, :cached_values, :file_basename + attr_reader :description, :test_file, :cached_values, :file_basename, :skip # Actions that if followed by a 'do' action, indicate that they complete their task group. # For example, consider this sequence of actions: diff --git a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb index 7a64938f4a..a48d1de92f 100644 --- a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb +++ b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb @@ -30,6 +30,8 @@ exit 1 end + CLUSTER_FEATURES = ADMIN_CLIENT.features.get_features['features'].map { |f| f['name'] } + # Traverse YAML files and create TestFile object: REST_API_YAML_FILES.each do |file| begin @@ -46,6 +48,10 @@ let(:client) { DEFAULT_CLIENT } test_file.tests.each do |test| + # To support new features skipping in YAML tests. This will go away with new YAML tests: + if (feature_to_skip = test.skip&.first&.[]('skip')&.[]('cluster_features')) + next unless CLUSTER_FEATURES.include? feature_to_skip + end context test.description do if test.skip_test?(ADMIN_CLIENT) skip 'Test contains feature(s) not yet supported or version is not satisfied' From 087cdde3ef00d1b6f42abc7809d0d7d742096e4d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 13 Mar 2024 16:39:05 +0000 Subject: [PATCH 218/540] Test Runner: Skip tests due to regexp --- .../spec/rest_api/skipped_tests_free.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index e21f095ed0..d0cad8eabe 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -52,3 +52,18 @@ - :file: 'health/10_basic.yml' # Migrated to written manually :description: 'cluster health basic test' +- + :file: 'cat.allocation/10_basic.yml' + :description: 'One index' +- + :file: 'cat.allocation/10_basic.yml' + :description: 'Node ID' +- + :file: 'cat.allocation/10_basic.yml' + :description: 'All Nodes' +- + :file: 'cat.allocation/10_basic.yml' + :description: 'Column headers' +- + :file: 'cat.allocation/10_basic.yml' + :description: 'Bytes' From 14e2eb8551fcca665a4b90a2dbc3d815713c2262 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Thu, 21 Mar 2024 06:06:00 +0000 Subject: [PATCH 219/540] Auto-generated API code --- .../elasticsearch/api/actions/connector/update_api_key_id.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb index 9e6002aab7..a44130824e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object containing the connector's API key id and/or Connector Secret document id for that API key. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/connector-apis.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-api-key-id-api.html # def update_api_key_id(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_api_key_id' } From 5a026a26b75538341e48815a84ae48f93dbf24b3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 2 Apr 2024 14:27:50 +0100 Subject: [PATCH 220/540] [API] Test Runner: Fixes do_action when empty --- elasticsearch-api/api-spec-testing/test_file/task_group.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/api-spec-testing/test_file/task_group.rb b/elasticsearch-api/api-spec-testing/test_file/task_group.rb index 7c8eb10728..1af199ac73 100644 --- a/elasticsearch-api/api-spec-testing/test_file/task_group.rb +++ b/elasticsearch-api/api-spec-testing/test_file/task_group.rb @@ -284,6 +284,7 @@ def length_match_clauses ACTIONS = (Test::GROUP_TERMINATORS + ['do']).freeze def do_actions + return [] if @actions.empty? @do_actions ||= @actions.group_by { |a| a.keys.first }['do'].map { |definition| Action.new(definition['do']) } end From 330e1e79318093174e2242e961ca7e5fcdc54f8f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 2 Apr 2024 14:34:43 +0100 Subject: [PATCH 221/540] [API] Skipped tests: knn_query_multiple_shards 2 knn queries --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index d0cad8eabe..7b0a5de4cf 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -67,3 +67,6 @@ - :file: 'cat.allocation/10_basic.yml' :description: 'Bytes' +- + :file: 'search.vectors/120_knn_query_multiple_shards.yml' + :description: 'Search for 2 knn queries combines scores from them' From 63192cbf9d9e2ab67be4d68adff1d20e14b4fdc2 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 2 Apr 2024 14:36:31 +0100 Subject: [PATCH 222/540] [API] Skipped test: knn_query function score --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 7b0a5de4cf..eb34a8834e 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -70,3 +70,6 @@ - :file: 'search.vectors/120_knn_query_multiple_shards.yml' :description: 'Search for 2 knn queries combines scores from them' +- + :file: 'search.vectors/140_knn_query_with_other_queries.yml' + :description: 'Function score query with knn query' From 46252588a9ae983ce48eb6125d62708574dfa11d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 2 Apr 2024 14:43:50 +0100 Subject: [PATCH 223/540] [API] Adds with_profile_uid parameter and typed_keys to api_keys --- .../lib/elasticsearch/api/actions/security/get_api_key.rb | 1 + .../lib/elasticsearch/api/actions/security/query_api_keys.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb index c45377aa6e..b023edb480 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb @@ -30,6 +30,7 @@ module Actions # @option arguments [String] :realm_name realm name of the user who created this API key to be retrieved # @option arguments [Boolean] :owner flag to query API keys owned by the currently authenticated user # @option arguments [Boolean] :with_limited_by flag to show the limited-by role descriptors of API Keys + # @option arguments [Boolean] :with_profile_uid flag to also retrieve the API Key's owner profile uid, if it exists # @option arguments [Boolean] :active_only flag to limit response to only active (not invalidated or expired) API keys # @option arguments [Hash] :headers Custom HTTP headers # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb index 0e59af95fa..02cf165e18 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb @@ -25,6 +25,8 @@ module Actions # Retrieves information for API keys using a subset of query DSL # # @option arguments [Boolean] :with_limited_by flag to show the limited-by role descriptors of API Keys + # @option arguments [Boolean] :with_profile_uid flag to also retrieve the API Key's owner profile uid, if it exists + # @option arguments [Boolean] :typed_keys flag to prefix aggregation names by their respective types in the response # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body From, size, query, sort and search_after # From 8450b614fd426d3951c264b69f9c09ea07c7aaee Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 2 Apr 2024 14:55:49 +0100 Subject: [PATCH 224/540] [API] Skipped tests: Skips knn filter alias test --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index eb34a8834e..8500e34d70 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -73,3 +73,6 @@ - :file: 'search.vectors/140_knn_query_with_other_queries.yml' :description: 'Function score query with knn query' +- + :file: 'search.vectors/60_knn_search_filter_alias.yml' + :description: 'kNN filter alias' From 7bd0ff66ba3c248f9f88b68a5febf8cb35f227a8 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 2 Apr 2024 15:04:58 +0100 Subject: [PATCH 225/540] [API] Adds new namespace DataStreams --- elasticsearch-api/lib/elasticsearch/api.rb | 3 +- .../data_streams/delete_global_retention.rb | 56 ++++++++++++++++++ .../data_streams/get_global_retention.rb | 55 +++++++++++++++++ .../data_streams/put_global_retention.rb | 59 +++++++++++++++++++ .../api/namespace/data_streams.rb | 36 +++++++++++ .../delete_global_retention_spec.rb | 35 +++++++++++ .../data_streams/get_global_retention_spec.rb | 35 +++++++++++ .../data_streams/put_global_retention_spec.rb | 35 +++++++++++ 8 files changed, 313 insertions(+), 1 deletion(-) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/data_streams/delete_global_retention.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/data_streams/get_global_retention.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/data_streams/put_global_retention.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/data_streams.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/data_streams/delete_global_retention_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/data_streams/get_global_retention_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/data_streams/put_global_retention_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index 5c84443efd..3e653bbb5d 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -89,7 +89,8 @@ def self.included(base) Elasticsearch::API::Simulate, Elasticsearch::API::Connector, Elasticsearch::API::ConnectorSyncJob, - Elasticsearch::API::ConnectorSecret + Elasticsearch::API::ConnectorSecret, + Elasticsearch::API::DataStreams end # The serializer class diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/delete_global_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/delete_global_retention.rb new file mode 100644 index 0000000000..2980a9d57f --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/delete_global_retention.rb @@ -0,0 +1,56 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module DataStreams + module Actions + # Deletes the global retention configuration that applies to all data streams managed by the data stream lifecycle. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [Boolean] :dry_run Determines whether the global retention provided should be applied or only the impact should be determined. + # @option arguments [Time] :master_timeout Specify timeout for connection to master. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-delete-global-retention.html + # + def delete_global_retention(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'data_streams.delete_global_retention' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_DELETE + path = '_data_stream/_global_retention' + 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/data_streams/get_global_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/get_global_retention.rb new file mode 100644 index 0000000000..1c43c20af3 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/get_global_retention.rb @@ -0,0 +1,55 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module DataStreams + module Actions + # Returns global retention configuration that applies to all data streams managed by the data stream lifecycle. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [Boolean] :local Return the global retention retrieved from the node that received the request. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-get-global-retention.html + # + def get_global_retention(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'data_streams.get_global_retention' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = '_data_stream/_global_retention' + 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/data_streams/put_global_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/put_global_retention.rb new file mode 100644 index 0000000000..b07c5e1cf6 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/put_global_retention.rb @@ -0,0 +1,59 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module DataStreams + module Actions + # Updates the global retention configuration that applies to all data streams managed by the data stream lifecycle. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [Boolean] :dry_run Determines whether the global retention provided should be applied or only the impact should be determined. + # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The global retention configuration including optional values for default and max retention. (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-put-global-retention.html + # + def put_global_retention(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'data_streams.put_global_retention' } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_PUT + path = '_data_stream/_global_retention' + 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/namespace/data_streams.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/data_streams.rb new file mode 100644 index 0000000000..2ed6da1f27 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/data_streams.rb @@ -0,0 +1,36 @@ +# 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. + +module Elasticsearch + module API + module DataStreams + module Actions; end + + # Client for the "data_streams" namespace (includes the {DataStreams::Actions} methods) + # + class DataStreamsClient + include Common::Client, Common::Client::Base, DataStreams::Actions + end + + # Proxy method for {DataStreamsClient}, available in the receiving object + # + def data_streams + @data_streams ||= DataStreamsClient.new(self) + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/delete_global_retention_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/delete_global_retention_spec.rb new file mode 100644 index 0000000000..bc3ba13167 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/delete_global_retention_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#data_streams.delete_global_retention' do + let(:expected_args) do + [ + 'DELETE', + '_data_stream/_global_retention', + {}, + nil, + {}, + { endpoint: 'data_streams.delete_global_retention' } + ] + end + + it 'performs the request' do + expect(client_double.data_streams.delete_global_retention).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/get_global_retention_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/get_global_retention_spec.rb new file mode 100644 index 0000000000..3626b42f8a --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/get_global_retention_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#data_streams.get_global_retention' do + let(:expected_args) do + [ + 'GET', + '_data_stream/_global_retention', + {}, + nil, + {}, + { endpoint: 'data_streams.get_global_retention' } + ] + end + + it 'performs the request' do + expect(client_double.data_streams.get_global_retention).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/put_global_retention_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/put_global_retention_spec.rb new file mode 100644 index 0000000000..ae47ffc0ee --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/put_global_retention_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#data_streams.put_global_retention' do + let(:expected_args) do + [ + 'PUT', + '_data_stream/_global_retention', + {}, + {}, + {}, + { endpoint: 'data_streams.put_global_retention' } + ] + end + + it 'performs the request' do + expect(client_double.data_streams.put_global_retention(body: {})).to be_a Elasticsearch::API::Response + end +end From 0edd8215b20b5810a92659023b33985b808d9085 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 18 Mar 2024 14:51:35 +0000 Subject: [PATCH 226/540] [Gem] Refactors helpers integration spec_helper --- .../integration/helpers/bulk_helper_spec.rb | 12 +------- .../helpers/helpers_spec_helper.rb | 29 +++++++++++++++++++ .../integration/helpers/scroll_helper_spec.rb | 12 +------- 3 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 elasticsearch/spec/integration/helpers/helpers_spec_helper.rb diff --git a/elasticsearch/spec/integration/helpers/bulk_helper_spec.rb b/elasticsearch/spec/integration/helpers/bulk_helper_spec.rb index 26a8ec465c..8fb7cb5485 100644 --- a/elasticsearch/spec/integration/helpers/bulk_helper_spec.rb +++ b/elasticsearch/spec/integration/helpers/bulk_helper_spec.rb @@ -14,22 +14,12 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}" -raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/ - +require_relative 'helpers_spec_helper' require 'elasticsearch/helpers/bulk_helper' -require 'spec_helper' require 'tempfile' context 'Elasticsearch client helpers' do context 'Bulk helper' do - let(:client) do - Elasticsearch::Client.new( - host: ELASTICSEARCH_URL, - user: 'elastic', - password: 'changeme' - ) - end let(:index) { 'bulk_animals' } let(:params) { { refresh: 'wait_for' } } let(:bulk_helper) { Elasticsearch::Helpers::BulkHelper.new(client, index, params) } diff --git a/elasticsearch/spec/integration/helpers/helpers_spec_helper.rb b/elasticsearch/spec/integration/helpers/helpers_spec_helper.rb new file mode 100644 index 0000000000..1c9b5de18c --- /dev/null +++ b/elasticsearch/spec/integration/helpers/helpers_spec_helper.rb @@ -0,0 +1,29 @@ +# 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. + +require 'spec_helper' + +ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}" +raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/ + +def client + @client ||= Elasticsearch::Client.new( + host: ELASTICSEARCH_URL, + user: 'elastic', + password: 'changeme' + ) +end diff --git a/elasticsearch/spec/integration/helpers/scroll_helper_spec.rb b/elasticsearch/spec/integration/helpers/scroll_helper_spec.rb index caa18d0f74..8cd63f9869 100644 --- a/elasticsearch/spec/integration/helpers/scroll_helper_spec.rb +++ b/elasticsearch/spec/integration/helpers/scroll_helper_spec.rb @@ -14,20 +14,10 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}" -raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/ - -require 'spec_helper' +require_relative 'helpers_spec_helper' require 'elasticsearch/helpers/scroll_helper' context 'Elasticsearch client helpers' do - let(:client) do - Elasticsearch::Client.new( - host: ELASTICSEARCH_URL, - user: 'elastic', - password: 'changeme' - ) - end let(:index) { 'books' } let(:body) { { size: 12, query: { match_all: {} } } } let(:scroll_helper) { Elasticsearch::Helpers::ScrollHelper.new(client, index, body) } From 7cf0247fbb0966dee3f0067625f393a487a5d550 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 18 Mar 2024 16:53:33 +0000 Subject: [PATCH 227/540] [Gem] Adds ES|QL Helper --- .../lib/elasticsearch/helpers/esql_helper.rb | 43 ++++++++++++ .../integration/client_integration_spec.rb | 2 +- .../integration/helpers/esql_helper_spec.rb | 70 +++++++++++++++++++ 3 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 elasticsearch/lib/elasticsearch/helpers/esql_helper.rb create mode 100644 elasticsearch/spec/integration/helpers/esql_helper_spec.rb diff --git a/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb new file mode 100644 index 0000000000..66783a398c --- /dev/null +++ b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb @@ -0,0 +1,43 @@ +# 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. + +module Elasticsearch + module Helpers + # Elasticsearch Client Helper for the ES|QL API + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html + # + module ESQLHelper + # By default, the `query` API returns a Hash response with a `columns` key whose value is an + # Array of { name: type } Hashes for each column and a `values` key whose value is an Array of + # Arrays with the values for each row. + # This helper function returns an Array of hashes with the columns as keys and the respective + # values: { column['name'] => value } + # + def self.query(client, query, params = {}) + response = client.esql.query({ body: { query: query }, format: 'json' }.merge(params)) + + columns = response['columns'] + response['values'].map do |value| + (value.length - 1).downto(0).map do |index| + { columns[index]['name'] => value[index] } + end.reduce({}, :merge) + end + end + end + end +end diff --git a/elasticsearch/spec/integration/client_integration_spec.rb b/elasticsearch/spec/integration/client_integration_spec.rb index d8ff72a288..2ae47d70e9 100644 --- a/elasticsearch/spec/integration/client_integration_spec.rb +++ b/elasticsearch/spec/integration/client_integration_spec.rb @@ -54,7 +54,7 @@ end context 'Reports the right meta header' do - it 'Reports es service name and gem versio' do + it 'Reports es service name and gem version' do headers = client.transport.connections.first.connection.headers version = Class.new.extend(Elastic::Transport::MetaHeader).send(:client_meta_version, Elasticsearch::VERSION) expect(headers['x-elastic-client-meta']).to match /^es=#{version}/ diff --git a/elasticsearch/spec/integration/helpers/esql_helper_spec.rb b/elasticsearch/spec/integration/helpers/esql_helper_spec.rb new file mode 100644 index 0000000000..69fb4608a8 --- /dev/null +++ b/elasticsearch/spec/integration/helpers/esql_helper_spec.rb @@ -0,0 +1,70 @@ +# 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. +require_relative 'helpers_spec_helper' +require 'elasticsearch/helpers/esql_helper' + +context 'Elasticsearch client helpers' do + let(:index) { 'esql_helper_test' } + let(:body) { { size: 12, query: { match_all: {} } } } + let(:esql_helper) { Elasticsearch::Helpers::ESQLHelper } + + before do + client.indices.create( + index: index, + body: { + mappings: { + properties: { 'client.ip' => { type: 'ip' }, message: { type: 'keyword' } } + } + } + ) + client.bulk( + index: index, + body: [ + {'index': {}}, + {'@timestamp' => '2023-10-23T12:15:03.360Z', 'client.ip' => '172.21.2.162', message: 'Connected to 10.1.0.3', 'event.duration' => 3450233}, + {'index': {}}, + {'@timestamp' => '2023-10-23T12:27:28.948Z', 'client.ip' => '172.21.2.113', message: 'Connected to 10.1.0.2', 'event.duration' => 2764889}, + {'index': {}}, + {'@timestamp' => '2023-10-23T13:33:34.937Z', 'client.ip' => '172.21.0.5', message: 'Disconnected', 'event.duration' => 1232382}, + {'index': {}}, + {'@timestamp' => '2023-10-23T13:51:54.732Z', 'client.ip' => '172.21.3.15', message: 'Connection error', 'event.duration' => 725448}, + {'index': {}}, + {'@timestamp' => '2023-10-23T13:52:55.015Z', 'client.ip' => '172.21.3.15', message: 'Connection error', 'event.duration' => 8268153}, + {'index': {}}, + {'@timestamp' => '2023-10-23T13:53:55.832Z', 'client.ip' => '172.21.3.15', message: 'Connection error', 'event.duration' => 5033755}, + {'index': {}}, + {'@timestamp' => '2023-10-23T13:55:01.543Z', 'client.ip' => '172.21.3.15', message: 'Connected to 10.1.0.1', 'event.duration' => 1756467} + ], + refresh: true + ) + end + + after do + client.indices.delete(index: index) + end + + it 'returns an ESQL response as a relational key/value object' do + query = <<~ESQL + FROM #{index} + | EVAL duration_ms = ROUND(event.duration / 1000000.0, 1) + ESQL + response = esql_helper.query(client, query) + + expect(response.count).to eq 7 + expect(response.first.keys).to eq ['duration_ms', 'message', 'event.duration', 'client.ip', '@timestamp'] + end +end From 38caac1c27048185acb800c2b7e8ae5126aa2fab Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 18 Mar 2024 16:53:46 +0000 Subject: [PATCH 228/540] [DOCS] Adds documentation for ES|QL Helper --- docs/helpers.asciidoc | 59 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/docs/helpers.asciidoc b/docs/helpers.asciidoc index 9509cd8989..85a6ba94af 100644 --- a/docs/helpers.asciidoc +++ b/docs/helpers.asciidoc @@ -160,3 +160,62 @@ end scroll_helper.clear ---- -- + +[discrete] +=== ES|QL Helper + +This helpers provides an Object response from the ESQL `query` API instead of the default JSON value. + +To use the ES|QL helper, require it in your code: + +[source,ruby] +---- +require 'elasticsearch/helpers/esql_helper' +---- + +By default, the `query` API returns a Hash response with `columns` and `values` like so: + +[source,ruby] +---- +query = <[ + {"name"=>"@timestamp", "type"=>"date"}, + {"name"=>"client.ip", "type"=>"ip"}, + {"name"=>"event.duration", "type"=>"long"}, + {"name"=>"message", "type"=>"keyword"}, + {"name"=>"duration_ms", "type"=>"double"} +], +"values"=>[ + ["2023-10-23T12:15:03.360Z", "172.21.2.162", 3450233, "Connected to 10.1.0.3", 3.5], + ["2023-10-23T12:27:28.948Z", "172.21.2.113", 2764889, "Connected to 10.1.0.2", 2.8], + ["2023-10-23T13:33:34.937Z", "172.21.0.5", 1232382, "Disconnected", 1.2], + ["2023-10-23T13:51:54.732Z", "172.21.3.15", 725448, "Connection error", 0.7], + ["2023-10-23T13:52:55.015Z", "172.21.3.15", 8268153, "Connection error", 8.3], + ["2023-10-23T13:53:55.832Z", "172.21.3.15", 5033755, "Connection error", 5.0], + ["2023-10-23T13:55:01.543Z", "172.21.3.15", 1756467, "Connected to 10.1.0.1", 1.8] +]} +---- + +The helper returns an Array of hashes with the columns as keys and the respective values. So for the previous example, it would return the following: + +[source,ruby] +---- +require 'elasticsearch/helpers/esql_helper' +response = Elasticsearch::Helpers::ESQLHelper.query(client, query) + +puts response +{"duration_ms"=>3.5, "message"=>"Connected to 10.1.0.3", "event.duration"=>3450233, "client.ip"=>"172.21.2.162", "@timestamp"=>"2023-10-23T12:15:03.360Z"} +{"duration_ms"=>2.8, "message"=>"Connected to 10.1.0.2", "event.duration"=>2764889, "client.ip"=>"172.21.2.113", "@timestamp"=>"2023-10-23T12:27:28.948Z"} +{"duration_ms"=>1.2, "message"=>"Disconnected", "event.duration"=>1232382, "client.ip"=>"172.21.0.5", "@timestamp"=>"2023-10-23T13:33:34.937Z"} +{"duration_ms"=>0.7, "message"=>"Connection error", "event.duration"=>725448, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:51:54.732Z"} +{"duration_ms"=>8.3, "message"=>"Connection error", "event.duration"=>8268153, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:52:55.015Z"} +{"duration_ms"=>5.0, "message"=>"Connection error", "event.duration"=>5033755, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:53:55.832Z"} +{"duration_ms"=>1.8, "message"=>"Connected to 10.1.0.1", "event.duration"=>1756467, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:55:01.543Z"} +---- From 3f64f0be05b13c7332e279317597d310d9d2ceaf Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 20 Mar 2024 12:14:21 +0000 Subject: [PATCH 229/540] [Gem] ES|QL Helper - Adds parser parameter to query --- docs/helpers.asciidoc | 31 +++++++++++++---- .../lib/elasticsearch/helpers/esql_helper.rb | 32 +++++++++++++---- .../integration/helpers/esql_helper_spec.rb | 34 ++++++++++++++++--- 3 files changed, 78 insertions(+), 19 deletions(-) diff --git a/docs/helpers.asciidoc b/docs/helpers.asciidoc index 85a6ba94af..2cf3b5efee 100644 --- a/docs/helpers.asciidoc +++ b/docs/helpers.asciidoc @@ -211,11 +211,28 @@ require 'elasticsearch/helpers/esql_helper' response = Elasticsearch::Helpers::ESQLHelper.query(client, query) puts response -{"duration_ms"=>3.5, "message"=>"Connected to 10.1.0.3", "event.duration"=>3450233, "client.ip"=>"172.21.2.162", "@timestamp"=>"2023-10-23T12:15:03.360Z"} -{"duration_ms"=>2.8, "message"=>"Connected to 10.1.0.2", "event.duration"=>2764889, "client.ip"=>"172.21.2.113", "@timestamp"=>"2023-10-23T12:27:28.948Z"} -{"duration_ms"=>1.2, "message"=>"Disconnected", "event.duration"=>1232382, "client.ip"=>"172.21.0.5", "@timestamp"=>"2023-10-23T13:33:34.937Z"} -{"duration_ms"=>0.7, "message"=>"Connection error", "event.duration"=>725448, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:51:54.732Z"} -{"duration_ms"=>8.3, "message"=>"Connection error", "event.duration"=>8268153, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:52:55.015Z"} -{"duration_ms"=>5.0, "message"=>"Connection error", "event.duration"=>5033755, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:53:55.832Z"} -{"duration_ms"=>1.8, "message"=>"Connected to 10.1.0.1", "event.duration"=>1756467, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:55:01.543Z"} +[ + {"duration_ms"=>3.5, "message"=>"Connected to 10.1.0.3", "event.duration"=>3450233, "client.ip"=>"172.21.2.162", "@timestamp"=>"2023-10-23T12:15:03.360Z"} + {"duration_ms"=>2.8, "message"=>"Connected to 10.1.0.2", "event.duration"=>2764889, "client.ip"=>"172.21.2.113", "@timestamp"=>"2023-10-23T12:27:28.948Z"} + {"duration_ms"=>1.2, "message"=>"Disconnected", "event.duration"=>1232382, "client.ip"=>"172.21.0.5", "@timestamp"=>"2023-10-23T13:33:34.937Z"} + {"duration_ms"=>0.7, "message"=>"Connection error", "event.duration"=>725448, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:51:54.732Z"} + {"duration_ms"=>8.3, "message"=>"Connection error", "event.duration"=>8268153, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:52:55.015Z"} + {"duration_ms"=>5.0, "message"=>"Connection error", "event.duration"=>5033755, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:53:55.832Z"} + {"duration_ms"=>1.8, "message"=>"Connected to 10.1.0.1", "event.duration"=>1756467, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:55:01.543Z"} +] +---- + +Additionally, a block can be specified to work on the response data. Pass in a block to `query` and it will yield each item in the Array of responses. + +You could use this for example to convert '@timestamp' into a DateTime object: +[source,ruby] +---- +require 'elasticsearch/helpers/esql_helper' + +response = esql_helper.query(client, query).each do |r| + r['@timestamp'] = DateTime.parse(r['@timestamp']) + end + +response.first['@timestamp'] +# ---- diff --git a/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb index 66783a398c..6aaa127e10 100644 --- a/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb +++ b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb @@ -22,19 +22,37 @@ module Helpers # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html # module ESQLHelper - # By default, the `query` API returns a Hash response with a `columns` key whose value is an - # Array of { name: type } Hashes for each column and a `values` key whose value is an Array of - # Arrays with the values for each row. + # Query helper for ES|QL + # + # By default, the `esql.query` API returns a Hash response with the following keys: + # - `columns` with the value being an Array of { name: type } Hashes for each column + # - `values` with the value being an Array of Arrays with the values for each row. # This helper function returns an Array of hashes with the columns as keys and the respective - # values: { column['name'] => value } + # values: { column['name'] => value }. + # + # @param client [Elasticsearch::Client] an instance of the Client to use for the query. + # @param query [Hash, String] The query to be passed to the ES|QL query API. + # @param params [Hash] options to pass to the ES|QL query API. + # @param convert_datetime [Boolean] Converts datetime values from the response into DateTime + # objects in Ruby. Default: true. + # + # @example Using the ES|QL helper with a parser + # response = Elasticsearch::Helpers::ESQLHelper.query( + # client, + # query, + # parser: { '@timestamp' => Proc.new { |t| DateTime.parse(t) } } + # ) # - def self.query(client, query, params = {}) + # @see https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/Helpers.html#_esql_helper + # + def self.query(client, query, params = {}, parser: {}) response = client.esql.query({ body: { query: query }, format: 'json' }.merge(params)) - columns = response['columns'] response['values'].map do |value| (value.length - 1).downto(0).map do |index| - { columns[index]['name'] => value[index] } + key = columns[index]['name'] + value[index] = parser[key].call value[index] if parser[key] + { key => value[index] } end.reduce({}, :merge) end end diff --git a/elasticsearch/spec/integration/helpers/esql_helper_spec.rb b/elasticsearch/spec/integration/helpers/esql_helper_spec.rb index 69fb4608a8..83355aba45 100644 --- a/elasticsearch/spec/integration/helpers/esql_helper_spec.rb +++ b/elasticsearch/spec/integration/helpers/esql_helper_spec.rb @@ -21,6 +21,12 @@ let(:index) { 'esql_helper_test' } let(:body) { { size: 12, query: { match_all: {} } } } let(:esql_helper) { Elasticsearch::Helpers::ESQLHelper } + let(:query) do + <<~ESQL + FROM #{index} + | EVAL duration_ms = ROUND(event.duration / 1000000.0, 1) + ESQL + end before do client.indices.create( @@ -58,13 +64,31 @@ end it 'returns an ESQL response as a relational key/value object' do - query = <<~ESQL - FROM #{index} - | EVAL duration_ms = ROUND(event.duration / 1000000.0, 1) - ESQL response = esql_helper.query(client, query) - expect(response.count).to eq 7 expect(response.first.keys).to eq ['duration_ms', 'message', 'event.duration', 'client.ip', '@timestamp'] + response.each do |r| + expect(r['@timestamp']).to be_a String + expect(r['client.ip']).to be_a String + expect(r['message']).to be_a String + expect(r['event.duration']).to be_a Integer + end + end + + it 'parses iterated objects when procs are passed in' do + require 'ipaddr' + + parser = { + '@timestamp' => Proc.new { |t| DateTime.parse(t) }, + 'client.ip' => Proc.new { |i| IPAddr.new(i) }, + 'event.duration' => Proc.new { |d| d.to_s } + } + response = esql_helper.query(client, query, parser: parser) + response.each do |r| + expect(r['@timestamp']).to be_a DateTime + expect(r['client.ip']).to be_a IPAddr + expect(r['message']).to be_a String + expect(r['event.duration']).to be_a String + end end end From d30155d64f9e4cf353acf7e85b43ade54f69ac3b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 21 Mar 2024 11:30:39 +0000 Subject: [PATCH 230/540] [DOCS] Updates docs/helpers.asciidoc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: István Zoltán Szabó --- docs/helpers.asciidoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/helpers.asciidoc b/docs/helpers.asciidoc index 2cf3b5efee..6b513b424f 100644 --- a/docs/helpers.asciidoc +++ b/docs/helpers.asciidoc @@ -162,9 +162,10 @@ scroll_helper.clear -- [discrete] +[[esql-helper]] === ES|QL Helper -This helpers provides an Object response from the ESQL `query` API instead of the default JSON value. +This helper provides an object response from the ESQL `query` API instead of the default JSON value. To use the ES|QL helper, require it in your code: @@ -203,7 +204,7 @@ puts response ]} ---- -The helper returns an Array of hashes with the columns as keys and the respective values. So for the previous example, it would return the following: +The helper returns an array of hashes with the columns as keys and the respective values. So for the previous example, it would return the following: [source,ruby] ---- @@ -222,7 +223,7 @@ puts response ] ---- -Additionally, a block can be specified to work on the response data. Pass in a block to `query` and it will yield each item in the Array of responses. +Additionally, a block can be specified to transform the response data. Pass in a block to `query` and it will yield each item in the array of responses. You could use this for example to convert '@timestamp' into a DateTime object: [source,ruby] From a1b9976f082225f8c10a1882e70fe20bb6c0b158 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 22 Mar 2024 10:04:48 +0000 Subject: [PATCH 231/540] [DOCS] Updates docs --- docs/helpers.asciidoc | 52 +++++++++++++------ .../lib/elasticsearch/helpers/esql_helper.rb | 20 +++++-- 2 files changed, 50 insertions(+), 22 deletions(-) diff --git a/docs/helpers.asciidoc b/docs/helpers.asciidoc index 6b513b424f..4fdb573275 100644 --- a/docs/helpers.asciidoc +++ b/docs/helpers.asciidoc @@ -165,7 +165,9 @@ scroll_helper.clear [[esql-helper]] === ES|QL Helper -This helper provides an object response from the ESQL `query` API instead of the default JSON value. +This functionality is Experimental and may be changed or removed completely in a future release. If you have any feedback on this helper, please https://github.com/elastic/elasticsearch-ruby/issues/new/choose[let us know]. + +The helper provides an object response from the ESQL `query` API instead of the default JSON value. To use the ES|QL helper, require it in your code: @@ -208,32 +210,48 @@ The helper returns an array of hashes with the columns as keys and the respectiv [source,ruby] ---- -require 'elasticsearch/helpers/esql_helper' response = Elasticsearch::Helpers::ESQLHelper.query(client, query) puts response -[ - {"duration_ms"=>3.5, "message"=>"Connected to 10.1.0.3", "event.duration"=>3450233, "client.ip"=>"172.21.2.162", "@timestamp"=>"2023-10-23T12:15:03.360Z"} - {"duration_ms"=>2.8, "message"=>"Connected to 10.1.0.2", "event.duration"=>2764889, "client.ip"=>"172.21.2.113", "@timestamp"=>"2023-10-23T12:27:28.948Z"} - {"duration_ms"=>1.2, "message"=>"Disconnected", "event.duration"=>1232382, "client.ip"=>"172.21.0.5", "@timestamp"=>"2023-10-23T13:33:34.937Z"} - {"duration_ms"=>0.7, "message"=>"Connection error", "event.duration"=>725448, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:51:54.732Z"} - {"duration_ms"=>8.3, "message"=>"Connection error", "event.duration"=>8268153, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:52:55.015Z"} - {"duration_ms"=>5.0, "message"=>"Connection error", "event.duration"=>5033755, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:53:55.832Z"} - {"duration_ms"=>1.8, "message"=>"Connected to 10.1.0.1", "event.duration"=>1756467, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:55:01.543Z"} -] + +{"duration_ms"=>3.5, "message"=>"Connected to 10.1.0.3", "event.duration"=>3450233, "client.ip"=>"172.21.2.162", "@timestamp"=>"2023-10-23T12:15:03.360Z"} +{"duration_ms"=>2.8, "message"=>"Connected to 10.1.0.2", "event.duration"=>2764889, "client.ip"=>"172.21.2.113", "@timestamp"=>"2023-10-23T12:27:28.948Z"} +{"duration_ms"=>1.2, "message"=>"Disconnected", "event.duration"=>1232382, "client.ip"=>"172.21.0.5", "@timestamp"=>"2023-10-23T13:33:34.937Z"} +{"duration_ms"=>0.7, "message"=>"Connection error", "event.duration"=>725448, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:51:54.732Z"} +{"duration_ms"=>8.3, "message"=>"Connection error", "event.duration"=>8268153, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:52:55.015Z"} ---- -Additionally, a block can be specified to transform the response data. Pass in a block to `query` and it will yield each item in the array of responses. +Additionally, you can transform the data in the response by passing in a Hash of `column => Proc` values. You could use this for example to convert '@timestamp' into a DateTime object. Pass in a Hash to `query` as a `parser` defining a `Proc` for each value you'd like to parse: -You could use this for example to convert '@timestamp' into a DateTime object: [source,ruby] ---- require 'elasticsearch/helpers/esql_helper' -response = esql_helper.query(client, query).each do |r| - r['@timestamp'] = DateTime.parse(r['@timestamp']) - end - +parser = { + '@timestamp' => Proc.new { |t| DateTime.parse(t) } +} +response = Elasticsearch::Helpers::ESQLHelper.query(client, query, parser: parser) response.first['@timestamp'] # ---- + +You can pass in as many Procs as there are columns in the response. For example: + +[source,ruby] +---- +parser = { + '@timestamp' => Proc.new { |t| DateTime.parse(t) }, + 'client.ip' => Proc.new { |i| IPAddr.new(i) }, + 'event.duration' => Proc.new { |d| d.to_s } +} + +response = Elasticsearch::Helpers::ESQLHelper.query(client, query, parser: parser) + +puts response + +{"duration_ms"=>3.5, "message"=>"Connected to 10.1.0.3", "event.duration"=>"3450233", "client.ip"=>#, "@timestamp"=>#} +{"duration_ms"=>2.8, "message"=>"Connected to 10.1.0.2", "event.duration"=>"2764889", "client.ip"=>#, "@timestamp"=>#} +{"duration_ms"=>1.2, "message"=>"Disconnected", "event.duration"=>"1232382", "client.ip"=>#, "@timestamp"=>#} +{"duration_ms"=>0.7, "message"=>"Connection error", "event.duration"=>"725448", "client.ip"=>#, "@timestamp"=>#} +{"duration_ms"=>8.3, "message"=>"Connection error", "event.duration"=>"8268153", "client.ip"=>#, "@timestamp"=>#} +---- diff --git a/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb index 6aaa127e10..9105850967 100644 --- a/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb +++ b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb @@ -25,16 +25,26 @@ module ESQLHelper # Query helper for ES|QL # # By default, the `esql.query` API returns a Hash response with the following keys: - # - `columns` with the value being an Array of { name: type } Hashes for each column - # - `values` with the value being an Array of Arrays with the values for each row. + # + # * `columns` with the value being an Array of `{ name: type }` Hashes for each column. + # + # * `values` with the value being an Array of Arrays with the values for each row. + # # This helper function returns an Array of hashes with the columns as keys and the respective - # values: { column['name'] => value }. + # values: `{ column['name'] => value }`. # # @param client [Elasticsearch::Client] an instance of the Client to use for the query. # @param query [Hash, String] The query to be passed to the ES|QL query API. # @param params [Hash] options to pass to the ES|QL query API. - # @param convert_datetime [Boolean] Converts datetime values from the response into DateTime - # objects in Ruby. Default: true. + # @param parser [Hash] Hash of column name keys and Proc values to transform the value of + # a given column. + # @example Using the ES|QL helper + # require 'elasticsearch/helpers/esql_helper' + # query = <<~ESQL + # FROM sample_data + # | EVAL duration_ms = ROUND(event.duration / 1000000.0, 1) + # ESQL + # response = Elasticsearch::Helpers::ESQLHelper.query(client, query) # # @example Using the ES|QL helper with a parser # response = Elasticsearch::Helpers::ESQLHelper.query( From c0622d750bedb54555f087d1eb073b06d92fd8d3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 3 Apr 2024 13:41:17 +0100 Subject: [PATCH 232/540] [DOCS] Release notes 8.13 --- CHANGELOG.md | 69 ++++++++++++++++++++++++++++ docs/release_notes/813.asciidoc | 76 +++++++++++++++++++++++++++++++ docs/release_notes/index.asciidoc | 2 + 3 files changed, 147 insertions(+) create mode 100644 docs/release_notes/813.asciidoc diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d1cf7bda4..7692aa6b29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,73 @@ *To see release notes for the `7.x` branch and older releases, see [CHANGELOG on the 7.17 branch](https://github.com/elastic/elasticsearch-ruby/blob/7.17/CHANGELOG.md).* + +## 8.13.0 Release notes + +### Client +* Tested versions of Ruby for 8.13.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. + +### Experimental ES|QL Helper + +This version provides a new experimental Helper for the ES|QL `query` API. Please check out [the documentation](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/Helpers.html#esql-helper) and [open an issue](https://github.com/elastic/elasticsearch-ruby/issues/new/choose) if you encounter any problems or have any feedback. + +### API + +API Changes: + +* `async_search.status` - adds Time `:keep_alive` parameter: Specify the time interval in which the results (partial or final) for this search will be available. +* `bulk` - adds boolean `:require_data_stream` parameter: When true, requires the destination to be a data stream (existing or to-be-created). Default is false. +* `connector.list` - Adds the following parameters: + * `:index_name` (List): A comma-separated list of connector index names to fetch connector documents for. + * `:connector_name` (List): A comma-separated list of connector names to fetch connector documents for. + * `:service_type` (List): A comma-separated list of connector service types to fetch connector documents for. + * `:query` (String): A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names. +* `esql.query` - adds boolean `:drop_null_columns` parameter: Should entirely null columns be removed from the results? Their name and type will be returning in a new `all_columns` section. +* `field_caps` - Adds `:include_empty_fields` boolean parameter: Include empty fields in result. +* `index` - adds boolean `:require_data_stream` parameter: When true, requires the destination to be a data stream (existing or to-be-created). Default is false. +* `indices.rollover` - adds boolean `:lazy` parameter: If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams. +* connector_sync_job.list - adds List `:job_type` parameter: A comma-separated list of job types. +* `inference.delete_model`, `inference.get_model`, `inference.inference`, `inference.put_model`: renames `:model_id` parameter to `:inference_id`. +* `termvector` will show a warning since it's been deprecated. Please use the plural version, `termvectors`. + +New APIs: + +* `indices.resolve_cluster` - Resolves the specified index expressions to return information about each cluster, including the local cluster, if included. +* `profiling.flamegraph` - Extracts a UI-optimized structure to render flamegraphs from Universal Profiling. +* `profiling.stacktraces` - Extracts raw stacktrace information from Universal Profiling. +* `security.query_user` - Retrieves information for Users using a subset of query DSL +* `text_structure.test_grok_pattern` - Tests a Grok pattern on some text. + +APIs Migrated from experimental to stable: + +* `synonyms.delete_synonym` +* `synonyms.delete_synonym_rule` +* `synonyms.get_synonym` +* `synonyms.get_synonym_rule` +* `synonyms.get_synonyms_sets` +* `synonyms.put_synonym` +* `synonyms.put_synonym_rule` + +New Experimental APIs: + +* `connector.update_api_key_id` - Updates the API key id and/or API key secret id fields in the connector document. +* `connector.update_index_name` - Updates the index name of the connector. +* `connector.update_native` - Updates the is_native flag of the connector. +* `connector.update_service_type` - Updates the service type of the connector. +* `connector.update_status` - Updates the status of the connector. +* `esql.async_query` - Executes an ESQL request asynchronously +* `esql.async_query_get` - Retrieves the results of a previously submitted async query request given its ID. + +New Experimental namespace `connector_secret`: + +* `connector_secret.delete` - Deletes a connector secret. +* `connector_secret.get` - Retrieves a secret stored by Connectors. +* `connector_secret.post` - Creates a secret for a Connector. +* `connector_secret.put` - Creates or updates a secret for a Connector. + +### Development + +* Migrated from `byebug` to `debug`. +* Added extra testing for OpenTelemetry. + ## 8.12.0 Release notes ### Client diff --git a/docs/release_notes/813.asciidoc b/docs/release_notes/813.asciidoc new file mode 100644 index 0000000000..4280755673 --- /dev/null +++ b/docs/release_notes/813.asciidoc @@ -0,0 +1,76 @@ +[[release_notes_8_13]] +=== 8.13 Release notes + +[discrete] +[[release_notes_8_13_0]] +=== 8.13.0 Release notes + +[discrete] +==== Client +* Tested versions of Ruby for 8.13.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. + +[discrete] +==== Experimental ES|QL Helper + +This version provides a new experimental Helper for the ES|QL `query` API. Please check out https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/Helpers.html#esql-helper[the documentation] and https://github.com/elastic/elasticsearch-ruby/issues/new/choose[open an issue] if you encounter any problems or have any feedback. + +[discrete] +==== API + +API Changes: + +* `async_search.status` - adds Time `:keep_alive` parameter: Specify the time interval in which the results (partial or final) for this search will be available. +* `bulk` - adds boolean `:require_data_stream` parameter: When true, requires the destination to be a data stream (existing or to-be-created). Default is false. +* `connector.list` - Adds the following parameters: + * `:index_name` (List): A comma-separated list of connector index names to fetch connector documents for. + * `:connector_name` (List): A comma-separated list of connector names to fetch connector documents for. + * `:service_type` (List): A comma-separated list of connector service types to fetch connector documents for. + * `:query` (String): A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names. +* `esql.query` - adds boolean `:drop_null_columns` parameter: Should entirely null columns be removed from the results? Their name and type will be returning in a new `all_columns` section. +* `field_caps` - Adds `:include_empty_fields` boolean parameter: Include empty fields in result. +* `index` - adds boolean `:require_data_stream` parameter: When true, requires the destination to be a data stream (existing or to-be-created). Default is false. +* `indices.rollover` - adds boolean `:lazy` parameter: If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams. +* connector_sync_job.list - adds List `:job_type` parameter: A comma-separated list of job types. +* `inference.delete_model`, `inference.get_model`, `inference.inference`, `inference.put_model`: renames `:model_id` parameter to `:inference_id`. +* `termvector` will show a warning since it's been deprecated. Please use the plural version, `termvectors`. + +New APIs: + +* `indices.resolve_cluster` - Resolves the specified index expressions to return information about each cluster, including the local cluster, if included. +* `profiling.flamegraph` - Extracts a UI-optimized structure to render flamegraphs from Universal Profiling. +* `profiling.stacktraces` - Extracts raw stacktrace information from Universal Profiling. +* `security.query_user` - Retrieves information for Users using a subset of query DSL +* `text_structure.test_grok_pattern` - Tests a Grok pattern on some text. + +APIs Migrated from experimental to stable: + +* `synonyms.delete_synonym` +* `synonyms.delete_synonym_rule` +* `synonyms.get_synonym` +* `synonyms.get_synonym_rule` +* `synonyms.get_synonyms_sets` +* `synonyms.put_synonym` +* `synonyms.put_synonym_rule` + +New Experimental APIs + +* `connector.update_api_key_id` - Updates the API key id and/or API key secret id fields in the connector document. +* `connector.update_index_name` - Updates the index name of the connector. +* `connector.update_native` - Updates the is_native flag of the connector. +* `connector.update_service_type` - Updates the service type of the connector. +* `connector.update_status` - Updates the status of the connector. +* `esql.async_query` - Executes an ESQL request asynchronously +* `esql.async_query_get` - Retrieves the results of a previously submitted async query request given its ID. + +New Experimental namespace `connector_secret`: + +* `connector_secret.delete` - Deletes a connector secret. +* `connector_secret.get` - Retrieves a secret stored by Connectors. +* `connector_secret.post` - Creates a secret for a Connector. +* `connector_secret.put` - Creates or updates a secret for a Connector. + +[discrete] +==== Development + +* Migrated from `byebug` to `debug`. +* Added extra testing for OpenTelemetry. diff --git a/docs/release_notes/index.asciidoc b/docs/release_notes/index.asciidoc index 1ea640ba71..d55ad0b45a 100644 --- a/docs/release_notes/index.asciidoc +++ b/docs/release_notes/index.asciidoc @@ -3,6 +3,7 @@ [discrete] === 8.x +* <> * <> * <> * <> @@ -34,6 +35,7 @@ * <> * <> +include::813.asciidoc[] include::812.asciidoc[] include::811.asciidoc[] include::810.asciidoc[] From 611a933d0956048f1d5cf08b53b3c4a4799f997a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 3 Apr 2024 16:57:50 +0100 Subject: [PATCH 233/540] [CI] Updates otel GitHub Action --- .github/workflows/otel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/otel.yml b/.github/workflows/otel.yml index dd773a041e..05963720e7 100644 --- a/.github/workflows/otel.yml +++ b/.github/workflows/otel.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [ '3.2', 'jruby-9.4' ] + ruby: [ '3.3', 'jruby-9.4' ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 33ecccfe190648ba108fdf00f6e40b2f818f0a9f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 4 Apr 2024 06:06:39 +0000 Subject: [PATCH 234/540] [API] Adds master_timeout, timeout parameters to ccr APIs. Adds failure_store boolean parameter to indices.rollover Auto-generated API code --- .../cross_cluster_replication/delete_auto_follow_pattern.rb | 3 ++- .../api/actions/cross_cluster_replication/follow.rb | 1 + .../api/actions/cross_cluster_replication/follow_info.rb | 3 ++- .../api/actions/cross_cluster_replication/follow_stats.rb | 3 ++- .../api/actions/cross_cluster_replication/forget_follower.rb | 3 ++- .../cross_cluster_replication/get_auto_follow_pattern.rb | 3 ++- .../cross_cluster_replication/pause_auto_follow_pattern.rb | 3 ++- .../api/actions/cross_cluster_replication/pause_follow.rb | 3 ++- .../cross_cluster_replication/put_auto_follow_pattern.rb | 3 ++- .../cross_cluster_replication/resume_auto_follow_pattern.rb | 3 ++- .../api/actions/cross_cluster_replication/resume_follow.rb | 3 ++- .../api/actions/cross_cluster_replication/stats.rb | 4 +++- .../api/actions/cross_cluster_replication/unfollow.rb | 3 ++- .../lib/elasticsearch/api/actions/indices/rollover.rb | 1 + 14 files changed, 27 insertions(+), 12 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb index fa6a7a5bb7..b3537c7ad1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb @@ -25,6 +25,7 @@ module Actions # Deletes auto-follow patterns. # # @option arguments [String] :name The name of the auto follow pattern. + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html @@ -48,7 +49,7 @@ def delete_auto_follow_pattern(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = "_ccr/auto_follow/#{Utils.__listify(_name)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb index ca70106723..c1fffadc12 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb @@ -26,6 +26,7 @@ module Actions # # @option arguments [String] :index The name of the follower index # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The name of the leader index and other optional ccr related parameters (*Required*) # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb index 4787369a2e..7ba6a422b0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb @@ -25,6 +25,7 @@ module Actions # Retrieves information about all follower indices, including parameters and status for each follower index # # @option arguments [List] :index A comma-separated list of index patterns; use `_all` to perform the operation on all indices + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html @@ -48,7 +49,7 @@ def follow_info(arguments = {}) method = Elasticsearch::API::HTTP_GET path = "#{Utils.__listify(_index)}/_ccr/info" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb index 02a3a51270..85e45f1259 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb @@ -25,6 +25,7 @@ module Actions # Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices. # # @option arguments [List] :index A comma-separated list of index patterns; use `_all` to perform the operation on all indices + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html @@ -48,7 +49,7 @@ def follow_stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = "#{Utils.__listify(_index)}/_ccr/stats" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb index ebe646a6e3..aa3726b0b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb @@ -25,6 +25,7 @@ module Actions # Removes the follower retention leases from the leader. # # @option arguments [String] :index the name of the leader index for which specified follower retention leases should be removed + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index (*Required*) # @@ -50,7 +51,7 @@ def forget_follower(arguments = {}) method = Elasticsearch::API::HTTP_POST path = "#{Utils.__listify(_index)}/_ccr/forget_follower" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb index fc2f5a63ba..ea4f844ef9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb @@ -25,6 +25,7 @@ module Actions # Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection. # # @option arguments [String] :name The name of the auto follow pattern. + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html @@ -50,7 +51,7 @@ def get_auto_follow_pattern(arguments = {}) else '_ccr/auto_follow' end - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb index 9754c6e1f9..573bd73ad4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb @@ -25,6 +25,7 @@ module Actions # Pauses an auto-follow pattern # # @option arguments [String] :name The name of the auto follow pattern that should pause discovering new indices to follow. + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html @@ -48,7 +49,7 @@ def pause_auto_follow_pattern(arguments = {}) method = Elasticsearch::API::HTTP_POST path = "_ccr/auto_follow/#{Utils.__listify(_name)}/pause" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb index 6819c53855..275bd1675e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb @@ -25,6 +25,7 @@ module Actions # Pauses a follower index. The follower index will not fetch any additional operations from the leader index. # # @option arguments [String] :index The name of the follower index that should pause following its leader index. + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html @@ -48,7 +49,7 @@ def pause_follow(arguments = {}) method = Elasticsearch::API::HTTP_POST path = "#{Utils.__listify(_index)}/_ccr/pause_follow" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb index 77146ef674..4ea1a7a754 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb @@ -25,6 +25,7 @@ module Actions # Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices. # # @option arguments [String] :name The name of the auto follow pattern. + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The specification of the auto follow pattern (*Required*) # @@ -50,7 +51,7 @@ def put_auto_follow_pattern(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = "_ccr/auto_follow/#{Utils.__listify(_name)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb index 66459ea9ed..2a979f9add 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb @@ -25,6 +25,7 @@ module Actions # Resumes an auto-follow pattern that has been paused # # @option arguments [String] :name The name of the auto follow pattern to resume discovering new indices to follow. + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html @@ -48,7 +49,7 @@ def resume_auto_follow_pattern(arguments = {}) method = Elasticsearch::API::HTTP_POST path = "_ccr/auto_follow/#{Utils.__listify(_name)}/resume" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb index 1ddfbf6337..f172d59a88 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb @@ -25,6 +25,7 @@ module Actions # Resumes a follower index that has been paused # # @option arguments [String] :index The name of the follow index to resume following. + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The name of the leader index and other optional ccr related parameters # @@ -49,7 +50,7 @@ def resume_follow(arguments = {}) method = Elasticsearch::API::HTTP_POST path = "#{Utils.__listify(_index)}/_ccr/resume_follow" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb index 87fe68e8d9..276ce44b34 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb @@ -24,6 +24,8 @@ module CrossClusterReplication module Actions # Gets all stats related to cross-cluster replication. # + # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html @@ -38,7 +40,7 @@ def stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = '_ccr/stats' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb index df29ef7f57..9719fd23a4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb @@ -25,6 +25,7 @@ module Actions # Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication. # # @option arguments [String] :index The name of the follower index that should be turned into a regular index. + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html @@ -48,7 +49,7 @@ def unfollow(arguments = {}) method = Elasticsearch::API::HTTP_POST path = "#{Utils.__listify(_index)}/_ccr/unfollow" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index fe1c79258f..2ff5842638 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -32,6 +32,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the newly created rollover index before the operation returns. # @option arguments [Boolean] :lazy If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams. + # @option arguments [Boolean] :failure_store If set to true, the rollover action will be applied on the failure store of the data stream. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The conditions that needs to be met for executing rollover # From b0b1a69875246935e6a6444cac766278f613d65e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 5 Apr 2024 06:06:11 +0000 Subject: [PATCH 235/540] [API] Adds profiling.topn_functions endpoint --- .../api/actions/profiling/topn_functions.rb | 53 +++++++++++++++++++ .../actions/profiling/topn_functions_spec.rb | 35 ++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/profiling/topn_functions.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/profiling/topn_functions_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/topn_functions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/topn_functions.rb new file mode 100644 index 0000000000..856f84542b --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/topn_functions.rb @@ -0,0 +1,53 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Profiling + module Actions + # Extracts a list of topN functions from Universal Profiling. + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The filter conditions for stacktraces (*Required*) + # + # @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html + # + def topn_functions(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'profiling.topn_functions' } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = '_profiling/topn/functions' + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/profiling/topn_functions_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/profiling/topn_functions_spec.rb new file mode 100644 index 0000000000..b7d02f929b --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/profiling/topn_functions_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.profiling#topn_functions' do + let(:expected_args) do + [ + 'POST', + '_profiling/topn/functions', + {}, + {}, + {}, + { endpoint: 'profiling.topn_functions' } + ] + end + + it 'performs the request' do + expect(client_double.profiling.topn_functions(body: {})).to be_a Elasticsearch::API::Response + end +end From 5b35609495f10870f2e256ea3ecd03253a1f3add Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 8 Apr 2024 15:58:22 +0100 Subject: [PATCH 236/540] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f83785aab4..bc5966d69a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Elasticsearch -[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.11](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.11.yml/badge.svg?branch=8.11)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.11.yml) [![8.12](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.12.yml/badge.svg?branch=8.12)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.12.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) +[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.12](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.12.yml/badge.svg?branch=8.12)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.12.yml) [![8.13](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.13.yml/badge.svg?branch=8.13)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.13.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) **[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)** or From 13d02b9373d1d40f6d9e50450a3f4a497e28c96d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 10 Apr 2024 06:06:40 +0000 Subject: [PATCH 237/540] [API] renames indices.rollover parameter `failure_store` to `target_failure_store` Auto-generated API code --- .../lib/elasticsearch/api/actions/indices/rollover.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index 2ff5842638..7ddd3b5df0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the newly created rollover index before the operation returns. # @option arguments [Boolean] :lazy If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams. - # @option arguments [Boolean] :failure_store If set to true, the rollover action will be applied on the failure store of the data stream. + # @option arguments [Boolean] :target_failure_store If set to true, the rollover action will be applied on the failure store of the data stream. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The conditions that needs to be met for executing rollover # From 4490e7d0c97e1695ed85c0d67952e8c2712f2fbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Trojanowski?= Date: Tue, 9 Apr 2024 18:43:41 +0200 Subject: [PATCH 238/540] Update connecting.asciidoc --- docs/connecting.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/connecting.asciidoc b/docs/connecting.asciidoc index 3f988cfe67..67e3add2b7 100644 --- a/docs/connecting.asciidoc +++ b/docs/connecting.asciidoc @@ -242,7 +242,7 @@ use the `transport_options` option: Elasticsearch::Client.new( url: 'https://username:password@localhost:9200', transport_options: { - ssl: { ca_file: '/path/to/cacert.pem' } + ssl: { ca_file: '/path/to/http_ca.crt' } } ) ------------------------------------ From 6f01ee8ecf086368c3b79a92dd66adc80a94b045 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 15 Apr 2024 09:53:31 +0100 Subject: [PATCH 239/540] [API] Test Runner: Skips broken tests --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 8500e34d70..233a98e02c 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -76,3 +76,9 @@ - :file: 'search.vectors/60_knn_search_filter_alias.yml' :description: 'kNN filter alias' +- + :file: 'cluster.desired_nodes/11_old_format.yml' + :description: 'Test node version must be at least the current master version' +- + :file: 'cluster.desired_nodes/11_old_format.yml' + :description: 'Test node version must have content' From 783a7838ddab1487d66a86f3a3eb3ab5f826425a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 12 Apr 2024 06:06:25 +0000 Subject: [PATCH 240/540] [API] Adds delete_sync_jobs boolean parameter to connector.delete Auto-generated API code --- .../lib/elasticsearch/api/actions/connector/delete.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb index 1bbc2294f1..4e73882b30 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb @@ -29,6 +29,7 @@ module Actions # support SLA of official GA features. # # @option arguments [String] :connector_id The unique identifier of the connector to be deleted. + # @option arguments [Boolean] :delete_sync_jobs Determines whether associated sync jobs are also deleted. # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-api.html @@ -52,7 +53,7 @@ def delete(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = "_connector/#{Utils.__listify(_connector_id)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From 7da022a4cb9774bfd3453c52e4989c4d3bc6d1fd Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 15 Apr 2024 13:11:17 +0100 Subject: [PATCH 241/540] [DOCS] Adds link to official docs in CHANGELOG (#2349) --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7692aa6b29..91b000e55b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -*To see release notes for the `7.x` branch and older releases, see [CHANGELOG on the 7.17 branch](https://github.com/elastic/elasticsearch-ruby/blob/7.17/CHANGELOG.md).* +*See the full release notes on the official documentation website: https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/release_notes.html* ## 8.13.0 Release notes From 3b8eb652ec12568a9ff5c1090e37ac97f34af2a2 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 16 Apr 2024 06:06:32 +0000 Subject: [PATCH 242/540] [API] Renames connnector namespaces All the APIs in `connector_sync_job` and `connector_secret` namespaces have been moved inside `connector`. --- elasticsearch-api/lib/elasticsearch/api.rb | 2 - .../delete.rb => connector/secret_delete.rb} | 6 +- .../get.rb => connector/secret_get.rb} | 6 +- .../post.rb => connector/secret_post.rb} | 6 +- .../put.rb => connector/secret_put.rb} | 6 +- .../sync_job_cancel.rb} | 6 +- .../sync_job_check_in.rb} | 6 +- .../sync_job_delete.rb} | 6 +- .../error.rb => connector/sync_job_error.rb} | 6 +- .../get.rb => connector/sync_job_get.rb} | 6 +- .../list.rb => connector/sync_job_list.rb} | 6 +- .../post.rb => connector/sync_job_post.rb} | 6 +- .../sync_job_update_stats.rb} | 6 +- .../connector/update_active_filtering.rb | 64 ++++++++++++++++++ .../connector/update_filtering_validation.rb | 66 +++++++++++++++++++ .../api/namespace/connector_secret.rb | 36 ---------- .../api/namespace/connector_sync_job.rb | 36 ---------- .../actions/connector_secret/delete_spec.rb | 6 +- .../api/actions/connector_secret/get_spec.rb | 6 +- .../api/actions/connector_secret/post_spec.rb | 6 +- .../api/actions/connector_secret/put_spec.rb | 6 +- .../actions/connector_sync_job/cancel_spec.rb | 6 +- .../connector_sync_job/check_in_spec.rb | 6 +- .../actions/connector_sync_job/delete_spec.rb | 6 +- .../actions/connector_sync_job/error_spec.rb | 6 +- .../actions/connector_sync_job/get_spec.rb | 6 +- .../actions/connector_sync_job/list_spec.rb | 6 +- .../actions/connector_sync_job/post_spec.rb | 6 +- .../connector_sync_job/update_stats_spec.rb | 6 +- 29 files changed, 202 insertions(+), 146 deletions(-) rename elasticsearch-api/lib/elasticsearch/api/actions/{connector_secret/delete.rb => connector/secret_delete.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{connector_secret/get.rb => connector/secret_get.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{connector_secret/post.rb => connector/secret_post.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{connector_secret/put.rb => connector/secret_put.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{connector_sync_job/cancel.rb => connector/sync_job_cancel.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{connector_sync_job/check_in.rb => connector/sync_job_check_in.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{connector_sync_job/delete.rb => connector/sync_job_delete.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{connector_sync_job/error.rb => connector/sync_job_error.rb} (97%) rename elasticsearch-api/lib/elasticsearch/api/actions/{connector_sync_job/get.rb => connector/sync_job_get.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{connector_sync_job/list.rb => connector/sync_job_list.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{connector_sync_job/post.rb => connector/sync_job_post.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{connector_sync_job/update_stats.rb => connector/sync_job_update_stats.rb} (96%) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/connector_secret.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/connector_sync_job.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index 3e653bbb5d..5141709dd9 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -88,8 +88,6 @@ def self.included(base) Elasticsearch::API::Profiling, Elasticsearch::API::Simulate, Elasticsearch::API::Connector, - Elasticsearch::API::ConnectorSyncJob, - Elasticsearch::API::ConnectorSecret, Elasticsearch::API::DataStreams end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_delete.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/delete.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_delete.rb index 0349af217c..931bec6795 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_delete.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module ConnectorSecret + module Connector module Actions # Deletes a connector secret. # This functionality is Experimental and may be changed or removed @@ -33,8 +33,8 @@ module Actions # # @see [TODO] # - def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector_secret.delete' } + def secret_delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.secret_delete' } defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_get.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/get.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_get.rb index 00f1720fc8..7ec6d602de 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_get.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module ConnectorSecret + module Connector module Actions # Retrieves a secret stored by Connectors. # This functionality is Experimental and may be changed or removed @@ -33,8 +33,8 @@ module Actions # # @see [TODO] # - def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector_secret.get' } + def secret_get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.secret_get' } defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_post.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/post.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_post.rb index 938bf3317f..311404cadd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_post.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module ConnectorSecret + module Connector module Actions # Creates a secret for a Connector. # This functionality is Experimental and may be changed or removed @@ -33,8 +33,8 @@ module Actions # # @see [TODO] # - def post(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector_secret.post' } + def secret_post(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.secret_post' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_put.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/put.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_put.rb index cfd34c4952..94077f9da0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_secret/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_put.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module ConnectorSecret + module Connector module Actions # Creates or updates a secret for a Connector. # This functionality is Experimental and may be changed or removed @@ -34,8 +34,8 @@ module Actions # # @see [TODO] # - def put(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector_secret.put' } + def secret_put(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.secret_put' } defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb index 8b2c068d0e..3a6bcebf48 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module ConnectorSyncJob + module Connector module Actions # Cancels a connector sync job. # This functionality is Experimental and may be changed or removed @@ -33,8 +33,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cancel-connector-sync-job-api.html # - def cancel(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.cancel' } + def sync_job_cancel(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_cancel' } defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb index 6e35d71964..90e935c527 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module ConnectorSyncJob + module Connector module Actions # Checks in a connector sync job (refreshes 'last_seen'). # This functionality is Experimental and may be changed or removed @@ -33,8 +33,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/check-in-connector-sync-job-api.html # - def check_in(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.check_in' } + def sync_job_check_in(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_check_in' } defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb index d07762a238..3a7ed141ca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module ConnectorSyncJob + module Connector module Actions # Deletes a connector sync job. # This functionality is Experimental and may be changed or removed @@ -33,8 +33,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-sync-job-api.html # - def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.delete' } + def sync_job_delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_delete' } defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb similarity index 97% rename from elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb index c69c0738ed..73ed91cbd3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/error.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module ConnectorSyncJob + module Connector module Actions # Sets an error for a connector sync job. # This functionality is Experimental and may be changed or removed @@ -34,8 +34,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/set-connector-sync-job-error-api.html # - def error(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.error' } + def sync_job_error(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_error' } defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb index cd1f8dfc9c..22e7554776 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module ConnectorSyncJob + module Connector module Actions # Returns the details about a connector sync job. # This functionality is Experimental and may be changed or removed @@ -33,8 +33,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-sync-job-api.html # - def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.get' } + def sync_job_get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_get' } defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb index 871a25cc48..222314a516 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module ConnectorSyncJob + module Connector module Actions # Lists all connector sync jobs. # This functionality is Experimental and may be changed or removed @@ -37,8 +37,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-sync-jobs-api.html # - def list(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.list' } + def sync_job_list(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_list' } arguments = arguments.clone headers = arguments.delete(:headers) || {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb index 1548c810f0..a455a80281 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module ConnectorSyncJob + module Connector module Actions # Creates a connector sync job. # This functionality is Experimental and may be changed or removed @@ -33,8 +33,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-sync-job-api.html # - def post(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.post' } + def sync_job_post(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_post' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb index 7515774764..772a28cf31 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module ConnectorSyncJob + module Connector module Actions # Updates the stats fields in the connector sync job document. # This functionality is Experimental and may be changed or removed @@ -34,8 +34,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/set-connector-sync-job-stats-api.html # - def update_stats(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector_sync_job.update_stats' } + def sync_job_update_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_update_stats' } defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb new file mode 100644 index 0000000000..975c7aa3d7 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb @@ -0,0 +1,64 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Activates the draft filtering rules if they are in a validated state. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html + # + def update_active_filtering(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_active_filtering' } + + defined_params = [:connector_id].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 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_filtering/_activate" + params = {} + + 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/connector/update_filtering_validation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb new file mode 100644 index 0000000000..b42a75b4db --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the validation info of the draft filtering rules. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body Validation info for the draft filtering rules (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html + # + def update_filtering_validation(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_filtering_validation' } + + defined_params = [:connector_id].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 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_filtering/_validation" + params = {} + + 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/namespace/connector_secret.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/connector_secret.rb deleted file mode 100644 index b8796af3ae..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/connector_secret.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module ConnectorSecret - module Actions; end - - # Client for the "connector_secret" namespace (includes the {ConnectorSecret::Actions} methods) - # - class ConnectorSecretClient - include Common::Client, Common::Client::Base, ConnectorSecret::Actions - end - - # Proxy method for {ConnectorSecretClient}, available in the receiving object - # - def connector_secret - @connector_secret ||= ConnectorSecretClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/connector_sync_job.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/connector_sync_job.rb deleted file mode 100644 index d062429c5a..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/connector_sync_job.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module ConnectorSyncJob - module Actions; end - - # Client for the "connector_sync_job" namespace (includes the {ConnectorSyncJob::Actions} methods) - # - class ConnectorSyncJobClient - include Common::Client, Common::Client::Base, ConnectorSyncJob::Actions - end - - # Proxy method for {ConnectorSyncJobClient}, available in the receiving object - # - def connector_sync_job - @connector_sync_job ||= ConnectorSyncJobClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/delete_spec.rb index af1070c73b..e8bc1f9dcc 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/delete_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/delete_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.connector_secret#get' do +describe 'client.connector#secret_delete' do let(:expected_args) do [ 'DELETE', @@ -25,11 +25,11 @@ {}, nil, {}, - { :defined_params=>{ id: 'foo' }, endpoint: 'connector_secret.delete' } + { :defined_params=>{ id: 'foo' }, endpoint: 'connector.secret_delete' } ] end it 'performs the request' do - expect(client_double.connector_secret.delete(id: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.connector.secret_delete(id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/get_spec.rb index c00840c6d1..8cd436abda 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/get_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/get_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.connector_secret#get' do +describe 'client.connector.secret_get' do let(:expected_args) do [ 'GET', @@ -25,11 +25,11 @@ {}, nil, {}, - { :defined_params=>{ id: 'foo' }, endpoint: 'connector_secret.get' } + { :defined_params=>{ id: 'foo' }, endpoint: 'connector.secret_get' } ] end it 'performs the request' do - expect(client_double.connector_secret.get(id: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.connector.secret_get(id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/post_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/post_spec.rb index fb76ee3022..ddae5fb0d7 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/post_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/post_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.connector_secret#post' do +describe 'client.connector.secret_post' do let(:expected_args) do [ 'POST', @@ -25,11 +25,11 @@ {}, {}, {}, - { endpoint: 'connector_secret.post' } + { endpoint: 'connector.secret_post' } ] end it 'performs the request' do - expect(client_double.connector_secret.post(body: {})).to be_a Elasticsearch::API::Response + expect(client_double.connector.secret_post(body: {})).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/put_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/put_spec.rb index 5b28bb72f2..7b8218769e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/put_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/put_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.connector_secret#get' do +describe 'client.connector#secret_get' do let(:expected_args) do [ 'PUT', @@ -25,11 +25,11 @@ {}, {}, {}, - { :defined_params=>{ id: 'foo' }, endpoint: 'connector_secret.put' } + { :defined_params=>{ id: 'foo' }, endpoint: 'connector.secret_put' } ] end it 'performs the request' do - expect(client_double.connector_secret.put(id: 'foo', body: {})).to be_a Elasticsearch::API::Response + expect(client_double.connector.secret_put(id: 'foo', body: {})).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/cancel_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/cancel_spec.rb index 4846287343..47adc6a221 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/cancel_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/cancel_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.connector_sync_job#cancel' do +describe 'client.connector.sync_job_cancel' do let(:expected_args) do [ 'PUT', @@ -27,12 +27,12 @@ {}, { defined_params: {connector_sync_job_id: "foo"}, - endpoint: 'connector_sync_job.cancel' + endpoint: 'connector.sync_job_cancel' } ] end it 'performs the request' do - expect(client_double.connector_sync_job.cancel(connector_sync_job_id: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.connector.sync_job_cancel(connector_sync_job_id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/check_in_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/check_in_spec.rb index 22dd40844a..02182d5bb8 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/check_in_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/check_in_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.connector_sync_job#check_in' do +describe 'client.connector.sync_job_check_in' do let(:expected_args) do [ 'PUT', @@ -27,12 +27,12 @@ {}, { defined_params: {connector_sync_job_id: "foo"}, - endpoint: 'connector_sync_job.check_in' + endpoint: 'connector.sync_job_check_in' } ] end it 'performs the request' do - expect(client_double.connector_sync_job.check_in(connector_sync_job_id: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.connector.sync_job_check_in(connector_sync_job_id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/delete_spec.rb index 29a2bb8dfc..66603564be 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/delete_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/delete_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.connector_sync_job#delete' do +describe 'client.connector.sync_job_delete' do let(:expected_args) do [ 'DELETE', @@ -27,12 +27,12 @@ {}, { defined_params: {connector_sync_job_id: 'foo'}, - endpoint: 'connector_sync_job.delete' + endpoint: 'connector.sync_job_delete' } ] end it 'performs the request' do - expect(client_double.connector_sync_job.delete(connector_sync_job_id: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.connector.sync_job_delete(connector_sync_job_id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/error_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/error_spec.rb index 8eafff58f7..f850d003ba 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/error_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/error_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.connector_sync_job#error' do +describe 'client.connector.sync_job_error' do let(:expected_args) do [ 'PUT', @@ -27,12 +27,12 @@ {}, { defined_params: {connector_sync_job_id: "foo"}, - endpoint: 'connector_sync_job.error' + endpoint: 'connector.sync_job_error' } ] end it 'performs the request' do - expect(client_double.connector_sync_job.error(connector_sync_job_id: 'foo', body: {})).to be_a Elasticsearch::API::Response + expect(client_double.connector.sync_job_error(connector_sync_job_id: 'foo', body: {})).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/get_spec.rb index 0b6694d367..dcc9b4b4ec 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/get_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/get_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.connector_sync_job#get' do +describe 'client.connector.sync_job_get' do let(:expected_args) do [ 'GET', @@ -27,12 +27,12 @@ {}, { defined_params: {connector_sync_job_id: "foo"}, - endpoint: 'connector_sync_job.get' + endpoint: 'connector.sync_job_get' } ] end it 'performs the request' do - expect(client_double.connector_sync_job.get(connector_sync_job_id: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.connector.sync_job_get(connector_sync_job_id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/list_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/list_spec.rb index 7459d88db3..2bfe10b52d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/list_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/list_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.connector_sync_job#list' do +describe 'client.connector.sync_job_list' do let(:expected_args) do [ 'GET', @@ -25,11 +25,11 @@ {}, nil, {}, - { endpoint: 'connector_sync_job.list' } + { endpoint: 'connector.sync_job_list' } ] end it 'performs the request' do - expect(client_double.connector_sync_job.list).to be_a Elasticsearch::API::Response + expect(client_double.connector.sync_job_list).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/post_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/post_spec.rb index 1569cd6990..130c00c0b1 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/post_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/post_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.connector_sync_job#post' do +describe 'client.connector.sync_job_post' do let(:expected_args) do [ 'POST', @@ -25,11 +25,11 @@ {}, {}, {}, - { endpoint: 'connector_sync_job.post' } + { endpoint: 'connector.sync_job_post' } ] end it 'performs the request' do - expect(client_double.connector_sync_job.post(body: {})).to be_a Elasticsearch::API::Response + expect(client_double.connector.sync_job_post(body: {})).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/update_stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/update_stats_spec.rb index b2219fd19d..b44f0c7198 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/update_stats_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/update_stats_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.connector_sync_job#update_stats' do +describe 'client.connector.sync_job_update_stats' do let(:expected_args) do [ 'PUT', @@ -27,12 +27,12 @@ {}, { defined_params: {connector_sync_job_id: "foo"}, - endpoint: 'connector_sync_job.update_stats' + endpoint: 'connector.sync_job_update_stats' } ] end it 'performs the request' do - expect(client_double.connector_sync_job.update_stats(connector_sync_job_id: 'foo', body: {})).to be_a Elasticsearch::API::Response + expect(client_double.connector.sync_job_update_stats(connector_sync_job_id: 'foo', body: {})).to be_a Elasticsearch::API::Response end end From 9913e3f3e6c76a03c23fffaad37faad4f4c98e6c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 16 Apr 2024 09:25:31 +0100 Subject: [PATCH 243/540] [API] Adds tests for connector APIs - connector.update_active_filtering - connector.update_filtering_validation --- .../connector/update_active_filtering_spec.rb | 38 +++++++++++++++++++ .../update_filtering_validation_spec.rb | 38 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_active_filtering_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_filtering_validation_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_active_filtering_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_active_filtering_spec.rb new file mode 100644 index 0000000000..7d91535e2c --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_active_filtering_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#update_active_filtering' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_filtering/_activate', + {}, + nil, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.update_active_filtering' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.update_active_filtering(body: {}, connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_filtering_validation_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_filtering_validation_spec.rb new file mode 100644 index 0000000000..50e9284157 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_filtering_validation_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#update_filtering_validation' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_filtering/_validation', + {}, + {}, + {}, + { + :defined_params=>{ connector_id: 'foo' }, + endpoint: 'connector.update_filtering_validation' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.update_filtering_validation(body: {}, connector_id: 'foo')).to be_a Elasticsearch::API::Response + end +end From 731f582071003072050eca654edb6ececf264d55 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 18 Apr 2024 09:07:40 +0100 Subject: [PATCH 244/540] [Gem] ESQL version parameter is now mandatory This updates the ESQL query helper to include a default version if one is not passed as a parameter. The specification has not been updated yet apparently, so there are no changes in the code generation. --- .../lib/elasticsearch/helpers/esql_helper.rb | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb index 9105850967..99142cb9ae 100644 --- a/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb +++ b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb @@ -18,6 +18,10 @@ module Elasticsearch module Helpers # Elasticsearch Client Helper for the ES|QL API + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html # @@ -56,7 +60,9 @@ module ESQLHelper # @see https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/Helpers.html#_esql_helper # def self.query(client, query, params = {}, parser: {}) - response = client.esql.query({ body: { query: query }, format: 'json' }.merge(params)) + request = build_request(query, params) + response = client.esql.query(request) + columns = response['columns'] response['values'].map do |value| (value.length - 1).downto(0).map do |index| @@ -66,6 +72,15 @@ def self.query(client, query, params = {}, parser: {}) end.reduce({}, :merge) end end + + def self.build_request(query, params) + { + body: { + query: query, + version: params.delete(:version) || '2024.04.01' }, + format: 'json' + }.merge(params) + end end end end From b422bf65e94f454823b34cd57eb3a295018dbb66 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 18 Apr 2024 06:06:26 +0000 Subject: [PATCH 245/540] [API] Parameter is now optional in inference.get_model --- .../lib/elasticsearch/api/actions/inference/get_model.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb index d25e4a484d..20de3fe28f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb @@ -42,8 +42,6 @@ def get_model(arguments = {}) end request_opts[:defined_params] = defined_params unless defined_params.empty? - raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] - arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -56,8 +54,10 @@ def get_model(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _task_type && _inference_id "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}" - else + elsif _inference_id "_inference/#{Utils.__listify(_inference_id)}" + else + '_inference' end params = {} From e2290fccdb5c9bf18f9b3001b694e6c9d624ff5e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 18 Apr 2024 14:00:56 +0100 Subject: [PATCH 246/540] [Gem] Fixes ES|QL Helper When passing in a parser, if the value was nil, the helper would error. Now it returns nil for nil values. --- .../lib/elasticsearch/helpers/esql_helper.rb | 2 +- .../integration/helpers/esql_helper_spec.rb | 28 +++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb index 99142cb9ae..2734397df4 100644 --- a/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb +++ b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb @@ -67,7 +67,7 @@ def self.query(client, query, params = {}, parser: {}) response['values'].map do |value| (value.length - 1).downto(0).map do |index| key = columns[index]['name'] - value[index] = parser[key].call value[index] if parser[key] + value[index] = parser[key].call(value[index]) if value[index] && parser[key] { key => value[index] } end.reduce({}, :merge) end diff --git a/elasticsearch/spec/integration/helpers/esql_helper_spec.rb b/elasticsearch/spec/integration/helpers/esql_helper_spec.rb index 83355aba45..12122c7157 100644 --- a/elasticsearch/spec/integration/helpers/esql_helper_spec.rb +++ b/elasticsearch/spec/integration/helpers/esql_helper_spec.rb @@ -16,6 +16,7 @@ # under the License. require_relative 'helpers_spec_helper' require 'elasticsearch/helpers/esql_helper' +require 'ipaddr' context 'Elasticsearch client helpers' do let(:index) { 'esql_helper_test' } @@ -76,8 +77,6 @@ end it 'parses iterated objects when procs are passed in' do - require 'ipaddr' - parser = { '@timestamp' => Proc.new { |t| DateTime.parse(t) }, 'client.ip' => Proc.new { |i| IPAddr.new(i) }, @@ -91,4 +90,29 @@ expect(r['event.duration']).to be_a String end end + + it 'parser does not error when value is nil, leaves nil' do + client.index( + index: index, + body: { + '@timestamp' => nil, + 'client.ip' => nil, + message: 'Connected to 10.1.0.1', + 'event.duration' => 1756465 + }, + refresh: true + ) + parser = { + '@timestamp' => Proc.new { |t| DateTime.parse(t) }, + 'client.ip' => Proc.new { |i| IPAddr.new(i) }, + 'event.duration' => Proc.new { |d| d.to_s } + } + response = esql_helper.query(client, query, parser: parser) + response.each do |r| + expect [DateTime, NilClass].include?(r['@timestamp'].class) + expect [IPAddr, NilClass].include?(r['client.ip'].class) + expect(r['message']).to be_a String + expect(r['event.duration']).to be_a String + end + end end From 836df851f523a4df73d59b055d8e0d04c3c653cf Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 18 Apr 2024 14:12:25 +0100 Subject: [PATCH 247/540] [Gem] Fixes Bulk Helper Addresses an issue where when using `slice`, the wrong hash was being passed again to `ingest` therefore adding unneccessary hash nesting. --- elasticsearch/lib/elasticsearch/helpers/bulk_helper.rb | 4 +++- elasticsearch/spec/integration/helpers/bulk_helper_spec.rb | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/elasticsearch/lib/elasticsearch/helpers/bulk_helper.rb b/elasticsearch/lib/elasticsearch/helpers/bulk_helper.rb index 80c906c38f..e5982eccb7 100644 --- a/elasticsearch/lib/elasticsearch/helpers/bulk_helper.rb +++ b/elasticsearch/lib/elasticsearch/helpers/bulk_helper.rb @@ -48,7 +48,9 @@ def initialize(client, index, params = {}) def ingest(docs, params = {}, body = {}, &block) ingest_docs = docs.map { |doc| { index: { _index: @index, data: doc} } } if (slice = params.delete(:slice)) - ingest_docs.each_slice(slice) { |items| ingest(items, params, &block) } + ingest_docs.each_slice(slice) do |items| + ingest(items.map { |item| item[:index][:data] }, params, &block) + end else bulk_request(ingest_docs, params, &block) end diff --git a/elasticsearch/spec/integration/helpers/bulk_helper_spec.rb b/elasticsearch/spec/integration/helpers/bulk_helper_spec.rb index 8fb7cb5485..31da9a0b84 100644 --- a/elasticsearch/spec/integration/helpers/bulk_helper_spec.rb +++ b/elasticsearch/spec/integration/helpers/bulk_helper_spec.rb @@ -21,6 +21,7 @@ context 'Elasticsearch client helpers' do context 'Bulk helper' do let(:index) { 'bulk_animals' } + let(:index_slice) { 'bulk_animals_slice' } let(:params) { { refresh: 'wait_for' } } let(:bulk_helper) { Elasticsearch::Helpers::BulkHelper.new(client, index, params) } let(:docs) do @@ -40,6 +41,7 @@ after do client.indices.delete(index: index, ignore: 404) + client.indices.delete(index: index_slice, ignore: 404) end it 'Ingests documents' do @@ -76,10 +78,13 @@ it 'Ingests documents and yields response and docs' do slice = 2 + bulk_helper = Elasticsearch::Helpers::BulkHelper.new(client, index_slice, params) response = bulk_helper.ingest(docs, {slice: slice}) do |response, docs| expect(response).to be_an_instance_of Elasticsearch::API::Response expect(docs.count).to eq slice end + response = client.search(index: index_slice, size: 200) + expect(response['hits']['hits'].map { |a| a['_source'].transform_keys(&:to_sym) }).to eq docs end context 'JSON File helper' do From e0847388763e7d30b3a0b659693d78554d020a9f Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Mon, 29 Apr 2024 06:04:38 +0000 Subject: [PATCH 248/540] Bumps stack to version 8.15.0-SNAPSHOT --- .buildkite/pipeline.yml | 2 +- .github/workflows/main.yml | 4 ++-- .github/workflows/otel.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 28c8765f47..87bf4ebbf5 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -5,7 +5,7 @@ steps: env: RUBY_VERSION: "{{ matrix.ruby }}" TEST_SUITE: "{{ matrix.suite }}" - STACK_VERSION: 8.14.0-SNAPSHOT + STACK_VERSION: 8.15.0-SNAPSHOT TRANSPORT_VERSION: "{{ matrix.transport }}" RUBY_SOURCE: "{{ matrix.ruby_source }}" matrix: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ecc6cdb80f..5b6674c133 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 8.14.0-SNAPSHOT + stack-version: 8.15.0-SNAPSHOT security-enabled: false - uses: ruby/setup-ruby@v1 with: @@ -40,4 +40,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake elasticsearch:download_artifacts[8.14.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake elasticsearch:download_artifacts[8.15.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit diff --git a/.github/workflows/otel.yml b/.github/workflows/otel.yml index 05963720e7..973f16d895 100644 --- a/.github/workflows/otel.yml +++ b/.github/workflows/otel.yml @@ -28,7 +28,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 8.14.0-SNAPSHOT + stack-version: 8.15.0-SNAPSHOT security-enabled: false - uses: ruby/setup-ruby@v1 with: @@ -42,4 +42,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake elasticsearch:download_artifacts[8.14.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake elasticsearch:download_artifacts[8.15.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit From 0288fb5111e1a26e301b8acdbe4ed0da0b775498 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 13 May 2024 14:44:58 +0100 Subject: [PATCH 249/540] Adds missing require --- elasticsearch/spec/integration/characters_escaping_spec.rb | 6 ++++-- elasticsearch/spec/integration/client_integration_spec.rb | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/elasticsearch/spec/integration/characters_escaping_spec.rb b/elasticsearch/spec/integration/characters_escaping_spec.rb index 7241bf1f24..3919841c9b 100644 --- a/elasticsearch/spec/integration/characters_escaping_spec.rb +++ b/elasticsearch/spec/integration/characters_escaping_spec.rb @@ -14,10 +14,12 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}" -raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/ require 'spec_helper' +require 'uri' + +ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}" +raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/ context 'Elasticsearch client' do let(:client) do diff --git a/elasticsearch/spec/integration/client_integration_spec.rb b/elasticsearch/spec/integration/client_integration_spec.rb index 2ae47d70e9..79ef20850c 100644 --- a/elasticsearch/spec/integration/client_integration_spec.rb +++ b/elasticsearch/spec/integration/client_integration_spec.rb @@ -19,6 +19,7 @@ require 'spec_helper' require 'logger' +require 'uri' context 'Elasticsearch client' do let(:logger) { Logger.new($stderr) } From 2b70eb75ab0e3e3ac9072f4defa6f270465d9156 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 13 May 2024 14:56:06 +0100 Subject: [PATCH 250/540] [API] Renames inference delete, get and put, removes 'model' --- .../api/actions/inference/{delete_model.rb => delete.rb} | 8 ++++---- .../api/actions/inference/{get_model.rb => get.rb} | 6 +++--- .../lib/elasticsearch/api/actions/inference/inference.rb | 2 +- .../api/actions/inference/{put_model.rb => put.rb} | 8 ++++---- .../inference/{delete_model_spec.rb => delete_spec.rb} | 6 +++--- .../actions/inference/{get_model_spec.rb => get_spec.rb} | 6 +++--- .../actions/inference/{put_model_spec.rb => put_spec.rb} | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) rename elasticsearch-api/lib/elasticsearch/api/actions/inference/{delete_model.rb => delete.rb} (94%) rename elasticsearch-api/lib/elasticsearch/api/actions/inference/{get_model.rb => get.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/inference/{put_model.rb => put.rb} (93%) rename elasticsearch-api/spec/elasticsearch/api/actions/inference/{delete_model_spec.rb => delete_spec.rb} (82%) rename elasticsearch-api/spec/elasticsearch/api/actions/inference/{get_model_spec.rb => get_spec.rb} (83%) rename elasticsearch-api/spec/elasticsearch/api/actions/inference/{put_model_spec.rb => put_spec.rb} (83%) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb similarity index 94% rename from elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb index 1b16a6732f..6e31b7a4b3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb @@ -22,20 +22,20 @@ module Elasticsearch module API module Inference module Actions - # Delete model in the Inference API + # Delete an inference endpoint # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :inference_id The model Id + # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-inference-api.html # - def delete_model(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'inference.delete_model' } + def delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.delete' } defined_params = %i[inference_id task_type].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb index 20de3fe28f..cb227aa9b2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Inference module Actions - # Get a model in the Inference API + # Get an inference endpoint # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the @@ -34,8 +34,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-api.html # - def get_model(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'inference.get_model' } + def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.get' } defined_params = %i[inference_id task_type].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb index a0bcf51145..de5e7b797c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Inference module Actions - # Perform inference on a model + # Perform inference # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb similarity index 93% rename from elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb index a86e2be1b7..9d485bcd17 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Inference module Actions - # Configure a model for use in the Inference API + # Configure an inference endpoint for use in the Inference API # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the @@ -31,12 +31,12 @@ module Actions # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The model's task and service settings + # @option arguments [Hash] :body The inference endpoint's task and service settings # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-inference-api.html # - def put_model(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'inference.put_model' } + def put(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put' } defined_params = %i[inference_id task_type].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_spec.rb similarity index 82% rename from elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_spec.rb index 109e0da862..cd41a6c822 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_model_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client#inference.delete_model' do +describe 'client#inference.delete' do let(:expected_args) do [ 'DELETE', @@ -26,11 +26,11 @@ nil, {}, { defined_params: { inference_id: 'bar', task_type: 'foo' }, - endpoint: 'inference.delete_model' } + endpoint: 'inference.delete' } ] end it 'performs the request' do - expect(client_double.inference.delete_model(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.delete(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_spec.rb similarity index 83% rename from elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/inference/get_spec.rb index 21a76d089b..66cbd6e682 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_model_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client#inference.get_model' do +describe 'client#inference.get' do let(:expected_args) do [ 'GET', @@ -26,11 +26,11 @@ nil, {}, { defined_params: { inference_id: 'bar', task_type: 'foo' }, - endpoint: 'inference.get_model' } + endpoint: 'inference.get' } ] end it 'performs the request' do - expect(client_double.inference.get_model(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.get(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_spec.rb similarity index 83% rename from elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/inference/put_spec.rb index a699e5d394..e06f205437 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_model_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client#inference.put_model' do +describe 'client#inference.put' do let(:expected_args) do [ 'PUT', @@ -26,11 +26,11 @@ nil, {}, { defined_params: { inference_id: 'bar', task_type: 'foo' }, - endpoint: 'inference.put_model' } + endpoint: 'inference.put' } ] end it 'performs the request' do - expect(client_double.inference.put_model(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.put(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response end end From 0ae58a7e5cc6e2b8a8c66f4772527931f8296296 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 13 May 2024 14:56:58 +0100 Subject: [PATCH 251/540] [API] Removes 'experimental' notice from esql query and async_query --- .../lib/elasticsearch/api/actions/esql/async_query.rb | 4 ---- elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb | 4 ---- 2 files changed, 8 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb index 11c44df9e2..fadffc40ef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb @@ -23,10 +23,6 @@ module API module Esql module Actions # Executes an ESQL request asynchronously - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the csv format. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb index 80c3e3513d..0d722a7f72 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb @@ -23,10 +23,6 @@ module API module Esql module Actions # Executes an ESQL request - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the csv format. From eb62667127445040e8c9c57464da0503f703e8bc Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 13 May 2024 14:57:28 +0100 Subject: [PATCH 252/540] [API] Adds typed_keys boolean parameter to search_application search --- .../lib/elasticsearch/api/actions/search_application/search.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb index 5d87a7e533..f3a7797355 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb @@ -29,6 +29,7 @@ module Actions # support SLA of official GA features. # # @option arguments [String] :name The name of the search application to be searched + # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Search parameters, including template parameters that override defaults # @@ -58,7 +59,7 @@ def search(arguments = {}) end path = "_application/search_application/#{Utils.__listify(_name)}/_search" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From 387b954597014082374427d9da602e1d660148a6 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 13 May 2024 14:58:15 +0100 Subject: [PATCH 253/540] [API] Removes experimental APIs global_retention in data_streams --- .../data_streams/delete_global_retention.rb | 56 ------------------ .../data_streams/get_global_retention.rb | 55 ----------------- .../data_streams/put_global_retention.rb | 59 ------------------- .../delete_global_retention_spec.rb | 35 ----------- .../data_streams/get_global_retention_spec.rb | 35 ----------- .../data_streams/put_global_retention_spec.rb | 35 ----------- 6 files changed, 275 deletions(-) delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/data_streams/delete_global_retention.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/data_streams/get_global_retention.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/data_streams/put_global_retention.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/data_streams/delete_global_retention_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/data_streams/get_global_retention_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/data_streams/put_global_retention_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/delete_global_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/delete_global_retention.rb deleted file mode 100644 index 2980a9d57f..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/delete_global_retention.rb +++ /dev/null @@ -1,56 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module DataStreams - module Actions - # Deletes the global retention configuration that applies to all data streams managed by the data stream lifecycle. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [Boolean] :dry_run Determines whether the global retention provided should be applied or only the impact should be determined. - # @option arguments [Time] :master_timeout Specify timeout for connection to master. - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-delete-global-retention.html - # - def delete_global_retention(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'data_streams.delete_global_retention' } - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - method = Elasticsearch::API::HTTP_DELETE - path = '_data_stream/_global_retention' - 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/data_streams/get_global_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/get_global_retention.rb deleted file mode 100644 index 1c43c20af3..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/get_global_retention.rb +++ /dev/null @@ -1,55 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module DataStreams - module Actions - # Returns global retention configuration that applies to all data streams managed by the data stream lifecycle. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [Boolean] :local Return the global retention retrieved from the node that received the request. - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-get-global-retention.html - # - def get_global_retention(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'data_streams.get_global_retention' } - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - method = Elasticsearch::API::HTTP_GET - path = '_data_stream/_global_retention' - 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/data_streams/put_global_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/put_global_retention.rb deleted file mode 100644 index b07c5e1cf6..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/data_streams/put_global_retention.rb +++ /dev/null @@ -1,59 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module DataStreams - module Actions - # Updates the global retention configuration that applies to all data streams managed by the data stream lifecycle. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [Boolean] :dry_run Determines whether the global retention provided should be applied or only the impact should be determined. - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The global retention configuration including optional values for default and max retention. (*Required*) - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-put-global-retention.html - # - def put_global_retention(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'data_streams.put_global_retention' } - - raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - method = Elasticsearch::API::HTTP_PUT - path = '_data_stream/_global_retention' - 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/spec/elasticsearch/api/actions/data_streams/delete_global_retention_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/delete_global_retention_spec.rb deleted file mode 100644 index bc3ba13167..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/delete_global_retention_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#data_streams.delete_global_retention' do - let(:expected_args) do - [ - 'DELETE', - '_data_stream/_global_retention', - {}, - nil, - {}, - { endpoint: 'data_streams.delete_global_retention' } - ] - end - - it 'performs the request' do - expect(client_double.data_streams.delete_global_retention).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/get_global_retention_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/get_global_retention_spec.rb deleted file mode 100644 index 3626b42f8a..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/get_global_retention_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#data_streams.get_global_retention' do - let(:expected_args) do - [ - 'GET', - '_data_stream/_global_retention', - {}, - nil, - {}, - { endpoint: 'data_streams.get_global_retention' } - ] - end - - it 'performs the request' do - expect(client_double.data_streams.get_global_retention).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/put_global_retention_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/put_global_retention_spec.rb deleted file mode 100644 index ae47ffc0ee..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/data_streams/put_global_retention_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#data_streams.put_global_retention' do - let(:expected_args) do - [ - 'PUT', - '_data_stream/_global_retention', - {}, - {}, - {}, - { endpoint: 'data_streams.put_global_retention' } - ] - end - - it 'performs the request' do - expect(client_double.data_streams.put_global_retention(body: {})).to be_a Elasticsearch::API::Response - end -end From 87bd18643e484167bd16e91093773f737e8655df Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 13 May 2024 15:33:12 +0100 Subject: [PATCH 254/540] [API] Test Runner: Skips test due to difference in expected error --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 233a98e02c..bb284ae085 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -82,3 +82,6 @@ - :file: 'cluster.desired_nodes/11_old_format.yml' :description: 'Test node version must have content' +- + :file: 'aggregations/stats_metric_fail_formatting.yml' + :description: 'fail formatting' From 863862be82ad03cb182ccdab0ced11450d8ea91b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 13 May 2024 16:20:21 +0100 Subject: [PATCH 255/540] [API] Test Runner - skips analytics/empty_field_metric.yml Rate test There's an issue from transport where `key_as_string` should not be parsed as a date, which will be addressed. --- elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml index 65ad2bdc74..04d9bb3e40 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml @@ -118,3 +118,8 @@ - :file: 'api_key/21_query_with_aggs.yml' :description: 'Test composite aggs api key' + +# Issue: key_as_string should not be parsed to date: +- + :file: 'analytics/empty_field_metric.yml' + :description: 'Rate test' From dbb602cd7e8f34f6cb9f2567d90d0ac9de370d5a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 14 May 2024 09:29:07 +0100 Subject: [PATCH 256/540] [CI] Abort with Exception message --- rake_tasks/elasticsearch_tasks.rake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rake_tasks/elasticsearch_tasks.rake b/rake_tasks/elasticsearch_tasks.rake index 919a8a39b6..268790f29e 100644 --- a/rake_tasks/elasticsearch_tasks.rake +++ b/rake_tasks/elasticsearch_tasks.rake @@ -43,8 +43,8 @@ namespace :elasticsearch do def download_file!(url, filename) puts "Downloading #{filename} from #{url}" - File.open(filename, "w") do |downloaded_file| - URI.open(url, "rb") do |artifact_file| + File.open(filename, 'w') do |downloaded_file| + URI.open(url, 'rb') do |artifact_file| downloaded_file.write(artifact_file.read) end end @@ -54,8 +54,11 @@ namespace :elasticsearch do warn "[!] Couldn't download #{filename}" exit 1 end + rescue OpenURI::HTTPError => e + abort e.message rescue StandardError => e - abort e + puts e.backtrace.join("\n\t") + abort e.message end desc 'Download artifacts (tests and REST spec) for currently running cluster' From 7c9b6af6d3026bad9a3be925f5e38b54edef23fd Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 15 May 2024 06:06:29 +0000 Subject: [PATCH 257/540] [API] Adds capabilities endpoint --- .../elasticsearch/api/actions/capabilities.rb | 56 +++++++++++++++++++ .../api/actions/capabilities_spec.rb | 35 ++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/capabilities_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb b/elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb new file mode 100644 index 0000000000..d0b7a2d51c --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb @@ -0,0 +1,56 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Actions + # Checks if the specified combination of method, API, parameters, and arbitrary capabilities are supported + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :method REST method to check (options: GET, HEAD, POST, PUT, DELETE) + # @option arguments [String] :path API path to check + # @option arguments [String] :parameters Comma-separated list of API parameters to check + # @option arguments [String] :capabilities Comma-separated list of arbitrary API capabilities to check + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/capabilities.html + # + def capabilities(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'capabilities' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = '_capabilities' + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/capabilities_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/capabilities_spec.rb new file mode 100644 index 0000000000..c44b099f68 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/capabilities_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#capabilities' do + let(:expected_args) do + [ + 'GET', + '_capabilities', + {}, + nil, + {}, + { endpoint: 'capabilities' } + ] + end + + it 'performs the request' do + expect(client_double.capabilities).to be_a Elasticsearch::API::Response + end +end From 7d6d0d8351a5c803aa0c8110b330f5ad7d299714 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 15 May 2024 13:12:19 +0100 Subject: [PATCH 258/540] [API] Test Runner: Support for skipping "awaits_fix" tests --- .../spec/rest_api/rest_api_yaml_spec.rb | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb index a48d1de92f..e163a65c73 100644 --- a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb +++ b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb @@ -20,6 +20,17 @@ require_relative './run_rspec_matchers' LOGGER = Logger.new($stdout) +CLUSTER_FEATURES = ADMIN_CLIENT.features.get_features['features'].map { |f| f['name'] } + +def skip_test?(test) + # To support new features skipping in YAML tests. This will go away with new YAML tests: + if (feature_to_skip = test.skip&.first&.[]('skip')&.[]('cluster_features')) + return true unless CLUSTER_FEATURES.include?(feature_to_skip) + end + # Support skipping 'awaits_fix' + !!test.test_file.instance_variable_get('@skip')&.first&.[]('skip')&.[]('awaits_fix') || + !!test.skip&.first&.[]('skip')&.[]('awaits_fix') +end describe 'Rest API YAML tests' do LOGGER.info "Elastic Transport version: #{Elastic::Transport::VERSION}" @@ -30,8 +41,6 @@ exit 1 end - CLUSTER_FEATURES = ADMIN_CLIENT.features.get_features['features'].map { |f| f['name'] } - # Traverse YAML files and create TestFile object: REST_API_YAML_FILES.each do |file| begin @@ -48,10 +57,8 @@ let(:client) { DEFAULT_CLIENT } test_file.tests.each do |test| - # To support new features skipping in YAML tests. This will go away with new YAML tests: - if (feature_to_skip = test.skip&.first&.[]('skip')&.[]('cluster_features')) - next unless CLUSTER_FEATURES.include? feature_to_skip - end + next if skip_test?(test) + context test.description do if test.skip_test?(ADMIN_CLIENT) skip 'Test contains feature(s) not yet supported or version is not satisfied' From 26baded279185d24c19ac33f2c2248a74262d3bd Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 15 May 2024 17:15:02 +0100 Subject: [PATCH 259/540] [API] Test Runner: Skips mips test in knn --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index bb284ae085..cf5383d559 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -40,6 +40,9 @@ - :file: 'search.vectors/40_knn_search.yml' :description: 'Direct kNN queries are disallowed' +- + :file: 'search.vectors/40_knn_search.yml' + :description: 'Knn search with mip' - :file: 'search.vectors/45_knn_search_byte.yml' :description: 'Direct kNN queries are disallowed' From 0ab2e0a70c80651b15bbeabbc6cc8fbe44380cba Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 16 May 2024 11:27:36 +0100 Subject: [PATCH 260/540] [API] Updates cross cluster api key test --- .../api_key/api_key_cross_cluster_spec.rb | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_cross_cluster_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_cross_cluster_spec.rb index 9ba92fbd9c..5b1ee7e7f7 100644 --- a/elasticsearch-api/spec/platinum/integration/api_key/api_key_cross_cluster_spec.rb +++ b/elasticsearch-api/spec/platinum/integration/api_key/api_key_cross_cluster_spec.rb @@ -30,7 +30,7 @@ username: user, body: { password: password, - roles: [ 'admin_role' ], + roles: ['admin_role'], full_name: 'Admin user' } ) @@ -45,31 +45,22 @@ it 'updates api key' do response = ADMIN_CLIENT.security.create_cross_cluster_api_key( body: { - name: "my-cc-api-key", - expiration: "1d", + name: 'my-cc-api-key', + expiration: '1d', access: { search: [ - { - names: ["logs*"], - query: { - term: { "category": "shared" } - }, - field_security: { - grant: ["*"], - except: ["private"] - } - } + { names: ['logs*'] } ], replication: [ { - names: ["archive"], + names: ['archive'], allow_restricted_indices: false } ] }, metadata: { answer: 42, - tag: "dev" + tag: 'dev' } } ) From f5c6ffc499561f345fe3ed5e247bdada8a3e2890 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 16 May 2024 11:34:03 +0100 Subject: [PATCH 261/540] [API] Test Runner: Capabilities test --- .../free/integration/capabilities_spec.rb | 26 +++++++++++++++++++ .../spec/rest_api/skipped_tests_free.yml | 4 +++ 2 files changed, 30 insertions(+) create mode 100644 elasticsearch-api/spec/free/integration/capabilities_spec.rb diff --git a/elasticsearch-api/spec/free/integration/capabilities_spec.rb b/elasticsearch-api/spec/free/integration/capabilities_spec.rb new file mode 100644 index 0000000000..87f881d459 --- /dev/null +++ b/elasticsearch-api/spec/free/integration/capabilities_spec.rb @@ -0,0 +1,26 @@ +# 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. +# TODO: These tests won't be necessary once we migrate to the new YAML tests +require_relative './spec_helper' + +describe 'Capabilities' do + it 'performs the request' do + response = CLIENT.capabilities(method: 'GET', path: '/_capabilities', parameters: 'unknown') + expect(response.status).to eq 200 + expect(response['cluster_name']).not_to be_nil + end +end diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index cf5383d559..bc38190451 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -88,3 +88,7 @@ - :file: 'aggregations/stats_metric_fail_formatting.yml' :description: 'fail formatting' +# TODO: Test failing due to implementation +- + :file: 'capabilities/10_basic.yml' + :description: '*' From 92268046a9378622703717851c8d98f43bf2ea59 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 16 May 2024 14:56:18 +0100 Subject: [PATCH 262/540] [DOCS] Updates docs generator --- rake_tasks/doc_generator.rake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/rake_tasks/doc_generator.rake b/rake_tasks/doc_generator.rake index 5d26cdb8d1..8ab5505a45 100644 --- a/rake_tasks/doc_generator.rake +++ b/rake_tasks/doc_generator.rake @@ -19,11 +19,11 @@ require 'json' require 'fileutils' require 'logger' -namespace :docs do - SRC_FILE = "#{__dir__}/docs/parsed_alternative_report.json".freeze - EXAMPLES_TO_PARSE = JSON.parse(File.read("#{__dir__}/docs/examples_to_parse.json")).freeze - TARGET_DIR = "#{__dir__}/../docs/examples/guide".freeze +SRC_FILE = "#{__dir__}/docs/parsed_alternative_report.json".freeze +EXAMPLES_TO_PARSE = JSON.parse(File.read("#{__dir__}/docs/examples_to_parse.json")).freeze +TARGET_DIR = "#{__dir__}/../docs/examples/guide".freeze +namespace :docs do desc 'Generate doc examples' task :generate do # Remove existing documents to avoid having outdated files @@ -206,7 +206,8 @@ module TestDocs end def self.log_successful_code(filename) - logger = Logger.new('log/200-ok.log') + FileUtils.mkdir_p('./log') unless File.directory?('./log') + logger = Logger.new('./log/200-ok.log') logger.formatter = -> (_, _, _, msg) { "#{msg} " } logger.info(filename) end From b076a3e0285076945b8290ffd495ad862fb16615 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 16 May 2024 14:56:32 +0100 Subject: [PATCH 263/540] [DOCS] Updates generated docs --- .../04412d11783dac25b5fd2ec5407078a3.asciidoc | 11 + .../086ec4c5d86bbf80fb80162e94037689.asciidoc | 48 +++++ .../0ba5acede9d43af424e85428e7d35420.asciidoc | 20 ++ .../1147a02afa087278e51fa365fb9e06b7.asciidoc | 9 + .../13ecdf99114098c76b050397d9c3d4e6.asciidoc | 2 +- ...16fc93f0e9a395d0668483d29e3df9d8.asciidoc} | 3 +- ...186a7143d50e8c3ee01094e1a9ff0c0c.asciidoc} | 5 +- .../1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc | 34 ++++ ...1ce2cbfe1430c8837c19304a6b648af3.asciidoc} | 3 +- .../2212167f67b7ad1cd2b8dcec083d09ea.asciidoc | 7 + .../22dd833336fa22c8a8f67bb754ffba9a.asciidoc | 24 +++ ...2988a112b590ae2320940887125fe36a.asciidoc} | 3 +- .../2afdf0d83724953aa2875b5fb37d60cc.asciidoc | 8 + .../2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc | 7 + .../2b7687e3d7c06824950e00618c297864.asciidoc | 7 + .../2e93eaaebf75fa4a2451e8a76ffa9f20.asciidoc | 23 +++ ...2f07b81fd47ec3b074242a760f0c4e9e.asciidoc} | 6 +- .../33d480fc6812ada75756cf5337bc9092.asciidoc | 2 +- ...34cdeefb09bbbe5206957a8bc1bd513d.asciidoc} | 6 +- .../357edc9d10e98ed776401c7a439a1a55.asciidoc | 8 + .../360b3cef34bbddc5d9579ca95f0cb061.asciidoc | 15 ++ .../365256ebdfa47b449780771d9beba8d9.asciidoc | 2 +- .../370b297ed3433577adf53e64f572d89d.asciidoc | 2 +- .../394d8fc4d78214e6fe5e4dea62c8923f.asciidoc | 41 ++++ .../3a7a6ab88a49b484fafb10c8eb09b562.asciidoc | 20 ++ .../3e4227250d49e81df48773f8ba803ea7.asciidoc | 14 ++ .../405511f7c1f12cc0a227b4563fe7b2e2.asciidoc | 7 + .../405ac843a9156d3cab374e199cac87fb.asciidoc | 2 +- .../42ba7c1d13aee91fe6f0a8a42c30eb74.asciidoc | 8 + .../430705509f8367aef92be413f702520b.asciidoc | 10 + .../43e86fbaeed068dcc981214338559b5a.asciidoc | 7 + .../443f0e8fbba83777b2df624879d188d5.asciidoc | 17 ++ .../452a61fecda86dd5539451dd57ec73a9.asciidoc | 36 ++++ .../46103fee3cd5f53dc75123def82d52ad.asciidoc | 19 ++ .../4be20da16d2b58216e8b307218c7bf3a.asciidoc | 28 +++ .../4e3414fc712b16311f9e433dd366f49d.asciidoc | 2 +- .../4fcca1687d7b2cf08de526539fea5a76.asciidoc | 43 ++++ ...52a2d119addb15366a935115518335fd.asciidoc} | 3 +- .../543c3a77880adf281099df1a41f6b96a.asciidoc | 11 + ...5a006feed86309b547bbaa1baca1c496.asciidoc} | 28 ++- .../5c7ece1f30267adabdb832424871900a.asciidoc | 7 + .../6606d46685d10377b996b5f20f1229b5.asciidoc | 10 + .../682336e5232c9ad3d866cb203d1c58c1.asciidoc | 22 ++ .../6843d859e2965d17cad4f033c81db83f.asciidoc | 24 +++ .../692606cc6d6462becc321d92961a3bac.asciidoc | 13 ++ .../6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc | 2 +- .../77518e8c6198acfe77c0934fd2fe65cb.asciidoc | 32 +++ .../78e20b4cff470ed7357de1fd74bcfeb7.asciidoc | 22 ++ .../84490ee2c6c07dbd2101ce2e3751e1aa.asciidoc | 17 ++ .../856c10ad554c26b70f1121454caff40a.asciidoc | 18 ++ .../89d2a3748dc14c6d5d4c6f94b9b03938.asciidoc | 8 + .../8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc | 2 +- .../8c619666488927dac6ecb7dcebca44c2.asciidoc | 21 ++ .../90083d93e46fad2524755b8d4d1306fc.asciidoc | 2 +- ...93cca1eb4d9ee4c65ab259e18469d9d6.asciidoc} | 0 .../93cd0fdd5ca22838db06aa1cabdbe8bd.asciidoc | 24 +++ .../9b0f34d122a4b348dc86df7410d6ebb6.asciidoc | 2 +- .../a4a3c3cd09efa75168dab90105afb2e9.asciidoc | 2 +- ...ad2b8aed84c67cdc295917b47a12d3dc.asciidoc} | 9 +- .../b45a8c6fc746e9c90fd181e69a605fad.asciidoc | 11 + .../b468d0124dc485385a34504d5b7af82a.asciidoc | 17 ++ .../b4693f2aa9fa65db04ab2499355c54fc.asciidoc | 24 +++ .../b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc | 191 ++++++++++++++++++ .../bc2feb70658f028d5d0418ae4ac9662f.asciidoc | 26 --- .../be30ea12f605fd61acba689b68e00bbe.asciidoc | 20 ++ .../c0220f749b260889bebc567533a01c3f.asciidoc | 7 + .../c12d6e962f083c728f9397932f05202e.asciidoc | 2 +- .../c21eb4bc30087188241cbba6b6b89999.asciidoc | 10 + ...c9a6ab0a56bb0177f158277185f68302.asciidoc} | 13 +- .../cd16538654e0f834ff19fe6cf329c398.asciidoc | 21 ++ .../cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc | 2 +- ...d14fe5838fc02224f4b5ade2626d6026.asciidoc} | 3 +- ...df8271648f547673007ecd778341bfc9.asciidoc} | 3 +- .../e301695a514a13abd98c1fe51360fa85.asciidoc | 17 -- .../e551ea38a2d8f8deac110b33304200cc.asciidoc | 27 +++ .../e6eb414f623566119d4db131a7677a7a.asciidoc | 12 ++ .../e80dab3e0314b7dad1bbd75b0956d9fc.asciidoc | 29 --- ...e930a572e8ddfdecc13498c04007b9e3.asciidoc} | 2 +- .../e9a0b450af6219772631703d602c7092.asciidoc | 40 ++++ ...ea0a5762f297928ea79948250a3624ed.asciidoc} | 3 +- .../ee0fd67acc807f1bddf5e9807c06e7eb.asciidoc | 94 +++++++++ .../f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc | 20 ++ .../f1cfc64c119b0a30376221d8f23cdd45.asciidoc | 7 + .../f245c4f1f79fb2f6f968278990c2b9dd.asciidoc | 13 ++ ...f2da3937e5f0718527e6eb73aa261b1f.asciidoc} | 3 +- ...f49ac80f0130cae8d0ea6f4472a149dd.asciidoc} | 3 + .../f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc | 2 +- 87 files changed, 1300 insertions(+), 110 deletions(-) create mode 100644 docs/examples/guide/04412d11783dac25b5fd2ec5407078a3.asciidoc create mode 100644 docs/examples/guide/086ec4c5d86bbf80fb80162e94037689.asciidoc create mode 100644 docs/examples/guide/0ba5acede9d43af424e85428e7d35420.asciidoc create mode 100644 docs/examples/guide/1147a02afa087278e51fa365fb9e06b7.asciidoc rename docs/examples/guide/{efa924638043f3a6b23ccb824d757eba.asciidoc => 16fc93f0e9a395d0668483d29e3df9d8.asciidoc} (85%) rename docs/examples/guide/{ef175686e1179c4ed8fb96935895b3d0.asciidoc => 186a7143d50e8c3ee01094e1a9ff0c0c.asciidoc} (84%) create mode 100644 docs/examples/guide/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc rename docs/examples/guide/{dddb6a6ebd145f8411c5b4910d332f87.asciidoc => 1ce2cbfe1430c8837c19304a6b648af3.asciidoc} (52%) create mode 100644 docs/examples/guide/2212167f67b7ad1cd2b8dcec083d09ea.asciidoc create mode 100644 docs/examples/guide/22dd833336fa22c8a8f67bb754ffba9a.asciidoc rename docs/examples/guide/{87457bb3467484bec3e9df4e25942ba6.asciidoc => 2988a112b590ae2320940887125fe36a.asciidoc} (81%) create mode 100644 docs/examples/guide/2afdf0d83724953aa2875b5fb37d60cc.asciidoc create mode 100644 docs/examples/guide/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc create mode 100644 docs/examples/guide/2b7687e3d7c06824950e00618c297864.asciidoc create mode 100644 docs/examples/guide/2e93eaaebf75fa4a2451e8a76ffa9f20.asciidoc rename docs/examples/guide/{01c0e302f4fd5118faf5e34f4a010ebf.asciidoc => 2f07b81fd47ec3b074242a760f0c4e9e.asciidoc} (52%) rename docs/examples/guide/{1c5a5a8c0bdc3c577f560157bd4e2313.asciidoc => 34cdeefb09bbbe5206957a8bc1bd513d.asciidoc} (52%) create mode 100644 docs/examples/guide/357edc9d10e98ed776401c7a439a1a55.asciidoc create mode 100644 docs/examples/guide/360b3cef34bbddc5d9579ca95f0cb061.asciidoc create mode 100644 docs/examples/guide/394d8fc4d78214e6fe5e4dea62c8923f.asciidoc create mode 100644 docs/examples/guide/3a7a6ab88a49b484fafb10c8eb09b562.asciidoc create mode 100644 docs/examples/guide/3e4227250d49e81df48773f8ba803ea7.asciidoc create mode 100644 docs/examples/guide/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc create mode 100644 docs/examples/guide/42ba7c1d13aee91fe6f0a8a42c30eb74.asciidoc create mode 100644 docs/examples/guide/430705509f8367aef92be413f702520b.asciidoc create mode 100644 docs/examples/guide/43e86fbaeed068dcc981214338559b5a.asciidoc create mode 100644 docs/examples/guide/443f0e8fbba83777b2df624879d188d5.asciidoc create mode 100644 docs/examples/guide/452a61fecda86dd5539451dd57ec73a9.asciidoc create mode 100644 docs/examples/guide/46103fee3cd5f53dc75123def82d52ad.asciidoc create mode 100644 docs/examples/guide/4be20da16d2b58216e8b307218c7bf3a.asciidoc create mode 100644 docs/examples/guide/4fcca1687d7b2cf08de526539fea5a76.asciidoc rename docs/examples/guide/{4aa510f34a0358fecc8d764dd099b843.asciidoc => 52a2d119addb15366a935115518335fd.asciidoc} (85%) create mode 100644 docs/examples/guide/543c3a77880adf281099df1a41f6b96a.asciidoc rename docs/examples/guide/{62e073b6b8ef533b5f3551bad623c070.asciidoc => 5a006feed86309b547bbaa1baca1c496.asciidoc} (56%) create mode 100644 docs/examples/guide/5c7ece1f30267adabdb832424871900a.asciidoc create mode 100644 docs/examples/guide/6606d46685d10377b996b5f20f1229b5.asciidoc create mode 100644 docs/examples/guide/682336e5232c9ad3d866cb203d1c58c1.asciidoc create mode 100644 docs/examples/guide/6843d859e2965d17cad4f033c81db83f.asciidoc create mode 100644 docs/examples/guide/692606cc6d6462becc321d92961a3bac.asciidoc create mode 100644 docs/examples/guide/77518e8c6198acfe77c0934fd2fe65cb.asciidoc create mode 100644 docs/examples/guide/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc create mode 100644 docs/examples/guide/84490ee2c6c07dbd2101ce2e3751e1aa.asciidoc create mode 100644 docs/examples/guide/856c10ad554c26b70f1121454caff40a.asciidoc create mode 100644 docs/examples/guide/89d2a3748dc14c6d5d4c6f94b9b03938.asciidoc create mode 100644 docs/examples/guide/8c619666488927dac6ecb7dcebca44c2.asciidoc rename docs/examples/guide/{2cafbc456bed3b7c8780e5557aab1d6b.asciidoc => 93cca1eb4d9ee4c65ab259e18469d9d6.asciidoc} (100%) create mode 100644 docs/examples/guide/93cd0fdd5ca22838db06aa1cabdbe8bd.asciidoc rename docs/examples/guide/{e885c28e6a1ff3cc20aaa5543d84f83e.asciidoc => ad2b8aed84c67cdc295917b47a12d3dc.asciidoc} (75%) create mode 100644 docs/examples/guide/b45a8c6fc746e9c90fd181e69a605fad.asciidoc create mode 100644 docs/examples/guide/b468d0124dc485385a34504d5b7af82a.asciidoc create mode 100644 docs/examples/guide/b4693f2aa9fa65db04ab2499355c54fc.asciidoc create mode 100644 docs/examples/guide/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc delete mode 100644 docs/examples/guide/bc2feb70658f028d5d0418ae4ac9662f.asciidoc create mode 100644 docs/examples/guide/be30ea12f605fd61acba689b68e00bbe.asciidoc create mode 100644 docs/examples/guide/c0220f749b260889bebc567533a01c3f.asciidoc create mode 100644 docs/examples/guide/c21eb4bc30087188241cbba6b6b89999.asciidoc rename docs/examples/guide/{2da48241cfc21d2c57dc970845470bda.asciidoc => c9a6ab0a56bb0177f158277185f68302.asciidoc} (71%) create mode 100644 docs/examples/guide/cd16538654e0f834ff19fe6cf329c398.asciidoc rename docs/examples/guide/{12cb1a87cdd0326cbe5affabdbf2ffe2.asciidoc => d14fe5838fc02224f4b5ade2626d6026.asciidoc} (66%) rename docs/examples/guide/{cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc => df8271648f547673007ecd778341bfc9.asciidoc} (90%) delete mode 100644 docs/examples/guide/e301695a514a13abd98c1fe51360fa85.asciidoc create mode 100644 docs/examples/guide/e551ea38a2d8f8deac110b33304200cc.asciidoc create mode 100644 docs/examples/guide/e6eb414f623566119d4db131a7677a7a.asciidoc delete mode 100644 docs/examples/guide/e80dab3e0314b7dad1bbd75b0956d9fc.asciidoc rename docs/examples/guide/{e8b0d0911b179355435d02fa9057fda8.asciidoc => e930a572e8ddfdecc13498c04007b9e3.asciidoc} (91%) create mode 100644 docs/examples/guide/e9a0b450af6219772631703d602c7092.asciidoc rename docs/examples/guide/{40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc => ea0a5762f297928ea79948250a3624ed.asciidoc} (90%) create mode 100644 docs/examples/guide/ee0fd67acc807f1bddf5e9807c06e7eb.asciidoc create mode 100644 docs/examples/guide/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc create mode 100644 docs/examples/guide/f1cfc64c119b0a30376221d8f23cdd45.asciidoc create mode 100644 docs/examples/guide/f245c4f1f79fb2f6f968278990c2b9dd.asciidoc rename docs/examples/guide/{744aeb2af40f519e430e21e004e3c3b7.asciidoc => f2da3937e5f0718527e6eb73aa261b1f.asciidoc} (87%) rename docs/examples/guide/{dc3c7d755f1d1d0c5973068288017dcb.asciidoc => f49ac80f0130cae8d0ea6f4472a149dd.asciidoc} (87%) diff --git a/docs/examples/guide/04412d11783dac25b5fd2ec5407078a3.asciidoc b/docs/examples/guide/04412d11783dac25b5fd2ec5407078a3.asciidoc new file mode 100644 index 0000000000..70b13f8c28 --- /dev/null +++ b/docs/examples/guide/04412d11783dac25b5fd2ec5407078a3.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.connector.update_api_key_id( + connector_id: 'my-connector', + body: { + api_key_id: 'my-api-key-id', + api_key_secret_id: 'my-connector-secret-id' + } +) +puts response +---- diff --git a/docs/examples/guide/086ec4c5d86bbf80fb80162e94037689.asciidoc b/docs/examples/guide/086ec4c5d86bbf80fb80162e94037689.asciidoc new file mode 100644 index 0000000000..66813eba78 --- /dev/null +++ b/docs/examples/guide/086ec4c5d86bbf80fb80162e94037689.asciidoc @@ -0,0 +1,48 @@ +[source, ruby] +---- +response = client.search( + body: { + query: { + weighted_tokens: { + query_expansion_field: { + tokens: { + "2161": 0.4679, + "2621": 0.307, + "2782": 0.1299, + "2851": 0.1056, + "3088": 0.3041, + "3376": 0.1038, + "3467": 0.4873, + "3684": 0.8958, + "4380": 0.334, + "4542": 0.4636, + "4633": 2.2805, + "4785": 1.2628, + "4860": 1.0655, + "5133": 1.0709, + "7139": 1.0016, + "7224": 0.2486, + "7387": 0.0985, + "7394": 0.0542, + "8915": 0.369, + "9156": 2.8947, + "10505": 0.2771, + "11464": 0.3996, + "13525": 0.0088, + "14178": 0.8161, + "16893": 0.1376, + "17851": 1.5348, + "19939": 0.6012 + }, + pruning_config: { + tokens_freq_ratio_threshold: 5, + tokens_weight_threshold: 0.4, + only_score_pruned_tokens: false + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/0ba5acede9d43af424e85428e7d35420.asciidoc b/docs/examples/guide/0ba5acede9d43af424e85428e7d35420.asciidoc new file mode 100644 index 0000000000..87819a64c9 --- /dev/null +++ b/docs/examples/guide/0ba5acede9d43af424e85428e7d35420.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.ingest.put_pipeline( + id: 'azure_openai_embeddings', + body: { + processors: [ + { + inference: { + model_id: 'azure_openai_embeddings', + input_output: { + input_field: 'content', + output_field: 'content_embedding' + } + } + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/1147a02afa087278e51fa365fb9e06b7.asciidoc b/docs/examples/guide/1147a02afa087278e51fa365fb9e06b7.asciidoc new file mode 100644 index 0000000000..d72c72314b --- /dev/null +++ b/docs/examples/guide/1147a02afa087278e51fa365fb9e06b7.asciidoc @@ -0,0 +1,9 @@ +[source, ruby] +---- +response = client.search( + body: { + size: '1000' + } +) +puts response +---- diff --git a/docs/examples/guide/13ecdf99114098c76b050397d9c3d4e6.asciidoc b/docs/examples/guide/13ecdf99114098c76b050397d9c3d4e6.asciidoc index 857351e8ca..5972158dfe 100644 --- a/docs/examples/guide/13ecdf99114098c76b050397d9c3d4e6.asciidoc +++ b/docs/examples/guide/13ecdf99114098c76b050397d9c3d4e6.asciidoc @@ -2,7 +2,7 @@ ---- response = client.inference.inference( task_type: 'sparse_embedding', - model_id: 'my-elser-model', + inference_id: 'my-elser-model', body: { input: 'The sky above the port was the color of television tuned to a dead channel.' } diff --git a/docs/examples/guide/efa924638043f3a6b23ccb824d757eba.asciidoc b/docs/examples/guide/16fc93f0e9a395d0668483d29e3df9d8.asciidoc similarity index 85% rename from docs/examples/guide/efa924638043f3a6b23ccb824d757eba.asciidoc rename to docs/examples/guide/16fc93f0e9a395d0668483d29e3df9d8.asciidoc index c911487719..5a5410cf7f 100644 --- a/docs/examples/guide/efa924638043f3a6b23ccb824d757eba.asciidoc +++ b/docs/examples/guide/16fc93f0e9a395d0668483d29e3df9d8.asciidoc @@ -27,7 +27,8 @@ puts response response = client.esql.query( body: { - query: 'FROM mv | LIMIT 2' + query: 'FROM mv | LIMIT 2', + version: '2024.04.01' } ) puts response diff --git a/docs/examples/guide/ef175686e1179c4ed8fb96935895b3d0.asciidoc b/docs/examples/guide/186a7143d50e8c3ee01094e1a9ff0c0c.asciidoc similarity index 84% rename from docs/examples/guide/ef175686e1179c4ed8fb96935895b3d0.asciidoc rename to docs/examples/guide/186a7143d50e8c3ee01094e1a9ff0c0c.asciidoc index d0055be72d..05ba3af0e9 100644 --- a/docs/examples/guide/ef175686e1179c4ed8fb96935895b3d0.asciidoc +++ b/docs/examples/guide/186a7143d50e8c3ee01094e1a9ff0c0c.asciidoc @@ -16,7 +16,10 @@ response = client.indices.create( properties: { vector: { type: 'dense_vector', - dims: 2 + dims: 2, + index_options: { + type: 'hnsw' + } }, text: { type: 'text', diff --git a/docs/examples/guide/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc b/docs/examples/guide/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc new file mode 100644 index 0000000000..75b7f4fdaf --- /dev/null +++ b/docs/examples/guide/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc @@ -0,0 +1,34 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'my-index-000002', + body: { + mappings: { + properties: { + metrics: { + subobjects: false, + properties: { + time: { + type: 'object', + properties: { + min: { + type: 'long' + }, + max: { + type: 'long' + } + } + } + } + } + } + } + } +) +puts response + +response = client.indices.get_mapping( + index: 'my-index-000002' +) +puts response +---- diff --git a/docs/examples/guide/dddb6a6ebd145f8411c5b4910d332f87.asciidoc b/docs/examples/guide/1ce2cbfe1430c8837c19304a6b648af3.asciidoc similarity index 52% rename from docs/examples/guide/dddb6a6ebd145f8411c5b4910d332f87.asciidoc rename to docs/examples/guide/1ce2cbfe1430c8837c19304a6b648af3.asciidoc index eca8fa3a9e..ab0394bf90 100644 --- a/docs/examples/guide/dddb6a6ebd145f8411c5b4910d332f87.asciidoc +++ b/docs/examples/guide/1ce2cbfe1430c8837c19304a6b648af3.asciidoc @@ -2,7 +2,8 @@ ---- response = client.esql.query( body: { - query: 'FROM mv | EVAL b + 2, a + b | LIMIT 4' + query: 'FROM mv | EVAL b + 2, a + b | LIMIT 4', + version: '2024.04.01' } ) puts response diff --git a/docs/examples/guide/2212167f67b7ad1cd2b8dcec083d09ea.asciidoc b/docs/examples/guide/2212167f67b7ad1cd2b8dcec083d09ea.asciidoc new file mode 100644 index 0000000000..4fe5f9dc12 --- /dev/null +++ b/docs/examples/guide/2212167f67b7ad1cd2b8dcec083d09ea.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.connector.list( + index_name: 'search-google-drive' +) +puts response +---- diff --git a/docs/examples/guide/22dd833336fa22c8a8f67bb754ffba9a.asciidoc b/docs/examples/guide/22dd833336fa22c8a8f67bb754ffba9a.asciidoc new file mode 100644 index 0000000000..fdce36bfd6 --- /dev/null +++ b/docs/examples/guide/22dd833336fa22c8a8f67bb754ffba9a.asciidoc @@ -0,0 +1,24 @@ +[source, ruby] +---- +response = client.search( + index: 'azure-openai-embeddings', + body: { + knn: { + field: 'content_embedding', + query_vector_builder: { + text_embedding: { + model_id: 'azure_openai_embeddings', + model_text: 'Calculate fuel cost' + } + }, + k: 10, + num_candidates: 100 + }, + _source: [ + 'id', + 'content' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/87457bb3467484bec3e9df4e25942ba6.asciidoc b/docs/examples/guide/2988a112b590ae2320940887125fe36a.asciidoc similarity index 81% rename from docs/examples/guide/87457bb3467484bec3e9df4e25942ba6.asciidoc rename to docs/examples/guide/2988a112b590ae2320940887125fe36a.asciidoc index bfbf834e73..b7074ac60d 100644 --- a/docs/examples/guide/87457bb3467484bec3e9df4e25942ba6.asciidoc +++ b/docs/examples/guide/2988a112b590ae2320940887125fe36a.asciidoc @@ -2,7 +2,8 @@ ---- response = client.esql.query( body: { - query: 'FROM mv | EVAL b=MV_MIN(b) | EVAL b + 2, a + b | LIMIT 4' + query: 'FROM mv | EVAL b=MV_MIN(b) | EVAL b + 2, a + b | LIMIT 4', + version: '2024.04.01' } ) puts response diff --git a/docs/examples/guide/2afdf0d83724953aa2875b5fb37d60cc.asciidoc b/docs/examples/guide/2afdf0d83724953aa2875b5fb37d60cc.asciidoc new file mode 100644 index 0000000000..f146aeb501 --- /dev/null +++ b/docs/examples/guide/2afdf0d83724953aa2875b5fb37d60cc.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.esql.async_query_get( + id: 'FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=', + wait_for_completion_timeout: '30s' +) +puts response +---- diff --git a/docs/examples/guide/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc b/docs/examples/guide/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc new file mode 100644 index 0000000000..d9089312cf --- /dev/null +++ b/docs/examples/guide/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.connector.sync_job_list( + job_type: 'full,incremental' +) +puts response +---- diff --git a/docs/examples/guide/2b7687e3d7c06824950e00618c297864.asciidoc b/docs/examples/guide/2b7687e3d7c06824950e00618c297864.asciidoc new file mode 100644 index 0000000000..ae52726b49 --- /dev/null +++ b/docs/examples/guide/2b7687e3d7c06824950e00618c297864.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.indices.resolve_cluster( + name: 'my-index*,clust*:my-index*' +) +puts response +---- diff --git a/docs/examples/guide/2e93eaaebf75fa4a2451e8a76ffa9f20.asciidoc b/docs/examples/guide/2e93eaaebf75fa4a2451e8a76ffa9f20.asciidoc new file mode 100644 index 0000000000..5588366d70 --- /dev/null +++ b/docs/examples/guide/2e93eaaebf75fa4a2451e8a76ffa9f20.asciidoc @@ -0,0 +1,23 @@ +[source, ruby] +---- +response = client.indices.put_index_template( + name: 'my-data-stream-template', + body: { + index_patterns: [ + 'my-data-stream*' + ], + data_stream: {}, + priority: 500, + template: { + mappings: { + properties: { + message: { + type: 'text' + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/01c0e302f4fd5118faf5e34f4a010ebf.asciidoc b/docs/examples/guide/2f07b81fd47ec3b074242a760f0c4e9e.asciidoc similarity index 52% rename from docs/examples/guide/01c0e302f4fd5118faf5e34f4a010ebf.asciidoc rename to docs/examples/guide/2f07b81fd47ec3b074242a760f0c4e9e.asciidoc index eba384ee21..bc4166eea6 100644 --- a/docs/examples/guide/01c0e302f4fd5118faf5e34f4a010ebf.asciidoc +++ b/docs/examples/guide/2f07b81fd47ec3b074242a760f0c4e9e.asciidoc @@ -1,11 +1,9 @@ [source, ruby] ---- response = client.indices.put_settings( - index: 'my_source_index', + index: 'my-index-000001', body: { - settings: { - 'index.blocks.write' => true - } + 'index.indexing.slowlog.include.user' => true } ) puts response diff --git a/docs/examples/guide/33d480fc6812ada75756cf5337bc9092.asciidoc b/docs/examples/guide/33d480fc6812ada75756cf5337bc9092.asciidoc index 72b2f4150e..0c4a9213ef 100644 --- a/docs/examples/guide/33d480fc6812ada75756cf5337bc9092.asciidoc +++ b/docs/examples/guide/33d480fc6812ada75756cf5337bc9092.asciidoc @@ -1,6 +1,6 @@ [source, ruby] ---- -response = client.connector_sync_job.list( +response = client.connector.sync_job_list( from: 0, size: 2 ) diff --git a/docs/examples/guide/1c5a5a8c0bdc3c577f560157bd4e2313.asciidoc b/docs/examples/guide/34cdeefb09bbbe5206957a8bc1bd513d.asciidoc similarity index 52% rename from docs/examples/guide/1c5a5a8c0bdc3c577f560157bd4e2313.asciidoc rename to docs/examples/guide/34cdeefb09bbbe5206957a8bc1bd513d.asciidoc index eba384ee21..fdf9888c07 100644 --- a/docs/examples/guide/1c5a5a8c0bdc3c577f560157bd4e2313.asciidoc +++ b/docs/examples/guide/34cdeefb09bbbe5206957a8bc1bd513d.asciidoc @@ -1,11 +1,9 @@ [source, ruby] ---- response = client.indices.put_settings( - index: 'my_source_index', + index: 'my-index-000001', body: { - settings: { - 'index.blocks.write' => true - } + 'index.search.slowlog.include.user' => true } ) puts response diff --git a/docs/examples/guide/357edc9d10e98ed776401c7a439a1a55.asciidoc b/docs/examples/guide/357edc9d10e98ed776401c7a439a1a55.asciidoc new file mode 100644 index 0000000000..3b7da07c1a --- /dev/null +++ b/docs/examples/guide/357edc9d10e98ed776401c7a439a1a55.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.indices.resolve_cluster( + name: 'not-present,clust*:my-index*,oldcluster:*', + ignore_unavailable: false +) +puts response +---- diff --git a/docs/examples/guide/360b3cef34bbddc5d9579ca95f0cb061.asciidoc b/docs/examples/guide/360b3cef34bbddc5d9579ca95f0cb061.asciidoc new file mode 100644 index 0000000000..ea8c543dfd --- /dev/null +++ b/docs/examples/guide/360b3cef34bbddc5d9579ca95f0cb061.asciidoc @@ -0,0 +1,15 @@ +[source, ruby] +---- +response = client.indices.put_mapping( + index: 'my-data-stream', + write_index_only: true, + body: { + properties: { + message: { + type: 'text' + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/365256ebdfa47b449780771d9beba8d9.asciidoc b/docs/examples/guide/365256ebdfa47b449780771d9beba8d9.asciidoc index 226c34ee7d..4953bdb2e7 100644 --- a/docs/examples/guide/365256ebdfa47b449780771d9beba8d9.asciidoc +++ b/docs/examples/guide/365256ebdfa47b449780771d9beba8d9.asciidoc @@ -1,6 +1,6 @@ [source, ruby] ---- -response = client.connector_sync_job.check_in( +response = client.connector.sync_job_check_in( connector_sync_job_id: 'my-connector-sync-job' ) puts response diff --git a/docs/examples/guide/370b297ed3433577adf53e64f572d89d.asciidoc b/docs/examples/guide/370b297ed3433577adf53e64f572d89d.asciidoc index 0f8fbcd7ea..fdf6818555 100644 --- a/docs/examples/guide/370b297ed3433577adf53e64f572d89d.asciidoc +++ b/docs/examples/guide/370b297ed3433577adf53e64f572d89d.asciidoc @@ -1,6 +1,6 @@ [source, ruby] ---- -response = client.connector_sync_job.delete( +response = client.connector.sync_job_delete( connector_sync_job_id: 'my-connector-sync-job-id' ) puts response diff --git a/docs/examples/guide/394d8fc4d78214e6fe5e4dea62c8923f.asciidoc b/docs/examples/guide/394d8fc4d78214e6fe5e4dea62c8923f.asciidoc new file mode 100644 index 0000000000..b2e2aa4eba --- /dev/null +++ b/docs/examples/guide/394d8fc4d78214e6fe5e4dea62c8923f.asciidoc @@ -0,0 +1,41 @@ +[source, ruby] +---- +response = client.connector.update_configuration( + connector_id: 'my-spo-connector', + body: { + configuration: { + client_id: { + default_value: nil, + depends_on: [], + display: 'text', + label: 'Client ID', + options: [], + order: 3, + required: true, + sensitive: false, + tooltip: nil, + type: 'str', + ui_restrictions: [], + validations: [], + value: nil + }, + secret_value: { + default_value: nil, + depends_on: [], + display: 'text', + label: 'Secret value', + options: [], + order: 4, + required: true, + sensitive: true, + tooltip: nil, + type: 'str', + ui_restrictions: [], + validations: [], + value: nil + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/3a7a6ab88a49b484fafb10c8eb09b562.asciidoc b/docs/examples/guide/3a7a6ab88a49b484fafb10c8eb09b562.asciidoc new file mode 100644 index 0000000000..5d641117d6 --- /dev/null +++ b/docs/examples/guide/3a7a6ab88a49b484fafb10c8eb09b562.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.ingest.put_pipeline( + id: 'cohere_embeddings', + body: { + processors: [ + { + inference: { + model_id: 'cohere_embeddings', + input_output: { + input_field: 'content', + output_field: 'content_embedding' + } + } + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/3e4227250d49e81df48773f8ba803ea7.asciidoc b/docs/examples/guide/3e4227250d49e81df48773f8ba803ea7.asciidoc new file mode 100644 index 0000000000..b1a1e477b1 --- /dev/null +++ b/docs/examples/guide/3e4227250d49e81df48773f8ba803ea7.asciidoc @@ -0,0 +1,14 @@ +[source, ruby] +---- +response = client.indices.put_mapping( + index: 'my-data-stream', + body: { + properties: { + message: { + type: 'text' + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc b/docs/examples/guide/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc new file mode 100644 index 0000000000..a8873e82b4 --- /dev/null +++ b/docs/examples/guide/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.esql.async_query_get( + id: 'FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=' +) +puts response +---- diff --git a/docs/examples/guide/405ac843a9156d3cab374e199cac87fb.asciidoc b/docs/examples/guide/405ac843a9156d3cab374e199cac87fb.asciidoc index abaa0f805b..14e1ae08cf 100644 --- a/docs/examples/guide/405ac843a9156d3cab374e199cac87fb.asciidoc +++ b/docs/examples/guide/405ac843a9156d3cab374e199cac87fb.asciidoc @@ -1,6 +1,6 @@ [source, ruby] ---- -response = client.connector_sync_job.post( +response = client.connector.sync_job_post( body: { id: 'connector-id', job_type: 'full', diff --git a/docs/examples/guide/42ba7c1d13aee91fe6f0a8a42c30eb74.asciidoc b/docs/examples/guide/42ba7c1d13aee91fe6f0a8a42c30eb74.asciidoc new file mode 100644 index 0000000000..0fa4e9159d --- /dev/null +++ b/docs/examples/guide/42ba7c1d13aee91fe6f0a8a42c30eb74.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.indices.rollover( + alias: 'my-data-stream', + lazy: true +) +puts response +---- diff --git a/docs/examples/guide/430705509f8367aef92be413f702520b.asciidoc b/docs/examples/guide/430705509f8367aef92be413f702520b.asciidoc new file mode 100644 index 0000000000..50cefc667e --- /dev/null +++ b/docs/examples/guide/430705509f8367aef92be413f702520b.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.connector.update_status( + connector_id: 'my-connector', + body: { + status: 'needs_configuration' + } +) +puts response +---- diff --git a/docs/examples/guide/43e86fbaeed068dcc981214338559b5a.asciidoc b/docs/examples/guide/43e86fbaeed068dcc981214338559b5a.asciidoc new file mode 100644 index 0000000000..ae3738c9fe --- /dev/null +++ b/docs/examples/guide/43e86fbaeed068dcc981214338559b5a.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.indices.resolve_cluster( + name: 'my-index-*,cluster*:my-index-*' +) +puts response +---- diff --git a/docs/examples/guide/443f0e8fbba83777b2df624879d188d5.asciidoc b/docs/examples/guide/443f0e8fbba83777b2df624879d188d5.asciidoc new file mode 100644 index 0000000000..15426aec49 --- /dev/null +++ b/docs/examples/guide/443f0e8fbba83777b2df624879d188d5.asciidoc @@ -0,0 +1,17 @@ +[source, ruby] +---- +response = client.reindex( + wait_for_completion: false, + body: { + source: { + index: 'test-data', + size: 50 + }, + dest: { + index: 'azure-openai-embeddings', + pipeline: 'azure_openai_embeddings' + } + } +) +puts response +---- diff --git a/docs/examples/guide/452a61fecda86dd5539451dd57ec73a9.asciidoc b/docs/examples/guide/452a61fecda86dd5539451dd57ec73a9.asciidoc new file mode 100644 index 0000000000..764336f6de --- /dev/null +++ b/docs/examples/guide/452a61fecda86dd5539451dd57ec73a9.asciidoc @@ -0,0 +1,36 @@ +[source, ruby] +---- +response = client.search( + index: 'my-image-index', + body: { + size: 3, + query: { + bool: { + should: [ + { + match: { + title: { + query: 'mountain lake', + boost: 1 + } + } + }, + { + knn: { + field: 'image-vector', + query_vector: [ + -5, + 9, + -12 + ], + num_candidates: 10, + boost: 2 + } + } + ] + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/46103fee3cd5f53dc75123def82d52ad.asciidoc b/docs/examples/guide/46103fee3cd5f53dc75123def82d52ad.asciidoc new file mode 100644 index 0000000000..29176ceb6c --- /dev/null +++ b/docs/examples/guide/46103fee3cd5f53dc75123def82d52ad.asciidoc @@ -0,0 +1,19 @@ +[source, ruby] +---- +response = client.indices.put_index_template( + name: 'my-data-stream-template', + body: { + index_patterns: [ + 'my-data-stream*' + ], + data_stream: {}, + priority: 500, + template: { + settings: { + 'index.refresh_interval' => '30s' + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/4be20da16d2b58216e8b307218c7bf3a.asciidoc b/docs/examples/guide/4be20da16d2b58216e8b307218c7bf3a.asciidoc new file mode 100644 index 0000000000..8410d14978 --- /dev/null +++ b/docs/examples/guide/4be20da16d2b58216e8b307218c7bf3a.asciidoc @@ -0,0 +1,28 @@ +[source, ruby] +---- +response = client.indices.put_index_template( + name: 'my-data-stream-template', + body: { + index_patterns: [ + 'my-data-stream*' + ], + data_stream: {}, + priority: 500, + template: { + mappings: { + properties: { + host: { + properties: { + ip: { + type: 'ip', + ignore_malformed: true + } + } + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/4e3414fc712b16311f9e433dd366f49d.asciidoc b/docs/examples/guide/4e3414fc712b16311f9e433dd366f49d.asciidoc index 25434b2366..93ead6685d 100644 --- a/docs/examples/guide/4e3414fc712b16311f9e433dd366f49d.asciidoc +++ b/docs/examples/guide/4e3414fc712b16311f9e433dd366f49d.asciidoc @@ -2,7 +2,7 @@ ---- response = client.inference.delete_model( task_type: 'sparse_embedding', - model_id: 'my-elser-model' + inference_id: 'my-elser-model' ) puts response ---- diff --git a/docs/examples/guide/4fcca1687d7b2cf08de526539fea5a76.asciidoc b/docs/examples/guide/4fcca1687d7b2cf08de526539fea5a76.asciidoc new file mode 100644 index 0000000000..43ce1972c3 --- /dev/null +++ b/docs/examples/guide/4fcca1687d7b2cf08de526539fea5a76.asciidoc @@ -0,0 +1,43 @@ +[source, ruby] +---- +response = client.search( + index: 'my-index', + body: { + query: { + bool: { + should: [ + { + text_expansion: { + 'ml.inference.title_expanded.predicted_value' => { + model_id: '.elser_model_2', + model_text: 'How is the weather in Jamaica?', + boost: 1 + } + } + }, + { + text_expansion: { + 'ml.inference.description_expanded.predicted_value' => { + model_id: '.elser_model_2', + model_text: 'How is the weather in Jamaica?', + boost: 1 + } + } + }, + { + multi_match: { + query: 'How is the weather in Jamaica?', + fields: [ + 'title', + 'description' + ], + boost: 4 + } + } + ] + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/4aa510f34a0358fecc8d764dd099b843.asciidoc b/docs/examples/guide/52a2d119addb15366a935115518335fd.asciidoc similarity index 85% rename from docs/examples/guide/4aa510f34a0358fecc8d764dd099b843.asciidoc rename to docs/examples/guide/52a2d119addb15366a935115518335fd.asciidoc index ee021d671f..26c940ad2d 100644 --- a/docs/examples/guide/4aa510f34a0358fecc8d764dd099b843.asciidoc +++ b/docs/examples/guide/52a2d119addb15366a935115518335fd.asciidoc @@ -5,8 +5,7 @@ response = client.indices.put_settings( body: { settings: { 'index.number_of_replicas' => 0, - 'index.routing.allocation.require._name' => 'shrink_node_name', - 'index.blocks.write' => true + 'index.routing.allocation.require._name' => 'shrink_node_name' } } ) diff --git a/docs/examples/guide/543c3a77880adf281099df1a41f6b96a.asciidoc b/docs/examples/guide/543c3a77880adf281099df1a41f6b96a.asciidoc new file mode 100644 index 0000000000..d38d8a9c06 --- /dev/null +++ b/docs/examples/guide/543c3a77880adf281099df1a41f6b96a.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.esql.query( + body: { + locale: 'fr-FR', + query: "\n ROW birth_date_string = \"2023-01-15T00:00:00.000Z\"\n | EVAL birth_date = date_parse(birth_date_string)\n | EVAL month_of_birth = DATE_FORMAT(\"MMMM\",birth_date)\n | LIMIT 5\n ", + version: '2024.04.01' + } +) +puts response +---- diff --git a/docs/examples/guide/62e073b6b8ef533b5f3551bad623c070.asciidoc b/docs/examples/guide/5a006feed86309b547bbaa1baca1c496.asciidoc similarity index 56% rename from docs/examples/guide/62e073b6b8ef533b5f3551bad623c070.asciidoc rename to docs/examples/guide/5a006feed86309b547bbaa1baca1c496.asciidoc index 7aba03f82b..d502847953 100644 --- a/docs/examples/guide/62e073b6b8ef533b5f3551bad623c070.asciidoc +++ b/docs/examples/guide/5a006feed86309b547bbaa1baca1c496.asciidoc @@ -5,6 +5,19 @@ response = client.indices.create( body: { mappings: { dynamic_templates: [ + { + numeric_counts: { + match_mapping_type: [ + 'long', + 'double' + ], + match: 'count', + mapping: { + type: '{dynamic_type}', + index: false + } + } + }, { integers: { match_mapping_type: 'long', @@ -26,6 +39,15 @@ response = client.indices.create( } } } + }, + { + non_objects_keyword: { + match_mapping_type: '*', + unmatch_mapping_type: 'object', + mapping: { + type: 'keyword' + } + } } ] } @@ -38,7 +60,11 @@ response = client.index( id: 1, body: { my_integer: 5, - my_string: 'Some string' + my_string: 'Some string', + my_boolean: 'false', + field: { + count: 4 + } } ) puts response diff --git a/docs/examples/guide/5c7ece1f30267adabdb832424871900a.asciidoc b/docs/examples/guide/5c7ece1f30267adabdb832424871900a.asciidoc new file mode 100644 index 0000000000..ae6b0b230b --- /dev/null +++ b/docs/examples/guide/5c7ece1f30267adabdb832424871900a.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.cat.allocation( + v: true +) +puts response +---- diff --git a/docs/examples/guide/6606d46685d10377b996b5f20f1229b5.asciidoc b/docs/examples/guide/6606d46685d10377b996b5f20f1229b5.asciidoc new file mode 100644 index 0000000000..53dc0cf460 --- /dev/null +++ b/docs/examples/guide/6606d46685d10377b996b5f20f1229b5.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.connector.update_index_name( + connector_id: 'my-connector', + body: { + index_name: 'data-from-my-google-drive' + } +) +puts response +---- diff --git a/docs/examples/guide/682336e5232c9ad3d866cb203d1c58c1.asciidoc b/docs/examples/guide/682336e5232c9ad3d866cb203d1c58c1.asciidoc new file mode 100644 index 0000000000..e8846eef91 --- /dev/null +++ b/docs/examples/guide/682336e5232c9ad3d866cb203d1c58c1.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'azure-openai-embeddings', + body: { + mappings: { + properties: { + content_embedding: { + type: 'dense_vector', + dims: 1536, + element_type: 'float', + similarity: 'dot_product' + }, + content: { + type: 'text' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/6843d859e2965d17cad4f033c81db83f.asciidoc b/docs/examples/guide/6843d859e2965d17cad4f033c81db83f.asciidoc new file mode 100644 index 0000000000..2ee2a2cd46 --- /dev/null +++ b/docs/examples/guide/6843d859e2965d17cad4f033c81db83f.asciidoc @@ -0,0 +1,24 @@ +[source, ruby] +---- +response = client.indices.put_index_template( + name: 'my-data-stream-template', + body: { + index_patterns: [ + 'my-data-stream*' + ], + data_stream: {}, + priority: 500, + template: { + settings: { + 'sort.field' => [ + '@timestamp' + ], + 'sort.order' => [ + 'desc' + ] + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/692606cc6d6462becc321d92961a3bac.asciidoc b/docs/examples/guide/692606cc6d6462becc321d92961a3bac.asciidoc new file mode 100644 index 0000000000..5c2ccaeef8 --- /dev/null +++ b/docs/examples/guide/692606cc6d6462becc321d92961a3bac.asciidoc @@ -0,0 +1,13 @@ +[source, ruby] +---- +response = client.text_structure.test_grok_pattern( + body: { + grok_pattern: 'Hello %{WORD:first_name} %{WORD:last_name}', + text: [ + 'Hello John Doe', + 'this does not match' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc b/docs/examples/guide/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc index b0c88741cb..d3fd22a7a7 100644 --- a/docs/examples/guide/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc +++ b/docs/examples/guide/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc @@ -1,6 +1,6 @@ [source, ruby] ---- -response = client.connector_sync_job.list( +response = client.connector.sync_job_list( status: 'pending' ) puts response diff --git a/docs/examples/guide/77518e8c6198acfe77c0934fd2fe65cb.asciidoc b/docs/examples/guide/77518e8c6198acfe77c0934fd2fe65cb.asciidoc new file mode 100644 index 0000000000..ea938fe04b --- /dev/null +++ b/docs/examples/guide/77518e8c6198acfe77c0934fd2fe65cb.asciidoc @@ -0,0 +1,32 @@ +[source, ruby] +---- +response = client.text_structure.find_message_structure( + body: { + messages: [ + '[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128', + '[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]', + '[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]', + '[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]', + '[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]', + '[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]', + '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]', + '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]', + '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]', + '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]', + '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]', + '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]', + '[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]', + '[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]', + '[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]', + '[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled', + '[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled', + '[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled', + '[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]', + '[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]', + '[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized', + '[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc b/docs/examples/guide/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc new file mode 100644 index 0000000000..b8e9fdf7cc --- /dev/null +++ b/docs/examples/guide/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc @@ -0,0 +1,22 @@ +[source, ruby] +---- +response = client.indices.update_aliases( + body: { + actions: [ + { + remove: { + index: 'index1', + alias: 'logs-non-existing' + } + }, + { + add: { + index: 'index2', + alias: 'logs-non-existing' + } + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/84490ee2c6c07dbd2101ce2e3751e1aa.asciidoc b/docs/examples/guide/84490ee2c6c07dbd2101ce2e3751e1aa.asciidoc new file mode 100644 index 0000000000..c3f423d9bf --- /dev/null +++ b/docs/examples/guide/84490ee2c6c07dbd2101ce2e3751e1aa.asciidoc @@ -0,0 +1,17 @@ +[source, ruby] +---- +response = client.reindex( + wait_for_completion: false, + body: { + source: { + index: 'test-data', + size: 50 + }, + dest: { + index: 'cohere-embeddings', + pipeline: 'cohere_embeddings' + } + } +) +puts response +---- diff --git a/docs/examples/guide/856c10ad554c26b70f1121454caff40a.asciidoc b/docs/examples/guide/856c10ad554c26b70f1121454caff40a.asciidoc new file mode 100644 index 0000000000..f0ffaae57a --- /dev/null +++ b/docs/examples/guide/856c10ad554c26b70f1121454caff40a.asciidoc @@ -0,0 +1,18 @@ +[source, ruby] +---- +response = client.search( + index: 'byte-image-index', + body: { + knn: { + field: 'byte-image-vector', + query_vector: 'fb09', + k: 10, + num_candidates: 100 + }, + fields: [ + 'title' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/89d2a3748dc14c6d5d4c6f94b9b03938.asciidoc b/docs/examples/guide/89d2a3748dc14c6d5d4c6f94b9b03938.asciidoc new file mode 100644 index 0000000000..70ef33abaf --- /dev/null +++ b/docs/examples/guide/89d2a3748dc14c6d5d4c6f94b9b03938.asciidoc @@ -0,0 +1,8 @@ +[source, ruby] +---- +response = client.indices.add_block( + index: 'my_source_index', + block: 'write' +) +puts response +---- diff --git a/docs/examples/guide/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc b/docs/examples/guide/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc index 67333da3bb..ba63948337 100644 --- a/docs/examples/guide/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc +++ b/docs/examples/guide/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc @@ -1,6 +1,6 @@ [source, ruby] ---- -response = client.connector_sync_job.error( +response = client.connector.sync_job_error( connector_sync_job_id: 'my-connector-sync-job', body: { error: 'some-error' diff --git a/docs/examples/guide/8c619666488927dac6ecb7dcebca44c2.asciidoc b/docs/examples/guide/8c619666488927dac6ecb7dcebca44c2.asciidoc new file mode 100644 index 0000000000..623878106b --- /dev/null +++ b/docs/examples/guide/8c619666488927dac6ecb7dcebca44c2.asciidoc @@ -0,0 +1,21 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'cohere-embeddings', + body: { + mappings: { + properties: { + content_embedding: { + type: 'dense_vector', + dims: 1024, + element_type: 'byte' + }, + content: { + type: 'text' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/90083d93e46fad2524755b8d4d1306fc.asciidoc b/docs/examples/guide/90083d93e46fad2524755b8d4d1306fc.asciidoc index 65d23a7431..06608f987c 100644 --- a/docs/examples/guide/90083d93e46fad2524755b8d4d1306fc.asciidoc +++ b/docs/examples/guide/90083d93e46fad2524755b8d4d1306fc.asciidoc @@ -1,6 +1,6 @@ [source, ruby] ---- -response = client.connector_sync_job.update_stats( +response = client.connector.sync_job_update_stats( connector_sync_job_id: 'my-connector-sync-job', body: { deleted_document_count: 10, diff --git a/docs/examples/guide/2cafbc456bed3b7c8780e5557aab1d6b.asciidoc b/docs/examples/guide/93cca1eb4d9ee4c65ab259e18469d9d6.asciidoc similarity index 100% rename from docs/examples/guide/2cafbc456bed3b7c8780e5557aab1d6b.asciidoc rename to docs/examples/guide/93cca1eb4d9ee4c65ab259e18469d9d6.asciidoc diff --git a/docs/examples/guide/93cd0fdd5ca22838db06aa1cabdbe8bd.asciidoc b/docs/examples/guide/93cd0fdd5ca22838db06aa1cabdbe8bd.asciidoc new file mode 100644 index 0000000000..6c8e28514c --- /dev/null +++ b/docs/examples/guide/93cd0fdd5ca22838db06aa1cabdbe8bd.asciidoc @@ -0,0 +1,24 @@ +[source, ruby] +---- +response = client.search( + index: 'hugging-face-embeddings', + body: { + knn: { + field: 'content_embedding', + query_vector_builder: { + text_embedding: { + model_id: 'hugging_face_embeddings', + model_text: "What's margin of error?" + } + }, + k: 10, + num_candidates: 100 + }, + _source: [ + 'id', + 'content' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc b/docs/examples/guide/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc index 1192f98675..bb0b6a0db3 100644 --- a/docs/examples/guide/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc +++ b/docs/examples/guide/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc @@ -1,6 +1,6 @@ [source, ruby] ---- -response = client.connector_sync_job.cancel( +response = client.connector.sync_job_cancel( connector_sync_job_id: 'my-connector-sync-job-id' ) puts response diff --git a/docs/examples/guide/a4a3c3cd09efa75168dab90105afb2e9.asciidoc b/docs/examples/guide/a4a3c3cd09efa75168dab90105afb2e9.asciidoc index dd0de3c74e..e6a4f843ab 100644 --- a/docs/examples/guide/a4a3c3cd09efa75168dab90105afb2e9.asciidoc +++ b/docs/examples/guide/a4a3c3cd09efa75168dab90105afb2e9.asciidoc @@ -2,7 +2,7 @@ ---- response = client.inference.get_model( task_type: 'sparse_embedding', - model_id: 'my-elser-model' + inference_id: 'my-elser-model' ) puts response ---- diff --git a/docs/examples/guide/e885c28e6a1ff3cc20aaa5543d84f83e.asciidoc b/docs/examples/guide/ad2b8aed84c67cdc295917b47a12d3dc.asciidoc similarity index 75% rename from docs/examples/guide/e885c28e6a1ff3cc20aaa5543d84f83e.asciidoc rename to docs/examples/guide/ad2b8aed84c67cdc295917b47a12d3dc.asciidoc index a63df7e5e1..1e3b94b96d 100644 --- a/docs/examples/guide/e885c28e6a1ff3cc20aaa5543d84f83e.asciidoc +++ b/docs/examples/guide/ad2b8aed84c67cdc295917b47a12d3dc.asciidoc @@ -15,7 +15,8 @@ response = client.bulk( 5, -20 ], - "file-type": 'jpg' + "file-type": 'jpg', + title: 'mountain lake' }, { index: { @@ -28,7 +29,8 @@ response = client.bulk( 8, -15 ], - "file-type": 'png' + "file-type": 'png', + title: 'frozen lake' }, { index: { @@ -41,7 +43,8 @@ response = client.bulk( 11, 23 ], - "file-type": 'jpg' + "file-type": 'jpg', + title: 'mountain lake lodge' } ] ) diff --git a/docs/examples/guide/b45a8c6fc746e9c90fd181e69a605fad.asciidoc b/docs/examples/guide/b45a8c6fc746e9c90fd181e69a605fad.asciidoc new file mode 100644 index 0000000000..404b498679 --- /dev/null +++ b/docs/examples/guide/b45a8c6fc746e9c90fd181e69a605fad.asciidoc @@ -0,0 +1,11 @@ +[source, ruby] +---- +response = client.inference.inference( + task_type: 'completion', + inference_id: 'openai_chat_completions', + body: { + input: 'What is Elastic?' + } +) +puts response +---- diff --git a/docs/examples/guide/b468d0124dc485385a34504d5b7af82a.asciidoc b/docs/examples/guide/b468d0124dc485385a34504d5b7af82a.asciidoc new file mode 100644 index 0000000000..ba765740ff --- /dev/null +++ b/docs/examples/guide/b468d0124dc485385a34504d5b7af82a.asciidoc @@ -0,0 +1,17 @@ +[source, ruby] +---- +response = client.reindex( + wait_for_completion: false, + body: { + source: { + index: 'test-data', + size: 50 + }, + dest: { + index: 'hugging-face-embeddings', + pipeline: 'hugging_face_embeddings' + } + } +) +puts response +---- diff --git a/docs/examples/guide/b4693f2aa9fa65db04ab2499355c54fc.asciidoc b/docs/examples/guide/b4693f2aa9fa65db04ab2499355c54fc.asciidoc new file mode 100644 index 0000000000..0b81c86c08 --- /dev/null +++ b/docs/examples/guide/b4693f2aa9fa65db04ab2499355c54fc.asciidoc @@ -0,0 +1,24 @@ +[source, ruby] +---- +response = client.search( + index: 'cohere-embeddings', + body: { + knn: { + field: 'content_embedding', + query_vector_builder: { + text_embedding: { + model_id: 'cohere_embeddings', + model_text: 'Muscles in human body' + } + }, + k: 10, + num_candidates: 100 + }, + _source: [ + 'id', + 'content' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc b/docs/examples/guide/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc new file mode 100644 index 0000000000..3fecc83c71 --- /dev/null +++ b/docs/examples/guide/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc @@ -0,0 +1,191 @@ +[source, ruby] +---- +response = client.bulk( + refresh: true, + body: [ + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized' + }, + { + index: { + _index: 'test-logs' + } + }, + { + message: '[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...' + } + ] +) +puts response + +response = client.text_structure.find_field_structure( + index: 'test-logs', + field: 'message' +) +puts response +---- diff --git a/docs/examples/guide/bc2feb70658f028d5d0418ae4ac9662f.asciidoc b/docs/examples/guide/bc2feb70658f028d5d0418ae4ac9662f.asciidoc deleted file mode 100644 index 4e19205736..0000000000 --- a/docs/examples/guide/bc2feb70658f028d5d0418ae4ac9662f.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.connector.update_configuration( - connector_id: 'my-connector', - body: { - configuration: { - service_account_credentials: { - default_value: nil, - depends_on: [], - display: 'textarea', - label: 'Google Drive service account JSON', - options: [], - order: 1, - required: true, - sensitive: true, - tooltip: 'This connectors authenticates as a service account to synchronize content from Google Drive.', - type: 'str', - ui_restrictions: [], - validations: [], - value: '...service account JSON...' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/be30ea12f605fd61acba689b68e00bbe.asciidoc b/docs/examples/guide/be30ea12f605fd61acba689b68e00bbe.asciidoc new file mode 100644 index 0000000000..4ceb3acb11 --- /dev/null +++ b/docs/examples/guide/be30ea12f605fd61acba689b68e00bbe.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.ingest.put_pipeline( + id: 'hugging_face_embeddings', + body: { + processors: [ + { + inference: { + model_id: 'hugging_face_embeddings', + input_output: { + input_field: 'content', + output_field: 'content_embedding' + } + } + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/c0220f749b260889bebc567533a01c3f.asciidoc b/docs/examples/guide/c0220f749b260889bebc567533a01c3f.asciidoc new file mode 100644 index 0000000000..e90d2ed108 --- /dev/null +++ b/docs/examples/guide/c0220f749b260889bebc567533a01c3f.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.connector.list( + service_type: 'sharepoint_online,google_drive' +) +puts response +---- diff --git a/docs/examples/guide/c12d6e962f083c728f9397932f05202e.asciidoc b/docs/examples/guide/c12d6e962f083c728f9397932f05202e.asciidoc index e0e1e833c0..af049b4a60 100644 --- a/docs/examples/guide/c12d6e962f083c728f9397932f05202e.asciidoc +++ b/docs/examples/guide/c12d6e962f083c728f9397932f05202e.asciidoc @@ -1,6 +1,6 @@ [source, ruby] ---- -response = client.connector_sync_job.list( +response = client.connector.sync_job_list( connector_id: 'connector-1' ) puts response diff --git a/docs/examples/guide/c21eb4bc30087188241cbba6b6b89999.asciidoc b/docs/examples/guide/c21eb4bc30087188241cbba6b6b89999.asciidoc new file mode 100644 index 0000000000..8d2f8d4065 --- /dev/null +++ b/docs/examples/guide/c21eb4bc30087188241cbba6b6b89999.asciidoc @@ -0,0 +1,10 @@ +[source, ruby] +---- +response = client.connector.update_service_type( + connector_id: 'my-connector', + body: { + service_type: 'sharepoint_online' + } +) +puts response +---- diff --git a/docs/examples/guide/2da48241cfc21d2c57dc970845470bda.asciidoc b/docs/examples/guide/c9a6ab0a56bb0177f158277185f68302.asciidoc similarity index 71% rename from docs/examples/guide/2da48241cfc21d2c57dc970845470bda.asciidoc rename to docs/examples/guide/c9a6ab0a56bb0177f158277185f68302.asciidoc index 89f6a74419..b740ab6108 100644 --- a/docs/examples/guide/2da48241cfc21d2c57dc970845470bda.asciidoc +++ b/docs/examples/guide/c9a6ab0a56bb0177f158277185f68302.asciidoc @@ -7,7 +7,18 @@ response = client.indices.create( properties: { metrics: { type: 'object', - subobjects: false + subobjects: false, + properties: { + time: { + type: 'long' + }, + 'time.min' => { + type: 'long' + }, + 'time.max' => { + type: 'long' + } + } } } } diff --git a/docs/examples/guide/cd16538654e0f834ff19fe6cf329c398.asciidoc b/docs/examples/guide/cd16538654e0f834ff19fe6cf329c398.asciidoc new file mode 100644 index 0000000000..c385c2be7d --- /dev/null +++ b/docs/examples/guide/cd16538654e0f834ff19fe6cf329c398.asciidoc @@ -0,0 +1,21 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'hugging-face-embeddings', + body: { + mappings: { + properties: { + content_embedding: { + type: 'dense_vector', + dims: 768, + element_type: 'float' + }, + content: { + type: 'text' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc b/docs/examples/guide/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc index 4db8dce241..6e9f003a13 100644 --- a/docs/examples/guide/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc +++ b/docs/examples/guide/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc @@ -1,5 +1,5 @@ [source, ruby] ---- -response = client.connector_sync_job.list +response = client.connector.sync_job_list puts response ---- diff --git a/docs/examples/guide/12cb1a87cdd0326cbe5affabdbf2ffe2.asciidoc b/docs/examples/guide/d14fe5838fc02224f4b5ade2626d6026.asciidoc similarity index 66% rename from docs/examples/guide/12cb1a87cdd0326cbe5affabdbf2ffe2.asciidoc rename to docs/examples/guide/d14fe5838fc02224f4b5ade2626d6026.asciidoc index f2bea9e76d..2560f1c381 100644 --- a/docs/examples/guide/12cb1a87cdd0326cbe5affabdbf2ffe2.asciidoc +++ b/docs/examples/guide/d14fe5838fc02224f4b5ade2626d6026.asciidoc @@ -1,7 +1,8 @@ [source, ruby] ---- response = client.ilm.explain_lifecycle( - index: 'my-index-000001' + index: 'my-index-000001', + human: true ) puts response ---- diff --git a/docs/examples/guide/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc b/docs/examples/guide/df8271648f547673007ecd778341bfc9.asciidoc similarity index 90% rename from docs/examples/guide/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc rename to docs/examples/guide/df8271648f547673007ecd778341bfc9.asciidoc index 9e4cc27f6e..430bbd5b72 100644 --- a/docs/examples/guide/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc +++ b/docs/examples/guide/df8271648f547673007ecd778341bfc9.asciidoc @@ -45,7 +45,8 @@ puts response response = client.esql.query( body: { - query: 'FROM mv | LIMIT 2' + query: 'FROM mv | LIMIT 2', + version: '2024.04.01' } ) puts response diff --git a/docs/examples/guide/e301695a514a13abd98c1fe51360fa85.asciidoc b/docs/examples/guide/e301695a514a13abd98c1fe51360fa85.asciidoc deleted file mode 100644 index 33042f946b..0000000000 --- a/docs/examples/guide/e301695a514a13abd98c1fe51360fa85.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-0001', - body: { - properties: { - 'ml.inference.summary.predicted_value' => { - type: 'dense_vector', - dims: 768, - index: true, - similarity: 'dot_product' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e551ea38a2d8f8deac110b33304200cc.asciidoc b/docs/examples/guide/e551ea38a2d8f8deac110b33304200cc.asciidoc new file mode 100644 index 0000000000..33b81209a1 --- /dev/null +++ b/docs/examples/guide/e551ea38a2d8f8deac110b33304200cc.asciidoc @@ -0,0 +1,27 @@ +[source, ruby] +---- +response = client.search( + index: 'my-index', + body: { + query: { + multi_match: { + fields: [ + 'title', + 'content' + ], + query: 'the quick brown fox' + } + }, + rescore: { + learning_to_rank: { + model_id: 'ltr-model', + params: { + query_text: 'the quick brown fox' + } + }, + window_size: 100 + } + } +) +puts response +---- diff --git a/docs/examples/guide/e6eb414f623566119d4db131a7677a7a.asciidoc b/docs/examples/guide/e6eb414f623566119d4db131a7677a7a.asciidoc new file mode 100644 index 0000000000..5187c899cf --- /dev/null +++ b/docs/examples/guide/e6eb414f623566119d4db131a7677a7a.asciidoc @@ -0,0 +1,12 @@ +[source, ruby] +---- +response = client.connector.update_configuration( + connector_id: 'my-spo-connector', + body: { + values: { + secret_value: 'new-super-secret-value' + } + } +) +puts response +---- diff --git a/docs/examples/guide/e80dab3e0314b7dad1bbd75b0956d9fc.asciidoc b/docs/examples/guide/e80dab3e0314b7dad1bbd75b0956d9fc.asciidoc deleted file mode 100644 index e659f26462..0000000000 --- a/docs/examples/guide/e80dab3e0314b7dad1bbd75b0956d9fc.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'passage_vectors', - body: { - fields: [ - 'creation_time', - 'full_text' - ], - _source: false, - knn: { - query_vector: [ - 0.45, - 45 - ], - field: 'paragraph.vector', - k: 2, - num_candidates: 2, - inner_hits: { - _source: false, - fields: [ - 'paragraph.text' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e8b0d0911b179355435d02fa9057fda8.asciidoc b/docs/examples/guide/e930a572e8ddfdecc13498c04007b9e3.asciidoc similarity index 91% rename from docs/examples/guide/e8b0d0911b179355435d02fa9057fda8.asciidoc rename to docs/examples/guide/e930a572e8ddfdecc13498c04007b9e3.asciidoc index 0456abf509..74197fa382 100644 --- a/docs/examples/guide/e8b0d0911b179355435d02fa9057fda8.asciidoc +++ b/docs/examples/guide/e930a572e8ddfdecc13498c04007b9e3.asciidoc @@ -8,7 +8,7 @@ response = client.indices.create( content_embedding: { type: 'dense_vector', dims: 1536, - element_type: 'byte', + element_type: 'float', similarity: 'dot_product' }, content: { diff --git a/docs/examples/guide/e9a0b450af6219772631703d602c7092.asciidoc b/docs/examples/guide/e9a0b450af6219772631703d602c7092.asciidoc new file mode 100644 index 0000000000..9e7fde1465 --- /dev/null +++ b/docs/examples/guide/e9a0b450af6219772631703d602c7092.asciidoc @@ -0,0 +1,40 @@ +[source, ruby] +---- +response = client.search( + index: 'my-index', + body: { + query: { + text_expansion: { + 'ml.tokens' => { + model_id: '.elser_model_2', + model_text: 'How is the weather in Jamaica?', + pruning_config: { + tokens_freq_ratio_threshold: 5, + tokens_weight_threshold: 0.4, + only_score_pruned_tokens: false + } + } + } + }, + rescore: { + window_size: 100, + query: { + rescore_query: { + text_expansion: { + 'ml.tokens' => { + model_id: '.elser_model_2', + model_text: 'How is the weather in Jamaica?', + pruning_config: { + tokens_freq_ratio_threshold: 5, + tokens_weight_threshold: 0.4, + only_score_pruned_tokens: true + } + } + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc b/docs/examples/guide/ea0a5762f297928ea79948250a3624ed.asciidoc similarity index 90% rename from docs/examples/guide/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc rename to docs/examples/guide/ea0a5762f297928ea79948250a3624ed.asciidoc index ef519ed3a3..e3214cc744 100644 --- a/docs/examples/guide/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc +++ b/docs/examples/guide/ea0a5762f297928ea79948250a3624ed.asciidoc @@ -45,7 +45,8 @@ puts response response = client.esql.query( body: { - query: 'FROM mv | EVAL b=TO_STRING(b) | LIMIT 2' + query: 'FROM mv | LIMIT 2', + version: '2024.04.01' } ) puts response diff --git a/docs/examples/guide/ee0fd67acc807f1bddf5e9807c06e7eb.asciidoc b/docs/examples/guide/ee0fd67acc807f1bddf5e9807c06e7eb.asciidoc new file mode 100644 index 0000000000..45cfc002e9 --- /dev/null +++ b/docs/examples/guide/ee0fd67acc807f1bddf5e9807c06e7eb.asciidoc @@ -0,0 +1,94 @@ +[source, ruby] +---- +response = client.search( + index: 'my-index', + body: { + query: { + weighted_tokens: { + query_expansion_field: { + tokens: { + "2161": 0.4679, + "2621": 0.307, + "2782": 0.1299, + "2851": 0.1056, + "3088": 0.3041, + "3376": 0.1038, + "3467": 0.4873, + "3684": 0.8958, + "4380": 0.334, + "4542": 0.4636, + "4633": 2.2805, + "4785": 1.2628, + "4860": 1.0655, + "5133": 1.0709, + "7139": 1.0016, + "7224": 0.2486, + "7387": 0.0985, + "7394": 0.0542, + "8915": 0.369, + "9156": 2.8947, + "10505": 0.2771, + "11464": 0.3996, + "13525": 0.0088, + "14178": 0.8161, + "16893": 0.1376, + "17851": 1.5348, + "19939": 0.6012 + }, + pruning_config: { + tokens_freq_ratio_threshold: 5, + tokens_weight_threshold: 0.4, + only_score_pruned_tokens: false + } + } + } + }, + rescore: { + window_size: 100, + query: { + rescore_query: { + weighted_tokens: { + query_expansion_field: { + tokens: { + "2161": 0.4679, + "2621": 0.307, + "2782": 0.1299, + "2851": 0.1056, + "3088": 0.3041, + "3376": 0.1038, + "3467": 0.4873, + "3684": 0.8958, + "4380": 0.334, + "4542": 0.4636, + "4633": 2.2805, + "4785": 1.2628, + "4860": 1.0655, + "5133": 1.0709, + "7139": 1.0016, + "7224": 0.2486, + "7387": 0.0985, + "7394": 0.0542, + "8915": 0.369, + "9156": 2.8947, + "10505": 0.2771, + "11464": 0.3996, + "13525": 0.0088, + "14178": 0.8161, + "16893": 0.1376, + "17851": 1.5348, + "19939": 0.6012 + }, + pruning_config: { + tokens_freq_ratio_threshold: 5, + tokens_weight_threshold: 0.4, + only_score_pruned_tokens: true + } + } + } + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc b/docs/examples/guide/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc new file mode 100644 index 0000000000..b86bb8e691 --- /dev/null +++ b/docs/examples/guide/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc @@ -0,0 +1,20 @@ +[source, ruby] +---- +response = client.inference.inference( + task_type: 'rerank', + inference_id: 'cohere_rerank', + body: { + input: [ + 'luke', + 'like', + 'leia', + 'chewy', + 'r2d2', + 'star', + 'wars' + ], + query: 'star wars main character' + } +) +puts response +---- diff --git a/docs/examples/guide/f1cfc64c119b0a30376221d8f23cdd45.asciidoc b/docs/examples/guide/f1cfc64c119b0a30376221d8f23cdd45.asciidoc new file mode 100644 index 0000000000..398bccd80f --- /dev/null +++ b/docs/examples/guide/f1cfc64c119b0a30376221d8f23cdd45.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.connector.list( + service_type: 'sharepoint_online' +) +puts response +---- diff --git a/docs/examples/guide/f245c4f1f79fb2f6f968278990c2b9dd.asciidoc b/docs/examples/guide/f245c4f1f79fb2f6f968278990c2b9dd.asciidoc new file mode 100644 index 0000000000..4cf6d3d207 --- /dev/null +++ b/docs/examples/guide/f245c4f1f79fb2f6f968278990c2b9dd.asciidoc @@ -0,0 +1,13 @@ +[source, ruby] +---- +response = client.connector.update_configuration( + connector_id: 'my-spo-connector', + body: { + values: { + client_id: 'my-client-id', + secret_value: 'super-secret-value' + } + } +) +puts response +---- diff --git a/docs/examples/guide/744aeb2af40f519e430e21e004e3c3b7.asciidoc b/docs/examples/guide/f2da3937e5f0718527e6eb73aa261b1f.asciidoc similarity index 87% rename from docs/examples/guide/744aeb2af40f519e430e21e004e3c3b7.asciidoc rename to docs/examples/guide/f2da3937e5f0718527e6eb73aa261b1f.asciidoc index 424af94431..89faf9ab29 100644 --- a/docs/examples/guide/744aeb2af40f519e430e21e004e3c3b7.asciidoc +++ b/docs/examples/guide/f2da3937e5f0718527e6eb73aa261b1f.asciidoc @@ -45,7 +45,8 @@ puts response response = client.esql.query( body: { - query: 'FROM mv | LIMIT 2' + query: 'FROM mv | EVAL b=TO_STRING(b) | LIMIT 2', + version: '2024.04.01' } ) puts response diff --git a/docs/examples/guide/dc3c7d755f1d1d0c5973068288017dcb.asciidoc b/docs/examples/guide/f49ac80f0130cae8d0ea6f4472a149dd.asciidoc similarity index 87% rename from docs/examples/guide/dc3c7d755f1d1d0c5973068288017dcb.asciidoc rename to docs/examples/guide/f49ac80f0130cae8d0ea6f4472a149dd.asciidoc index ef289cb860..003a91cb15 100644 --- a/docs/examples/guide/dc3c7d755f1d1d0c5973068288017dcb.asciidoc +++ b/docs/examples/guide/f49ac80f0130cae8d0ea6f4472a149dd.asciidoc @@ -13,6 +13,9 @@ response = client.indices.create( }, "file-type": { type: 'keyword' + }, + title: { + type: 'text' } } } diff --git a/docs/examples/guide/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc b/docs/examples/guide/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc index c479d1f735..f2e52a81c5 100644 --- a/docs/examples/guide/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc +++ b/docs/examples/guide/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc @@ -1,6 +1,6 @@ [source, ruby] ---- -response = client.connector_sync_job.get( +response = client.connector.sync_job_get( connector_sync_job_id: 'my-connector-sync-job' ) puts response From d48c1102732a5cef4715e83bc5dca03431ade94a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 17 May 2024 16:11:22 +0100 Subject: [PATCH 264/540] [DOCS] Updates generated docs --- .../197dc41c8df9629e145b3064c63b2ccc.asciidoc | 37 ------------ .../1fcc4a3280be399753dcfd5c489ff682.asciidoc | 34 +++++++++++ .../2212167f67b7ad1cd2b8dcec083d09ea.asciidoc | 7 --- .../3386fe07e90844dbcdbbe7c07f09e04a.asciidoc | 7 +++ .../394d8fc4d78214e6fe5e4dea62c8923f.asciidoc | 41 ------------- .../3f3b3e207f79303ce6f86e03e928e062.asciidoc | 8 --- ...443e8da9968f1c65f46a2a65a1e1e078.asciidoc} | 18 ++++-- ...4479e8c63a04fa22207a6a8803eadcad.asciidoc} | 2 +- .../50d36787601ebba01fc6266abe3bd415.asciidoc | 17 ------ .../51390ca10aa22d7104e8970f09ea4512.asciidoc | 32 ++++++++++ .../53c6256295111524d5ff2885bdcb99a9.asciidoc | 4 +- .../5db5349162a4fbe74bffb646926a2495.asciidoc | 31 ++++++++++ .../5e9a7845e60b79685aab59877c5fbd1a.asciidoc | 15 +++++ .../75e229852d1404040bb2e83723c0f1db.asciidoc | 14 ----- .../90112d594b934c0111b7303b9f91cb7f.asciidoc | 12 ---- .../98f83f0dc4634e108ab0db6db347b2c7.asciidoc | 7 --- .../c0220f749b260889bebc567533a01c3f.asciidoc | 7 --- .../c4e29dde9a3e497c69aec02b61c0d322.asciidoc | 60 ------------------- .../cb0f3eea39612a694d47a57aee93956f.asciidoc | 8 --- .../dd360e1cf42ad897e2ab9e785a45466f.asciidoc | 30 ---------- .../e6eb414f623566119d4db131a7677a7a.asciidoc | 12 ---- .../f1cfc64c119b0a30376221d8f23cdd45.asciidoc | 7 --- .../f245c4f1f79fb2f6f968278990c2b9dd.asciidoc | 13 ---- .../f38262ef72f73816ec35fa4c9c85760d.asciidoc | 45 ++++++++++++++ .../f9cb2547ab04461a12bfd25a35be5f96.asciidoc | 37 ++++++++++++ .../fe208d94ec93eabf3bd06139fa70701e.asciidoc | 45 ++++++++++++++ 26 files changed, 262 insertions(+), 288 deletions(-) delete mode 100644 docs/examples/guide/197dc41c8df9629e145b3064c63b2ccc.asciidoc create mode 100644 docs/examples/guide/1fcc4a3280be399753dcfd5c489ff682.asciidoc delete mode 100644 docs/examples/guide/2212167f67b7ad1cd2b8dcec083d09ea.asciidoc create mode 100644 docs/examples/guide/3386fe07e90844dbcdbbe7c07f09e04a.asciidoc delete mode 100644 docs/examples/guide/394d8fc4d78214e6fe5e4dea62c8923f.asciidoc delete mode 100644 docs/examples/guide/3f3b3e207f79303ce6f86e03e928e062.asciidoc rename docs/examples/guide/{7c2b45de463c8c5a06e933b1793b584b.asciidoc => 443e8da9968f1c65f46a2a65a1e1e078.asciidoc} (60%) rename docs/examples/guide/{9949bcc64c9cd6f4041819546d7fce78.asciidoc => 4479e8c63a04fa22207a6a8803eadcad.asciidoc} (63%) delete mode 100644 docs/examples/guide/50d36787601ebba01fc6266abe3bd415.asciidoc create mode 100644 docs/examples/guide/51390ca10aa22d7104e8970f09ea4512.asciidoc create mode 100644 docs/examples/guide/5db5349162a4fbe74bffb646926a2495.asciidoc create mode 100644 docs/examples/guide/5e9a7845e60b79685aab59877c5fbd1a.asciidoc delete mode 100644 docs/examples/guide/75e229852d1404040bb2e83723c0f1db.asciidoc delete mode 100644 docs/examples/guide/90112d594b934c0111b7303b9f91cb7f.asciidoc delete mode 100644 docs/examples/guide/98f83f0dc4634e108ab0db6db347b2c7.asciidoc delete mode 100644 docs/examples/guide/c0220f749b260889bebc567533a01c3f.asciidoc delete mode 100644 docs/examples/guide/c4e29dde9a3e497c69aec02b61c0d322.asciidoc delete mode 100644 docs/examples/guide/cb0f3eea39612a694d47a57aee93956f.asciidoc delete mode 100644 docs/examples/guide/dd360e1cf42ad897e2ab9e785a45466f.asciidoc delete mode 100644 docs/examples/guide/e6eb414f623566119d4db131a7677a7a.asciidoc delete mode 100644 docs/examples/guide/f1cfc64c119b0a30376221d8f23cdd45.asciidoc delete mode 100644 docs/examples/guide/f245c4f1f79fb2f6f968278990c2b9dd.asciidoc create mode 100644 docs/examples/guide/f38262ef72f73816ec35fa4c9c85760d.asciidoc create mode 100644 docs/examples/guide/f9cb2547ab04461a12bfd25a35be5f96.asciidoc create mode 100644 docs/examples/guide/fe208d94ec93eabf3bd06139fa70701e.asciidoc diff --git a/docs/examples/guide/197dc41c8df9629e145b3064c63b2ccc.asciidoc b/docs/examples/guide/197dc41c8df9629e145b3064c63b2ccc.asciidoc deleted file mode 100644 index fbbb020028..0000000000 --- a/docs/examples/guide/197dc41c8df9629e145b3064c63b2ccc.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'customer', - body: [ - { - create: {} - }, - { - firstname: 'Monica', - lastname: 'Rambeau' - }, - { - create: {} - }, - { - firstname: 'Carol', - lastname: 'Danvers' - }, - { - create: {} - }, - { - firstname: 'Wanda', - lastname: 'Maximoff' - }, - { - create: {} - }, - { - firstname: 'Jennifer', - lastname: 'Takeda' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/1fcc4a3280be399753dcfd5c489ff682.asciidoc b/docs/examples/guide/1fcc4a3280be399753dcfd5c489ff682.asciidoc new file mode 100644 index 0000000000..ba41c64e82 --- /dev/null +++ b/docs/examples/guide/1fcc4a3280be399753dcfd5c489ff682.asciidoc @@ -0,0 +1,34 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'idx', + body: { + mappings: { + _source: { + mode: 'synthetic' + }, + properties: { + my_range: { + type: 'ip_range' + } + } + } + } +) +puts response + +response = client.index( + index: 'idx', + id: 1, + body: { + my_range: [ + '10.0.0.0/24', + { + gte: '10.0.0.0', + lte: '10.0.0.255' + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/2212167f67b7ad1cd2b8dcec083d09ea.asciidoc b/docs/examples/guide/2212167f67b7ad1cd2b8dcec083d09ea.asciidoc deleted file mode 100644 index 4fe5f9dc12..0000000000 --- a/docs/examples/guide/2212167f67b7ad1cd2b8dcec083d09ea.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.connector.list( - index_name: 'search-google-drive' -) -puts response ----- diff --git a/docs/examples/guide/3386fe07e90844dbcdbbe7c07f09e04a.asciidoc b/docs/examples/guide/3386fe07e90844dbcdbbe7c07f09e04a.asciidoc new file mode 100644 index 0000000000..37570408e0 --- /dev/null +++ b/docs/examples/guide/3386fe07e90844dbcdbbe7c07f09e04a.asciidoc @@ -0,0 +1,7 @@ +[source, ruby] +---- +response = client.synonyms.delete_synonym( + id: 'my-synonyms-set' +) +puts response +---- diff --git a/docs/examples/guide/394d8fc4d78214e6fe5e4dea62c8923f.asciidoc b/docs/examples/guide/394d8fc4d78214e6fe5e4dea62c8923f.asciidoc deleted file mode 100644 index b2e2aa4eba..0000000000 --- a/docs/examples/guide/394d8fc4d78214e6fe5e4dea62c8923f.asciidoc +++ /dev/null @@ -1,41 +0,0 @@ -[source, ruby] ----- -response = client.connector.update_configuration( - connector_id: 'my-spo-connector', - body: { - configuration: { - client_id: { - default_value: nil, - depends_on: [], - display: 'text', - label: 'Client ID', - options: [], - order: 3, - required: true, - sensitive: false, - tooltip: nil, - type: 'str', - ui_restrictions: [], - validations: [], - value: nil - }, - secret_value: { - default_value: nil, - depends_on: [], - display: 'text', - label: 'Secret value', - options: [], - order: 4, - required: true, - sensitive: true, - tooltip: nil, - type: 'str', - ui_restrictions: [], - validations: [], - value: nil - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3f3b3e207f79303ce6f86e03e928e062.asciidoc b/docs/examples/guide/3f3b3e207f79303ce6f86e03e928e062.asciidoc deleted file mode 100644 index 26796258c2..0000000000 --- a/docs/examples/guide/3f3b3e207f79303ce6f86e03e928e062.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'customer', - id: 1 -) -puts response ----- diff --git a/docs/examples/guide/7c2b45de463c8c5a06e933b1793b584b.asciidoc b/docs/examples/guide/443e8da9968f1c65f46a2a65a1e1e078.asciidoc similarity index 60% rename from docs/examples/guide/7c2b45de463c8c5a06e933b1793b584b.asciidoc rename to docs/examples/guide/443e8da9968f1c65f46a2a65a1e1e078.asciidoc index 14bcc33dea..8ef1002f6a 100644 --- a/docs/examples/guide/7c2b45de463c8c5a06e933b1793b584b.asciidoc +++ b/docs/examples/guide/443e8da9968f1c65f46a2a65a1e1e078.asciidoc @@ -1,9 +1,17 @@ [source, ruby] ---- -response = client.cluster.put_component_template( - name: 'my-weather-sensor-mappings', +response = client.indices.put_index_template( + name: 'my-weather-sensor-index-template', body: { + index_patterns: [ + 'metrics-weather_sensors-*' + ], + data_stream: {}, template: { + settings: { + 'index.mode' => 'time_series', + 'index.lifecycle.name' => 'my-lifecycle-policy' + }, mappings: { properties: { sensor_id: { @@ -23,14 +31,14 @@ response = client.cluster.put_component_template( time_series_metric: 'gauge' }, "@timestamp": { - type: 'date', - format: 'strict_date_optional_time' + type: 'date' } } } }, + priority: 500, _meta: { - description: 'Mappings for weather sensor data' + description: 'Template for my weather sensor data' } } ) diff --git a/docs/examples/guide/9949bcc64c9cd6f4041819546d7fce78.asciidoc b/docs/examples/guide/4479e8c63a04fa22207a6a8803eadcad.asciidoc similarity index 63% rename from docs/examples/guide/9949bcc64c9cd6f4041819546d7fce78.asciidoc rename to docs/examples/guide/4479e8c63a04fa22207a6a8803eadcad.asciidoc index 5d90dfd67d..d6abceee23 100644 --- a/docs/examples/guide/9949bcc64c9cd6f4041819546d7fce78.asciidoc +++ b/docs/examples/guide/4479e8c63a04fa22207a6a8803eadcad.asciidoc @@ -3,7 +3,7 @@ response = client.cluster.put_settings( body: { persistent: { - 'cluster.remote.cluster_two.skip_unavailable' => true + 'cluster.routing.allocation.awareness.attributes' => 'rack_id' } } ) diff --git a/docs/examples/guide/50d36787601ebba01fc6266abe3bd415.asciidoc b/docs/examples/guide/50d36787601ebba01fc6266abe3bd415.asciidoc deleted file mode 100644 index 71108a2766..0000000000 --- a/docs/examples/guide/50d36787601ebba01fc6266abe3bd415.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'my-weather-sensor-settings', - body: { - template: { - settings: { - 'index.lifecycle.name' => 'my-lifecycle-policy' - } - }, - _meta: { - description: 'Index settings for weather sensor data' - } - } -) -puts response ----- diff --git a/docs/examples/guide/51390ca10aa22d7104e8970f09ea4512.asciidoc b/docs/examples/guide/51390ca10aa22d7104e8970f09ea4512.asciidoc new file mode 100644 index 0000000000..ca759417ef --- /dev/null +++ b/docs/examples/guide/51390ca10aa22d7104e8970f09ea4512.asciidoc @@ -0,0 +1,32 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'idx', + body: { + mappings: { + _source: { + mode: 'synthetic' + }, + properties: { + binary: { + type: 'binary', + doc_values: true + } + } + } + } +) +puts response + +response = client.index( + index: 'idx', + id: 1, + body: { + binary: [ + 'IAA=', + 'EAA=' + ] + } +) +puts response +---- diff --git a/docs/examples/guide/53c6256295111524d5ff2885bdcb99a9.asciidoc b/docs/examples/guide/53c6256295111524d5ff2885bdcb99a9.asciidoc index 7dd23fda14..9023a1e760 100644 --- a/docs/examples/guide/53c6256295111524d5ff2885bdcb99a9.asciidoc +++ b/docs/examples/guide/53c6256295111524d5ff2885bdcb99a9.asciidoc @@ -1,7 +1,7 @@ [source, ruby] ---- -response = client.indices.get( - index: '_transform', +response = client.transform.get_transform( + transform_id: '_stats', from: 5, size: 10 ) diff --git a/docs/examples/guide/5db5349162a4fbe74bffb646926a2495.asciidoc b/docs/examples/guide/5db5349162a4fbe74bffb646926a2495.asciidoc new file mode 100644 index 0000000000..7a7e45ae07 --- /dev/null +++ b/docs/examples/guide/5db5349162a4fbe74bffb646926a2495.asciidoc @@ -0,0 +1,31 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'idx', + body: { + mappings: { + _source: { + mode: 'synthetic' + }, + properties: { + my_range: { + type: 'long_range' + } + } + } + } +) +puts response + +response = client.index( + index: 'idx', + id: 1, + body: { + my_range: { + gt: 200, + lt: 300 + } + } +) +puts response +---- diff --git a/docs/examples/guide/5e9a7845e60b79685aab59877c5fbd1a.asciidoc b/docs/examples/guide/5e9a7845e60b79685aab59877c5fbd1a.asciidoc new file mode 100644 index 0000000000..227b9ffa09 --- /dev/null +++ b/docs/examples/guide/5e9a7845e60b79685aab59877c5fbd1a.asciidoc @@ -0,0 +1,15 @@ +[source, ruby] +---- +response = client.search( + body: { + aggregations: { + ignored_fields: { + terms: { + field: '_ignored' + } + } + } + } +) +puts response +---- diff --git a/docs/examples/guide/75e229852d1404040bb2e83723c0f1db.asciidoc b/docs/examples/guide/75e229852d1404040bb2e83723c0f1db.asciidoc deleted file mode 100644 index e158dbf7ca..0000000000 --- a/docs/examples/guide/75e229852d1404040bb2e83723c0f1db.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'customer', - body: { - query: { - match: { - firstname: 'Jennifer' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/90112d594b934c0111b7303b9f91cb7f.asciidoc b/docs/examples/guide/90112d594b934c0111b7303b9f91cb7f.asciidoc deleted file mode 100644 index 22fea04517..0000000000 --- a/docs/examples/guide/90112d594b934c0111b7303b9f91cb7f.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'customer', - id: 1, - body: { - firstname: 'Jennifer', - lastname: 'Walters' - } -) -puts response ----- diff --git a/docs/examples/guide/98f83f0dc4634e108ab0db6db347b2c7.asciidoc b/docs/examples/guide/98f83f0dc4634e108ab0db6db347b2c7.asciidoc deleted file mode 100644 index e7035bef28..0000000000 --- a/docs/examples/guide/98f83f0dc4634e108ab0db6db347b2c7.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.connector.delete( - connector_id: 'my-connector' -) -puts response ----- diff --git a/docs/examples/guide/c0220f749b260889bebc567533a01c3f.asciidoc b/docs/examples/guide/c0220f749b260889bebc567533a01c3f.asciidoc deleted file mode 100644 index e90d2ed108..0000000000 --- a/docs/examples/guide/c0220f749b260889bebc567533a01c3f.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.connector.list( - service_type: 'sharepoint_online,google_drive' -) -puts response ----- diff --git a/docs/examples/guide/c4e29dde9a3e497c69aec02b61c0d322.asciidoc b/docs/examples/guide/c4e29dde9a3e497c69aec02b61c0d322.asciidoc deleted file mode 100644 index e931ec0b26..0000000000 --- a/docs/examples/guide/c4e29dde9a3e497c69aec02b61c0d322.asciidoc +++ /dev/null @@ -1,60 +0,0 @@ -[source, ruby] ----- -response = client.connector.update_filtering( - connector_id: 'my-connector', - body: { - filtering: [ - { - active: { - advanced_snippet: { - created_at: '2023-11-09T15:13:08.231Z', - updated_at: '2023-11-09T15:13:08.231Z', - value: {} - }, - rules: [ - { - created_at: '2023-11-09T15:13:08.231Z', - field: '_', - id: 'DEFAULT', - order: 0, - policy: 'include', - rule: 'regex', - updated_at: '2023-11-09T15:13:08.231Z', - value: '.*' - } - ], - validation: { - errors: [], - state: 'valid' - } - }, - domain: 'DEFAULT', - draft: { - advanced_snippet: { - created_at: '2023-11-09T15:13:08.231Z', - updated_at: '2023-11-09T15:13:08.231Z', - value: {} - }, - rules: [ - { - created_at: '2023-11-09T15:13:08.231Z', - field: '_', - id: 'DEFAULT', - order: 0, - policy: 'include', - rule: 'regex', - updated_at: '2023-11-09T15:13:08.231Z', - value: '.*' - } - ], - validation: { - errors: [], - state: 'valid' - } - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/cb0f3eea39612a694d47a57aee93956f.asciidoc b/docs/examples/guide/cb0f3eea39612a694d47a57aee93956f.asciidoc deleted file mode 100644 index 1b7674facf..0000000000 --- a/docs/examples/guide/cb0f3eea39612a694d47a57aee93956f.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.connector.list( - from: 0, - size: 2 -) -puts response ----- diff --git a/docs/examples/guide/dd360e1cf42ad897e2ab9e785a45466f.asciidoc b/docs/examples/guide/dd360e1cf42ad897e2ab9e785a45466f.asciidoc deleted file mode 100644 index f630058b3d..0000000000 --- a/docs/examples/guide/dd360e1cf42ad897e2ab9e785a45466f.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'my-weather-sensor-index-template', - body: { - index_patterns: [ - 'metrics-weather_sensors-*' - ], - data_stream: {}, - template: { - settings: { - 'index.mode' => 'time_series', - 'index.routing_path' => [ - 'sensor_id', - 'location' - ] - } - }, - composed_of: [ - 'my-weather-sensor-mappings', - 'my-weather-sensor-settings' - ], - priority: 500, - _meta: { - description: 'Template for my weather sensor data' - } - } -) -puts response ----- diff --git a/docs/examples/guide/e6eb414f623566119d4db131a7677a7a.asciidoc b/docs/examples/guide/e6eb414f623566119d4db131a7677a7a.asciidoc deleted file mode 100644 index 5187c899cf..0000000000 --- a/docs/examples/guide/e6eb414f623566119d4db131a7677a7a.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.connector.update_configuration( - connector_id: 'my-spo-connector', - body: { - values: { - secret_value: 'new-super-secret-value' - } - } -) -puts response ----- diff --git a/docs/examples/guide/f1cfc64c119b0a30376221d8f23cdd45.asciidoc b/docs/examples/guide/f1cfc64c119b0a30376221d8f23cdd45.asciidoc deleted file mode 100644 index 398bccd80f..0000000000 --- a/docs/examples/guide/f1cfc64c119b0a30376221d8f23cdd45.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.connector.list( - service_type: 'sharepoint_online' -) -puts response ----- diff --git a/docs/examples/guide/f245c4f1f79fb2f6f968278990c2b9dd.asciidoc b/docs/examples/guide/f245c4f1f79fb2f6f968278990c2b9dd.asciidoc deleted file mode 100644 index 4cf6d3d207..0000000000 --- a/docs/examples/guide/f245c4f1f79fb2f6f968278990c2b9dd.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.connector.update_configuration( - connector_id: 'my-spo-connector', - body: { - values: { - client_id: 'my-client-id', - secret_value: 'super-secret-value' - } - } -) -puts response ----- diff --git a/docs/examples/guide/f38262ef72f73816ec35fa4c9c85760d.asciidoc b/docs/examples/guide/f38262ef72f73816ec35fa4c9c85760d.asciidoc new file mode 100644 index 0000000000..c219238128 --- /dev/null +++ b/docs/examples/guide/f38262ef72f73816ec35fa4c9c85760d.asciidoc @@ -0,0 +1,45 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'idx', + body: { + mappings: { + _source: { + mode: 'synthetic' + }, + properties: { + my_range: { + type: 'long_range' + } + } + } + } +) +puts response + +response = client.index( + index: 'idx', + id: 1, + body: { + my_range: [ + { + gte: 200, + lte: 300 + }, + { + gte: 1, + lte: 100 + }, + { + gte: 200, + lte: 300 + }, + { + gte: 200, + lte: 500 + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/f9cb2547ab04461a12bfd25a35be5f96.asciidoc b/docs/examples/guide/f9cb2547ab04461a12bfd25a35be5f96.asciidoc new file mode 100644 index 0000000000..d4f57568c3 --- /dev/null +++ b/docs/examples/guide/f9cb2547ab04461a12bfd25a35be5f96.asciidoc @@ -0,0 +1,37 @@ +[source, ruby] +---- +response = client.indices.create( + index: 'idx', + body: { + mappings: { + _source: { + mode: 'synthetic' + }, + properties: { + my_range: { + type: 'date_range' + } + } + } + } +) +puts response + +response = client.index( + index: 'idx', + id: 1, + body: { + my_range: [ + { + gte: 1_504_224_000_000, + lte: 1_504_569_600_000 + }, + { + gte: '2017-09-01', + lte: '2017-09-10' + } + ] + } +) +puts response +---- diff --git a/docs/examples/guide/fe208d94ec93eabf3bd06139fa70701e.asciidoc b/docs/examples/guide/fe208d94ec93eabf3bd06139fa70701e.asciidoc new file mode 100644 index 0000000000..b55fd5df6b --- /dev/null +++ b/docs/examples/guide/fe208d94ec93eabf3bd06139fa70701e.asciidoc @@ -0,0 +1,45 @@ +[source, ruby] +---- +response = client.indices.put_index_template( + name: 'sensor-template', + body: { + index_patterns: [ + 'sensor-*' + ], + data_stream: {}, + template: { + lifecycle: { + downsampling: [ + { + after: '1d', + fixed_interval: '1h' + } + ] + }, + settings: { + 'index.mode' => 'time_series' + }, + mappings: { + properties: { + node: { + type: 'keyword', + time_series_dimension: true + }, + temperature: { + type: 'half_float', + time_series_metric: 'gauge' + }, + voltage: { + type: 'half_float', + time_series_metric: 'gauge' + }, + "@timestamp": { + type: 'date' + } + } + } + } + } +) +puts response +---- From bd16056bcd371bb327aaec8b0f43134056aef79c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 20 May 2024 08:59:48 +0100 Subject: [PATCH 265/540] [API] Updates connectors, body and id not required in post and put anymore --- .../lib/elasticsearch/api/actions/connector/post.rb | 4 +--- .../lib/elasticsearch/api/actions/connector/put.rb | 11 ++++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb index e66f7b37c1..6e2c055541 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb @@ -29,15 +29,13 @@ module Actions # support SLA of official GA features. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The connector configuration. (*Required*) + # @option arguments [Hash] :body The connector configuration. # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html # def post(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.post' } - raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - arguments = arguments.clone headers = arguments.delete(:headers) || {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb index aa082e8b5b..038f37ab3c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb @@ -30,7 +30,7 @@ module Actions # # @option arguments [String] :connector_id The unique identifier of the connector to be created or updated. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The connector configuration. (*Required*) + # @option arguments [Hash] :body The connector configuration. # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html # @@ -42,9 +42,6 @@ def put(arguments = {}) end request_opts[:defined_params] = defined_params unless defined_params.empty? - raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] - arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -53,7 +50,11 @@ def put(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}" + path = if _connector_id + "_connector/#{Utils.__listify(_connector_id)}" + else + '_connector' + end params = {} Elasticsearch::API::Response.new( From 719f370e70e29dbd120cdb66b8575626f0c5623e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 20 May 2024 09:01:05 +0100 Subject: [PATCH 266/540] [API] Adds timeout and master_timeout parameters to APIs - license.delete - license.post - license.post_start_basic - license.post_start_trial - snapshot_lifecycle_management.start - snapshot_lifecycle_management.stop --- .../lib/elasticsearch/api/actions/license/delete.rb | 4 +++- .../lib/elasticsearch/api/actions/license/post.rb | 2 ++ .../lib/elasticsearch/api/actions/license/post_start_basic.rb | 2 ++ .../lib/elasticsearch/api/actions/license/post_start_trial.rb | 2 ++ .../api/actions/snapshot_lifecycle_management/start.rb | 4 +++- .../api/actions/snapshot_lifecycle_management/stop.rb | 4 +++- 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb index 2be8986ab9..b4a2a5fd9d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb @@ -24,6 +24,8 @@ module License module Actions # Deletes licensing information for the cluster # + # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-license.html @@ -38,7 +40,7 @@ def delete(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = '_license' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb index 4ff504f8d8..54a72d52e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb @@ -25,6 +25,8 @@ module Actions # Updates the license for the cluster. # # @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false) + # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body licenses to be installed # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb index c9c5b7c8f5..b95eb10bf9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb @@ -25,6 +25,8 @@ module Actions # Starts an indefinite basic license. # # @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false) + # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-basic.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb index 630c18035d..4a3a20ae6c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb @@ -26,6 +26,8 @@ module Actions # # @option arguments [String] :type The type of trial license to generate (default: "trial") # @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false) + # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trial.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb index 38c9580774..7e5a1d73bf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb @@ -24,6 +24,8 @@ module SnapshotLifecycleManagement module Actions # Turns on snapshot lifecycle management (SLM). # + # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html @@ -38,7 +40,7 @@ def start(arguments = {}) method = Elasticsearch::API::HTTP_POST path = '_slm/start' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb index e5e7c8ebbb..d5dbab1d1e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb @@ -24,6 +24,8 @@ module SnapshotLifecycleManagement module Actions # Turns off snapshot lifecycle management (SLM). # + # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html @@ -38,7 +40,7 @@ def stop(arguments = {}) method = Elasticsearch::API::HTTP_POST path = '_slm/stop' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From 4776c6ab7d9c2ead3a48292a5f466ad05b473668 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 20 May 2024 17:05:39 +0100 Subject: [PATCH 267/540] Updates Rubocop to address dependency vulnerability --- Gemfile | 2 +- elasticsearch-api/utils/Gemfile | 6 ++++-- elasticsearch/elasticsearch.gemspec | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index f5f0bbac4b..c618282910 100644 --- a/Gemfile +++ b/Gemfile @@ -25,7 +25,6 @@ gem 'cane' gem 'mocha' gem 'pry' gem 'rake' -gem 'rubocop' gem 'shoulda-context' gem 'simplecov' gem 'test-unit', '~> 2' @@ -39,4 +38,5 @@ end group :development, :test do gem 'debug' unless defined?(JRUBY_VERSION) gem 'rspec' + gem 'rubocop', '>= 1.51' unless defined?(JRUBY_VERSION) && Gem::Version.new(JRUBY_VERSION) <= Gem::Version.new('9.4') end diff --git a/elasticsearch-api/utils/Gemfile b/elasticsearch-api/utils/Gemfile index 046609a541..6f6f061b67 100644 --- a/elasticsearch-api/utils/Gemfile +++ b/elasticsearch-api/utils/Gemfile @@ -18,9 +18,11 @@ source 'https://rubygems.org' gem 'coderay' -gem 'debug' unless defined?(JRUBY_VERSION) + gem 'json' gem 'multi_json' gem 'pry' -gem 'rubocop' gem 'thor' + +gem 'rubocop', '>= 1.51' unless defined?(JRUBY_VERSION) && Gem::Version.new(JRUBY_VERSION) <= Gem::Version.new('9.4') +gem 'debug' unless defined?(JRUBY_VERSION) diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index 1b32349b05..d7dbdc900f 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -47,7 +47,7 @@ Gem::Specification.new do |s| s.add_dependency 'elastic-transport', '~> 8.3' s.add_dependency 'elasticsearch-api', '8.14.0' - + s.add_development_dependency 'base64' s.add_development_dependency 'bundler' s.add_development_dependency 'debug' unless defined?(JRUBY_VERSION) From c50b614eaf198fc6548b69f5cd50f652eac20834 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 21 May 2024 10:27:06 +0100 Subject: [PATCH 268/540] [CI] Updates actions/checkout to v4 in GH actions --- .github/workflows/license.yml | 4 ++-- .github/workflows/main.yml | 2 +- .github/workflows/otel.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml index d7357e56e7..8816ff40dd 100644 --- a/.github/workflows/license.yml +++ b/.github/workflows/license.yml @@ -4,10 +4,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3 + ruby-version: '3.3' - name: Check license headers run: | ruby ./.github/check_license_headers.rb diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5b6674c133..a87791966e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: ruby: [ '3.0', '3.1', '3.2', '3.3', 'jruby-9.3', 'jruby-9.4' ] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Increase system limits run: | sudo swapoff -a diff --git a/.github/workflows/otel.yml b/.github/workflows/otel.yml index 973f16d895..2f32d28683 100644 --- a/.github/workflows/otel.yml +++ b/.github/workflows/otel.yml @@ -19,7 +19,7 @@ jobs: ruby: [ '3.3', 'jruby-9.4' ] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Increase system limits run: | sudo swapoff -a From fcfc7ac27a11ab74cd4459feff907deee138d122 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 22 May 2024 06:06:48 +0000 Subject: [PATCH 269/540] [API] Adds master_timeout, timeout parameters to autoscaling endpoints --- .../api/actions/autoscaling/delete_autoscaling_policy.rb | 4 +++- .../api/actions/autoscaling/get_autoscaling_capacity.rb | 3 ++- .../api/actions/autoscaling/get_autoscaling_policy.rb | 3 ++- .../api/actions/autoscaling/put_autoscaling_policy.rb | 4 +++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb index e10ad043a7..6672db4b28 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb @@ -25,6 +25,8 @@ module Actions # Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. # # @option arguments [String] :name the name of the autoscaling policy + # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html @@ -48,7 +50,7 @@ def delete_autoscaling_policy(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = "_autoscaling/policy/#{Utils.__listify(_name)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb index a490502822..9fba921f3a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb @@ -24,6 +24,7 @@ module Autoscaling module Actions # Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. # + # @option arguments [Time] :master_timeout Timeout for processing on master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html @@ -38,7 +39,7 @@ def get_autoscaling_capacity(arguments = {}) method = Elasticsearch::API::HTTP_GET path = '_autoscaling/capacity' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb index e4d66d0517..9090bdbc74 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb @@ -25,6 +25,7 @@ module Actions # Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. # # @option arguments [String] :name the name of the autoscaling policy + # @option arguments [Time] :master_timeout Timeout for processing on master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html @@ -48,7 +49,7 @@ def get_autoscaling_policy(arguments = {}) method = Elasticsearch::API::HTTP_GET path = "_autoscaling/policy/#{Utils.__listify(_name)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb index cde8ca11d0..b453f52c9f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb @@ -25,6 +25,8 @@ module Actions # Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. # # @option arguments [String] :name the name of the autoscaling policy + # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body the specification of the autoscaling policy (*Required*) # @@ -50,7 +52,7 @@ def put_autoscaling_policy(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = "_autoscaling/policy/#{Utils.__listify(_name)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From aa6eb3f6d22411e59aa279141e44c6c292238c3e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 23 May 2024 06:06:18 +0000 Subject: [PATCH 270/540] [API] Promotes ml.update_traned_model_deployment to stable Adds number_of_allocations integer parameter --- .../update_trained_model_deployment.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb index 2b08fa5dc5..64c623c328 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb @@ -23,14 +23,11 @@ module API module MachineLearning module Actions # Updates certain properties of trained model deployment. - # This functionality is in Beta and is subject to change. The design and - # code is less mature than official GA features and is being provided - # as-is with no warranties. Beta features are not subject to the support - # SLA of official GA features. # # @option arguments [String] :model_id The unique identifier of the trained model. + # @option arguments [Integer] :number_of_allocations Update the model deployment to this number of allocations. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The updated trained model deployment settings (*Required*) + # @option arguments [Hash] :body The updated trained model deployment settings # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-trained-model-deployment.html # @@ -42,7 +39,6 @@ def update_trained_model_deployment(arguments = {}) end request_opts[:defined_params] = defined_params unless defined_params.empty? - raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] arguments = arguments.clone @@ -54,7 +50,7 @@ def update_trained_model_deployment(arguments = {}) method = Elasticsearch::API::HTTP_POST path = "_ml/trained_models/#{Utils.__listify(_model_id)}/deployment/_update" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From 4d73521f5cdf1caa79fefd0cfa527e9f4313118e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 23 May 2024 10:41:20 +0100 Subject: [PATCH 271/540] [API] Test Runner: Skips simulate legacy template test --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index bc38190451..8b727457ca 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -92,3 +92,9 @@ - :file: 'capabilities/10_basic.yml' :description: '*' +- + :file: 'indices.simulate_index_template/10_basic.yml' + :description: 'Simulate index matches overlapping legacy and composable templates' +- + :file: 'indices.simulate_template/10_basic.yml' + :description: 'Simulate template matches overlapping legacy and composable templates' From d96b5538d2b4bbbdf9177b8fda41d81ba3a59089 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 23 May 2024 13:16:35 +0100 Subject: [PATCH 272/540] [Gem] ESQL version parameter is not a thing anymore Reverts changes from 731f582071003072050eca654edb6ececf264d55 --- .../lib/elasticsearch/helpers/esql_helper.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb index 2734397df4..883ae0d514 100644 --- a/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb +++ b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb @@ -60,8 +60,7 @@ module ESQLHelper # @see https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/Helpers.html#_esql_helper # def self.query(client, query, params = {}, parser: {}) - request = build_request(query, params) - response = client.esql.query(request) + response = client.esql.query({ body: { query: query }, format: 'json' }.merge(params)) columns = response['columns'] response['values'].map do |value| @@ -72,15 +71,6 @@ def self.query(client, query, params = {}, parser: {}) end.reduce({}, :merge) end end - - def self.build_request(query, params) - { - body: { - query: query, - version: params.delete(:version) || '2024.04.01' }, - format: 'json' - }.merge(params) - end end end end From 6bb9d27f0143c895be3c816b408d4569f753879d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 24 May 2024 06:06:37 +0000 Subject: [PATCH 273/540] [API] Adds master_timeout to shutdown.get_node --- .../lib/elasticsearch/api/actions/shutdown/get_node.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb index f7d62070cb..a54d202492 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb @@ -25,6 +25,7 @@ module Actions # Retrieve status of a node or nodes that are currently marked as shutting down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. # # @option arguments [String] :node_id Which node for which to retrieve the shutdown status + # @option arguments [Time] :master_timeout Timeout for processing on master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current @@ -50,7 +51,7 @@ def get_node(arguments = {}) else '_nodes/shutdown' end - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From 51e2500b149e59625149092f65ff44f5939ae5f7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 29 May 2024 16:05:20 +0100 Subject: [PATCH 274/540] [API] Adds timeout parameters to watcher namespace APIs --- .../lib/elasticsearch/api/actions/watcher/get_settings.rb | 3 ++- .../lib/elasticsearch/api/actions/watcher/start.rb | 3 ++- .../lib/elasticsearch/api/actions/watcher/stop.rb | 3 ++- .../lib/elasticsearch/api/actions/watcher/update_settings.rb | 4 +++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb index 730ad3ed93..00eb7f13f6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb @@ -24,6 +24,7 @@ module Watcher module Actions # Retrieve settings for the watcher system index # + # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-settings.html @@ -38,7 +39,7 @@ def get_settings(arguments = {}) method = Elasticsearch::API::HTTP_GET path = '_watcher/settings' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb index a02d5a04d4..ef2b8ea8e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb @@ -24,6 +24,7 @@ module Watcher module Actions # Starts Watcher if it is not already running. # + # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html @@ -38,7 +39,7 @@ def start(arguments = {}) method = Elasticsearch::API::HTTP_POST path = '_watcher/_start' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb index 5ebecfbdf7..2f112aedd6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb @@ -24,6 +24,7 @@ module Watcher module Actions # Stops Watcher if it is running. # + # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html @@ -38,7 +39,7 @@ def stop(arguments = {}) method = Elasticsearch::API::HTTP_POST path = '_watcher/_stop' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb index bac6c47c04..b316761c9e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb @@ -24,6 +24,8 @@ module Watcher module Actions # Update settings for the watcher system index # + # @option arguments [Time] :timeout Specify timeout for waiting for acknowledgement from all nodes + # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object with the new index settings (*Required*) # @@ -41,7 +43,7 @@ def update_settings(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = '_watcher/settings' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From eda77506a18719e2205875497b62e3971d22639d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 30 May 2024 13:00:26 +0100 Subject: [PATCH 275/540] [API] Adds master_timeout parameter to enrich endpoints --- .../lib/elasticsearch/api/actions/enrich/delete_policy.rb | 3 ++- .../lib/elasticsearch/api/actions/enrich/execute_policy.rb | 1 + .../lib/elasticsearch/api/actions/enrich/get_policy.rb | 3 ++- .../lib/elasticsearch/api/actions/enrich/put_policy.rb | 3 ++- .../lib/elasticsearch/api/actions/enrich/stats.rb | 3 ++- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb index 667e472f32..de116ae993 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb @@ -25,6 +25,7 @@ module Actions # Deletes an existing enrich policy and its enrich index. # # @option arguments [String] :name The name of the enrich policy + # @option arguments [Time] :master_timeout Timeout for processing on master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html @@ -48,7 +49,7 @@ def delete_policy(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = "_enrich/policy/#{Utils.__listify(_name)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb index c06a3417bd..f30444fefe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb @@ -26,6 +26,7 @@ module Actions # # @option arguments [String] :name The name of the enrich policy # @option arguments [Boolean] :wait_for_completion Should the request should block until the execution is complete. + # @option arguments [Time] :master_timeout Timeout for processing on master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb index 262b027229..802e5d1027 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb @@ -25,6 +25,7 @@ module Actions # Gets information about an enrich policy. # # @option arguments [List] :name A comma-separated list of enrich policy names + # @option arguments [Time] :master_timeout Timeout for processing on master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html @@ -50,7 +51,7 @@ def get_policy(arguments = {}) else '_enrich/policy' end - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb index c60eac2661..b93de33b2c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb @@ -25,6 +25,7 @@ module Actions # Creates a new enrich policy. # # @option arguments [String] :name The name of the enrich policy + # @option arguments [Time] :master_timeout Timeout for processing on master node # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The enrich policy to register (*Required*) # @@ -50,7 +51,7 @@ def put_policy(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = "_enrich/policy/#{Utils.__listify(_name)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb index 7fc8597f8c..8a71c336d4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb @@ -24,6 +24,7 @@ module Enrich module Actions # Gets enrich coordinator statistics and information about enrich policies that are currently executing. # + # @option arguments [Time] :master_timeout Timeout for processing on master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html @@ -38,7 +39,7 @@ def stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = '_enrich/_stats' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From ad4dc43cf8ab4a164e595e5141e99f32c4777805 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Sat, 1 Jun 2024 06:06:07 +0000 Subject: [PATCH 276/540] [API] Adds master_timeout parameter to cluster.allocation_explain Auto-generated API code --- .../lib/elasticsearch/api/actions/cluster/allocation_explain.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb index 2f93e73d46..08abe8949a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb @@ -24,6 +24,7 @@ module Cluster module Actions # Provides explanations for shard allocations in the cluster. # + # @option arguments [Time] :master_timeout Timeout for connection to master node # @option arguments [Boolean] :include_yes_decisions Return 'YES' decisions in explanation (default: false) # @option arguments [Boolean] :include_disk_info Return information about disk usage and shard sizes (default: false) # @option arguments [Hash] :headers Custom HTTP headers From 247fc2eda6c4191703f5275d181ff2d47863479a Mon Sep 17 00:00:00 2001 From: marciw <333176+marciw@users.noreply.github.com> Date: Thu, 6 Jun 2024 04:06:17 -0400 Subject: [PATCH 277/540] [DOCS] Restructure helper docs for ES|QL GA (#2399) --- docs/connecting.asciidoc | 8 +- docs/helpers.asciidoc | 257 ------------------------------ docs/helpers/bulk-scroll.asciidoc | 162 +++++++++++++++++++ docs/helpers/esql.asciidoc | 128 +++++++++++++++ docs/helpers/index.asciidoc | 10 ++ docs/index.asciidoc | 5 +- 6 files changed, 308 insertions(+), 262 deletions(-) delete mode 100644 docs/helpers.asciidoc create mode 100644 docs/helpers/bulk-scroll.asciidoc create mode 100644 docs/helpers/esql.asciidoc create mode 100644 docs/helpers/index.asciidoc diff --git a/docs/connecting.asciidoc b/docs/connecting.asciidoc index 67e3add2b7..80e2acba63 100644 --- a/docs/connecting.asciidoc +++ b/docs/connecting.asciidoc @@ -23,7 +23,7 @@ This document contains code snippets to show you how to connect to various {es} If you are using https://www.elastic.co/cloud[Elastic Cloud], the client offers an easy way to connect to it. You need the Cloud ID that you can find in the cloud console, then your username and password. -image::docs/images/cloud_id.png["Cloud ID"] +image::images/cloud_id.png["Cloud ID"] Once you have collected the Cloud ID you can use the client to connect to your Elastic Cloud instance, as follows: @@ -40,15 +40,15 @@ client = Elasticsearch::Client.new( You can also connect to the Cloud by using API Key authentication. You can generate an `API key` in the `Management` page under the section `Security`. -image::docs/images/cloud_api_key.png["API key"] +image::images/cloud_api_key.png["API key"] When you click on `Create API key` you can choose a name and set the other options (eg. restrict privileges, expire after time, etc). -image::docs/images/api_key_name.png["Choose an API name"] +image::images/api_key_name.png["Choose an API name"] After this step you will get the `API key` in the API keys page. -image::docs/images/cloud_api_key.png["API key"] +image::images/cloud_api_key.png["API key"] **IMPORTANT**: you need to copy and store the `API key` in a secure place, since you will not be able to view it again in Elastic Cloud. diff --git a/docs/helpers.asciidoc b/docs/helpers.asciidoc deleted file mode 100644 index 4fdb573275..0000000000 --- a/docs/helpers.asciidoc +++ /dev/null @@ -1,257 +0,0 @@ -[[Helpers]] -== Client Helpers - -The {es} Ruby client includes some useful helpers for a more comfortable experience with some APIs. - -[discrete] -=== Bulk Helper - -The Bulk API in Elasticsearch allows you to perform multiple indexing or deletion operations through a single API call, resulting in reduced overhead and improved indexing speed. The actions are specified in the request body using a newline delimited JSON (NDJSON) structure. In the Elasticsearch Ruby client, the `bulk` method supports several data structures as a parameter. You can use the Bulk API in an idiomatic way without concerns about payload formatting. Refer to <> for more information. - - -The BulkHelper provides a better developer experience when using the Bulk API. At its simplest, you can send it a collection of hashes in an array, and it will bulk ingest them into {es}. - -To use the BulkHelper, require it in your code: - -[source,ruby] ----- -require 'elasticsearch/helpers/bulk_helper' ----- - -Instantiate a BulkHelper with a client, and an index: -[source,ruby] ----- -client = Elasticsearch::Client.new -bulk_helper = Elasticsearch::Helpers::BulkHelper.new(client, index) ----- - -This helper works on the index you pass in during initialization, but you can change the index at any time in your code: - -[source,ruby] ----- -bulk_helper.index = 'new_index' ----- - -If you want to index a collection of documents, use the `ingest` method: - -[source,ruby] ----- -documents = [ - { name: 'document1', date: '2024-05-16' }, - { name: 'document2', date: '2023-12-19' }, - { name: 'document3', date: '2024-07-07' } -] -bulk_helper.ingest(documents) ----- - -If you're ingesting a large set of data and want to separate the documents into smaller pieces before sending them to {es}, use the `slice` parameter. - -[source,ruby] ----- -bulk_helper.ingest(documents, { slice: 2 }) ----- - -This way the data will be sent in two different bulk requests. - -You can also include the parameters you would send to the Bulk API either in the query parameters or in the request body. The method signature is `ingest(docs, params = {}, body = {}, &block)`. Additionally, the method can be called with a block, that will provide access to the response object received from calling the Bulk API and the documents sent in the request: - -[source,ruby] ----- -helper.ingest(documents) { |_, docs| puts "Ingested #{docs.count} documents" } ----- - -You can update and delete documents with the BulkHelper too. To delete a set of documents, you can send an array of document ids: - -[source,ruby] ----- -ids = ['shm0I4gB6LpJd9ljO9mY', 'sxm0I4gB6LpJd9ljO9mY', 'tBm0I4gB6LpJd9ljO9mY', 'tRm0I4gB6LpJd9ljO9mY', 'thm0I4gB6LpJd9ljO9mY', 'txm0I4gB6LpJd9ljO9mY', 'uBm0I4gB6LpJd9ljO9mY', 'uRm0I4gB6LpJd9ljO9mY', 'uhm0I4gB6LpJd9ljO9mY', 'uxm0I4gB6LpJd9ljO9mY'] -helper.delete(ids) ----- - -To update documents, you can send the array of documents with their respective ids: -[source,ruby] ----- -documents = [ - {name: 'updated name 1', id: 'AxkFJYgB6LpJd9ljOtr7'}, - {name: 'updated name 2', id: 'BBkFJYgB6LpJd9ljOtr7'} -] -helper.update(documents) ----- - -[discrete] -==== Ingest a JSON file - -`BulkHelper` also provides a helper to ingest data straight from a JSON file. By giving a file path as an input, the helper will parse and ingest the documents in the file: - -[source,ruby] ----- -file_path = './data.json' -helper.ingest_json(file_path) ----- - -In cases where the array of data you want to ingest is not necessarily in the root of the JSON file, you can provide the keys to access the data, for example given the following JSON file: - -[source,json] ----- -{ - "field": "value", - "status": 200, - "data": { - "items": [ - { - "name": "Item 1", - (...) - }, - { - (...) - ] - } -} ----- - -The following is an example of the Ruby code to ingest the documents in the JSON above: - -[source,ruby] ----- -bulk_helper.ingest_json(file_path, { keys: ['data', 'items'] }) ----- - -[discrete] -=== Scroll Helper - -This helper provides an easy way to get results from a Scroll. - -To use the ScrollHelper, require it in your code: - -[source,ruby] ----- -require 'elasticsearch/helpers/scroll_helper' ----- - -Instantiate a ScrollHelper with a client, an index, and a body (with the scroll API parameters) which will be used in every following scroll request: - -[source,ruby] ----- -client = Elasticsearch::Client.new -scroll_helper = Elasticsearch::Helpers::ScrollHelper.new(client, index, body) ----- - -There are two ways to get the results from a scroll using the helper. - -1. You can iterate over a scroll using the methods in `Enumerable` such as `each` and `map`: -+ --- -[source,ruby] ----- -scroll_helper.each do |item| - puts item -end ----- --- -2. You can fetch results by page, with the `results` function: -+ --- -[source,ruby] ----- -my_documents = [] -while !(documents = scroll_helper.results).empty? - my_documents << documents -end -scroll_helper.clear ----- --- - -[discrete] -[[esql-helper]] -=== ES|QL Helper - -This functionality is Experimental and may be changed or removed completely in a future release. If you have any feedback on this helper, please https://github.com/elastic/elasticsearch-ruby/issues/new/choose[let us know]. - -The helper provides an object response from the ESQL `query` API instead of the default JSON value. - -To use the ES|QL helper, require it in your code: - -[source,ruby] ----- -require 'elasticsearch/helpers/esql_helper' ----- - -By default, the `query` API returns a Hash response with `columns` and `values` like so: - -[source,ruby] ----- -query = <[ - {"name"=>"@timestamp", "type"=>"date"}, - {"name"=>"client.ip", "type"=>"ip"}, - {"name"=>"event.duration", "type"=>"long"}, - {"name"=>"message", "type"=>"keyword"}, - {"name"=>"duration_ms", "type"=>"double"} -], -"values"=>[ - ["2023-10-23T12:15:03.360Z", "172.21.2.162", 3450233, "Connected to 10.1.0.3", 3.5], - ["2023-10-23T12:27:28.948Z", "172.21.2.113", 2764889, "Connected to 10.1.0.2", 2.8], - ["2023-10-23T13:33:34.937Z", "172.21.0.5", 1232382, "Disconnected", 1.2], - ["2023-10-23T13:51:54.732Z", "172.21.3.15", 725448, "Connection error", 0.7], - ["2023-10-23T13:52:55.015Z", "172.21.3.15", 8268153, "Connection error", 8.3], - ["2023-10-23T13:53:55.832Z", "172.21.3.15", 5033755, "Connection error", 5.0], - ["2023-10-23T13:55:01.543Z", "172.21.3.15", 1756467, "Connected to 10.1.0.1", 1.8] -]} ----- - -The helper returns an array of hashes with the columns as keys and the respective values. So for the previous example, it would return the following: - -[source,ruby] ----- -response = Elasticsearch::Helpers::ESQLHelper.query(client, query) - -puts response - -{"duration_ms"=>3.5, "message"=>"Connected to 10.1.0.3", "event.duration"=>3450233, "client.ip"=>"172.21.2.162", "@timestamp"=>"2023-10-23T12:15:03.360Z"} -{"duration_ms"=>2.8, "message"=>"Connected to 10.1.0.2", "event.duration"=>2764889, "client.ip"=>"172.21.2.113", "@timestamp"=>"2023-10-23T12:27:28.948Z"} -{"duration_ms"=>1.2, "message"=>"Disconnected", "event.duration"=>1232382, "client.ip"=>"172.21.0.5", "@timestamp"=>"2023-10-23T13:33:34.937Z"} -{"duration_ms"=>0.7, "message"=>"Connection error", "event.duration"=>725448, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:51:54.732Z"} -{"duration_ms"=>8.3, "message"=>"Connection error", "event.duration"=>8268153, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:52:55.015Z"} ----- - -Additionally, you can transform the data in the response by passing in a Hash of `column => Proc` values. You could use this for example to convert '@timestamp' into a DateTime object. Pass in a Hash to `query` as a `parser` defining a `Proc` for each value you'd like to parse: - -[source,ruby] ----- -require 'elasticsearch/helpers/esql_helper' - -parser = { - '@timestamp' => Proc.new { |t| DateTime.parse(t) } -} -response = Elasticsearch::Helpers::ESQLHelper.query(client, query, parser: parser) -response.first['@timestamp'] -# ----- - -You can pass in as many Procs as there are columns in the response. For example: - -[source,ruby] ----- -parser = { - '@timestamp' => Proc.new { |t| DateTime.parse(t) }, - 'client.ip' => Proc.new { |i| IPAddr.new(i) }, - 'event.duration' => Proc.new { |d| d.to_s } -} - -response = Elasticsearch::Helpers::ESQLHelper.query(client, query, parser: parser) - -puts response - -{"duration_ms"=>3.5, "message"=>"Connected to 10.1.0.3", "event.duration"=>"3450233", "client.ip"=>#, "@timestamp"=>#} -{"duration_ms"=>2.8, "message"=>"Connected to 10.1.0.2", "event.duration"=>"2764889", "client.ip"=>#, "@timestamp"=>#} -{"duration_ms"=>1.2, "message"=>"Disconnected", "event.duration"=>"1232382", "client.ip"=>#, "@timestamp"=>#} -{"duration_ms"=>0.7, "message"=>"Connection error", "event.duration"=>"725448", "client.ip"=>#, "@timestamp"=>#} -{"duration_ms"=>8.3, "message"=>"Connection error", "event.duration"=>"8268153", "client.ip"=>#, "@timestamp"=>#} ----- diff --git a/docs/helpers/bulk-scroll.asciidoc b/docs/helpers/bulk-scroll.asciidoc new file mode 100644 index 0000000000..8d638bab65 --- /dev/null +++ b/docs/helpers/bulk-scroll.asciidoc @@ -0,0 +1,162 @@ +[[Helpers]] +=== Bulk and Scroll helpers + +The {es} Ruby client includes Bulk and Scroll helpers for working with results more efficiently. + +[discrete] +==== Bulk helper + +The Bulk API in Elasticsearch allows you to perform multiple indexing or deletion operations through a single API call, resulting in reduced overhead and improved indexing speed. The actions are specified in the request body using a newline delimited JSON (NDJSON) structure. In the Elasticsearch Ruby client, the `bulk` method supports several data structures as a parameter. You can use the Bulk API in an idiomatic way without concerns about payload formatting. Refer to <> for more information. + + +The BulkHelper provides a better developer experience when using the Bulk API. At its simplest, you can send it a collection of hashes in an array, and it will bulk ingest them into {es}. + +To use the BulkHelper, require it in your code: + +[source,ruby] +---- +require 'elasticsearch/helpers/bulk_helper' +---- + +Instantiate a BulkHelper with a client, and an index: +[source,ruby] +---- +client = Elasticsearch::Client.new +bulk_helper = Elasticsearch::Helpers::BulkHelper.new(client, index) +---- + +This helper works on the index you pass in during initialization, but you can change the index at any time in your code: + +[source,ruby] +---- +bulk_helper.index = 'new_index' +---- + +If you want to index a collection of documents, use the `ingest` method: + +[source,ruby] +---- +documents = [ + { name: 'document1', date: '2024-05-16' }, + { name: 'document2', date: '2023-12-19' }, + { name: 'document3', date: '2024-07-07' } +] +bulk_helper.ingest(documents) +---- + +If you're ingesting a large set of data and want to separate the documents into smaller pieces before sending them to {es}, use the `slice` parameter. + +[source,ruby] +---- +bulk_helper.ingest(documents, { slice: 2 }) +---- + +This way the data will be sent in two different bulk requests. + +You can also include the parameters you would send to the Bulk API either in the query parameters or in the request body. The method signature is `ingest(docs, params = {}, body = {}, &block)`. Additionally, the method can be called with a block, that will provide access to the response object received from calling the Bulk API and the documents sent in the request: + +[source,ruby] +---- +helper.ingest(documents) { |_, docs| puts "Ingested #{docs.count} documents" } +---- + +You can update and delete documents with the BulkHelper too. To delete a set of documents, you can send an array of document ids: + +[source,ruby] +---- +ids = ['shm0I4gB6LpJd9ljO9mY', 'sxm0I4gB6LpJd9ljO9mY', 'tBm0I4gB6LpJd9ljO9mY', 'tRm0I4gB6LpJd9ljO9mY', 'thm0I4gB6LpJd9ljO9mY', 'txm0I4gB6LpJd9ljO9mY', 'uBm0I4gB6LpJd9ljO9mY', 'uRm0I4gB6LpJd9ljO9mY', 'uhm0I4gB6LpJd9ljO9mY', 'uxm0I4gB6LpJd9ljO9mY'] +helper.delete(ids) +---- + +To update documents, you can send the array of documents with their respective ids: +[source,ruby] +---- +documents = [ + {name: 'updated name 1', id: 'AxkFJYgB6LpJd9ljOtr7'}, + {name: 'updated name 2', id: 'BBkFJYgB6LpJd9ljOtr7'} +] +helper.update(documents) +---- + +[discrete] +===== Ingest a JSON file + +`BulkHelper` also provides a helper to ingest data straight from a JSON file. By giving a file path as an input, the helper will parse and ingest the documents in the file: + +[source,ruby] +---- +file_path = './data.json' +helper.ingest_json(file_path) +---- + +In cases where the array of data you want to ingest is not necessarily in the root of the JSON file, you can provide the keys to access the data, for example given the following JSON file: + +[source,json] +---- +{ + "field": "value", + "status": 200, + "data": { + "items": [ + { + "name": "Item 1", + (...) + }, + { + (...) + ] + } +} +---- + +The following is an example of the Ruby code to ingest the documents in the JSON above: + +[source,ruby] +---- +bulk_helper.ingest_json(file_path, { keys: ['data', 'items'] }) +---- + +[discrete] +==== Scroll helper + +This helper provides an easy way to get results from a Scroll. + +To use the ScrollHelper, require it in your code: + +[source,ruby] +---- +require 'elasticsearch/helpers/scroll_helper' +---- + +Instantiate a ScrollHelper with a client, an index, and a body (with the scroll API parameters) which will be used in every following scroll request: + +[source,ruby] +---- +client = Elasticsearch::Client.new +scroll_helper = Elasticsearch::Helpers::ScrollHelper.new(client, index, body) +---- + +There are two ways to get the results from a scroll using the helper. + +1. You can iterate over a scroll using the methods in `Enumerable` such as `each` and `map`: ++ +-- +[source,ruby] +---- +scroll_helper.each do |item| + puts item +end +---- +-- +2. You can fetch results by page, with the `results` function: ++ +-- +[source,ruby] +---- +my_documents = [] +while !(documents = scroll_helper.results).empty? + my_documents << documents +end +scroll_helper.clear +---- +-- diff --git a/docs/helpers/esql.asciidoc b/docs/helpers/esql.asciidoc new file mode 100644 index 0000000000..9a310911b5 --- /dev/null +++ b/docs/helpers/esql.asciidoc @@ -0,0 +1,128 @@ +[[esql]] +=== ES|QL in the Ruby client +++++ +ES|QL +++++ + +This page helps you understand and use {ref}/esql.html[ES|QL] in the +Ruby client. + +There are two ways to use ES|QL in the Ruby client: + +* Use the Elasticsearch {es-docs}/esql-apis.html[ES|QL API] directly: This +is the most flexible approach, but it's also the most complex because you must handle +results in their raw form. You can choose the precise format of results, +such as JSON, CSV, or text. +* Use the Ruby ES|QL helper: The helper maps the raw response to an object that's +more readily usable by your application. + + +[discrete] +[[esql-how-to]] +==== ES|QL API + +The {es-docs}/esql-query-api.html[ES|QL query API] allows you to specify how +results should be returned. You can choose a +{es-docs}/esql-rest.html#esql-rest-format[response format] such as CSV, text, or +JSON, then fine-tune it with parameters like column separators and locale. + +By default, the `query` API returns a Hash response with `columns` and `values`: + +[[esql-query]] +[source,ruby] +---- +query = <[ + {"name"=>"@timestamp", "type"=>"date"}, + {"name"=>"client.ip", "type"=>"ip"}, + {"name"=>"event.duration", "type"=>"long"}, + {"name"=>"message", "type"=>"keyword"}, + {"name"=>"duration_ms", "type"=>"double"} +], +"values"=>[ + ["2023-10-23T12:15:03.360Z", "172.21.2.162", 3450233, "Connected to 10.1.0.3", 3.5], + ["2023-10-23T12:27:28.948Z", "172.21.2.113", 2764889, "Connected to 10.1.0.2", 2.8], + ["2023-10-23T13:33:34.937Z", "172.21.0.5", 1232382, "Disconnected", 1.2], + ["2023-10-23T13:51:54.732Z", "172.21.3.15", 725448, "Connection error", 0.7], + ["2023-10-23T13:52:55.015Z", "172.21.3.15", 8268153, "Connection error", 8.3], + ["2023-10-23T13:53:55.832Z", "172.21.3.15", 5033755, "Connection error", 5.0], + ["2023-10-23T13:55:01.543Z", "172.21.3.15", 1756467, "Connected to 10.1.0.1", 1.8] +]} +---- + + +[discrete] +[[esql-helper]] +==== ES|QL helper + +The ES|QL helper in the Ruby client provides an object response from the ES|QL +query API, instead of the default JSON value. + +To use the ES|QL helper, require it in your code: + +[source,ruby] +---- +require 'elasticsearch/helpers/esql_helper' +---- + +The helper returns an array of hashes with the columns as keys and the +respective values. Using the <>, the helper returns +the following: + +[source,ruby] +---- +response = Elasticsearch::Helpers::ESQLHelper.query(client, query) + +puts response + +{"duration_ms"=>3.5, "message"=>"Connected to 10.1.0.3", "event.duration"=>3450233, "client.ip"=>"172.21.2.162", "@timestamp"=>"2023-10-23T12:15:03.360Z"} +{"duration_ms"=>2.8, "message"=>"Connected to 10.1.0.2", "event.duration"=>2764889, "client.ip"=>"172.21.2.113", "@timestamp"=>"2023-10-23T12:27:28.948Z"} +{"duration_ms"=>1.2, "message"=>"Disconnected", "event.duration"=>1232382, "client.ip"=>"172.21.0.5", "@timestamp"=>"2023-10-23T13:33:34.937Z"} +{"duration_ms"=>0.7, "message"=>"Connection error", "event.duration"=>725448, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:51:54.732Z"} +{"duration_ms"=>8.3, "message"=>"Connection error", "event.duration"=>8268153, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:52:55.015Z"} +---- + +Additionally, you can transform the data in the response by passing in a Hash +of `column => Proc` values. You could use this for example to convert +'@timestamp' into a DateTime object. Pass in a Hash to `query` as a `parser` +defining a `Proc` for each value you'd like to parse: + +[source,ruby] +---- +require 'elasticsearch/helpers/esql_helper' + +parser = { + '@timestamp' => Proc.new { |t| DateTime.parse(t) } +} +response = Elasticsearch::Helpers::ESQLHelper.query(client, query, parser: parser) +response.first['@timestamp'] +# +---- + +You can pass in as many Procs as there are columns in the response. For example: + +[source,ruby] +---- +parser = { + '@timestamp' => Proc.new { |t| DateTime.parse(t) }, + 'client.ip' => Proc.new { |i| IPAddr.new(i) }, + 'event.duration' => Proc.new { |d| d.to_s } +} + +response = Elasticsearch::Helpers::ESQLHelper.query(client, query, parser: parser) + +puts response + +{"duration_ms"=>3.5, "message"=>"Connected to 10.1.0.3", "event.duration"=>"3450233", "client.ip"=>#, "@timestamp"=>#} +{"duration_ms"=>2.8, "message"=>"Connected to 10.1.0.2", "event.duration"=>"2764889", "client.ip"=>#, "@timestamp"=>#} +{"duration_ms"=>1.2, "message"=>"Disconnected", "event.duration"=>"1232382", "client.ip"=>#, "@timestamp"=>#} +{"duration_ms"=>0.7, "message"=>"Connection error", "event.duration"=>"725448", "client.ip"=>#, "@timestamp"=>#} +{"duration_ms"=>8.3, "message"=>"Connection error", "event.duration"=>"8268153", "client.ip"=>#, "@timestamp"=>#} +---- diff --git a/docs/helpers/index.asciidoc b/docs/helpers/index.asciidoc new file mode 100644 index 0000000000..1e475886cd --- /dev/null +++ b/docs/helpers/index.asciidoc @@ -0,0 +1,10 @@ +[[client-helpers]] +== Client helpers + +The Ruby client includes the following helpers: + +* <> +* <> + +include::bulk-scroll.asciidoc[] +include::esql.asciidoc[] \ No newline at end of file diff --git a/docs/index.asciidoc b/docs/index.asciidoc index 48a3fa171c..b83dd47058 100644 --- a/docs/index.asciidoc +++ b/docs/index.asciidoc @@ -2,8 +2,11 @@ :doctype: book +include::{asciidoc-dir}/../../shared/versions/stack/{source_branch}.asciidoc[] include::{asciidoc-dir}/../../shared/attributes.asciidoc[] +:es-docs: https://www.elastic.co/guide/en/elasticsearch/reference/{branch} + include::overview.asciidoc[] include::getting-started.asciidoc[] @@ -24,6 +27,6 @@ include::examples.asciidoc[] include::troubleshooting.asciidoc[] -include::helpers.asciidoc[] +include::helpers/index.asciidoc[] include::release_notes/index.asciidoc[] From 0ce567a9cc518229702526bb193ec447d681a900 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 5 Jun 2024 12:20:31 +0100 Subject: [PATCH 278/540] [DOCS] Removes experimental from ES|QL Helper --- elasticsearch/lib/elasticsearch/helpers/esql_helper.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb index 883ae0d514..e8d3d8cbf8 100644 --- a/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb +++ b/elasticsearch/lib/elasticsearch/helpers/esql_helper.rb @@ -18,10 +18,6 @@ module Elasticsearch module Helpers # Elasticsearch Client Helper for the ES|QL API - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html # From 9f05cf1422115af8f2a879eb80e2bceb8e3e7e1b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 5 Jun 2024 15:48:38 +0100 Subject: [PATCH 279/540] [API] Clean up unused namespace --- elasticsearch-api/lib/elasticsearch/api.rb | 3 +- .../api/namespace/data_streams.rb | 36 ------------------- 2 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/data_streams.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index 5141709dd9..2548b1b82b 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -87,8 +87,7 @@ def self.included(base) Elasticsearch::API::Inference, Elasticsearch::API::Profiling, Elasticsearch::API::Simulate, - Elasticsearch::API::Connector, - Elasticsearch::API::DataStreams + Elasticsearch::API::Connector end # The serializer class diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/data_streams.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/data_streams.rb deleted file mode 100644 index 2ed6da1f27..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/data_streams.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module DataStreams - module Actions; end - - # Client for the "data_streams" namespace (includes the {DataStreams::Actions} methods) - # - class DataStreamsClient - include Common::Client, Common::Client::Base, DataStreams::Actions - end - - # Proxy method for {DataStreamsClient}, available in the receiving object - # - def data_streams - @data_streams ||= DataStreamsClient.new(self) - end - end - end -end From 7a51e635f36fec4a071991c6437de7a2175e95b7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 5 Jun 2024 15:57:12 +0100 Subject: [PATCH 280/540] [DOCS] Release notes 8.14 --- CHANGELOG.md | 46 +++++++++++++++++++++++++++ docs/release_notes/814.asciidoc | 52 +++++++++++++++++++++++++++++++ docs/release_notes/index.asciidoc | 2 ++ 3 files changed, 100 insertions(+) create mode 100644 docs/release_notes/814.asciidoc diff --git a/CHANGELOG.md b/CHANGELOG.md index 91b000e55b..5db2143d09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,51 @@ *See the full release notes on the official documentation website: https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/release_notes.html* +## 8.14.0 Release notes + +### Client +* Tested versions of Ruby for 8.14.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. + +### API + +API changes: + +- All Connector APIs have been migrated to one common namespace `connector`: + - `connector_secret.delete` -> `connector.secret_delete` + - `connector_secret.get` -> `connector.secret_get` + - `connector_secret.post` -> `connector.secret_post` + - `connector_secret.put` -> `connector.secret_put` + - `connector_sync_job.cancel` -> `connector.sync_job_cancel` + - `connector_sync_job.check_in` -> `connector.sync_job_check_in` + - `connector_sync_job.delete` -> `connector.sync_job_delete` + - `connector_sync_job.error` -> `connector.sync_job_error` + - `connector_sync_job.get` -> `connector.sync_job_get` + - `connector_sync_job.post` -> `connector.sync_job_post` + - `connector_sync_job.update_stats` -> `connector.sync_job_update_stats` + +- `connector.delete` - Adds Boolean parameter `:delete_sync_jobs`: Determines whether associated sync jobs are also deleted. +- `cross_cluster_replication.delete_auto_follow_pattern`, `cross_cluster_replication.follow`, `cross_cluster_replication.follow_info`, `cross_cluster_replication.get_auto_follow_pattern`, `cross_cluster_replication.pause_auto_follow_pattern`, `cross_cluster_replication.pause_follow`, `cross_cluster_replication.put_auto_follow_pattern`, `cross_cluster_replication.resume_auto_follow_pattern`, `cross_cluster_replication.resume_follow`, `cross_cluster_replication.stats`, `cross_cluster_replication.unfollow` - Add Time parameter `:master_timeout`: Explicit operation timeout for connection to master node. +- `cross_cluster_replication.follow_stats`, `cross_cluster_replication.forget_follower`, `cross_cluster_replication.stats` - Add Time parameter `:timeout`: Explicit operation timeout. +- `indices/rollover` - Adds Boolean parameter `:target_failure` If set to true, the rollover action will be applied on the failure store of the data stream. +- `inference.get_model` - Parameter `inference_id` no longer required. +- `search_application.search` - Adds Boolean parameter `:typed_keys`: Specify whether aggregation and suggester names should be prefixed by their respective types in the response. +- `security.get_api_key`, `security.query_api_keys` - Add Boolean parameter `:with_profile_uid`: flag to also retrieve the API Key's owner profile uid, if it exists. + +New APIs: + +- `profiling.topn_functions` - Extracts a list of topN functions from Universal Profiling. +- `text_structure.find_field_structure` - Finds the structure of a text field in an index. +- `text_structure/find_message_structure`- Finds the structure of a list of messages. The messages must contain data that is suitable to be ingested into Elasticsearch. + +APIs Migrated from experimental to stable: + +- `esql.async_query` +- `esql.query` + +New Experimental APIs: + +- `connector.update_active_filtering` - Activates the draft filtering rules if they are in a validated state. +- `connector.update_filtering_validation` - Updates the validation info of the draft filtering rules. + ## 8.13.0 Release notes ### Client diff --git a/docs/release_notes/814.asciidoc b/docs/release_notes/814.asciidoc new file mode 100644 index 0000000000..6bb42142f9 --- /dev/null +++ b/docs/release_notes/814.asciidoc @@ -0,0 +1,52 @@ +[[release_notes_8_14]] +=== 8.14 Release notes + +[discrete] +[[release_notes_8_14_0]] +=== 8.14.0 Release notes + +[discrete] +==== Client +* Tested versions of Ruby for 8.14.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. + +[discrete] +==== API + +API changes: + +* All Connector APIs have been migrated to one common namespace `connector`: +** `connector_secret.delete` -> `connector.secret_delete` +** `connector_secret.get` -> `connector.secret_get` +** `connector_secret.post` -> `connector.secret_post` +** `connector_secret.put` -> `connector.secret_put` +** `connector_sync_job.cancel` -> `connector.sync_job_cancel` +** `connector_sync_job.check_in` -> `connector.sync_job_check_in` +** `connector_sync_job.delete` -> `connector.sync_job_delete` +** `connector_sync_job.error` -> `connector.sync_job_error` +** `connector_sync_job.get` -> `connector.sync_job_get` +** `connector_sync_job.post` -> `connector.sync_job_post` +** `connector_sync_job.update_stats` -> `connector.sync_job_update_stats` + +* `connector.delete` - Adds Boolean parameter `:delete_sync_jobs`: Determines whether associated sync jobs are also deleted. +* `cross_cluster_replication.delete_auto_follow_pattern`, `cross_cluster_replication.follow`, `cross_cluster_replication.follow_info`, `cross_cluster_replication.get_auto_follow_pattern`, `cross_cluster_replication.pause_auto_follow_pattern`, `cross_cluster_replication.pause_follow`, `cross_cluster_replication.put_auto_follow_pattern`, `cross_cluster_replication.resume_auto_follow_pattern`, `cross_cluster_replication.resume_follow`, `cross_cluster_replication.stats`, `cross_cluster_replication.unfollow` - Add Time parameter `:master_timeout`: Explicit operation timeout for connection to master node. +* `cross_cluster_replication.follow_stats`, `cross_cluster_replication.forget_follower`, `cross_cluster_replication.stats` - Add Time parameter `:timeout`: Explicit operation timeout. +* `indices/rollover` - Adds Boolean parameter `:target_failure` If set to true, the rollover action will be applied on the failure store of the data stream. +* `inference.get_model` - Parameter `inference_id` no longer required. +* `search_application.search` - Adds Boolean parameter `:typed_keys`: Specify whether aggregation and suggester names should be prefixed by their respective types in the response. +* `security.get_api_key`, `security.query_api_keys` - Add Boolean parameter `:with_profile_uid`: flag to also retrieve the API Key's owner profile uid, if it exists. + +New APIs: + +- `profiling.topn_functions` - Extracts a list of topN functions from Universal Profiling. +- `text_structure.find_field_structure` - Finds the structure of a text field in an index. +- `text_structure/find_message_structure`- Finds the structure of a list of messages. The messages must contain data that is suitable to be ingested into Elasticsearch. + +APIs Migrated from experimental to stable: + +- `esql.async_query` +- `esql.query` + +New Experimental APIs: + +- `connector.update_active_filtering` - Activates the draft filtering rules if they are in a validated state. +- `connector.update_filtering_validation` - Updates the validation info of the draft filtering rules. diff --git a/docs/release_notes/index.asciidoc b/docs/release_notes/index.asciidoc index d55ad0b45a..ad7a008b4c 100644 --- a/docs/release_notes/index.asciidoc +++ b/docs/release_notes/index.asciidoc @@ -3,6 +3,7 @@ [discrete] === 8.x +* <> * <> * <> * <> @@ -35,6 +36,7 @@ * <> * <> +include::814.asciidoc[] include::813.asciidoc[] include::812.asciidoc[] include::811.asciidoc[] From df1c5564a7082d3106f6255a827f42c520de5226 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 6 Jun 2024 10:45:14 +0100 Subject: [PATCH 281/540] [API] Adds connector.update_features --- .../api/actions/connector/update_features.rb | 66 +++++++++++++++++++ .../actions/connector/update_features_spec.rb | 38 +++++++++++ 2 files changed, 104 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/update_features_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb new file mode 100644 index 0000000000..531a7c2ad1 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Updates the connector features in the connector document. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body An object containing the connector's features definition. (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-features-api.html + # + def update_features(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.update_features' } + + defined_params = [:connector_id].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 'connector_id' missing" unless arguments[:connector_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_id = arguments.delete(:connector_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/#{Utils.__listify(_connector_id)}/_features" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_features_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_features_spec.rb new file mode 100644 index 0000000000..c716a4774f --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_features_spec.rb @@ -0,0 +1,38 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#update_features' do + let(:expected_args) do + [ + 'PUT', + '_connector/foo/_features', + {}, + {}, + {}, + { + defined_params: { connector_id: 'foo' }, + endpoint: 'connector.update_features' + } + ] + end + + it 'performs the request' do + expect(client_double.connector.update_features(connector_id: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end From 7fe49b9ff04499154f7a1a4e41f12c10f1f5316f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 6 Jun 2024 14:27:30 +0100 Subject: [PATCH 282/540] [DOCS] Updates link to ES|QL helper docs (8.13) --- docs/release_notes/813.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release_notes/813.asciidoc b/docs/release_notes/813.asciidoc index 4280755673..0c3066d3e4 100644 --- a/docs/release_notes/813.asciidoc +++ b/docs/release_notes/813.asciidoc @@ -12,7 +12,7 @@ [discrete] ==== Experimental ES|QL Helper -This version provides a new experimental Helper for the ES|QL `query` API. Please check out https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/Helpers.html#esql-helper[the documentation] and https://github.com/elastic/elasticsearch-ruby/issues/new/choose[open an issue] if you encounter any problems or have any feedback. +This version provides a new experimental Helper for the ES|QL `query` API. Please check out https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/8.13/Helpers.html#esql-helper[the documentation] and https://github.com/elastic/elasticsearch-ruby/issues/new/choose[open an issue] if you encounter any problems or have any feedback. [discrete] ==== API From ff71f12987acd13c2686e88059c4dc6492d1f6e3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 7 Jun 2024 10:04:30 +0100 Subject: [PATCH 283/540] [CI] Use Ruby 3.3 for make.sh tasks --- .github/make.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/make.sh b/.github/make.sh index d71fb727d8..a3ce02170d 100755 --- a/.github/make.sh +++ b/.github/make.sh @@ -34,7 +34,7 @@ STACK_VERSION=$VERSION set -euo pipefail product="elastic/elasticsearch-ruby" -RUBY_VERSION=${RUBY_VERSION-3.1} +RUBY_VERSION=${RUBY_VERSION-3.3} WORKFLOW=${WORKFLOW-staging} echo -e "\033[34;1mINFO:\033[0m PRODUCT ${product}\033[0m" From 3697242de5d4d8447875488a8051998a8fd12598 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 7 Jun 2024 10:04:48 +0100 Subject: [PATCH 284/540] [API] Generator: Disables EmptyComment cop in Rubocop --- elasticsearch-api/utils/thor/.rubocop.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elasticsearch-api/utils/thor/.rubocop.yml b/elasticsearch-api/utils/thor/.rubocop.yml index ea30afd29b..98a88a262f 100644 --- a/elasticsearch-api/utils/thor/.rubocop.yml +++ b/elasticsearch-api/utils/thor/.rubocop.yml @@ -1,2 +1,4 @@ Layout/EndAlignment: AutoCorrect: true +Layout/EmptyComment: + Enabled: false From d0689cd8ec04402618359ea86400606ff3921ce3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 7 Jun 2024 15:29:09 +0100 Subject: [PATCH 285/540] Updates badges in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bc5966d69a..add1122dd0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Elasticsearch -[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.12](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.12.yml/badge.svg?branch=8.12)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.12.yml) [![8.13](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.13.yml/badge.svg?branch=8.13)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.13.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) +[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.13](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.13.yml/badge.svg?branch=8.13)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.13.yml) [![8.14](https://github.com/elastic/elasticsearch-ruby/actions/workflows/tests.yml/badge.svg?branch=8.14)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/tests.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) **[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)** or From 06b48993762f47f42a48f460ce3fa4b6a9a8fb95 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 10 Jun 2024 10:18:27 +0100 Subject: [PATCH 286/540] [API] Adds `dry_run` and `force` parameters to `inference.delete` --- .../lib/elasticsearch/api/actions/inference/delete.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb index 6e31b7a4b3..f9186d3c76 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb @@ -30,6 +30,8 @@ module Actions # # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type + # @option arguments [Boolean] :dry_run If true the endpoint will not be deleted and a list of ingest processors which reference this endpoint will be returned. + # @option arguments [Boolean] :force If true the endpoint will be forcefully stopped (regardless of whether or not it is referenced by any ingest processors or semantic text fields). # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-inference-api.html @@ -59,7 +61,7 @@ def delete(arguments = {}) else "_inference/#{Utils.__listify(_inference_id)}" end - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From c6b3965fc22932922555513da0d4456904484318 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 11 Jun 2024 10:03:50 +0100 Subject: [PATCH 287/540] [API] Adds timeout, master_timeout parameter to security APIs --- .../lib/elasticsearch/api/actions/security/get_settings.rb | 3 ++- .../lib/elasticsearch/api/actions/security/update_settings.rb | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb index 75a65b7f77..ce1a6ba852 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb @@ -24,6 +24,7 @@ module Security module Actions # Retrieve settings for the security system indices # + # @option arguments [Time] :master_timeout Timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-settings.html @@ -38,7 +39,7 @@ def get_settings(arguments = {}) method = Elasticsearch::API::HTTP_GET path = '_security/settings' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb index 0e1ea86024..bd86ffcbca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb @@ -24,6 +24,8 @@ module Security module Actions # Update settings for the security system index # + # @option arguments [Time] :master_timeout Timeout for connection to master + # @option arguments [Time] :timeout Timeout for acknowledgements from all nodes # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object with the new settings for each index, if any (*Required*) # @@ -41,7 +43,7 @@ def update_settings(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = '_security/settings' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From 9a66fa49a9099220ad3a8c943dc5e71f520ceed5 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 11 Jun 2024 10:08:04 +0100 Subject: [PATCH 288/540] [API] Adds experimental api query_rule.put --- elasticsearch-api/lib/elasticsearch/api.rb | 3 +- .../api/actions/query_rule/put.rb | 70 +++++++++++++++++++ .../elasticsearch/api/namespace/query_rule.rb | 36 ++++++++++ .../api/actions/query_rule/put_spec.rb | 35 ++++++++++ 4 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/query_rule.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/query_rule/put_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index 2548b1b82b..56f8851919 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -87,7 +87,8 @@ def self.included(base) Elasticsearch::API::Inference, Elasticsearch::API::Profiling, Elasticsearch::API::Simulate, - Elasticsearch::API::Connector + Elasticsearch::API::Connector, + Elasticsearch::API::QueryRule end # The serializer class diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb new file mode 100644 index 0000000000..1c4781dea7 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb @@ -0,0 +1,70 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module QueryRule + module Actions + # Creates or updates a query rule within a ruleset. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :ruleset_id The unique identifier of the ruleset this rule should be added to. The ruleset will be created if it does not exist. + # @option arguments [String] :rule_id The unique identifier of the rule to be created or updated. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The query rule configuration, including the type of rule, the criteria to match the rule, and the action that should be taken if the rule matches. (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-rule.html + # + def put(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'query_rule.put' } + + defined_params = %i[ruleset_id rule_id].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 'ruleset_id' missing" unless arguments[:ruleset_id] + raise ArgumentError, "Required argument 'rule_id' missing" unless arguments[:rule_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _ruleset_id = arguments.delete(:ruleset_id) + + _rule_id = arguments.delete(:rule_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_query_rules/#{Utils.__listify(_ruleset_id)}/#{Utils.__listify(_rule_id)}" + params = {} + + 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/namespace/query_rule.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/query_rule.rb new file mode 100644 index 0000000000..fe95512e0c --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/query_rule.rb @@ -0,0 +1,36 @@ +# 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. + +module Elasticsearch + module API + module QueryRule + module Actions; end + + # Client for the "query_rule" namespace (includes the {QueryRule::Actions} methods) + # + class QueryRuleClient + include Common::Client, Common::Client::Base, QueryRule::Actions + end + + # Proxy method for {QueryRuleClient}, available in the receiving object + # + def query_rule + @query_rule ||= QueryRuleClient.new(self) + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/put_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/put_spec.rb new file mode 100644 index 0000000000..8ce7e49010 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/put_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.query_rule#put' do + let(:expected_args) do + [ + 'PUT', + '_query_rules/foo/bar', + {}, + {}, + {}, + { defined_params: { rule_id: 'bar', ruleset_id: 'foo' }, endpoint: 'query_rule.put' } + ] + end + + it 'performs the request' do + expect(client_double.query_rule.put(body: {}, ruleset_id: 'foo', rule_id: 'bar')).to be_a Elasticsearch::API::Response + end +end From 186f53fd5ad4f179f60c515a2e4dc443f60d6f3a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 11 Jun 2024 10:09:52 +0100 Subject: [PATCH 289/540] [API] Adds transform.get_node_stats --- .../api/actions/transform/get_node_stats.rb | 50 +++++++++++++++++++ .../actions/transform/get_node_stats_spec.rb | 35 +++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/transform/get_node_stats_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb new file mode 100644 index 0000000000..69d76d7474 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb @@ -0,0 +1,50 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Transform + module Actions + # Retrieves transform usage information for transform nodes. + # + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-node-stats.html + # + def get_node_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'transform.get_node_stats' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = '_transform/_node_stats' + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/transform/get_node_stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/transform/get_node_stats_spec.rb new file mode 100644 index 0000000000..1eb0030709 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/transform/get_node_stats_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.transform#get_node_stats' do + let(:expected_args) do + [ + 'GET', + '_transform/_node_stats', + {}, + nil, + {}, + { endpoint: 'transform.get_node_stats' } + ] + end + + it 'performs the request' do + expect(client_double.transform.get_node_stats).to be_a Elasticsearch::API::Response + end +end From cebd01c0a21249fb199840f163bbcba852dbac64 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Wed, 12 Jun 2024 12:08:11 +0400 Subject: [PATCH 290/540] Rename Buildkite team from clients-team to devtools-team --- catalog-info.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalog-info.yaml b/catalog-info.yaml index a3c8efee6f..25413dfabf 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -12,8 +12,8 @@ spec: spec: repository: elastic/elasticsearch-ruby teams: - clients-team: {} + devtools-team: {} everyone: access_level: READ_ONLY - owner: group:clients-team + owner: group:devtools-team type: buildkite-pipeline From 4abd20f24f23ac383e1b32c26ee8d0e67697766b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 12 Jun 2024 16:19:43 +0100 Subject: [PATCH 291/540] [Test Runner] Skips dense vector tests --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 8b727457ca..ad70ca95d1 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -98,3 +98,12 @@ - :file: 'indices.simulate_template/10_basic.yml' :description: 'Simulate template matches overlapping legacy and composable templates' +- + :file: 'search.vectors/180_update_dense_vector_type.yml' + :description: 'Test create and update dense vector mapping with per-doc indexing and flush' +- + :file: 'search.vectors/180_update_dense_vector_type.yml' + :description: 'Test create and update dense vector mapping with bulk indexing' +- + :file: 'search.vectors/180_update_dense_vector_type.yml' + :description: 'Index, update and merge' From 477d71eb83d27f0f487ce0ab60b0f4432d0738b7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 13 Jun 2024 09:44:57 +0100 Subject: [PATCH 292/540] [Test Runner] Updates error catching, skips disallowed scripted metrics tests --- elasticsearch-api/api-spec-testing/rspec_matchers.rb | 10 ++++------ elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 9 +++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/elasticsearch-api/api-spec-testing/rspec_matchers.rb b/elasticsearch-api/api-spec-testing/rspec_matchers.rb index b999fa5837..410102af0e 100644 --- a/elasticsearch-api/api-spec-testing/rspec_matchers.rb +++ b/elasticsearch-api/api-spec-testing/rspec_matchers.rb @@ -106,7 +106,6 @@ RSpec::Matchers.define :match_gt_field do |expected_pairs, test| match do |response| expected_pairs.all? do |expected_key, expected_value| - split_key = TestFile::Test.split_and_parse_key(expected_key).collect do |k| test.get_cached_value(k) end @@ -128,7 +127,6 @@ RSpec::Matchers.define :match_lte_field do |expected_pairs, test| match do |response| expected_pairs.all? do |expected_key, expected_value| - split_key = TestFile::Test.split_and_parse_key(expected_key).collect do |k| test.get_cached_value(k) end @@ -150,7 +148,6 @@ RSpec::Matchers.define :match_lt_field do |expected_pairs, test| match do |response| expected_pairs.all? do |expected_key, expected_value| - split_key = TestFile::Test.split_and_parse_key(expected_key).collect do |k| test.get_cached_value(k) end @@ -302,7 +299,8 @@ def compare_string_response(expected_string, response) # Remove surrounding '/' in string representing Regex expected_error = expected_error.chomp("/") expected_error = expected_error[1..-1] if expected_error =~ /^\// - message = actual_error.message.tr("\\","") + + message = actual_error.message.tr('\\', '') case expected_error when 'request_timeout' @@ -317,12 +315,12 @@ def compare_string_response(expected_string, response) message =~ /\[400\]/ when 'param' message =~ /\[400\]/ || - actual_error.is_a?(ArgumentError) + actual_error.is_a?(ArgumentError) when 'unauthorized' actual_error.is_a?(Elastic::Transport::Transport::Errors::Unauthorized) when 'forbidden' actual_error.is_a?(Elastic::Transport::Transport::Errors::Forbidden) - when /error parsing field/ + when /error parsing field/, /illegal_argument_exception/ message =~ /\[400\]/ || actual_error.is_a?(Elastic::Transport::Transport::Errors::BadRequest) when /NullPointerException/ diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index ad70ca95d1..7a74525ecb 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -107,3 +107,12 @@ - :file: 'search.vectors/180_update_dense_vector_type.yml' :description: 'Index, update and merge' +- + :file: 'search/330_disallow_scripted_metrics.yml' + :description: 'all scripts allowed by default' +- + :file: 'search/330_disallow_scripted_metrics.yml' + :description: 'disallow all for empty allow lists' +- + :file: 'search/330_disallow_scripted_metrics.yml' + :description: 'allowed stored scripts do not affect allowed inline scripts' From d13dfe37e8cac9b9ba5b64cf88ac9987366f6155 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 13 Jun 2024 09:06:49 +0100 Subject: [PATCH 293/540] [API] updates query_rule.put path --- .../lib/elasticsearch/api/actions/query_rule/put.rb | 2 +- .../spec/elasticsearch/api/actions/query_rule/put_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb index 1c4781dea7..3b52a25595 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb @@ -57,7 +57,7 @@ def put(arguments = {}) _rule_id = arguments.delete(:rule_id) method = Elasticsearch::API::HTTP_PUT - path = "_query_rules/#{Utils.__listify(_ruleset_id)}/#{Utils.__listify(_rule_id)}" + path = "_query_rules/#{Utils.__listify(_ruleset_id)}/_rule/#{Utils.__listify(_rule_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/put_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/put_spec.rb index 8ce7e49010..633e55a729 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/put_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/put_spec.rb @@ -21,7 +21,7 @@ let(:expected_args) do [ 'PUT', - '_query_rules/foo/bar', + '_query_rules/foo/_rule/bar', {}, {}, {}, From ea76729256955a6a26228737c0909293e431fefb Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 13 Jun 2024 09:09:46 +0100 Subject: [PATCH 294/540] [API] Adds query_rule get and delete endpoints --- .../api/actions/query_rule/delete.rb | 68 +++++++++++++++++++ .../api/actions/query_rule/get.rb | 68 +++++++++++++++++++ .../api/actions/query_rule/delete_spec.rb | 35 ++++++++++ .../api/actions/query_rule/get_spec.rb | 35 ++++++++++ 4 files changed, 206 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/query_rule/delete.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/query_rule/get.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/query_rule/delete_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/query_rule/get_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/delete.rb new file mode 100644 index 0000000000..829549d0ca --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/delete.rb @@ -0,0 +1,68 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module QueryRule + module Actions + # Deletes an individual query rule within a ruleset. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :ruleset_id The unique identifier of the query ruleset this rule exists in + # @option arguments [String] :rule_id The unique identifier of the rule to delete. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-rule.html + # + def delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'query_rule.delete' } + + defined_params = %i[ruleset_id rule_id].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 'ruleset_id' missing" unless arguments[:ruleset_id] + raise ArgumentError, "Required argument 'rule_id' missing" unless arguments[:rule_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _ruleset_id = arguments.delete(:ruleset_id) + + _rule_id = arguments.delete(:rule_id) + + method = Elasticsearch::API::HTTP_DELETE + path = "_query_rules/#{Utils.__listify(_ruleset_id)}/_rule/#{Utils.__listify(_rule_id)}" + params = {} + + 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/query_rule/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/get.rb new file mode 100644 index 0000000000..7c814583d9 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/get.rb @@ -0,0 +1,68 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module QueryRule + module Actions + # Returns the details about an individual query rule within a ruleset. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :ruleset_id The unique identifier of the query ruleset the rule exists within + # @option arguments [String] :rule_id The unique identifier of the rule to be retrieved. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-rule.html + # + def get(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'query_rule.get' } + + defined_params = %i[ruleset_id rule_id].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 'ruleset_id' missing" unless arguments[:ruleset_id] + raise ArgumentError, "Required argument 'rule_id' missing" unless arguments[:rule_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _ruleset_id = arguments.delete(:ruleset_id) + + _rule_id = arguments.delete(:rule_id) + + method = Elasticsearch::API::HTTP_GET + path = "_query_rules/#{Utils.__listify(_ruleset_id)}/_rule/#{Utils.__listify(_rule_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/delete_spec.rb new file mode 100644 index 0000000000..10cf03c31c --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/delete_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.query_rule#delete' do + let(:expected_args) do + [ + 'DELETE', + '_query_rules/foo/_rule/bar', + {}, + nil, + {}, + { defined_params: { rule_id: 'bar', ruleset_id: 'foo' }, endpoint: 'query_rule.delete' } + ] + end + + it 'performs the request' do + expect(client_double.query_rule.delete(ruleset_id: 'foo', rule_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/get_spec.rb new file mode 100644 index 0000000000..11df8ae6b8 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/get_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.query_rule#get' do + let(:expected_args) do + [ + 'GET', + '_query_rules/foo/_rule/bar', + {}, + nil, + {}, + { defined_params: { rule_id: 'bar', ruleset_id: 'foo' }, endpoint: 'query_rule.get' } + ] + end + + it 'performs the request' do + expect(client_double.query_rule.get(ruleset_id: 'foo', rule_id: 'bar')).to be_a Elasticsearch::API::Response + end +end From d96e53807cc1d895eecbc587f3f7f6a86571db8f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 13 Jun 2024 10:26:44 +0100 Subject: [PATCH 295/540] [Test Runner] Skips sparse vectors test --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 7a74525ecb..f25ea31d75 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -107,6 +107,9 @@ - :file: 'search.vectors/180_update_dense_vector_type.yml' :description: 'Index, update and merge' +- + :file: 'search.vectors/90_sparse_vector.yml' + :description: 'Indexing and searching multi-value sparse vectors in >=8.15' - :file: 'search/330_disallow_scripted_metrics.yml' :description: 'all scripts allowed by default' From b35794f1af9c211d479778a5ba05dfbd0c2ccf6c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 17 Jun 2024 08:35:46 +0100 Subject: [PATCH 296/540] [API] Adds wait_for_completion parameter to snapshot.delete --- .../lib/elasticsearch/api/actions/snapshot/delete.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb index 73072d871e..3489aad395 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb @@ -27,6 +27,7 @@ module Actions # @option arguments [String] :repository A repository name # @option arguments [List] :snapshot A comma-separated list of snapshot names # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html From 72335d605ed922850ca242c99ead34229f2dfa04 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 19 Jun 2024 16:13:15 +0100 Subject: [PATCH 297/540] Adds YAML Test runner --- elasticsearch-api/Gemfile | 4 +- elasticsearch-api/Rakefile | 5 ++ elasticsearch-api/elasticsearch-api.gemspec | 1 + .../spec/yaml-test-runner/run.rb | 65 +++++++++++++++++++ 4 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 elasticsearch-api/spec/yaml-test-runner/run.rb diff --git a/elasticsearch-api/Gemfile b/elasticsearch-api/Gemfile index 0b2f02be0d..d65c401d73 100644 --- a/elasticsearch-api/Gemfile +++ b/elasticsearch-api/Gemfile @@ -20,8 +20,8 @@ source 'https://rubygems.org' # Specify your gem's dependencies in elasticsearch-api.gemspec gemspec -if File.exist? File.expand_path("../../elasticsearch/elasticsearch.gemspec", __FILE__) - gem 'elasticsearch', path: File.expand_path('../../elasticsearch', __FILE__), require: false +if File.exist? File.expand_path("../../elasticsearch/elasticsearch.gemspec", __dir__) + gem 'elasticsearch', path: File.expand_path('../../elasticsearch', __dir__), require: false end group :development do diff --git a/elasticsearch-api/Rakefile b/elasticsearch-api/Rakefile index 56767a648a..58c9dede1e 100644 --- a/elasticsearch-api/Rakefile +++ b/elasticsearch-api/Rakefile @@ -50,6 +50,11 @@ namespace :test do Rake::Task['test:integration'].invoke end + desc 'Run tests with yaml runner' + task :yaml do + ruby './spec/yaml-test-runner/run.rb' + end + namespace :platinum do desc 'Run Platinum Rest API Spec tests' RSpec::Core::RakeTask.new(:api) do diff --git a/elasticsearch-api/elasticsearch-api.gemspec b/elasticsearch-api/elasticsearch-api.gemspec index a73f342a94..a48cf030b3 100644 --- a/elasticsearch-api/elasticsearch-api.gemspec +++ b/elasticsearch-api/elasticsearch-api.gemspec @@ -49,6 +49,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'ansi' s.add_development_dependency 'bundler' s.add_development_dependency 'elasticsearch' + s.add_development_dependency 'elasticsearch-test-runner' s.add_development_dependency 'minitest' s.add_development_dependency 'minitest-reporters', '>= 1.6' s.add_development_dependency 'mocha' diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb new file mode 100644 index 0000000000..28f7b8dc8d --- /dev/null +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -0,0 +1,65 @@ +# 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. + +require 'logger' +require 'openssl' +require 'elasticsearch' +require 'elasticsearch/tests/test_runner' +require 'elasticsearch/tests/downloader' + +PROJECT_PATH = File.join(File.dirname(__FILE__), '../..') +CERTS_PATH = "#{PROJECT_PATH}/../.buildkite/certs/".freeze +host = ENV['TEST_ES_SERVER'] || 'https://localhost:9200' +raise URI::InvalidURIError unless host =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/ + +password = ENV['ELASTIC_PASSWORD'] || 'changeme' +uri = URI.parse(host) + +if uri.is_a?(URI::HTTPS) + raw_certificate = File.read("#{CERTS_PATH}/testnode.crt") + certificate = OpenSSL::X509::Certificate.new(raw_certificate) + raw_key = File.read("#{CERTS_PATH}/testnode.key") + key = OpenSSL::PKey::RSA.new(raw_key) + ca_file = File.expand_path("#{CERTS_PATH}/ca.crt") + host = "https://elastic:#{password}@#{uri.host}:#{uri.port}".freeze + transport_options = { + ssl: { + client_cert: certificate, + client_key: key, + ca_file: ca_file, + verify: false + } + } +elsif uri.is_a?(URI::HTTP) + host = "http://elastic:#{password}@#{uri.host}:#{uri.port}".freeze + transport_options = {} +end + +if ENV['ES_API_KEY'] + CLIENT = Elasticsearch::Client.new(host: host, api_key: ENV['ES_API_KEY'], transport_options: transport_options) +else + CLIENT = Elasticsearch::Client.new(host: host, transport_options: transport_options) +end + + +tests_path = File.expand_path('./tmp', __dir__) + +logger = Logger.new($stdout) +logger.level = Logger::WARN unless ENV['DEBUG'] + +Elasticsearch::Tests::Downloader::run(tests_path) +Elasticsearch::Tests::TestRunner.new(CLIENT, tests_path, logger).run From cc39497f6d6a4413a0ba0f381aafc34965731aad Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 20 Jun 2024 09:40:51 +0100 Subject: [PATCH 298/540] [CI] Adds YAML test runner task to Buildkite --- .buildkite/pipeline.yml | 10 +++++++++ .buildkite/run-yaml-tests.sh | 43 ++++++++++++++++++++++++++++++++++++ rake_tasks/test_tasks.rake | 5 +++++ 3 files changed, 58 insertions(+) create mode 100644 .buildkite/run-yaml-tests.sh diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 87bf4ebbf5..de000d3f68 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -61,6 +61,16 @@ steps: # I'm publishing test results to HTML and JUnit in this directory and this directive makes them # available in the Artifacts tab of a build in Buildkite. artifact_paths: "elasticsearch-api/tmp/*" + - label: ":ruby: :yaml: Test suite" + agents: + provider: "gcp" + env: + RUBY_VERSION: "3.3" + STACK_VERSION: 8.15.0-SNAPSHOT + TRANSPORT_VERSION: "8.3" + RUBY_SOURCE: "ruby" + TEST_SUITE: "platinum" + command: ./.buildkite/run-yaml-tests.sh - wait: ~ continue_on_failure: true - label: "Log Results" diff --git a/.buildkite/run-yaml-tests.sh b/.buildkite/run-yaml-tests.sh new file mode 100644 index 0000000000..2a967da7da --- /dev/null +++ b/.buildkite/run-yaml-tests.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Script to run YAML runner integration tests on Buildkite +# +# Version 0.1 +# +script_path=$(dirname $(realpath -s $0)) +source $script_path/functions/imports.sh +set -euo pipefail +repo=`pwd` + +echo "--- :elasticsearch: Starting Elasticsearch" +DETACH=true bash $script_path/run-elasticsearch.sh + +export RUBY_VERSION=${RUBY_VERSION:-3.1} +export TRANSPORT_VERSION=${TRANSPORT_VERSION:-8} + +echo "--- :ruby: Building Docker image" +docker build \ + --file $script_path/Dockerfile \ + --tag elastic/elasticsearch-ruby \ + --build-arg RUBY_VERSION=$RUBY_VERSION \ + --build-arg TRANSPORT_VERSION=$TRANSPORT_VERSION \ + --build-arg RUBY_SOURCE=$RUBY_SOURCE \ + . + +mkdir -p elasticsearch-api/tmp + +echo "--- :ruby: Running :yaml: tests" +docker run \ + -u "$(id -u)" \ + --network="${network_name}" \ + --env "TEST_ES_SERVER=${elasticsearch_url}" \ + --env "ELASTIC_PASSWORD=${elastic_password}" \ + --env "ELASTIC_USER=elastic" \ + --env "BUILDKITE=true" \ + --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ + --env "STACK_VERSION=${STACK_VERSION}" \ + --volume $repo:/usr/src/app \ + --name elasticsearch-ruby \ + --rm \ + elastic/elasticsearch-ruby \ + bundle exec rake test:yaml diff --git a/rake_tasks/test_tasks.rake b/rake_tasks/test_tasks.rake index 038f643c1c..be924fabc7 100644 --- a/rake_tasks/test_tasks.rake +++ b/rake_tasks/test_tasks.rake @@ -61,6 +61,11 @@ namespace :test do puts "\n" end + desc 'Run YAML test runner tests' + task :yaml do + sh "cd #{CURRENT_PATH.join('elasticsearch-api')} && unset BUNDLE_GEMFILE && bundle exec rake test:yaml" + end + namespace :platinum do desc 'Run platinum integration tests' task :integration do From e510fc6a8c8f508cc55528c757b974111756363d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 20 Jun 2024 12:11:24 +0100 Subject: [PATCH 299/540] Adds yaml runner conditional for JRuby 9.3 in gemspec --- elasticsearch-api/elasticsearch-api.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/elasticsearch-api.gemspec b/elasticsearch-api/elasticsearch-api.gemspec index a48cf030b3..a458ed60d1 100644 --- a/elasticsearch-api/elasticsearch-api.gemspec +++ b/elasticsearch-api/elasticsearch-api.gemspec @@ -49,7 +49,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'ansi' s.add_development_dependency 'bundler' s.add_development_dependency 'elasticsearch' - s.add_development_dependency 'elasticsearch-test-runner' + s.add_development_dependency 'elasticsearch-test-runner' unless defined?(JRUBY_VERSION) && JRUBY_VERSION <= "9.4" s.add_development_dependency 'minitest' s.add_development_dependency 'minitest-reporters', '>= 1.6' s.add_development_dependency 'mocha' From c7fd3cf4dbb2e2f8195d4caed0e0cec34d1ac0e1 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 25 Jun 2024 08:41:33 +0100 Subject: [PATCH 300/540] [API] Adds connector.sync_job_claim --- .../api/actions/connector/sync_job_claim.rb | 70 +++++++++++++++++++ .../actions/connector/sync_job_claim_spec.rb | 40 +++++++++++ 2 files changed, 110 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector/sync_job_claim_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb new file mode 100644 index 0000000000..f524141fc3 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb @@ -0,0 +1,70 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Connector + module Actions + # Claims a connector sync job. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be claimed. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body Data to claim a sync job. (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/claim-connector-sync-job-api.html + # + def sync_job_claim(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_claim' } + + defined_params = [:connector_sync_job_id].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] + + unless arguments[:connector_sync_job_id] + raise ArgumentError, + "Required argument 'connector_sync_job_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _connector_sync_job_id = arguments.delete(:connector_sync_job_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_claim" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/sync_job_claim_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector/sync_job_claim_spec.rb new file mode 100644 index 0000000000..07a6ebd26f --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/connector/sync_job_claim_spec.rb @@ -0,0 +1,40 @@ +# 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. + +require 'spec_helper' + +describe 'client.connector#sync_job_claim' do + let(:expected_args) do + [ + 'PUT', + '_connector/_sync_job/foo/_claim', + {}, + {}, + {}, + { + defined_params: { connector_sync_job_id: 'foo' }, + endpoint: 'connector.sync_job_claim' + } + ] + end + + it 'performs the request' do + expect( + client_double.connector.sync_job_claim(connector_sync_job_id: 'foo', body: {}) + ).to be_a Elasticsearch::API::Response + end +end From b8b11ebc9530ce8d47a512112323b6dbbf167184 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 25 Jun 2024 08:43:03 +0100 Subject: [PATCH 301/540] [API] Updates generated code * features.reset_features adds master_timeout parameter APIs promoted to stable from experimental: * query_rule.delete * query_rule.get * query_rule.put * query_ruleset.delete * query_ruleset.get * query_ruleset.list * query_ruleset.put --- .../lib/elasticsearch/api/actions/features/reset_features.rb | 3 ++- .../lib/elasticsearch/api/actions/query_rule/delete.rb | 4 ---- .../lib/elasticsearch/api/actions/query_rule/get.rb | 4 ---- .../lib/elasticsearch/api/actions/query_rule/put.rb | 4 ---- .../lib/elasticsearch/api/actions/query_ruleset/delete.rb | 4 ---- .../lib/elasticsearch/api/actions/query_ruleset/get.rb | 4 ---- .../lib/elasticsearch/api/actions/query_ruleset/list.rb | 4 ---- .../lib/elasticsearch/api/actions/query_ruleset/put.rb | 4 ---- 8 files changed, 2 insertions(+), 29 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb index f9ef7ac039..63ea0c5e85 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb @@ -28,6 +28,7 @@ module Actions # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html @@ -42,7 +43,7 @@ def reset_features(arguments = {}) method = Elasticsearch::API::HTTP_POST path = '_features/_reset' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/delete.rb index 829549d0ca..301235f6cf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/delete.rb @@ -23,10 +23,6 @@ module API module QueryRule module Actions # Deletes an individual query rule within a ruleset. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :ruleset_id The unique identifier of the query ruleset this rule exists in # @option arguments [String] :rule_id The unique identifier of the rule to delete. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/get.rb index 7c814583d9..ca96a426de 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/get.rb @@ -23,10 +23,6 @@ module API module QueryRule module Actions # Returns the details about an individual query rule within a ruleset. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :ruleset_id The unique identifier of the query ruleset the rule exists within # @option arguments [String] :rule_id The unique identifier of the rule to be retrieved. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb index 3b52a25595..f62569ab31 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb @@ -23,10 +23,6 @@ module API module QueryRule module Actions # Creates or updates a query rule within a ruleset. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :ruleset_id The unique identifier of the ruleset this rule should be added to. The ruleset will be created if it does not exist. # @option arguments [String] :rule_id The unique identifier of the rule to be created or updated. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb index 5a43c14046..7a088dfd37 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb @@ -23,10 +23,6 @@ module API module QueryRuleset module Actions # Deletes a query ruleset. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :ruleset_id The unique identifier of the query ruleset to delete # @option arguments [Hash] :headers Custom HTTP headers diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb index 426572a806..cf43abf180 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb @@ -23,10 +23,6 @@ module API module QueryRuleset module Actions # Returns the details about a query ruleset. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :ruleset_id The unique identifier of the query ruleset # @option arguments [Hash] :headers Custom HTTP headers diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb index 18df19e9dd..7784b0de48 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb @@ -23,10 +23,6 @@ module API module QueryRuleset module Actions # Lists query rulesets. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [Integer] :from Starting offset (default: 0) # @option arguments [Integer] :size specifies a max number of results to get (default: 100) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb index 03eba510ed..e81ebb43e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb @@ -23,10 +23,6 @@ module API module QueryRuleset module Actions # Creates or updates a query ruleset. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :ruleset_id The unique identifier of the ruleset to be created or updated. # @option arguments [Hash] :headers Custom HTTP headers From f484c4f3ffcf1533feebeabb4e0c917ed4485c4f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 1 Jul 2024 09:28:34 +0100 Subject: [PATCH 302/540] [API] Reorganizes query_rule and query_ruleset into query_rules --- elasticsearch-api/lib/elasticsearch/api.rb | 3 +-- .../delete.rb => query_rules/delete_rule.rb} | 6 +++--- .../delete.rb => query_rules/delete_ruleset.rb} | 6 +++--- .../{query_rule/get.rb => query_rules/get_rule.rb} | 6 +++--- .../get.rb => query_rules/get_ruleset.rb} | 6 +++--- .../list.rb => query_rules/list_rulesets.rb} | 6 +++--- .../{query_rule/put.rb => query_rules/put_rule.rb} | 6 +++--- .../put.rb => query_rules/put_ruleset.rb} | 6 +++--- .../namespace/{query_rule.rb => query_rules.rb} | 14 +++++++------- .../delete_ruleset_spec.rb} | 6 +++--- .../{query_rule => query_rules}/delete_spec.rb | 6 +++--- .../get_ruleset_spec.rb} | 6 +++--- .../{query_rule => query_rules}/get_spec.rb | 6 +++--- .../put_ruleset_spec.rb} | 7 +++---- .../{query_rule => query_rules}/put_spec.rb | 6 +++--- 15 files changed, 47 insertions(+), 49 deletions(-) rename elasticsearch-api/lib/elasticsearch/api/actions/{query_rule/delete.rb => query_rules/delete_rule.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{query_ruleset/delete.rb => query_rules/delete_ruleset.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{query_rule/get.rb => query_rules/get_rule.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{query_ruleset/get.rb => query_rules/get_ruleset.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/actions/{query_ruleset/list.rb => query_rules/list_rulesets.rb} (95%) rename elasticsearch-api/lib/elasticsearch/api/actions/{query_rule/put.rb => query_rules/put_rule.rb} (97%) rename elasticsearch-api/lib/elasticsearch/api/actions/{query_ruleset/put.rb => query_rules/put_ruleset.rb} (96%) rename elasticsearch-api/lib/elasticsearch/api/namespace/{query_rule.rb => query_rules.rb} (70%) rename elasticsearch-api/spec/elasticsearch/api/actions/{query_ruleset/delete_spec.rb => query_rules/delete_ruleset_spec.rb} (84%) rename elasticsearch-api/spec/elasticsearch/api/actions/{query_rule => query_rules}/delete_spec.rb (83%) rename elasticsearch-api/spec/elasticsearch/api/actions/{query_ruleset/get_spec.rb => query_rules/get_ruleset_spec.rb} (85%) rename elasticsearch-api/spec/elasticsearch/api/actions/{query_rule => query_rules}/get_spec.rb (84%) rename elasticsearch-api/spec/elasticsearch/api/actions/{query_ruleset/put_spec.rb => query_rules/put_ruleset_spec.rb} (84%) rename elasticsearch-api/spec/elasticsearch/api/actions/{query_rule => query_rules}/put_spec.rb (83%) diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index 56f8851919..a20a31a23b 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -82,13 +82,12 @@ def self.included(base) Elasticsearch::API::XPack, Elasticsearch::API::SearchApplication, Elasticsearch::API::Synonyms, - Elasticsearch::API::QueryRuleset, Elasticsearch::API::Esql, Elasticsearch::API::Inference, Elasticsearch::API::Profiling, Elasticsearch::API::Simulate, Elasticsearch::API::Connector, - Elasticsearch::API::QueryRule + Elasticsearch::API::QueryRules end # The serializer class diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/query_rule/delete.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb index 301235f6cf..a7f69d8916 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module QueryRule + module QueryRules module Actions # Deletes an individual query rule within a ruleset. # @@ -30,8 +30,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-rule.html # - def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'query_rule.delete' } + def delete_rule(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'query_rules.delete_rule' } defined_params = %i[ruleset_id rule_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb index 7a088dfd37..057962e12a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module QueryRuleset + module QueryRules module Actions # Deletes a query ruleset. # @@ -29,8 +29,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-ruleset.html # - def delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'query_ruleset.delete' } + def delete_ruleset(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'query_rules.delete_ruleset' } defined_params = [:ruleset_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/query_rule/get.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb index ca96a426de..579d2a9627 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module QueryRule + module QueryRules module Actions # Returns the details about an individual query rule within a ruleset. # @@ -30,8 +30,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-rule.html # - def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'query_rule.get' } + def get_rule(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'query_rules.get_rule' } defined_params = %i[ruleset_id rule_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb index cf43abf180..3eb2931d90 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module QueryRuleset + module QueryRules module Actions # Returns the details about a query ruleset. # @@ -29,8 +29,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-ruleset.html # - def get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'query_ruleset.get' } + def get_ruleset(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'query_rules.get_ruleset' } defined_params = [:ruleset_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb similarity index 95% rename from elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb index 7784b0de48..46cb469e2a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module QueryRuleset + module QueryRules module Actions # Lists query rulesets. # @@ -30,8 +30,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-query-rulesets.html # - def list(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'query_ruleset.list' } + def list_rulesets(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'query_rules.list_rulesets' } arguments = arguments.clone headers = arguments.delete(:headers) || {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb similarity index 97% rename from elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb index f62569ab31..659f785d6c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rule/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module QueryRule + module QueryRules module Actions # Creates or updates a query rule within a ruleset. # @@ -31,8 +31,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-rule.html # - def put(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'query_rule.put' } + def put_rule(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'query_rules.put_rule' } defined_params = %i[ruleset_id rule_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb similarity index 96% rename from elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb index e81ebb43e0..ed042f3960 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb @@ -20,7 +20,7 @@ # module Elasticsearch module API - module QueryRuleset + module QueryRules module Actions # Creates or updates a query ruleset. # @@ -30,8 +30,8 @@ module Actions # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-ruleset.html # - def put(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'query_ruleset.put' } + def put_ruleset(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'query_rules.put_ruleset' } defined_params = [:ruleset_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/query_rule.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/query_rules.rb similarity index 70% rename from elasticsearch-api/lib/elasticsearch/api/namespace/query_rule.rb rename to elasticsearch-api/lib/elasticsearch/api/namespace/query_rules.rb index fe95512e0c..efff86c635 100644 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/query_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/query_rules.rb @@ -17,19 +17,19 @@ module Elasticsearch module API - module QueryRule + module QueryRules module Actions; end - # Client for the "query_rule" namespace (includes the {QueryRule::Actions} methods) + # Client for the "query_rules" namespace (includes the {QueryRules::Actions} methods) # - class QueryRuleClient - include Common::Client, Common::Client::Base, QueryRule::Actions + class QueryRulesClient + include Common::Client, Common::Client::Base, QueryRules::Actions end - # Proxy method for {QueryRuleClient}, available in the receiving object + # Proxy method for {QueryRulesClient}, available in the receiving object # - def query_rule - @query_rule ||= QueryRuleClient.new(self) + def query_rules + @query_rules ||= QueryRulesClient.new(self) end end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/delete_ruleset_spec.rb similarity index 84% rename from elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/delete_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/query_rules/delete_ruleset_spec.rb index 9a48000000..5453aa006e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/delete_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/delete_ruleset_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.query_ruleset#delete' do +describe 'client.query_rules#delete_ruleset' do let(:expected_args) do [ @@ -26,11 +26,11 @@ {}, nil, {}, - { defined_params: { ruleset_id: 'foo' }, endpoint: 'query_ruleset.delete' } + { defined_params: { ruleset_id: 'foo' }, endpoint: 'query_rules.delete_ruleset' } ] end it 'performs the request' do - expect(client_double.query_ruleset.delete(ruleset_id: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.query_rules.delete_ruleset(ruleset_id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/delete_spec.rb similarity index 83% rename from elasticsearch-api/spec/elasticsearch/api/actions/query_rule/delete_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/query_rules/delete_spec.rb index 10cf03c31c..f456942c0b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/delete_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/delete_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.query_rule#delete' do +describe 'client.query_rules#delete_rule' do let(:expected_args) do [ 'DELETE', @@ -25,11 +25,11 @@ {}, nil, {}, - { defined_params: { rule_id: 'bar', ruleset_id: 'foo' }, endpoint: 'query_rule.delete' } + { defined_params: { rule_id: 'bar', ruleset_id: 'foo' }, endpoint: 'query_rules.delete_rule' } ] end it 'performs the request' do - expect(client_double.query_rule.delete(ruleset_id: 'foo', rule_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.query_rules.delete_rule(ruleset_id: 'foo', rule_id: 'bar')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/get_ruleset_spec.rb similarity index 85% rename from elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/get_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/query_rules/get_ruleset_spec.rb index a033fa3086..df8cfc9a8d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/get_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/get_ruleset_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.query_ruleset#get' do +describe 'client.query_rules#get_ruleset' do let(:expected_args) do [ 'GET', @@ -25,11 +25,11 @@ {}, nil, {}, - { defined_params: { ruleset_id: 'foo' }, endpoint: 'query_ruleset.get' } + { defined_params: { ruleset_id: 'foo' }, endpoint: 'query_rules.get_ruleset' } ] end it 'performs the request' do - expect(client_double.query_ruleset.get(ruleset_id: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.query_rules.get_ruleset(ruleset_id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/get_spec.rb similarity index 84% rename from elasticsearch-api/spec/elasticsearch/api/actions/query_rule/get_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/query_rules/get_spec.rb index 11df8ae6b8..27c0a01410 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/get_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/get_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.query_rule#get' do +describe 'client.query_rules#get_rule' do let(:expected_args) do [ 'GET', @@ -25,11 +25,11 @@ {}, nil, {}, - { defined_params: { rule_id: 'bar', ruleset_id: 'foo' }, endpoint: 'query_rule.get' } + { defined_params: { rule_id: 'bar', ruleset_id: 'foo' }, endpoint: 'query_rules.get_rule' } ] end it 'performs the request' do - expect(client_double.query_rule.get(ruleset_id: 'foo', rule_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.query_rules.get_rule(ruleset_id: 'foo', rule_id: 'bar')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/put_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/put_ruleset_spec.rb similarity index 84% rename from elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/put_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/query_rules/put_ruleset_spec.rb index af9b2d74cc..5252801f73 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/query_ruleset/put_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/put_ruleset_spec.rb @@ -17,8 +17,7 @@ require 'spec_helper' -describe 'client.query_ruleset#put' do - +describe 'client.query_rules#put_ruleset' do let(:expected_args) do [ 'PUT', @@ -26,11 +25,11 @@ {}, {}, {}, - { defined_params: { ruleset_id: 'foo' }, endpoint: 'query_ruleset.put' } + { defined_params: { ruleset_id: 'foo' }, endpoint: 'query_rules.put_ruleset' } ] end it 'performs the request' do - expect(client_double.query_ruleset.put(body: {}, ruleset_id: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.query_rules.put_ruleset(body: {}, ruleset_id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/put_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/put_spec.rb similarity index 83% rename from elasticsearch-api/spec/elasticsearch/api/actions/query_rule/put_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/query_rules/put_spec.rb index 633e55a729..1b040b8f89 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/query_rule/put_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/put_spec.rb @@ -17,7 +17,7 @@ require 'spec_helper' -describe 'client.query_rule#put' do +describe 'client.query_rule#put_rule' do let(:expected_args) do [ 'PUT', @@ -25,11 +25,11 @@ {}, {}, {}, - { defined_params: { rule_id: 'bar', ruleset_id: 'foo' }, endpoint: 'query_rule.put' } + { defined_params: { rule_id: 'bar', ruleset_id: 'foo' }, endpoint: 'query_rules.put_rule' } ] end it 'performs the request' do - expect(client_double.query_rule.put(body: {}, ruleset_id: 'foo', rule_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.query_rules.put_rule(body: {}, ruleset_id: 'foo', rule_id: 'bar')).to be_a Elasticsearch::API::Response end end From 37f61e4d00495bedffaf03e813c28355bb07342c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 1 Jul 2024 10:32:15 +0100 Subject: [PATCH 303/540] [API] Test Runner: Skips aggregations test --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index f25ea31d75..b57b9f9c02 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -119,3 +119,6 @@ - :file: 'search/330_disallow_scripted_metrics.yml' :description: 'allowed stored scripts do not affect allowed inline scripts' +- + :file: 'aggregations/scripted_metric_allow_list.yml' + :description: 'allowed stored scripts do not affect allowed inline scripts' From 17518683df3928d47524782704c9e6691003f8cc Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 3 Jul 2024 16:23:28 +0100 Subject: [PATCH 304/540] [API] Adds security.query_role and security.bulk_put_role --- .../api/actions/security/bulk_put_role.rb | 54 ++++++++++++++++++ .../api/actions/security/query_role.rb | 56 +++++++++++++++++++ .../lib/elasticsearch/api/namespace/common.rb | 2 - .../actions/security/bulk_put_role_spec.rb | 35 ++++++++++++ .../api/actions/security/query_role_spec.rb | 35 ++++++++++++ 5 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/security/bulk_put_role_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/security/query_role_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb new file mode 100644 index 0000000000..5ec4578391 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb @@ -0,0 +1,54 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Security + module Actions + # Bulk adds and updates roles in the native realm. + # + # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The roles to add (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-put-role.html + # + def bulk_put_role(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.bulk_put_role' } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = '_security/role' + 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/security/query_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb new file mode 100644 index 0000000000..c5d84ec159 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb @@ -0,0 +1,56 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Security + module Actions + # Retrieves information for Roles using a subset of query DSL + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body From, size, query, sort and search_after + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-role.html + # + def query_role(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.query_role' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = if body + Elasticsearch::API::HTTP_POST + else + Elasticsearch::API::HTTP_GET + end + + path = '_security/_query/role' + params = {} + + 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/namespace/common.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb index 4178b6b093..789aca2514 100644 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb @@ -21,7 +21,6 @@ module Common module Actions; end module Client - # Base client wrapper # module Base @@ -38,7 +37,6 @@ def perform_request(method, path, params={}, body=nil, headers=nil, request_opts client.perform_request method, path, params, body, headers, request_opts end end - end end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/bulk_put_role_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/bulk_put_role_spec.rb new file mode 100644 index 0000000000..66b16ed6de --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/bulk_put_role_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#security.bulk_put_role' do + let(:expected_args) do + [ + 'POST', + '_security/role', + {}, + {}, + {}, + { endpoint: 'security.bulk_put_role' } + ] + end + + it 'performs the request' do + expect(client_double.security.bulk_put_role(body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/query_role_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/query_role_spec.rb new file mode 100644 index 0000000000..8563135310 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/query_role_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#security#query_user' do + let(:expected_args) do + [ + 'GET', + '_security/_query/role', + {}, + nil, + {}, + { endpoint: 'security.query_role' } + ] + end + + it 'performs the request' do + expect(client_double.security.query_role).to be_a Elasticsearch::API::Response + end +end From cf2ba089dbd8b68013a12d6fb8543a17293f7a8f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 4 Jul 2024 08:34:29 +0100 Subject: [PATCH 305/540] [API] Adds security.bulk_delete_role --- .../api/actions/security/bulk_delete_role.rb | 54 +++++++++++++++++++ .../actions/security/bulk_delete_role_spec.rb | 35 ++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/security/bulk_delete_role_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb new file mode 100644 index 0000000000..ae3d6bbfd1 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb @@ -0,0 +1,54 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Security + module Actions + # Bulk delete roles in the native realm. + # + # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The roles to delete (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-delete-role.html + # + def bulk_delete_role(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.bulk_delete_role' } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_DELETE + path = '_security/role' + 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/spec/elasticsearch/api/actions/security/bulk_delete_role_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/bulk_delete_role_spec.rb new file mode 100644 index 0000000000..c48ead67d1 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/bulk_delete_role_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#security.bulk_delete_role' do + let(:expected_args) do + [ + 'DELETE', + '_security/role', + {}, + {}, + {}, + { endpoint: 'security.bulk_delete_role' } + ] + end + + it 'performs the request' do + expect(client_double.security.bulk_delete_role(body: {})).to be_a Elasticsearch::API::Response + end +end From d4ad795070db82f8b867dd5e22193e9931afb030 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 4 Jul 2024 08:30:52 +0100 Subject: [PATCH 306/540] Test Runner: Adds enterprise search users for entsearch platinum tests --- .../api-spec-testing/wipe_cluster.rb | 49 +++++++++++++++++++ .../spec/rest_api/rest_api_tests_helper.rb | 5 +- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/api-spec-testing/wipe_cluster.rb b/elasticsearch-api/api-spec-testing/wipe_cluster.rb index a3cf59ae77..083a20dd6e 100644 --- a/elasticsearch-api/api-spec-testing/wipe_cluster.rb +++ b/elasticsearch-api/api-spec-testing/wipe_cluster.rb @@ -61,6 +61,55 @@ def self.create_xpack_rest_user(client) ) end + def self.create_enterprise_search_users(client) + client.security.put_role( + name: 'entuser', + body: { + cluster: [ + 'post_behavioral_analytics_event', + 'manage_api_key', + 'read_connector_secrets', + 'write_connector_secrets' + ], + indices: [ + { + names: [ + 'test-index1', + 'test-search-application', + 'test-search-application-1', + 'test-search-application-with-aggs', + 'test-search-application-with-list', + 'test-search-application-with-list-invalid', + '.elastic-connectors-v1', + '.elastic-connectors-sync-jobs-v1' + ], + privileges: ['read'] + } + ] + } + ) + client.security.put_role( + name: 'unprivileged', + body: { + indices: [ + { + names: ['test-*', 'another-test-search-application'], + privileges: ['manage', 'write', 'read'] + } + ] + } + ) + + client.security.put_user( + username: 'entsearch-user', + body: { password: 'entsearch-user-password', roles: ['entuser'] } + ) + client.security.put_user( + username: 'entsearch-unprivileged', + body: { password: 'entsearch-unprivileged-password', roles: ['privileged'] } + ) + end + class << self private diff --git a/elasticsearch-api/spec/rest_api/rest_api_tests_helper.rb b/elasticsearch-api/spec/rest_api/rest_api_tests_helper.rb index c9ea316d96..d7d7827f4d 100644 --- a/elasticsearch-api/spec/rest_api/rest_api_tests_helper.rb +++ b/elasticsearch-api/spec/rest_api/rest_api_tests_helper.rb @@ -65,7 +65,10 @@ exit end -Elasticsearch::RestAPIYAMLTests::WipeCluster.create_xpack_rest_user(ADMIN_CLIENT) if test_suite == 'platinum' +if test_suite == 'platinum' + Elasticsearch::RestAPIYAMLTests::WipeCluster.create_xpack_rest_user(ADMIN_CLIENT) + Elasticsearch::RestAPIYAMLTests::WipeCluster.create_enterprise_search_users(ADMIN_CLIENT) +end YAML_FILES_DIRECTORY = "#{PROJECT_PATH}/../../tmp/rest-api-spec/test/#{test_suite}".freeze From 3b11cccf806c3da8cb9db9a8241edbabb9d4bcda Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 4 Jul 2024 17:11:15 +0100 Subject: [PATCH 307/540] Adds skipped tests migrated to elasticsearch-clients-tests --- .../spec/rest_api/skipped_tests_platinum.yml | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml index 04d9bb3e40..1bd5e7fc37 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml @@ -123,3 +123,85 @@ - :file: 'analytics/empty_field_metric.yml' :description: 'Rate test' +# Migrated to yaml tests in elastic/elasticsearch-clients-tests +- + :file: 'roles/10_basic.yml' + :description: '*' +- + :file: 'roles/50_remote_only.yml' + :description: '*' +- + :file: 'entsearch/connector/secret/10_connector_secret_post.yml' + :description: '*' +- + :file: 'entsearch/connector/secret/30_connector_secret_get.yml' + :description: '*' +- + :file: 'entsearch/connector/secret/40_connector_secret_delete.yml' + :description: '*' +- + :file: 'entsearch/search/20_search_application_put.yml' + :description: '*' +- + :file: 'entsearch/search/30_search_application_get.yml' + :description: '*' +- + :file: 'entsearch/search/40_search_application_delete.yml' + :description: '*' +- + :file: 'entsearch/search/50_search_application_list.yml' + :description: '*' +- + :file: 'entsearch/search/56_search_application_search_with_apikey.yml' + :description: '*' +- + :file: 'entsearch/connector/secret/20_connector_secret_put.yml' + :description: '*' +- + :file: 'entsearch/connector/sync_job/50_connector_sync_job_get.yml' + :description: '*' +- + :file: 'entsearch/connector/sync_job/70_connector_sync_job_update_stats.yml' + :description: '*' +- + :file: 'entsearch/analytics/40_behavioral_analytics_event_post.yml' + :description: '*' +- + :file: 'entsearch/connector/20_connector_list.yml' + :description: '*' +- + :file: 'entsearch/rules/5_query_rulesets_before_setup.yml' + :description: '*' +- + :file: 'entsearch/rules/10_query_ruleset_put.yml' + :description: '*' +- + :file: 'entsearch/rules/20_query_ruleset_list.yml' + :description: '*' +- + :file: 'entsearch/rules/50_query_rule_put.yml' + :description: '*' +- + :file: 'entsearch/rules/10_query_ruleset_put.yml' + :description: '*' +- + :file: 'entsearch/rules/40_rule_query_search.yml' + :description: '*' +- + :file: 'entsearch/rules/60_query_rule_delete.yml' + :description: '*' +- + :file: 'entsearch/rules/30_query_ruleset_delete.yml' + :description: '*' +- + :file: 'roles/60_bulk_roles.yml' + :description: '*' +- + :file: 'entsearch/analytics/30_behavioral_analytics_delete.yml' + :description: '*' +- + :file: 'entsearch/analytics/40_behavioral_analytics_event_post.yml' + :description: '*' +- + :file: 'entsearch/20_usage.yml' + :description: '*' From ea2e501db45d9de77d4979393e9c3cb2955d1423 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Mon, 15 Jul 2024 06:05:15 +0000 Subject: [PATCH 308/540] Bumps stack to version 8.16.0-SNAPSHOT --- .buildkite/pipeline.yml | 4 ++-- .github/workflows/main.yml | 4 ++-- .github/workflows/otel.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index de000d3f68..f2002c0b40 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -5,7 +5,7 @@ steps: env: RUBY_VERSION: "{{ matrix.ruby }}" TEST_SUITE: "{{ matrix.suite }}" - STACK_VERSION: 8.15.0-SNAPSHOT + STACK_VERSION: 8.16.0-SNAPSHOT TRANSPORT_VERSION: "{{ matrix.transport }}" RUBY_SOURCE: "{{ matrix.ruby_source }}" matrix: @@ -66,7 +66,7 @@ steps: provider: "gcp" env: RUBY_VERSION: "3.3" - STACK_VERSION: 8.15.0-SNAPSHOT + STACK_VERSION: 8.16.0-SNAPSHOT TRANSPORT_VERSION: "8.3" RUBY_SOURCE: "ruby" TEST_SUITE: "platinum" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a87791966e..07d803ed46 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 8.15.0-SNAPSHOT + stack-version: 8.16.0-SNAPSHOT security-enabled: false - uses: ruby/setup-ruby@v1 with: @@ -40,4 +40,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake elasticsearch:download_artifacts[8.15.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake elasticsearch:download_artifacts[8.16.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit diff --git a/.github/workflows/otel.yml b/.github/workflows/otel.yml index 2f32d28683..895c320541 100644 --- a/.github/workflows/otel.yml +++ b/.github/workflows/otel.yml @@ -28,7 +28,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 8.15.0-SNAPSHOT + stack-version: 8.16.0-SNAPSHOT security-enabled: false - uses: ruby/setup-ruby@v1 with: @@ -42,4 +42,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake elasticsearch:download_artifacts[8.15.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake elasticsearch:download_artifacts[8.16.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit From 62e5528a95ef0e14e087ddac7403cb00dd97168e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 19 Jul 2024 09:42:42 +0100 Subject: [PATCH 309/540] Test Runner: Catch Net::ReadTimeout when retrying actions --- elasticsearch-api/api-spec-testing/test_file.rb | 1 + .../spec/elasticsearch/api/perform_request_spec.rb | 2 +- elasticsearch/spec/integration/opentelemetry_spec.rb | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/api-spec-testing/test_file.rb b/elasticsearch-api/api-spec-testing/test_file.rb index c610b918ff..41d97a775a 100644 --- a/elasticsearch-api/api-spec-testing/test_file.rb +++ b/elasticsearch-api/api-spec-testing/test_file.rb @@ -162,6 +162,7 @@ def run_actions_and_retry(actions) action.execute(client) true rescue Elastic::Transport::Transport::Errors::RequestTimeout, + Net::ReadTimeout, # TODO: Replace this if we change adapters Elastic::Transport::Transport::Errors::ServiceUnavailable => e # The action sometimes gets the cluster in a recovering state, so we # retry a few times and then raise an exception if it's still diff --git a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb index 840866ea9b..a075ce257d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb @@ -58,7 +58,7 @@ if defined_path_parts.empty? { endpoint: spec.endpoint_name } else - { endpoint: spec.endpoint_name, defined_params: defined_path_parts} + { endpoint: spec.endpoint_name, defined_params: defined_path_parts } end end diff --git a/elasticsearch/spec/integration/opentelemetry_spec.rb b/elasticsearch/spec/integration/opentelemetry_spec.rb index 57761a9aaf..55c423b780 100644 --- a/elasticsearch/spec/integration/opentelemetry_spec.rb +++ b/elasticsearch/spec/integration/opentelemetry_spec.rb @@ -36,12 +36,12 @@ end after do - client.delete(index: 'myindex', id: 1); rescue + client.delete(index: 'myindex', id: 1); rescue end context 'when a request is instrumented' do it 'sets the span name to the endpoint id' do - client.search(body: { query: { match: {a: 1} } }) + client.search(body: { query: { match: { a: 1 } } }) expect(span.name).to eq 'search' end From ce8efd7dbb396568135ea6de33c1d70261db6cfa Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 19 Jul 2024 17:26:11 +0100 Subject: [PATCH 310/540] Test Runner: Skips logsdb tests --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index b57b9f9c02..bfd6351e2d 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -122,3 +122,6 @@ - :file: 'aggregations/scripted_metric_allow_list.yml' :description: 'allowed stored scripts do not affect allowed inline scripts' +- + :file: 'logsdb/10_settings.yml' + :description: '*' From b7b1ef7d59111814a2422c979f9c421741bc881a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 19 Jul 2024 12:21:05 +0100 Subject: [PATCH 311/540] Adds task to automatically update to the latest STACK_VERSION --- Rakefile | 4 ++-- rake_tasks/automation.rake | 18 +++++++----------- rake_tasks/elasticsearch_tasks.rake | 13 +++++++++++++ 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/Rakefile b/Rakefile index 6dad7b3b65..062a1f62c4 100644 --- a/Rakefile +++ b/Rakefile @@ -38,9 +38,9 @@ def admin_client } ) - url = "https://#{user}:#{password}@#{uri.host}:#{uri.port}" + url = "https://#{user}:#{password}@#{uri.host}:#{uri.port}" else - url = "http://#{user}:#{password}@#{uri.host}:#{uri.port}" + url = "http://#{user}:#{password}@#{uri.host}:#{uri.port}" end puts "Elasticsearch Client url: #{url}" Elasticsearch::Client.new(host: url, transport_options: transport_options) diff --git a/rake_tasks/automation.rake b/rake_tasks/automation.rake index ec510d3dbe..f319f4af0e 100644 --- a/rake_tasks/automation.rake +++ b/rake_tasks/automation.rake @@ -20,11 +20,8 @@ require_relative '../elasticsearch/lib/elasticsearch/version' namespace :automation do desc 'Build gem releases and snapshots' - task :build_gems do |_, args| - output_dir = File.expand_path(__dir__ + '/../build') - require 'byebug'; byebug - - + task :build_gems do + output_dir = File.expand_path("#{__dir__}/../build") dir = CURRENT_PATH.join(output_dir).to_s FileUtils.mkdir_p(dir) unless File.exist?(dir) version = Elasticsearch::VERSION @@ -40,7 +37,7 @@ namespace :automation do desc 'Generate API code' task :codegen do - version = YAML.load_file(File.expand_path(__dir__ + '/../.buildkite/pipeline.yml'))['steps'].first['env']['STACK_VERSION'] + version = YAML.load_file(File.expand_path("#{__dir__}/../.buildkite/pipeline.yml"))['steps'].first['env']['STACK_VERSION'] Rake::Task['elasticsearch:download_artifacts'].invoke(version) sh "cd #{CURRENT_PATH.join('elasticsearch-api/utils')} \ @@ -100,16 +97,15 @@ namespace :automation do DESC task :bumpmatrix, :version do |_, args| abort('[!] Required argument [version] missing') unless (version = args[:version]) + gh_actions = Dir.glob(File.expand_path('../.github/workflows/*.yml', __dir__)) - files = [ - '.github/workflows/main.yml', - '.github/workflows/otel.yml', - '.buildkite/pipeline.yml' - ] + files = gh_actions + ['.buildkite/pipeline.yml'] regexp = Regexp.new(/([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}?+(-SNAPSHOT)?)/) files.each do |file| content = File.read(file) match = content.match(regexp) + next if match.nil? + old_version = match[1] content.gsub!(old_version, args[:version]) puts "[#{old_version}] -> [#{version}] in #{file.gsub('./', '')}" diff --git a/rake_tasks/elasticsearch_tasks.rake b/rake_tasks/elasticsearch_tasks.rake index 268790f29e..9de8a75e39 100644 --- a/rake_tasks/elasticsearch_tasks.rake +++ b/rake_tasks/elasticsearch_tasks.rake @@ -41,6 +41,19 @@ namespace :elasticsearch do end end + desc 'Automatically update to latest version' + task :autoupdate_version do + require 'tempfile' + + branch = `git branch --show-current`.strip + url = "https://snapshots.elastic.co/latest/#{branch}.json" + file = Tempfile.new('version') + download_file!(url, file) + version = JSON.parse(file.read)['version'] + puts "Latest version is #{version}" + Rake::Task['automation:bumpmatrix'].invoke(version) + end + def download_file!(url, filename) puts "Downloading #{filename} from #{url}" File.open(filename, 'w') do |downloaded_file| From 71dad0cf538d196ddf91d603e21e5660fa5289b8 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 22 Jul 2024 17:11:10 +0100 Subject: [PATCH 312/540] [API] Adds geoip_database endpoints - delete, get, put --- .../actions/ingest/delete_geoip_database.rb | 60 ++++++++++++++++++ .../api/actions/ingest/get_geoip_database.rb | 62 +++++++++++++++++++ .../api/actions/ingest/put_geoip_database.rb | 62 +++++++++++++++++++ .../ingest/delete_geoip_database_spec.rb | 39 ++++++++++++ .../actions/ingest/get_geoip_database_spec.rb | 39 ++++++++++++ .../actions/ingest/put_geoip_database_spec.rb | 45 ++++++++++++++ 6 files changed, 307 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_geoip_database_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_geoip_database_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_geoip_database_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb new file mode 100644 index 0000000000..9a75e8c8ec --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb @@ -0,0 +1,60 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Ingest + module Actions + # Deletes a geoip database configuration + # + # @option arguments [List] :id A comma-separated list of geoip database configurations to delete + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/TODO.html + # + def delete_geoip_database(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'ingest.delete_geoip_database' } + + defined_params = [:id].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 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_DELETE + path = "_ingest/geoip/database/#{Utils.__listify(_id)}" + params = {} + + 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/ingest/get_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb new file mode 100644 index 0000000000..c6d73252d5 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb @@ -0,0 +1,62 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Ingest + module Actions + # Returns geoip database configuration. + # + # @option arguments [List] :id A comma-separated list of geoip database configurations to get; use `*` to get all geoip database configurations + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/TODO.html + # + def get_geoip_database(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'ingest.get_geoip_database' } + + defined_params = [:id].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 + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_GET + path = if _id + "_ingest/geoip/database/#{Utils.__listify(_id)}" + else + '_ingest/geoip/database' + end + params = {} + + 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/ingest/put_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb new file mode 100644 index 0000000000..e0db4adf5a --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb @@ -0,0 +1,62 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Ingest + module Actions + # Puts the configuration for a geoip database to be downloaded + # + # @option arguments [String] :id The id of the database configuration + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The database configuration definition (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/TODO.html + # + def put_geoip_database(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'ingest.put_geoip_database' } + + defined_params = [:id].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 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_PUT + path = "_ingest/geoip/database/#{Utils.__listify(_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_geoip_database_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_geoip_database_spec.rb new file mode 100644 index 0000000000..4a3e4e9b6e --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_geoip_database_spec.rb @@ -0,0 +1,39 @@ +# 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. + +require 'spec_helper' + +describe 'client.ingest#delete_geoip_database' do + let(:expected_args) do + [ + 'DELETE', + '_ingest/geoip/database/foo', + {}, + nil, + {}, + { defined_params: { id: 'foo' }, endpoint: 'ingest.delete_geoip_database' } + ] + end + + let(:client) do + Class.new { include Elasticsearch::API }.new + end + + it 'performs the request' do + expect(client_double.ingest.delete_geoip_database(id: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_geoip_database_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_geoip_database_spec.rb new file mode 100644 index 0000000000..535d653839 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_geoip_database_spec.rb @@ -0,0 +1,39 @@ +# 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. + +require 'spec_helper' + +describe 'client.ingest#get_geoip_database' do + let(:expected_args) do + [ + 'GET', + '_ingest/geoip/database/foo', + {}, + nil, + {}, + { defined_params: { id: 'foo' }, endpoint: 'ingest.get_geoip_database' } + ] + end + + let(:client) do + Class.new { include Elasticsearch::API }.new + end + + it 'performs the request' do + expect(client_double.ingest.get_geoip_database(id: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_geoip_database_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_geoip_database_spec.rb new file mode 100644 index 0000000000..e1df722c52 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_geoip_database_spec.rb @@ -0,0 +1,45 @@ +# 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. + +require 'spec_helper' + +describe 'client.ingest#put_geoip_database' do + let(:expected_args) do + [ + 'PUT', + '_ingest/geoip/database/foo', + {}, + {}, + {}, + { defined_params: { id: 'foo' }, endpoint: 'ingest.put_geoip_database' } + ] + end + + let(:client) do + Class.new { include Elasticsearch::API }.new + end + + it 'requires the :id argument' do + expect { + client.ingest.put_geoip_database + }.to raise_exception(ArgumentError) + end + + it 'performs the request' do + expect(client_double.ingest.put_geoip_database(id: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end From d2cf0373f8cd4578626a848835f5507fa2d4b4f9 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 22 Jul 2024 18:38:23 +0100 Subject: [PATCH 313/540] Test Runner: Adds search vectors and ingest test to skipped list --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index bfd6351e2d..de142b97ae 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -125,3 +125,9 @@ - :file: 'logsdb/10_settings.yml' :description: '*' +- + :file: 'search.vectors/180_update_dense_vector_type.yml' + :description: 'Test create and update dense vector mapping to int4 with per-doc indexing and flush' +- + :file: 'simulate.ingest/10_basic.yml' + :description: 'Test mapping validation' From 1a53ad8dcde8c012d4f3af16751a5c6c32aab724 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 22 Jul 2024 18:38:43 +0100 Subject: [PATCH 314/540] Test Runner: Fixes variable name --- .../api-spec-testing/test_file/action.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/elasticsearch-api/api-spec-testing/test_file/action.rb b/elasticsearch-api/api-spec-testing/test_file/action.rb index 4e8d3ea71a..bc7da39d1c 100644 --- a/elasticsearch-api/api-spec-testing/test_file/action.rb +++ b/elasticsearch-api/api-spec-testing/test_file/action.rb @@ -127,8 +127,8 @@ def perform_internal(method, args, client, test) client end - def perform_action(_method, args, client, test) - case _method + def perform_action(method, args, client, test) + case method when 'bulk' arguments = prepare_arguments(args, test) arguments[:body].map! do |item| @@ -138,7 +138,7 @@ def perform_action(_method, args, client, test) symbolize_keys(JSON.parse(item)) end end if arguments[:body].is_a? Array - @response = client.send(_method, arguments) + @response = client.send(method, arguments) client when 'headers' headers = prepare_arguments(args, test) @@ -161,11 +161,11 @@ def perform_action(_method, args, client, test) client when 'put_trained_model_alias' args.merge!('reassign' => true) unless args['reassign'] === false - @response = client.send(_method, prepare_arguments(args, test)) + @response = client.send(method, prepare_arguments(args, test)) client when 'create' begin - @response = client.send(_method, prepare_arguments(args, test)) + @response = client.send(method, prepare_arguments(args, test)) rescue Elastic::Transport::Transport::Errors::BadRequest => e case e.message when /resource_already_exists_exception/ @@ -178,17 +178,17 @@ def perform_action(_method, args, client, test) else raise e end - @response = client.send(_method, prepare_arguments(args, test)) + @response = client.send(method, prepare_arguments(args, test)) end client when 'update_user_profile_data', 'get_user_profile', 'enable_user_profile', 'disable_user_profile' args.each do |key, value| args[key] = value.gsub(value, test.cached_values[value.gsub('$', '')]) if value.match?(/^\$/) end - @response = client.send(_method, prepare_arguments(args, test)) + @response = client.send(method, prepare_arguments(args, test)) client else - @response = client.send(_method, prepare_arguments(args, test)) + @response = client.send(method, prepare_arguments(args, test)) client end rescue Elastic::Transport::Transport::Error => e From 42799d434b92ca0e84f8fef1246337e3b4316dca Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 23 Jul 2024 09:23:05 +0100 Subject: [PATCH 315/540] [API] security.[create|update]_cross_cluster_api_key promoted to stable --- .../api/actions/security/create_cross_cluster_api_key.rb | 4 ---- .../api/actions/security/update_cross_cluster_api_key.rb | 4 ---- 2 files changed, 8 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb index 2a951c385a..4933f9fbb8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb @@ -23,10 +23,6 @@ module API module Security module Actions # Creates a cross-cluster API key for API key based remote cluster access. - # This functionality is in Beta and is subject to change. The design and - # code is less mature than official GA features and is being provided - # as-is with no warranties. Beta features are not subject to the support - # SLA of official GA features. # # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The request to create a cross-cluster API key (*Required*) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb index 126160b605..141a5cd3af 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb @@ -23,10 +23,6 @@ module API module Security module Actions # Updates attributes of an existing cross-cluster API key. - # This functionality is in Beta and is subject to change. The design and - # code is less mature than official GA features and is being provided - # as-is with no warranties. Beta features are not subject to the support - # SLA of official GA features. # # @option arguments [String] :id The ID of the cross-cluster API key to update # @option arguments [Hash] :headers Custom HTTP headers From af049df469b3879e7cab5317a9a1a6211041b435 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 23 Jul 2024 11:28:27 +0100 Subject: [PATCH 316/540] Update README.md build badges --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index add1122dd0..9178cb70f2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Elasticsearch -[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.13](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.13.yml/badge.svg?branch=8.13)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.13.yml) [![8.14](https://github.com/elastic/elasticsearch-ruby/actions/workflows/tests.yml/badge.svg?branch=8.14)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/tests.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) +[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.14](https://github.com/elastic/elasticsearch-ruby/actions/workflows/tests.yml/badge.svg?branch=8.14)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/tests.yml) [![8.15](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.15.yml/badge.svg?branch=8.15)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.15.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) **[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)** or From bfb0c7e9c56bad56c22232892fb1d5b8d6194244 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 25 Jul 2024 10:15:43 +0100 Subject: [PATCH 317/540] Test Runner: Skips Lucene segment level field stats test --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index de142b97ae..96f99c4cde 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -131,3 +131,6 @@ - :file: 'simulate.ingest/10_basic.yml' :description: 'Test mapping validation' +- + :file: 'nodes.stats/11_indices_metrics.yml' + :description: 'Lucene segment level fields stats' From 7bb1f425b843a626e6f1496da550821bb5866674 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 29 Jul 2024 08:45:59 +0100 Subject: [PATCH 318/540] Updates rake task namespace from elasticsearch to es --- rake_tasks/elasticsearch_tasks.rake | 2 +- rake_tasks/test_tasks.rake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rake_tasks/elasticsearch_tasks.rake b/rake_tasks/elasticsearch_tasks.rake index 9de8a75e39..50676dcf34 100644 --- a/rake_tasks/elasticsearch_tasks.rake +++ b/rake_tasks/elasticsearch_tasks.rake @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -namespace :elasticsearch do +namespace :es do desc 'Wait for elasticsearch cluster to be in green state' task :wait_for_green do require 'elasticsearch' diff --git a/rake_tasks/test_tasks.rake b/rake_tasks/test_tasks.rake index be924fabc7..bd375d779f 100644 --- a/rake_tasks/test_tasks.rake +++ b/rake_tasks/test_tasks.rake @@ -48,14 +48,14 @@ namespace :test do end desc 'Run rest api tests' - task rest_api: ['elasticsearch:wait_for_green'] do + task rest_api: ['es:wait_for_green'] do puts '-' * 80 sh "cd #{CURRENT_PATH.join('elasticsearch-api')} && unset BUNDLE_GEMFILE && bundle exec rake test:rest_api" puts "\n" end desc 'Run security (Platinum) rest api yaml tests' - task security: 'elasticsearch:wait_for_green' do + task security: 'es:wait_for_green' do puts '-' * 80 sh "cd #{CURRENT_PATH.join('elasticsearch-api')} && unset BUNDLE_GEMFILE && TEST_SUITE=platinum bundle exec rake test:rest_api" puts "\n" From 3ac042f9fecd272fc93da66c91c4907f80a37123 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 29 Jul 2024 10:00:43 +0100 Subject: [PATCH 319/540] Test Runner: Skips tests with regexp issue --- elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml index 1bd5e7fc37..1a4c3ca323 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml @@ -205,3 +205,10 @@ - :file: 'entsearch/20_usage.yml' :description: '*' +# TODO: Update test runnner. Error is ok but Regexp shenanigans +- + :file: 'eql/60_no_exact.yml' + :description: 'Case insensitive match on text field' +- + :file: 'esql/180_match_operator.yml' + :description: '*' From 1bc7a905cd3b8a37630a6a93a47f5c7e9b513cca Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 29 Jul 2024 10:12:44 +0100 Subject: [PATCH 320/540] [CI] Updates GitHub Actions and Buildkite --- .buildkite/run-client.sh | 2 +- .github/workflows/main.yml | 2 +- .github/workflows/otel.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildkite/run-client.sh b/.buildkite/run-client.sh index ef89d07104..fa4453bcce 100755 --- a/.buildkite/run-client.sh +++ b/.buildkite/run-client.sh @@ -35,4 +35,4 @@ docker run \ --name elasticsearch-ruby \ --rm \ elastic/elasticsearch-ruby \ - bundle exec rake elasticsearch:download_artifacts test:platinum:integration test:rest_api + bundle exec rake es:download_artifacts test:platinum:integration test:rest_api diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 07d803ed46..766ef5fe2c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,4 +40,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake elasticsearch:download_artifacts[8.16.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake es:download_artifacts[8.16.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit diff --git a/.github/workflows/otel.yml b/.github/workflows/otel.yml index 895c320541..56d6b9a5fc 100644 --- a/.github/workflows/otel.yml +++ b/.github/workflows/otel.yml @@ -42,4 +42,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake elasticsearch:download_artifacts[8.16.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake es:download_artifacts[8.16.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit From e7bedcd64637d567d5f1ff79d928061dfbde494a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 29 Jul 2024 10:14:50 +0100 Subject: [PATCH 321/540] [API] Udpates capabilities source code doc url --- elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb b/elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb index d0b7a2d51c..d3319018db 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [String] :capabilities Comma-separated list of arbitrary API capabilities to check # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/capabilities.html + # @see https://github.com/elastic/elasticsearch/blob/current/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/README.asciidoc#require-or-skip-api-capabilities # def capabilities(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'capabilities' } From f1a9e63faebeeca7bfe7d89535007dc9755f8d4c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 1 Aug 2024 08:51:38 +0100 Subject: [PATCH 322/540] [CI] Fixes missing elasticsearch task namespace renames --- elasticsearch-api/README.md | 2 +- elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb | 2 +- elasticsearch-api/utils/README.md | 4 ++-- rake_tasks/automation.rake | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/elasticsearch-api/README.md b/elasticsearch-api/README.md index 94ff4c86f1..c87ec9ab5d 100644 --- a/elasticsearch-api/README.md +++ b/elasticsearch-api/README.md @@ -23,7 +23,7 @@ The `rest_api` task needs the test files from Elasticsearch. You can run the rak Or it can get the version from a running cluster to determine which version and build hash of Elasticsearch to use and test against: -`TEST_ES_SERVER=http://localhost:9200 rake elasticsearch:download_artifacts` +`TEST_ES_SERVER=http://localhost:9200 rake es:download_artifacts` This will download the necessary files used for the integration tests to `./tmp`. diff --git a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb index e163a65c73..98e48c7f8e 100644 --- a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb +++ b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb @@ -37,7 +37,7 @@ def skip_test?(test) if REST_API_YAML_FILES.empty? LOGGER.error 'No test files found!' - LOGGER.info 'Use rake rake elasticsearch:download_artifacts in the root directory of the project to download the test artifacts.' + LOGGER.info 'Use rake rake es:download_artifacts in the root directory of the project to download the test artifacts.' exit 1 end diff --git a/elasticsearch-api/utils/README.md b/elasticsearch-api/utils/README.md index 8bd6d967f2..c69113941c 100644 --- a/elasticsearch-api/utils/README.md +++ b/elasticsearch-api/utils/README.md @@ -8,7 +8,7 @@ This directory hosts The Generator, a tool that generates the classes for each A To generate the code, you need to have the Elasticsearch REST API spec files in `tmp/rest-api-spec` in the root of the project. You can run a rake task from the root of the project to download the specs corresponding to the current running cluster: ```bash -$ rake elasticsearch:download_artifacts +$ rake es:download_artifacts ``` Once the JSON files have been downloaded, you need to run (from this folder): @@ -24,7 +24,7 @@ $ thor code:generate $ IGNORE_VERSION=true thor code:generate ``` -- You can use the environment variable `BUILD_HASH` to update the build hash for the generated code from the `tmp/rest-api-spec/build_hash` file. This file is updated every time you use the `elasticsearch:download_artifacts` Rake task is used in the root of the project to download the latest Elasticsearch specs and tests: +- You can use the environment variable `BUILD_HASH` to update the build hash for the generated code from the `tmp/rest-api-spec/build_hash` file. This file is updated every time you use the `es:download_artifacts` Rake task is used in the root of the project to download the latest Elasticsearch specs and tests: ```bash $ BUILD_HASH=true thor code:generate ``` diff --git a/rake_tasks/automation.rake b/rake_tasks/automation.rake index f319f4af0e..a334922352 100644 --- a/rake_tasks/automation.rake +++ b/rake_tasks/automation.rake @@ -39,7 +39,7 @@ namespace :automation do task :codegen do version = YAML.load_file(File.expand_path("#{__dir__}/../.buildkite/pipeline.yml"))['steps'].first['env']['STACK_VERSION'] - Rake::Task['elasticsearch:download_artifacts'].invoke(version) + Rake::Task['es:download_artifacts'].invoke(version) sh "cd #{CURRENT_PATH.join('elasticsearch-api/utils')} \ && BUNDLE_GEMFILE=`pwd`/Gemfile \ && bundle exec thor code:generate" From d2a16f8c159cc5f8072ab91798f1d9e47d361388 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 1 Aug 2024 08:52:04 +0100 Subject: [PATCH 323/540] [API] Adds master_timeout to search_shards --- elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb index 7ee7019db6..70189da643 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb @@ -30,6 +30,7 @@ module Actions # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html From 5fd3e7ccc3123af29dba7c30f893f639c2ba73e7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 7 Aug 2024 08:59:45 +0100 Subject: [PATCH 324/540] [API] Adds timeout and master_timeout parameters to indices endpoints --- .../elasticsearch/api/actions/indices/create_data_stream.rb | 4 +++- .../elasticsearch/api/actions/indices/delete_data_stream.rb | 1 + .../elasticsearch/api/actions/indices/get_data_lifecycle.rb | 1 + .../lib/elasticsearch/api/actions/indices/get_data_stream.rb | 1 + .../api/actions/indices/migrate_to_data_stream.rb | 4 +++- .../elasticsearch/api/actions/indices/promote_data_stream.rb | 3 ++- 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb index 2462f6b966..66da1e830c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb @@ -25,6 +25,8 @@ module Actions # Creates a data stream # # @option arguments [String] :name The name of the data stream + # @option arguments [Time] :timeout Specify timeout for acknowledging the cluster state update + # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html @@ -48,7 +50,7 @@ def create_data_stream(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = "_data_stream/#{Utils.__listify(_name)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb index d1e743273e..c773bbc37a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb @@ -26,6 +26,7 @@ module Actions # # @option arguments [List] :name A comma-separated list of data streams to delete; use `*` to delete all data streams # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) + # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb index 217c0f6a4e..3661340ee5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb @@ -31,6 +31,7 @@ module Actions # @option arguments [List] :name A comma-separated list of data streams to get; use `*` to get all data streams # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) # @option arguments [Boolean] :include_defaults Return all relevant default configurations for the data stream (default: false) + # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-get-lifecycle.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb index 56abc8e409..f3bfedc205 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb @@ -27,6 +27,7 @@ module Actions # @option arguments [List] :name A comma-separated list of data streams to get; use `*` to get all data streams # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) # @option arguments [Boolean] :include_defaults Return all relevant default configurations for the data stream (default: false) + # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb index 759d526335..7b70036ced 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb @@ -25,6 +25,8 @@ module Actions # Migrates an alias to a data stream # # @option arguments [String] :name The name of the alias to migrate + # @option arguments [Time] :timeout Specify timeout for acknowledging the cluster state update + # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html @@ -48,7 +50,7 @@ def migrate_to_data_stream(arguments = {}) method = Elasticsearch::API::HTTP_POST path = "_data_stream/_migrate/#{Utils.__listify(_name)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb index dde2b8a41f..1a55479ee6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb @@ -25,6 +25,7 @@ module Actions # Promotes a data stream from a replicated data stream managed by CCR to a regular data stream # # @option arguments [String] :name The name of the data stream + # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html @@ -48,7 +49,7 @@ def promote_data_stream(arguments = {}) method = Elasticsearch::API::HTTP_POST path = "_data_stream/_promote/#{Utils.__listify(_name)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From 49e67acabe2a826767bf954578e070ab0a62f9b1 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 7 Aug 2024 09:00:13 +0100 Subject: [PATCH 325/540] Test Runner: Minor styling refactor for CLIENT --- elasticsearch-api/spec/yaml-test-runner/run.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index 28f7b8dc8d..91cdcaf8d4 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -49,11 +49,11 @@ transport_options = {} end -if ENV['ES_API_KEY'] - CLIENT = Elasticsearch::Client.new(host: host, api_key: ENV['ES_API_KEY'], transport_options: transport_options) -else - CLIENT = Elasticsearch::Client.new(host: host, transport_options: transport_options) -end +CLIENT = if ENV['ES_API_KEY'] + Elasticsearch::Client.new(host: host, api_key: ENV['ES_API_KEY'], transport_options: transport_options) + else + Elasticsearch::Client.new(host: host, transport_options: transport_options) + end tests_path = File.expand_path('./tmp', __dir__) From 5f7eaa00e861cf65d4621d90b27ea83c9429231c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 7 Aug 2024 14:25:52 +0100 Subject: [PATCH 326/540] [CI] don't use QUIET for Buildkite build --- .buildkite/pipeline.yml | 1 + .buildkite/run-client.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index f2002c0b40..ee28038e0a 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -8,6 +8,7 @@ steps: STACK_VERSION: 8.16.0-SNAPSHOT TRANSPORT_VERSION: "{{ matrix.transport }}" RUBY_SOURCE: "{{ matrix.ruby_source }}" + QUIET: false matrix: setup: suite: diff --git a/.buildkite/run-client.sh b/.buildkite/run-client.sh index fa4453bcce..01287fe78b 100755 --- a/.buildkite/run-client.sh +++ b/.buildkite/run-client.sh @@ -29,6 +29,7 @@ docker run \ --env "TEST_SUITE=${TEST_SUITE}" \ --env "ELASTIC_USER=elastic" \ --env "BUILDKITE=true" \ + --env "QUIET=${QUIET}" \ --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ --env "STACK_VERSION=${STACK_VERSION}" \ --volume $repo:/usr/src/app \ From 26047b6808fee2b23170777ab6b0c872da9049b9 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 9 Aug 2024 08:53:52 +0100 Subject: [PATCH 327/540] [DOCS] Release notes for 8.15.0 --- CHANGELOG.md | 84 ++++++++++++++++++++++++++ docs/release_notes/815.asciidoc | 99 +++++++++++++++++++++++++++++++ docs/release_notes/index.asciidoc | 2 + 3 files changed, 185 insertions(+) create mode 100644 docs/release_notes/815.asciidoc diff --git a/CHANGELOG.md b/CHANGELOG.md index 5db2143d09..257dcea000 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,89 @@ *See the full release notes on the official documentation website: https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/release_notes.html* +## 8.15.0 Release notes + +### Client +* Tested versions of Ruby for 8.15.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. + +#### API changes + +* `snapshot.delete` - Adds `wait_for_completion` Boolean parameter, should this request wait until the operation has completed before returning. +* `cluster.allocation_explain` - `body` is no longer a required parameter. +* `connector.put` - (experimental API) `body` and `connector_id` no longer required parameters. +* `machine_learning.update_trained_model_deployment` has been promoted to stable from Beta. Adds Integer parameter `number_of_allocations`, updates the model deployment to this number of allocations. + +##### `master_timeout` and `timeout` parameters + +These parameters have been added to several APIs: + +* `master_timeout` timeout for processing on master node. +* `timeout` timeout for acknowledgement of update from all nodes in cluster parameters. + +The APIs: + +* `autoscaling.delete_autoscaling_policy` - both. +* `autoscaling.get_autoscaling_capacity`- `master_timeout`. +* `get_autoscaling_policy` - `master_timeout`. +* `put_autoscaling_policy` - both. +* `enrich.delete_policy` - `master_timeout`. +* `enrich.execute_policy` - `master_timeout`. +* `enrich.get_policy` - `master_timeout`. +* `enrich.put_policy` - `master_timeout`. +* `enrich.stats` - `master_timeout`. +* `features.reset_features` - `master_timeout`. +* `license.delete` - both. +* `license.post` - both. +* `license.post_start_basic` - both. +* `license.post_start_trial` - both. +* `security.get_settings` - `master_timeout`. +* `security.update_settings` - both. +* `shutdown.get_node` - `master_timeout`. +* `snapshot_lifecycle_management.start` - both. +* `snapshot_lifecycle_management.stop` - both. +* `watcher.get_settings` - `master_timeout`. +* `watcher.start` - `master_timeout`. +* `watcher.stop` - `master_timeout`. +* `watcher.update_settings` - both. + +##### Inference APIs have been renamed: + +* `inference.delete_model` => `inference.delete`. Also adds two new parameters: + * `dry_run` (Boolean), if true the endpoint will not be deleted and a list of ingest processors which reference this endpoint will be returned. + * `force` (Boolean), if true the endpoint will be forcefully stopped (regardless of whether or not it is referenced by any ingest processors or semantic text fields). +* `inference.get_model` => `inference.get` +* `inference.put_model` => `inference.put` + +##### Query Rules parameters consolidated + +Changes in `query_ruleset` and `query_rules` APIs, these have been combined into the `query_rules` namespace: + +* `query_rules.delete_ruleset` - Renamed from `query_ruleset.delete`, promoted from experimental to stable. +* `query_rules.delete_rule` - Deletes an individual query rule within a ruleset. +* `query_rules.get_rule` - Returns the details about an individual query rule within a ruleset. +* `query_rules.get_ruleset` - Renamed from `query_ruleset.get`, promoted from experimental to stable. +* `query_rules.list_rulesets` - Renamed from `query_ruleset.list`, promoted from experimental to stable. +* `query_rules.put_rule` - Creates or updates a query rule within a ruleset. +* `query_rules.put_ruleset` - Renamed from `query_ruleset.put_ruleset`, promoted from experimental to stable. + +#### New APIs: + +* `ingest.delete_geoip_database` - Deletes a geoip database configuration. +* `ingest.get_geoip_database` - Returns geoip database configuration. +* `ingest.put_geoip_database` - Puts the configuration for a geoip database to be downloaded. +* `security.bulk_delete_role` - Bulk delete roles in the native realm. +* `security.bulk_put_role` - Bulk adds and updates roles in the native realm. +* `security.query_role` - Retrieves information for Roles using a subset of query DSL. +* `transform.get_node_stats` - Retrieves transform usage information for transform nodes. + +#### New Experimental APIs: + +* `connector.sync_job_claim` - Claims a connector sync job. +* `connector.update_features` - Updates the connector features in the connector document. + +### Development + +- Added a build using [es-test-runner-ruby](https://github.com/elastic/es-test-runner-ruby) and [Elasticsearch Clients Tests](https://github.com/elastic/elasticsearch-clients-tests) which will replace the Elasticsearch YAML test runner. + ## 8.14.0 Release notes ### Client diff --git a/docs/release_notes/815.asciidoc b/docs/release_notes/815.asciidoc new file mode 100644 index 0000000000..38312a5922 --- /dev/null +++ b/docs/release_notes/815.asciidoc @@ -0,0 +1,99 @@ +[[release_notes_8_15]] +=== 8.15 Release notes + +[discrete] +[[release_notes_8_15_0]] +=== 8.15.0 Release notes + +[discrete] +==== Client +* Tested versions of Ruby for 8.15.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. + +[discrete] +==== API + +[discrete] +===== API changes + +* `cluster.allocation_explain` - `body` is no longer a required parameter. +* `connector.put` - (experimental API) `body` and `connector_id` are no longer required parameters. +* `machine_learning.update_trained_model_deployment` has been promoted to stable from Beta. Adds Integer parameter `number_of_allocations`, updates the model deployment to this number of allocations. +* `snapshot.delete` - Adds `wait_for_completion` Boolean parameter, should this request wait until the operation has completed before returning. + +[discrete] +====== `master_timeout` and `timeout` parameters + +These parameters have been added to several APIs: + +* `master_timeout` timeout for processing on master node. +* `timeout` timeout for acknowledgement of update from all nodes in cluster parameters. + +The APIs: + +* `autoscaling.delete_autoscaling_policy` - both. +* `autoscaling.get_autoscaling_capacity`- `master_timeout`. +* `get_autoscaling_policy` - `master_timeout`. +* `put_autoscaling_policy` - both. +* `enrich.delete_policy` - `master_timeout`. +* `enrich.execute_policy` - `master_timeout`. +* `enrich.get_policy` - `master_timeout`. +* `enrich.put_policy` - `master_timeout`. +* `enrich.stats` - `master_timeout`. +* `features.reset_features` - `master_timeout`. +* `license.delete` - both. +* `license.post` - both. +* `license.post_start_basic` - both. +* `license.post_start_trial` - both. +* `security.get_settings` - `master_timeout`. +* `security.update_settings` - both. +* `shutdown.get_node` - `master_timeout`. +* `snapshot_lifecycle_management.start` - both. +* `snapshot_lifecycle_management.stop` - both. +* `watcher.get_settings` - `master_timeout`. +* `watcher.start` - `master_timeout`. +* `watcher.stop` - `master_timeout`. +* `watcher.update_settings` - both. + +[discrete] +====== Inference APIs have been renamed: + +* `inference.delete_model` => `inference.delete`. Also adds two new parameters: +** `dry_run` (Boolean), if true the endpoint will not be deleted and a list of ingest processors which reference this endpoint will be returned. +** `force` (Boolean), if true the endpoint will be forcefully stopped (regardless of whether or not it is referenced by any ingest processors or semantic text fields). +* `inference.get_model` => `inference.get` +* `inference.put_model` => `inference.put` + +[discrete] +====== Query Rules parameters consolidated + +Changes in `query_ruleset` and `query_rules` APIs, These have been combined into the `query_rules` namespace: + +* `query_rules.delete_ruleset` - Renamed from `query_ruleset.delete`, promoted from experimental to stable. +* `query_rules.delete_rule` - Deletes an individual query rule within a ruleset. +* `query_rules.get_rule` - Returns the details about an individual query rule within a ruleset. +* `query_rules.get_ruleset` - Renamed from `query_ruleset.get`, promoted from experimental to stable. +* `query_rules.list_rulesets` - Renamed from `query_ruleset.list`, promoted from experimental to stable. +* `query_rules.put_rule` - Creates or updates a query rule within a ruleset. +* `query_rules.put_ruleset` - Renamed from `query_ruleset.put_ruleset`, promoted from experimental to stable. + +[discrete] +===== New APIs: + +* `ingest.delete_geoip_database` - Deletes a geoip database configuration. +* `ingest.get_geoip_database` - Returns geoip database configuration. +* `ingest.put_geoip_database` - Puts the configuration for a geoip database to be downloaded. +* `security.bulk_delete_role` - Bulk delete roles in the native realm. +* `security.bulk_put_role` - Bulk adds and updates roles in the native realm. +* `security.query_role` - Retrieves information for Roles using a subset of query DSL. +* `transform.get_node_stats` - Retrieves transform usage information for transform nodes. + +[discrete] +===== New Experimental APIs: + +* `connector.sync_job_claim` - Claims a connector sync job. +* `connector.update_features` - Updates the connector features in the connector document. + +[discrete] +==== Development + +- Added a build using https://github.com/elastic/es-test-runner-ruby[es-test-runner-ruby] and https://github.com/elastic/elasticsearch-clients-tests[Elasticsearch Clients Tests] which will replace the Elasticsearch YAML test runner. diff --git a/docs/release_notes/index.asciidoc b/docs/release_notes/index.asciidoc index ad7a008b4c..2c6223c830 100644 --- a/docs/release_notes/index.asciidoc +++ b/docs/release_notes/index.asciidoc @@ -3,6 +3,7 @@ [discrete] === 8.x +* <> * <> * <> * <> @@ -36,6 +37,7 @@ * <> * <> +include::815.asciidoc[] include::814.asciidoc[] include::813.asciidoc[] include::812.asciidoc[] From a0550179f3b0df26fad461537f2a5b3a77fb7bf1 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 15 Aug 2024 14:49:42 +0100 Subject: [PATCH 328/540] [CI] Updates transport version in Buildkite pipeline --- .buildkite/pipeline.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index ee28038e0a..be4fcbbd08 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -20,7 +20,7 @@ steps: - "3.1" - "3.0" transport: - - "8.2" + - "8.3" ruby_source: - 'ruby' # Only run platinum once for the latest Ruby. You can use lots of combinations, check the @@ -42,12 +42,12 @@ steps: suite: "free" ruby: "3.3" ruby_source: "ruby" - transport: "8.0" + transport: "8.1" - with: suite: "free" ruby: "3.3" ruby_source: "ruby" - transport: "8.1" + transport: "8.2" - with: suite: "free" ruby: "3.3" @@ -57,7 +57,7 @@ steps: suite: "free" ruby: "9.4" ruby_source: "jruby" - transport: "8.2" + transport: "8.3" command: ./.buildkite/run-tests.sh # I'm publishing test results to HTML and JUnit in this directory and this directive makes them # available in the Artifacts tab of a build in Buildkite. From f9086fe32ab15f29587ad991f5baab060d816972 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 19 Aug 2024 11:19:35 +0100 Subject: [PATCH 329/540] [API] Adds local_only to capabilites --- elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb b/elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb index d3319018db..f769dce688 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb @@ -31,6 +31,7 @@ module Actions # @option arguments [String] :path API path to check # @option arguments [String] :parameters Comma-separated list of API parameters to check # @option arguments [String] :capabilities Comma-separated list of arbitrary API capabilities to check + # @option arguments [Boolean] :local_only True if only the node being called should be considered # @option arguments [Hash] :headers Custom HTTP headers # # @see https://github.com/elastic/elasticsearch/blob/current/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/README.asciidoc#require-or-skip-api-capabilities From a50a6b381998cf3656366e955a3d56cd61ed5071 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 21 Aug 2024 09:43:29 +0100 Subject: [PATCH 330/540] Updates getting version when downloading artifacts --- rake_tasks/elasticsearch_tasks.rake | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/rake_tasks/elasticsearch_tasks.rake b/rake_tasks/elasticsearch_tasks.rake index 50676dcf34..a38989ab85 100644 --- a/rake_tasks/elasticsearch_tasks.rake +++ b/rake_tasks/elasticsearch_tasks.rake @@ -78,11 +78,7 @@ namespace :es do task :download_artifacts, :version do |_, args| json_filename = CURRENT_PATH.join('tmp/artifacts.json') - unless (version_number = args[:version] || ENV['STACK_VERSION']) - # Get version number and build hash of running cluster: - version_number = cluster_info['number'] - @build_hash = cluster_info['build_hash'] if cluster_info['build_hash'] - end + version_number = args[:version] || ENV['STACK_VERSION'] || version_from_buildkite || version_from_running_cluster # Create ./tmp if it doesn't exist Dir.mkdir(CURRENT_PATH.join('tmp'), 0700) unless File.directory?(CURRENT_PATH.join('tmp')) @@ -123,6 +119,18 @@ namespace :es do File.write(CURRENT_PATH.join('tmp/rest-api-spec/build_hash'), @build_hash) end + def version_from_buildkite + require 'yaml' + yaml = YAML.load_file(File.expand_path('../.buildkite/pipeline.yml', __dir__)) + yaml['steps'].first['env']['STACK_VERSION'] + end + + def version_from_running_cluster + info = cluster_info + @build_hash = info['build_hash'] if info['build_hash'] + info['number'] + end + desc 'Check Elasticsearch health' task :health do require 'elasticsearch' From f71c049a036f22d0bb76fd800b65d0f4bff3d7ff Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 21 Aug 2024 14:06:14 +0100 Subject: [PATCH 331/540] [Test Runner] Skips tests in search.suggestion and analysis-common --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 96f99c4cde..c0c3ba6891 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -134,3 +134,10 @@ - :file: 'nodes.stats/11_indices_metrics.yml' :description: 'Lucene segment level fields stats' +- + :file: 'search.suggest/20_phrase.yml' + :description: 'breaks ties by sorting terms' +# Regexp issues with catching an error +- + :file: 'analysis-common/40_token_filters.yml' + :description: 'stemmer_override file access' From 1f6d16ae7e8d22c5331d631a80337c45945d5f6a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 28 Aug 2024 10:51:57 +0100 Subject: [PATCH 332/540] [API] Test Runner: Skips geo_ip tests, migrated to YAML --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index c0c3ba6891..5c1823700d 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -141,3 +141,9 @@ - :file: 'analysis-common/40_token_filters.yml' :description: 'stemmer_override file access' +- # Migrated to YAML tests: + :file: 'ingest_geoip/30_geoip_stats.yml' + :description: '*' +- # Testing server: + :file: 'ingest_geoip/20_geoip_processor.yml' + :description: '*' From 11d4c93bc356ac852f152a6767590280acad0fe9 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 2 Sep 2024 09:03:41 +0100 Subject: [PATCH 333/540] [API] Generator: Rubocop styling changes --- elasticsearch-api/utils/thor/endpoint_specifics.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/utils/thor/endpoint_specifics.rb b/elasticsearch-api/utils/thor/endpoint_specifics.rb index 0b3cc41547..5dc4d6fa65 100644 --- a/elasticsearch-api/utils/thor/endpoint_specifics.rb +++ b/elasticsearch-api/utils/thor/endpoint_specifics.rb @@ -99,16 +99,14 @@ def msearch_body_helper <<~SRC case when body.is_a?(Array) && body.any? { |d| d.has_key? :search } - payload = body. - inject([]) do |sum, item| + payload = body.inject([]) do |sum, item| meta = item data = meta.delete(:search) sum << meta sum << data sum - end. - map { |item| Elasticsearch::API.serializer.dump(item) } + end.map { |item| Elasticsearch::API.serializer.dump(item) } payload << "" unless payload.empty? payload = payload.join("\\n") when body.is_a?(Array) From 9631ac99e696b19b839c3b9f65995363f9d6b300 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 2 Sep 2024 09:03:08 +0100 Subject: [PATCH 334/540] [API] Autogenerated Rubocop changes --- .../lib/elasticsearch/api/actions/fleet/msearch.rb | 14 ++++++-------- .../api/actions/indices/get_data_stream.rb | 1 + .../lib/elasticsearch/api/actions/msearch.rb | 14 ++++++-------- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb index 0929394ce0..d80bbed755 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb @@ -60,15 +60,13 @@ def msearch(arguments = {}) params = {} if body.is_a?(Array) && body.any? { |d| d.has_key? :search } - payload = body - .each_with_object([]) do |item, sum| - meta = item - data = meta.delete(:search) + payload = body.each_with_object([]) do |item, sum| + meta = item + data = meta.delete(:search) - sum << meta - sum << data - end - .map { |item| Elasticsearch::API.serializer.dump(item) } + sum << meta + sum << data + end.map { |item| Elasticsearch::API.serializer.dump(item) } payload << '' unless payload.empty? payload = payload.join("\n") elsif body.is_a?(Array) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb index f3bfedc205..5e1ff6ff08 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb @@ -28,6 +28,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) # @option arguments [Boolean] :include_defaults Return all relevant default configurations for the data stream (default: false) # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [Boolean] :verbose Whether the maximum timestamp for each data stream should be calculated and returned (default: false) # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb index e53eebd21b..4b326a03fc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb @@ -62,15 +62,13 @@ def msearch(arguments = {}) params = Utils.process_params(arguments) if body.is_a?(Array) && body.any? { |d| d.has_key? :search } - payload = body - .each_with_object([]) do |item, sum| - meta = item - data = meta.delete(:search) + payload = body.each_with_object([]) do |item, sum| + meta = item + data = meta.delete(:search) - sum << meta - sum << data - end - .map { |item| Elasticsearch::API.serializer.dump(item) } + sum << meta + sum << data + end.map { |item| Elasticsearch::API.serializer.dump(item) } payload << '' unless payload.empty? payload = payload.join("\n") elsif body.is_a?(Array) From 6efa650e7daaf29b665cfb16c6a9b5b78eea331e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 2 Sep 2024 09:50:01 +0100 Subject: [PATCH 335/540] YAML Tests: Download branch when in a release branch --- .buildkite/pipeline.yml | 1 + .buildkite/run-yaml-tests.sh | 1 + elasticsearch-api/spec/yaml-test-runner/run.rb | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index be4fcbbd08..fb64720c28 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -68,6 +68,7 @@ steps: env: RUBY_VERSION: "3.3" STACK_VERSION: 8.16.0-SNAPSHOT + ES_YAML_TESTS_BRANCH: main TRANSPORT_VERSION: "8.3" RUBY_SOURCE: "ruby" TEST_SUITE: "platinum" diff --git a/.buildkite/run-yaml-tests.sh b/.buildkite/run-yaml-tests.sh index 2a967da7da..ba04b78cad 100644 --- a/.buildkite/run-yaml-tests.sh +++ b/.buildkite/run-yaml-tests.sh @@ -36,6 +36,7 @@ docker run \ --env "BUILDKITE=true" \ --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ --env "STACK_VERSION=${STACK_VERSION}" \ + --env "ES_YAML_TESTS_BRANCH=${ES_YAML_TESTS_BRANCH}" \ --volume $repo:/usr/src/app \ --name elasticsearch-ruby \ --rm \ diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index 91cdcaf8d4..c25c3a71c3 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -55,11 +55,13 @@ Elasticsearch::Client.new(host: host, transport_options: transport_options) end - tests_path = File.expand_path('./tmp', __dir__) logger = Logger.new($stdout) logger.level = Logger::WARN unless ENV['DEBUG'] -Elasticsearch::Tests::Downloader::run(tests_path) +# If we're running in a release branch, download the corresponding branch for tests +current_branch = `git rev-parse --abbrev-ref HEAD`.strip +branch = current_branch.match(/[0-9]\.[0-9]+/)&.[](0) || ENV['ES_YAML_TESTS_BRANCH'] || nil +Elasticsearch::Tests::Downloader::run(tests_path, branch) Elasticsearch::Tests::TestRunner.new(CLIENT, tests_path, logger).run From 0c9b2da9d4ac236f248e52af9a5415c2659db547 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 2 Sep 2024 10:48:24 +0100 Subject: [PATCH 336/540] [CI] Updates YAML tests branch in bumpmatrix --- rake_tasks/automation.rake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rake_tasks/automation.rake b/rake_tasks/automation.rake index a334922352..7268688bd8 100644 --- a/rake_tasks/automation.rake +++ b/rake_tasks/automation.rake @@ -103,6 +103,12 @@ namespace :automation do regexp = Regexp.new(/([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}?+(-SNAPSHOT)?)/) files.each do |file| content = File.read(file) + if file == '.buildkite/pipeline.yml' + branch = version.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1] + old_branch = content.match(/ES_YAML_TESTS_BRANCH: ([0-9.]+)/)[1] + content.gsub!(old_branch, branch) + puts "[#{old_branch}] -> [#{branch}] in #{file.gsub('./', '')}" + end match = content.match(regexp) next if match.nil? From b16c30303a04d3227d45910ee808aeadff40a239 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 9 Sep 2024 08:58:55 +0100 Subject: [PATCH 337/540] Test Runner: Skips simulate test --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 5c1823700d..dfd8e2563c 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -147,3 +147,6 @@ - # Testing server: :file: 'ingest_geoip/20_geoip_processor.yml' :description: '*' +- + :file: 'simulate.ingest/10_basic.yml' + :description: 'Test mapping validation from templates' From 4189056db98d56a5237be21b39ad849a21330006 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 9 Sep 2024 08:53:12 +0100 Subject: [PATCH 338/540] [API] Adds ignore_unavailable and allow_no_indices to indices.resolve_index --- .../lib/elasticsearch/api/actions/indices/resolve_index.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb index 0f955a8aa0..9c6e38013d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb @@ -26,6 +26,8 @@ module Actions # # @option arguments [List] :name A comma-separated list of names or wildcard expressions # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) + # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) + # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-index-api.html From 97a5c7cc8961e0d70fce100a9a13536fd497ddd9 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 9 Sep 2024 16:34:57 +0100 Subject: [PATCH 339/540] Automation: Fixes bumpmatrix for main branch --- rake_tasks/automation.rake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rake_tasks/automation.rake b/rake_tasks/automation.rake index 7268688bd8..6edce27267 100644 --- a/rake_tasks/automation.rake +++ b/rake_tasks/automation.rake @@ -104,10 +104,14 @@ namespace :automation do files.each do |file| content = File.read(file) if file == '.buildkite/pipeline.yml' + require 'yaml' + yaml = YAML.safe_load(content) branch = version.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1] - old_branch = content.match(/ES_YAML_TESTS_BRANCH: ([0-9.]+)/)[1] - content.gsub!(old_branch, branch) - puts "[#{old_branch}] -> [#{branch}] in #{file.gsub('./', '')}" + yaml_tests_branch = yaml['steps'][1]['env']['ES_YAML_TESTS_BRANCH'] + next if yaml_tests_branch == 'main' + + content.gsub!(yaml_tests_branch, branch) + puts "[#{yaml_tests_branch}] -> [#{branch}] in #{file.gsub('./', '')}" end match = content.match(regexp) next if match.nil? From 9150c6a2d4664b5fcf6552eae28c0f62c6f09fa9 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 12 Sep 2024 06:55:25 +0100 Subject: [PATCH 340/540] Test Runner: Adds warnings_regex to catchables --- elasticsearch-api/api-spec-testing/test_file/action.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/api-spec-testing/test_file/action.rb b/elasticsearch-api/api-spec-testing/test_file/action.rb index bc7da39d1c..869dd57605 100644 --- a/elasticsearch-api/api-spec-testing/test_file/action.rb +++ b/elasticsearch-api/api-spec-testing/test_file/action.rb @@ -157,7 +157,7 @@ def perform_action(method, args, client, test) transport_options: transport_options.merge(headers: headers) ) end - when 'catch', 'warnings', 'allowed_warnings', 'allowed_warnings_regex' + when 'catch', 'warnings', 'allowed_warnings', 'allowed_warnings_regex', 'warnings_regex' client when 'put_trained_model_alias' args.merge!('reassign' => true) unless args['reassign'] === false From 3a1ed870e419bee67e8f6dfaa5e3c5124b3c005a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 16 Sep 2024 06:05:25 +0000 Subject: [PATCH 341/540] [CI] Bumps stack to version 9.0.0-SNAPSHOT in tests Branch 8.x has been created to follow 8.x releases and main will now target 9.0.0 --- .github/workflows/main.yml | 4 ++-- .github/workflows/otel.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 766ef5fe2c..6b08d20714 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 8.16.0-SNAPSHOT + stack-version: 9.0.0-SNAPSHOT security-enabled: false - uses: ruby/setup-ruby@v1 with: @@ -40,4 +40,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake es:download_artifacts[8.16.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake es:download_artifacts[9.0.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit diff --git a/.github/workflows/otel.yml b/.github/workflows/otel.yml index 56d6b9a5fc..238305e750 100644 --- a/.github/workflows/otel.yml +++ b/.github/workflows/otel.yml @@ -28,7 +28,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 8.16.0-SNAPSHOT + stack-version: 9.0.0-SNAPSHOT security-enabled: false - uses: ruby/setup-ruby@v1 with: @@ -42,4 +42,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake es:download_artifacts[8.16.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake es:download_artifacts[9.0.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit From f1ceca99f7237e51d675e2a51f21218d92801198 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 16 Sep 2024 08:40:14 +0100 Subject: [PATCH 342/540] Bumps main to 9.0.0 --- elasticsearch-api/lib/elasticsearch/api/version.rb | 2 +- elasticsearch/elasticsearch.gemspec | 2 +- elasticsearch/lib/elasticsearch/version.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index e43ee587d7..a8d55bf703 100644 --- a/elasticsearch-api/lib/elasticsearch/api/version.rb +++ b/elasticsearch-api/lib/elasticsearch/api/version.rb @@ -17,6 +17,6 @@ module Elasticsearch module API - VERSION = '8.14.0'.freeze + VERSION = '9.0.0'.freeze end end diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index d7dbdc900f..c30c83e263 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -46,7 +46,7 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 2.5' s.add_dependency 'elastic-transport', '~> 8.3' - s.add_dependency 'elasticsearch-api', '8.14.0' + s.add_dependency 'elasticsearch-api', '9.0.0' s.add_development_dependency 'base64' s.add_development_dependency 'bundler' diff --git a/elasticsearch/lib/elasticsearch/version.rb b/elasticsearch/lib/elasticsearch/version.rb index 099a40a401..33758a0941 100644 --- a/elasticsearch/lib/elasticsearch/version.rb +++ b/elasticsearch/lib/elasticsearch/version.rb @@ -16,5 +16,5 @@ # under the License. module Elasticsearch - VERSION = '8.14.0'.freeze + VERSION = '9.0.0'.freeze end From 1914ca544731ad2e2d00b1f9b0ae44568a7690bf Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 16 Sep 2024 08:40:32 +0100 Subject: [PATCH 343/540] Removes 2.7 deprecated code in es-api gemspec --- elasticsearch-api/elasticsearch-api.gemspec | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/elasticsearch-api/elasticsearch-api.gemspec b/elasticsearch-api/elasticsearch-api.gemspec index a458ed60d1..f2149ebda2 100644 --- a/elasticsearch-api/elasticsearch-api.gemspec +++ b/elasticsearch-api/elasticsearch-api.gemspec @@ -59,15 +59,10 @@ Gem::Specification.new do |s| s.add_development_dependency 'yard' # Gems for testing integrations - s.add_development_dependency 'jsonify' + s.add_development_dependency 'activesupport' s.add_development_dependency 'hashie' - # Temporary support for Ruby 2.6, since it's EOL March 2022: - if RUBY_VERSION < '2.7.0' - s.add_development_dependency 'jbuilder', '< 7.0.0' - else - s.add_development_dependency 'activesupport' - s.add_development_dependency 'jbuilder' - end + s.add_development_dependency 'jbuilder' + s.add_development_dependency 'jsonify' s.add_development_dependency 'cane' s.add_development_dependency 'escape_utils' unless defined? JRUBY_VERSION From cdde4e6ed6593057de13bf9446d185c10bfc7209 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 16 Sep 2024 15:02:28 +0100 Subject: [PATCH 344/540] [CI] Updates Buildkite STACK_VERSION to 9.0.0-SNAPSHOT --- .buildkite/pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index fb64720c28..d7b6146663 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -5,7 +5,7 @@ steps: env: RUBY_VERSION: "{{ matrix.ruby }}" TEST_SUITE: "{{ matrix.suite }}" - STACK_VERSION: 8.16.0-SNAPSHOT + STACK_VERSION: 9.0.0-SNAPSHOT TRANSPORT_VERSION: "{{ matrix.transport }}" RUBY_SOURCE: "{{ matrix.ruby_source }}" QUIET: false @@ -67,7 +67,7 @@ steps: provider: "gcp" env: RUBY_VERSION: "3.3" - STACK_VERSION: 8.16.0-SNAPSHOT + STACK_VERSION: 9.0.0-SNAPSHOT ES_YAML_TESTS_BRANCH: main TRANSPORT_VERSION: "8.3" RUBY_SOURCE: "ruby" From 59599744d0787876505796edca7c8ccd9c9c1158 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 16 Sep 2024 16:02:49 +0100 Subject: [PATCH 345/540] Generator: Refactors code generation for visibility Temporary backport from 8x while we haven't switched generators for 9x --- elasticsearch-api/utils/thor/endpoint_spec.rb | 31 +++++++++++++++++-- .../utils/thor/generate_source.rb | 2 +- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/utils/thor/endpoint_spec.rb b/elasticsearch-api/utils/thor/endpoint_spec.rb index 30a06a5562..a309cbb9e2 100644 --- a/elasticsearch-api/utils/thor/endpoint_spec.rb +++ b/elasticsearch-api/utils/thor/endpoint_spec.rb @@ -24,6 +24,23 @@ module API class EndpointSpec include EndpointSpecifics + # These APIs are private, but were added in 8.x since the generator didn't consider + # visibility. They will be removed in 9.x since we're using a different generator that + # considers visibility. But new private APIs code won't be generated for the client. + EXCLUDED_8X = [ + 'autoscaling.delete_autoscaling_policy', 'autoscaling.get_autoscaling_capacity', + 'autoscaling.get_autoscaling_policy', 'autoscaling.put_autoscaling_policy', 'capabilities', + 'connector.secret_delete', 'connector.secret_get', 'connector.secret_post', + 'connector.secret_put', 'fleet.delete_secret', 'fleet.get_secret', 'fleet.post_secret', + 'ml.validate', 'ml.validate_detector', 'monitoring.bulk', 'profiling.flamegraph', + 'profiling.stacktraces', 'profiling.status', 'profiling.topn_functions', + 'security.activate_user_profile', 'security.disable_user_profile', + 'security.enable_user_profile', 'security.get_user_profile', + 'security.has_privileges_user_profile', 'security.suggest_user_profiles', + 'security.update_user_profile_data', 'shutdown.delete_node', 'shutdown.get_node', + 'shutdown.put_node' + ].freeze + def initialize(filepath) @path = Pathname(filepath) json = MultiJson.load(File.read(@path)) @@ -31,14 +48,14 @@ def initialize(filepath) @endpoint_name = json.keys.first full_namespace = parse_full_namespace - @namespace_depth = full_namespace.size > 0 ? full_namespace.size - 1 : 0 + @namespace_depth = full_namespace.size.positive? ? full_namespace.size - 1 : 0 @module_namespace = full_namespace[0, @namespace_depth] @method_name = full_namespace.last @path_parts = parse_endpoint_parts(@spec) @params = @spec['params'] || {} @paths = @spec['url']['paths'].map { |b| b['path'] } if @spec['url'] - @path_params = path_variables.flatten.uniq.collect(&:to_sym) + @path_params = path_variables.flatten.uniq.collect(&:to_sym) @http_method = parse_http_method(@spec) @deprecation_note = @spec['url']['paths'].last&.[]('deprecated') @http_path = parse_http_path(@paths) @@ -71,6 +88,16 @@ def stability @spec['stability'] end + def visibility + @spec['visibility'] + end + + def skippable? + return true if module_namespace.flatten.first == '_internal' + + visibility != 'public' && !EXCLUDED_8X.include?(endpoint_name) + end + # Function that adds the listified h param code def specific_params super(@module_namespace.first, @method_name) diff --git a/elasticsearch-api/utils/thor/generate_source.rb b/elasticsearch-api/utils/thor/generate_source.rb index df60b0004c..acdf8bb41d 100644 --- a/elasticsearch-api/utils/thor/generate_source.rb +++ b/elasticsearch-api/utils/thor/generate_source.rb @@ -68,7 +68,7 @@ def generate_source @spec = EndpointSpec.new(filepath) say_status 'json', @spec.path, :yellow # Don't generate code for internal APIs: - next if @spec.module_namespace.flatten.first == '_internal' + next if @spec.skippable? path_to_file = output.join(@spec.module_namespace.join('/')).join("#{@spec.method_name}.rb") dir = output.join(@spec.module_namespace.join('/')) From 06736c8004f196ca11697946c2d0f9244d15eac5 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 16 Sep 2024 17:07:56 +0100 Subject: [PATCH 346/540] Skips APIs that are not public in OTel tests --- .../spec/elasticsearch/api/perform_request_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb index a075ce257d..44b3fa288e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb @@ -23,7 +23,7 @@ describe 'Perform request args' do Elasticsearch::API::FilesHelper.files.each do |filepath| spec = Elasticsearch::API::EndpointSpec.new(filepath) - next if spec.module_namespace.flatten.first == '_internal' + next if spec.module_namespace.flatten.first == '_internal' || spec.visibility != 'public' # These are the path parts defined by the user in the method argument defined_path_parts = spec.path_params.inject({}) do |params, part| From 3294ae83a088167a623c262219ab095244fd1ef7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 18 Sep 2024 08:56:43 +0100 Subject: [PATCH 347/540] [API] Updates generator, removes exceptions for private apis --- elasticsearch-api/utils/thor/endpoint_spec.rb | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/elasticsearch-api/utils/thor/endpoint_spec.rb b/elasticsearch-api/utils/thor/endpoint_spec.rb index a309cbb9e2..6b7aca4bdf 100644 --- a/elasticsearch-api/utils/thor/endpoint_spec.rb +++ b/elasticsearch-api/utils/thor/endpoint_spec.rb @@ -24,23 +24,6 @@ module API class EndpointSpec include EndpointSpecifics - # These APIs are private, but were added in 8.x since the generator didn't consider - # visibility. They will be removed in 9.x since we're using a different generator that - # considers visibility. But new private APIs code won't be generated for the client. - EXCLUDED_8X = [ - 'autoscaling.delete_autoscaling_policy', 'autoscaling.get_autoscaling_capacity', - 'autoscaling.get_autoscaling_policy', 'autoscaling.put_autoscaling_policy', 'capabilities', - 'connector.secret_delete', 'connector.secret_get', 'connector.secret_post', - 'connector.secret_put', 'fleet.delete_secret', 'fleet.get_secret', 'fleet.post_secret', - 'ml.validate', 'ml.validate_detector', 'monitoring.bulk', 'profiling.flamegraph', - 'profiling.stacktraces', 'profiling.status', 'profiling.topn_functions', - 'security.activate_user_profile', 'security.disable_user_profile', - 'security.enable_user_profile', 'security.get_user_profile', - 'security.has_privileges_user_profile', 'security.suggest_user_profiles', - 'security.update_user_profile_data', 'shutdown.delete_node', 'shutdown.get_node', - 'shutdown.put_node' - ].freeze - def initialize(filepath) @path = Pathname(filepath) json = MultiJson.load(File.read(@path)) @@ -93,9 +76,7 @@ def visibility end def skippable? - return true if module_namespace.flatten.first == '_internal' - - visibility != 'public' && !EXCLUDED_8X.include?(endpoint_name) + module_namespace.flatten.first == '_internal' || visibility != 'public' end # Function that adds the listified h param code From f6db8489420175262f849466ae1a356f3af5f2a5 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 18 Sep 2024 08:59:15 +0100 Subject: [PATCH 348/540] [API] Removes private APIs autoscaling.delete_autoscaling_policy.rb autoscaling.get_autoscaling_capacity.rb autoscaling.get_autoscaling_policy.rb autoscaling.put_autoscaling_policy.rb capabilities.rb connector.secret_delete.rb connector.secret_get.rb connector.secret_post.rb connector.secret_put.rb fleet.delete_secret.rb fleet.get_secret.rb fleet.post_secret.rb machine_learning.validate.rb machine_learning.validate_detector.rb monitoring.bulk.rb profiling.flamegraph.rb profiling.stacktraces.rb profiling.status.rb profiling.topn_functions.rb security.activate_user_profile.rb security.disable_user_profile.rb security.enable_user_profile.rb security.get_user_profile.rb security.has_privileges_user_profile.rb security.suggest_user_profiles.rb security.update_user_profile_data.rb shutdown.delete_node.rb shutdown.get_node.rb shutdown.put_node.rb --- .../autoscaling/delete_autoscaling_policy.rb | 62 -------------- .../autoscaling/get_autoscaling_capacity.rb | 51 ------------ .../autoscaling/get_autoscaling_policy.rb | 61 -------------- .../autoscaling/put_autoscaling_policy.rb | 64 --------------- .../elasticsearch/api/actions/capabilities.rb | 57 ------------- .../api/actions/connector/secret_delete.rb | 64 --------------- .../api/actions/connector/secret_get.rb | 64 --------------- .../api/actions/connector/secret_post.rb | 57 ------------- .../api/actions/connector/secret_put.rb | 66 --------------- .../api/actions/fleet/delete_secret.rb | 64 --------------- .../api/actions/fleet/get_secret.rb | 64 --------------- .../api/actions/fleet/post_secret.rb | 57 ------------- .../api/actions/machine_learning/validate.rb | 53 ------------ .../machine_learning/validate_detector.rb | 53 ------------ .../api/actions/monitoring/bulk.rb | 81 ------------------- .../api/actions/profiling/flamegraph.rb | 53 ------------ .../api/actions/profiling/stacktraces.rb | 53 ------------ .../api/actions/profiling/status.rb | 53 ------------ .../api/actions/profiling/topn_functions.rb | 53 ------------ .../actions/security/activate_user_profile.rb | 53 ------------ .../actions/security/disable_user_profile.rb | 61 -------------- .../actions/security/enable_user_profile.rb | 61 -------------- .../api/actions/security/get_user_profile.rb | 61 -------------- .../security/has_privileges_user_profile.rb | 53 ------------ .../actions/security/suggest_user_profiles.rb | 57 ------------- .../security/update_user_profile_data.rb | 65 --------------- .../api/actions/shutdown/delete_node.rb | 60 -------------- .../api/actions/shutdown/get_node.rb | 63 --------------- .../api/actions/shutdown/put_node.rb | 62 -------------- 29 files changed, 1726 deletions(-) delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_delete.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_get.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_post.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_put.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/profiling/flamegraph.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/profiling/stacktraces.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/profiling/status.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/profiling/topn_functions.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb deleted file mode 100644 index 6672db4b28..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb +++ /dev/null @@ -1,62 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Autoscaling - module Actions - # Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. - # - # @option arguments [String] :name the name of the autoscaling policy - # @option arguments [Time] :master_timeout Timeout for processing on master node - # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html - # - def delete_autoscaling_policy(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'autoscaling.delete_autoscaling_policy' } - - 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 = "_autoscaling/policy/#{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/autoscaling/get_autoscaling_capacity.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb deleted file mode 100644 index 9fba921f3a..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb +++ /dev/null @@ -1,51 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Autoscaling - module Actions - # Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. - # - # @option arguments [Time] :master_timeout Timeout for processing on master node - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html - # - def get_autoscaling_capacity(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'autoscaling.get_autoscaling_capacity' } - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - method = Elasticsearch::API::HTTP_GET - path = '_autoscaling/capacity' - 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/autoscaling/get_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb deleted file mode 100644 index 9090bdbc74..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb +++ /dev/null @@ -1,61 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Autoscaling - module Actions - # Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. - # - # @option arguments [String] :name the name of the autoscaling policy - # @option arguments [Time] :master_timeout Timeout for processing on master node - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html - # - def get_autoscaling_policy(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'autoscaling.get_autoscaling_policy' } - - 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_GET - path = "_autoscaling/policy/#{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/autoscaling/put_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb deleted file mode 100644 index b453f52c9f..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb +++ /dev/null @@ -1,64 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Autoscaling - module Actions - # Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. - # - # @option arguments [String] :name the name of the autoscaling policy - # @option arguments [Time] :master_timeout Timeout for processing on master node - # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body the specification of the autoscaling policy (*Required*) - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html - # - def put_autoscaling_policy(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'autoscaling.put_autoscaling_policy' } - - 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 = "_autoscaling/policy/#{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/capabilities.rb b/elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb deleted file mode 100644 index f769dce688..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/capabilities.rb +++ /dev/null @@ -1,57 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Actions - # Checks if the specified combination of method, API, parameters, and arbitrary capabilities are supported - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :method REST method to check (options: GET, HEAD, POST, PUT, DELETE) - # @option arguments [String] :path API path to check - # @option arguments [String] :parameters Comma-separated list of API parameters to check - # @option arguments [String] :capabilities Comma-separated list of arbitrary API capabilities to check - # @option arguments [Boolean] :local_only True if only the node being called should be considered - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://github.com/elastic/elasticsearch/blob/current/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/README.asciidoc#require-or-skip-api-capabilities - # - def capabilities(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'capabilities' } - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - method = Elasticsearch::API::HTTP_GET - path = '_capabilities' - params = Utils.process_params(arguments) - - Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, request_opts) - ) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_delete.rb deleted file mode 100644 index 931bec6795..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_delete.rb +++ /dev/null @@ -1,64 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Connector - module Actions - # Deletes a connector secret. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :id The ID of the secret - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see [TODO] - # - def secret_delete(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector.secret_delete' } - - defined_params = [:id].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 'id' missing" unless arguments[:id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _id = arguments.delete(:id) - - method = Elasticsearch::API::HTTP_DELETE - path = "_connector/_secret/#{Utils.__listify(_id)}" - params = {} - - 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/connector/secret_get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_get.rb deleted file mode 100644 index 7ec6d602de..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_get.rb +++ /dev/null @@ -1,64 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Connector - module Actions - # Retrieves a secret stored by Connectors. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :id The ID of the secret - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see [TODO] - # - def secret_get(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector.secret_get' } - - defined_params = [:id].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 'id' missing" unless arguments[:id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _id = arguments.delete(:id) - - method = Elasticsearch::API::HTTP_GET - path = "_connector/_secret/#{Utils.__listify(_id)}" - params = {} - - 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/connector/secret_post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_post.rb deleted file mode 100644 index 311404cadd..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_post.rb +++ /dev/null @@ -1,57 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Connector - module Actions - # Creates a secret for a Connector. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The secret value to store (*Required*) - # - # @see [TODO] - # - def secret_post(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector.secret_post' } - - raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - method = Elasticsearch::API::HTTP_POST - path = '_connector/_secret' - params = {} - - 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/connector/secret_put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_put.rb deleted file mode 100644 index 94077f9da0..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/secret_put.rb +++ /dev/null @@ -1,66 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Connector - module Actions - # Creates or updates a secret for a Connector. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :id The unique identifier of the connector secret to be created or updated. - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The secret value to store (*Required*) - # - # @see [TODO] - # - def secret_put(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector.secret_put' } - - defined_params = [:id].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 'id' missing" unless arguments[:id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - _id = arguments.delete(:id) - - method = Elasticsearch::API::HTTP_PUT - path = "_connector/_secret/#{Utils.__listify(_id)}" - params = {} - - 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/fleet/delete_secret.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb deleted file mode 100644 index 8ff603ad77..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/delete_secret.rb +++ /dev/null @@ -1,64 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Fleet - module Actions - # Deletes a secret stored by Fleet. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :id The ID of the secret - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see [TODO] - # - def delete_secret(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'fleet.delete_secret' } - - defined_params = [:id].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 'id' missing" unless arguments[:id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _id = arguments.delete(:id) - - method = Elasticsearch::API::HTTP_DELETE - path = "_fleet/secret/#{Utils.__listify(_id)}" - params = {} - - 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/fleet/get_secret.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb deleted file mode 100644 index f00f51e05c..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/get_secret.rb +++ /dev/null @@ -1,64 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Fleet - module Actions - # Retrieves a secret stored by Fleet. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :id The ID of the secret - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see [TODO] - # - def get_secret(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'fleet.get_secret' } - - defined_params = [:id].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 'id' missing" unless arguments[:id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _id = arguments.delete(:id) - - method = Elasticsearch::API::HTTP_GET - path = "_fleet/secret/#{Utils.__listify(_id)}" - params = {} - - 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/fleet/post_secret.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb deleted file mode 100644 index 340520db70..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/post_secret.rb +++ /dev/null @@ -1,57 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Fleet - module Actions - # Creates a secret stored by Fleet. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The secret value to store (*Required*) - # - # @see [TODO] - # - def post_secret(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'fleet.post_secret' } - - raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - method = Elasticsearch::API::HTTP_POST - path = '_fleet/secret' - params = {} - - 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/machine_learning/validate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb deleted file mode 100644 index 66a4a8a394..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb +++ /dev/null @@ -1,53 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module MachineLearning - module Actions - # Validates an anomaly detection job. - # - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The job config (*Required*) - # - # @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html - # - def validate(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'ml.validate' } - - raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - method = Elasticsearch::API::HTTP_POST - path = '_ml/anomaly_detectors/_validate' - params = {} - - 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/machine_learning/validate_detector.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb deleted file mode 100644 index 77f97b9c46..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb +++ /dev/null @@ -1,53 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module MachineLearning - module Actions - # Validates an anomaly detection detector. - # - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The detector (*Required*) - # - # @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html - # - def validate_detector(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'ml.validate_detector' } - - raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - method = Elasticsearch::API::HTTP_POST - path = '_ml/anomaly_detectors/_validate/detector' - params = {} - - 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/monitoring/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb deleted file mode 100644 index fe2526af71..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb +++ /dev/null @@ -1,81 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Monitoring - module Actions - # Used by the monitoring features to send monitoring data. - # - # @option arguments [String] :type Default document type for items which don't provide one *Deprecated* - # @option arguments [String] :system_id Identifier of the monitored system - # @option arguments [String] :system_api_version API Version of the monitored system - # @option arguments [String] :interval Collection interval (e.g., '10s' or '10000ms') of the payload - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [String|Array] :body The operation definition and data (action-data pairs), separated by newlines. Array of Strings, Header/Data pairs, - # or the conveniency "combined" format can be passed, refer to Elasticsearch::API::Utils.__bulkify documentation. - # - # *Deprecation notice*: - # Specifying types in urls has been deprecated - # Deprecated since version 7.0.0 - # - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/monitor-elasticsearch-cluster.html - # - def bulk(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'monitoring.bulk' } - - defined_params = [:type].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] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - _type = arguments.delete(:type) - - method = Elasticsearch::API::HTTP_POST - path = if _type - "_monitoring/#{Utils.__listify(_type)}/bulk" - else - '_monitoring/bulk' - end - params = Utils.process_params(arguments) - - payload = if body.is_a? Array - Elasticsearch::API::Utils.__bulkify(body) - else - body - end - - headers.merge!('Content-Type' => 'application/x-ndjson') - Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, request_opts) - ) - end - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/flamegraph.rb b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/flamegraph.rb deleted file mode 100644 index a809de4a9e..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/flamegraph.rb +++ /dev/null @@ -1,53 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Profiling - module Actions - # Extracts a UI-optimized structure to render flamegraphs from Universal Profiling. - # - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The filter conditions for the flamegraph (*Required*) - # - # @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html - # - def flamegraph(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'profiling.flamegraph' } - - raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - method = Elasticsearch::API::HTTP_POST - path = '_profiling/flamegraph' - params = {} - - 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/profiling/stacktraces.rb b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/stacktraces.rb deleted file mode 100644 index 5d2e78c2e3..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/stacktraces.rb +++ /dev/null @@ -1,53 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Profiling - module Actions - # Extracts raw stacktrace information from Universal Profiling. - # - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The filter conditions for stacktraces (*Required*) - # - # @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html - # - def stacktraces(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'profiling.stacktraces' } - - raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - method = Elasticsearch::API::HTTP_POST - path = '_profiling/stacktraces' - params = {} - - 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/profiling/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/status.rb deleted file mode 100644 index 78c74a494a..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/status.rb +++ /dev/null @@ -1,53 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Profiling - module Actions - # Returns basic information about the status of Universal Profiling. - # - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Boolean] :wait_for_resources_created Whether to return immediately or wait until resources have been created - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html - # - def status(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'profiling.status' } - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - method = Elasticsearch::API::HTTP_GET - path = '_profiling/status' - 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/profiling/topn_functions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/profiling/topn_functions.rb deleted file mode 100644 index 856f84542b..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/profiling/topn_functions.rb +++ /dev/null @@ -1,53 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Profiling - module Actions - # Extracts a list of topN functions from Universal Profiling. - # - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The filter conditions for stacktraces (*Required*) - # - # @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html - # - def topn_functions(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'profiling.topn_functions' } - - raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - method = Elasticsearch::API::HTTP_POST - path = '_profiling/topn/functions' - params = {} - - 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/security/activate_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb deleted file mode 100644 index 776e2a88b7..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb +++ /dev/null @@ -1,53 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Security - module Actions - # Creates or updates the user profile on behalf of another user. - # - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The grant type and user's credential (*Required*) - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-activate-user-profile.html - # - def activate_user_profile(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'security.activate_user_profile' } - - raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - method = Elasticsearch::API::HTTP_POST - path = '_security/profile/_activate' - params = {} - - 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/security/disable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb deleted file mode 100644 index 890f6959c9..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb +++ /dev/null @@ -1,61 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Security - module Actions - # Disables a user profile so it's not visible in user profile searches. - # - # @option arguments [String] :uid Unique identifier for the user profile - # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user-profile.html - # - def disable_user_profile(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'security.disable_user_profile' } - - defined_params = [:uid].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 'uid' missing" unless arguments[:uid] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _uid = arguments.delete(:uid) - - method = Elasticsearch::API::HTTP_PUT - path = "_security/profile/#{Utils.__listify(_uid)}/_disable" - 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/security/enable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb deleted file mode 100644 index c494854720..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb +++ /dev/null @@ -1,61 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Security - module Actions - # Enables a user profile so it's visible in user profile searches. - # - # @option arguments [String] :uid An unique identifier of the user profile - # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user-profile.html - # - def enable_user_profile(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'security.enable_user_profile' } - - defined_params = [:uid].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 'uid' missing" unless arguments[:uid] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _uid = arguments.delete(:uid) - - method = Elasticsearch::API::HTTP_PUT - path = "_security/profile/#{Utils.__listify(_uid)}/_enable" - 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/security/get_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb deleted file mode 100644 index 85033b4a4d..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb +++ /dev/null @@ -1,61 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Security - module Actions - # Retrieves user profiles for the given unique ID(s). - # - # @option arguments [List] :uid A comma-separated list of unique identifier for user profiles - # @option arguments [List] :data A comma-separated list of keys for which the corresponding application data are retrieved. - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-profile.html - # - def get_user_profile(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'security.get_user_profile' } - - defined_params = [:uid].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 'uid' missing" unless arguments[:uid] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _uid = arguments.delete(:uid) - - method = Elasticsearch::API::HTTP_GET - path = "_security/profile/#{Utils.__listify(_uid)}" - 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/security/has_privileges_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb deleted file mode 100644 index f65160e35c..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +++ /dev/null @@ -1,53 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Security - module Actions - # Determines whether the users associated with the specified profile IDs have all the requested privileges. - # - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The privileges to check and the list of profile IDs (*Required*) - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges-user-profile.html - # - def has_privileges_user_profile(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'security.has_privileges_user_profile' } - - raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - method = Elasticsearch::API::HTTP_POST - path = '_security/profile/_has_privileges' - params = {} - - 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/security/suggest_user_profiles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb deleted file mode 100644 index 566b2c9d3a..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +++ /dev/null @@ -1,57 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Security - module Actions - # Get suggestions for user profiles that match specified search criteria. - # - # @option arguments [List] :data A comma-separated list of keys for which the corresponding application data are retrieved. - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The suggestion definition for user profiles - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-suggest-user-profile.html - # - def suggest_user_profiles(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'security.suggest_user_profiles' } - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - method = if body - Elasticsearch::API::HTTP_POST - else - Elasticsearch::API::HTTP_GET - end - - path = '_security/profile/_suggest' - 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/security/update_user_profile_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb deleted file mode 100644 index 271f147120..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +++ /dev/null @@ -1,65 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Security - module Actions - # Update application specific data for the user profile of the given unique ID. - # - # @option arguments [String] :uid An unique identifier of the user profile - # @option arguments [Number] :if_seq_no only perform the update operation if the last operation that has changed the document has the specified sequence number - # @option arguments [Number] :if_primary_term only perform the update operation if the last operation that has changed the document has the specified primary term - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The application data to update (*Required*) - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-user-profile-data.html - # - def update_user_profile_data(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'security.update_user_profile_data' } - - defined_params = [:uid].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 'uid' missing" unless arguments[:uid] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - _uid = arguments.delete(:uid) - - method = Elasticsearch::API::HTTP_PUT - path = "_security/profile/#{Utils.__listify(_uid)}/_data" - 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/shutdown/delete_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb deleted file mode 100644 index f56dad05b3..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb +++ /dev/null @@ -1,60 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Shutdown - module Actions - # Removes a node from the shutdown list. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. - # - # @option arguments [String] :node_id The node id of node to be removed from the shutdown state - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current - # - def delete_node(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'shutdown.delete_node' } - - defined_params = [:node_id].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 'node_id' missing" unless arguments[:node_id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _node_id = arguments.delete(:node_id) - - method = Elasticsearch::API::HTTP_DELETE - path = "_nodes/#{Utils.__listify(_node_id)}/shutdown" - params = {} - - 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/shutdown/get_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb deleted file mode 100644 index a54d202492..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb +++ /dev/null @@ -1,63 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Shutdown - module Actions - # Retrieve status of a node or nodes that are currently marked as shutting down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. - # - # @option arguments [String] :node_id Which node for which to retrieve the shutdown status - # @option arguments [Time] :master_timeout Timeout for processing on master node - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current - # - def get_node(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'shutdown.get_node' } - - defined_params = [:node_id].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 - - _node_id = arguments.delete(:node_id) - - method = Elasticsearch::API::HTTP_GET - path = if _node_id - "_nodes/#{Utils.__listify(_node_id)}/shutdown" - else - '_nodes/shutdown' - 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/shutdown/put_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb deleted file mode 100644 index a8f49a550a..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb +++ /dev/null @@ -1,62 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Shutdown - module Actions - # Adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. - # - # @option arguments [String] :node_id The node id of node to be shut down - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The shutdown type definition to register (*Required*) - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current - # - def put_node(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'shutdown.put_node' } - - defined_params = [:node_id].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 'node_id' missing" unless arguments[:node_id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - _node_id = arguments.delete(:node_id) - - method = Elasticsearch::API::HTTP_PUT - path = "_nodes/#{Utils.__listify(_node_id)}/shutdown" - params = {} - - Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, request_opts) - ) - end - end - end - end -end From 4c190384ea7a578836454c3b5857b88f65d94030 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 18 Sep 2024 09:11:50 +0100 Subject: [PATCH 349/540] [API] Removes monitoring, profiling and shutdown namespaces --- elasticsearch-api/lib/elasticsearch/api.rb | 3 -- .../elasticsearch/api/namespace/monitoring.rb | 36 ------------------ .../elasticsearch/api/namespace/profiling.rb | 36 ------------------ .../elasticsearch/api/namespace/shutdown.rb | 37 ------------------- 4 files changed, 112 deletions(-) delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/monitoring.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/profiling.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/shutdown.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index a20a31a23b..02ec70f9ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -55,7 +55,6 @@ def self.included(base) Elasticsearch::API::Remote, Elasticsearch::API::DanglingIndices, Elasticsearch::API::Features, - Elasticsearch::API::Shutdown, Elasticsearch::API::AsyncSearch, Elasticsearch::API::Autoscaling, Elasticsearch::API::CrossClusterReplication, @@ -69,7 +68,6 @@ def self.included(base) Elasticsearch::API::Logstash, Elasticsearch::API::Migration, Elasticsearch::API::MachineLearning, - Elasticsearch::API::Monitoring, Elasticsearch::API::Rollup, Elasticsearch::API::SearchableSnapshots, Elasticsearch::API::Security, @@ -84,7 +82,6 @@ def self.included(base) Elasticsearch::API::Synonyms, Elasticsearch::API::Esql, Elasticsearch::API::Inference, - Elasticsearch::API::Profiling, Elasticsearch::API::Simulate, Elasticsearch::API::Connector, Elasticsearch::API::QueryRules diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/monitoring.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/monitoring.rb deleted file mode 100644 index 4c0f9dc010..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/monitoring.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Monitoring - module Actions; end - - # Client for the "monitoring" namespace (includes the {Monitoring::Actions} methods) - # - class MonitoringClient - include Common::Client, Common::Client::Base, Monitoring::Actions - end - - # Proxy method for {MonitoringClient}, available in the receiving object - # - def monitoring - @monitoring ||= MonitoringClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/profiling.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/profiling.rb deleted file mode 100644 index 7bfc0915b6..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/profiling.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Profiling - module Actions; end - - # Client for the "profiling" namespace (includes the {Profiling::Actions} methods) - # - class ProfilingClient - include Common::Client, Common::Client::Base, Profiling::Actions - end - - # Proxy method for {ProfilingClient}, available in the receiving object - # - def profiling - @profiling ||= ProfilingClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/shutdown.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/shutdown.rb deleted file mode 100644 index 0c6fbee48a..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/shutdown.rb +++ /dev/null @@ -1,37 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Shutdown - module Actions; end - - # Client for the "shutdown" namespace (includes the {Shutdown::Actions} methods) - # - class ShutdownClient - include Common::Client, Common::Client::Base, Shutdown::Actions - end - - # Proxy method for {ShutdownClient}, available in the receiving object - # - def shutdown - @shutdown ||= ShutdownClient.new(self) - end - - end - end -end From 64eed44928f792d1cd417aec6a218827640c82b0 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 18 Sep 2024 09:33:54 +0100 Subject: [PATCH 350/540] [API] Removes tests for removed APIs --- .../api/actions/capabilities_spec.rb | 35 ----------- .../actions/connector_secret/delete_spec.rb | 35 ----------- .../api/actions/connector_secret/get_spec.rb | 35 ----------- .../api/actions/connector_secret/post_spec.rb | 35 ----------- .../api/actions/connector_secret/put_spec.rb | 35 ----------- .../api/actions/profiling/flamegraph_spec.rb | 35 ----------- .../api/actions/profiling/stacktraces_spec.rb | 35 ----------- .../api/actions/profiling/status_spec.rb | 36 ------------ .../actions/profiling/topn_functions_spec.rb | 35 ----------- .../security/disable_user_profile_spec.rb | 35 ----------- .../security/enable_user_profile_spec.rb | 35 ----------- .../has_privileges_user_profile_spec.rb | 35 ----------- .../security/suggest_user_profiles_spec.rb | 46 --------------- .../api/actions/shutdown/delete_node_spec.rb | 45 -------------- .../api/actions/shutdown/get_node_spec.rb | 58 ------------------- .../api/actions/shutdown/put_node_spec.rb | 51 ---------------- .../free/integration/capabilities_spec.rb | 26 --------- .../delete_autoscaling_policy_test.rb | 46 --------------- .../get_autoscaling_capacity_test.rb | 40 ------------- .../get_autoscaling_policy_test.rb | 46 --------------- .../put_autoscaling_policy_test.rb | 52 ----------------- .../validate_detector_test.rb | 43 -------------- .../unit/machine_learning/validate_test.rb | 43 -------------- .../platinum/unit/monitoring/bulk_test.rb | 43 -------------- .../security/activate_user_profile_test.rb | 40 ------------- .../unit/security/get_user_profile_test.rb | 40 ------------- .../security/update_user_profile_data_test.rb | 40 ------------- 27 files changed, 1080 deletions(-) delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/capabilities_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/delete_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/get_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/post_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/put_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/profiling/flamegraph_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/profiling/stacktraces_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/profiling/status_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/profiling/topn_functions_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/security/disable_user_profile_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/security/enable_user_profile_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/security/has_privileges_user_profile_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/security/suggest_user_profiles_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb delete mode 100644 elasticsearch-api/spec/free/integration/capabilities_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/autoscaling/delete_autoscaling_policy_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/autoscaling/get_autoscaling_capacity_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/autoscaling/get_autoscaling_policy_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/autoscaling/put_autoscaling_policy_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/validate_detector_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/validate_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/monitoring/bulk_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/activate_user_profile_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/get_user_profile_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/update_user_profile_data_test.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/capabilities_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/capabilities_spec.rb deleted file mode 100644 index c44b099f68..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/capabilities_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#capabilities' do - let(:expected_args) do - [ - 'GET', - '_capabilities', - {}, - nil, - {}, - { endpoint: 'capabilities' } - ] - end - - it 'performs the request' do - expect(client_double.capabilities).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/delete_spec.rb deleted file mode 100644 index e8bc1f9dcc..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/delete_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.connector#secret_delete' do - let(:expected_args) do - [ - 'DELETE', - '_connector/_secret/foo', - {}, - nil, - {}, - { :defined_params=>{ id: 'foo' }, endpoint: 'connector.secret_delete' } - ] - end - - it 'performs the request' do - expect(client_double.connector.secret_delete(id: 'foo')).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/get_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/get_spec.rb deleted file mode 100644 index 8cd436abda..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/get_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.connector.secret_get' do - let(:expected_args) do - [ - 'GET', - '_connector/_secret/foo', - {}, - nil, - {}, - { :defined_params=>{ id: 'foo' }, endpoint: 'connector.secret_get' } - ] - end - - it 'performs the request' do - expect(client_double.connector.secret_get(id: 'foo')).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/post_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/post_spec.rb deleted file mode 100644 index ddae5fb0d7..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/post_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.connector.secret_post' do - let(:expected_args) do - [ - 'POST', - '_connector/_secret', - {}, - {}, - {}, - { endpoint: 'connector.secret_post' } - ] - end - - it 'performs the request' do - expect(client_double.connector.secret_post(body: {})).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/put_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/put_spec.rb deleted file mode 100644 index 7b8218769e..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/connector_secret/put_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.connector#secret_get' do - let(:expected_args) do - [ - 'PUT', - '_connector/_secret/foo', - {}, - {}, - {}, - { :defined_params=>{ id: 'foo' }, endpoint: 'connector.secret_put' } - ] - end - - it 'performs the request' do - expect(client_double.connector.secret_put(id: 'foo', body: {})).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/profiling/flamegraph_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/profiling/flamegraph_spec.rb deleted file mode 100644 index df43702ba5..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/profiling/flamegraph_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.profiling#flamegraph' do - let(:expected_args) do - [ - 'POST', - '_profiling/flamegraph', - {}, - {}, - {}, - { endpoint: 'profiling.flamegraph' } - ] - end - - it 'performs the request' do - expect(client_double.profiling.flamegraph(body: {})).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/profiling/stacktraces_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/profiling/stacktraces_spec.rb deleted file mode 100644 index bc846d38b7..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/profiling/stacktraces_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.profiling#stacktraces' do - let(:expected_args) do - [ - 'POST', - '_profiling/stacktraces', - {}, - {}, - {}, - { endpoint: 'profiling.stacktraces' } - ] - end - - it 'performs the request' do - expect(client_double.profiling.stacktraces(body: {})).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/profiling/status_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/profiling/status_spec.rb deleted file mode 100644 index 70f8bce89d..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/profiling/status_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#profiling.status' do - - let(:expected_args) do - [ - 'GET', - '_profiling/status', - {}, - nil, - {}, - { endpoint: 'profiling.status' } - ] - end - - it 'performs the request' do - expect(client_double.profiling.status).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/profiling/topn_functions_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/profiling/topn_functions_spec.rb deleted file mode 100644 index b7d02f929b..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/profiling/topn_functions_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.profiling#topn_functions' do - let(:expected_args) do - [ - 'POST', - '_profiling/topn/functions', - {}, - {}, - {}, - { endpoint: 'profiling.topn_functions' } - ] - end - - it 'performs the request' do - expect(client_double.profiling.topn_functions(body: {})).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/disable_user_profile_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/disable_user_profile_spec.rb deleted file mode 100644 index 2b7173a565..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/disable_user_profile_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#security#disable_user_profile' do - let(:expected_args) do - [ - 'PUT', - '_security/profile/foo/_disable', - {}, - nil, - {}, - { defined_params: { uid: 'foo' }, endpoint: 'security.disable_user_profile' } - ] - end - - it 'performs the request' do - expect(client_double.security.disable_user_profile(uid: 'foo')).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/enable_user_profile_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/enable_user_profile_spec.rb deleted file mode 100644 index 1e61a7395c..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/enable_user_profile_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#security#enable_user_profile' do - let(:expected_args) do - [ - 'PUT', - '_security/profile/foo/_enable', - {}, - nil, - {}, - { defined_params: { uid: 'foo' }, endpoint: 'security.enable_user_profile' } - ] - end - - it 'performs the request' do - expect(client_double.security.enable_user_profile(uid: 'foo')).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/has_privileges_user_profile_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/has_privileges_user_profile_spec.rb deleted file mode 100644 index a124ca0142..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/has_privileges_user_profile_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#security#has_privileges_user_profile' do - let(:expected_args) do - [ - 'POST', - '_security/profile/_has_privileges', - {}, - {}, - {}, - { endpoint: 'security.has_privileges_user_profile' } - ] - end - - it 'performs the request' do - expect(client_double.security.has_privileges_user_profile(body: {})).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/suggest_user_profiles_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/suggest_user_profiles_spec.rb deleted file mode 100644 index 499ea90bfc..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/security/suggest_user_profiles_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#security#search_user_profiles' do - let(:expected_args) do - [ - method, - '_security/profile/_suggest', - {}, - body, - {}, - { endpoint: 'security.suggest_user_profiles' } - ] - end - let(:method) { 'GET' } - let(:body) { nil } - - it 'performs the request' do - expect(client_double.security.suggest_user_profiles).to be_a Elasticsearch::API::Response - end - - context 'when there is a body parameter' do - let(:method) { 'POST' } - let(:body) { {} } - - it 'performs the request' do - expect(client_double.security.suggest_user_profiles(body: {})).to be_a Elasticsearch::API::Response - end - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb deleted file mode 100644 index 7454aed968..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.shutdown#delete_node' do - let(:expected_args) do - [ - 'DELETE', - '_nodes/id/shutdown', - {}, - nil, - {}, - { defined_params: { node_id: 'id' }, endpoint: 'shutdown.delete_node' } - ] - end - - it 'performs the request' do - expect(client_double.shutdown.delete_node(node_id: 'id')).to be_a Elasticsearch::API::Response - end - - let(:client) do - Class.new { include Elasticsearch::API }.new - end - - it 'raises an error if no node_id is provided' do - expect { - client.shutdown.delete_node - }.to raise_exception(ArgumentError) - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb deleted file mode 100644 index 1c4f54d553..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.shutdown#get_node' do - let(:expected_args) do - [ - 'GET', - url, - {}, - nil, - {}, - { defined_params: { node_id: 'id' }, endpoint: 'shutdown.get_node' } - ] - end - - context 'when id is provided' do - let(:url) { '_nodes/id/shutdown' } - - it 'performs the request' do - expect(client_double.shutdown.get_node(node_id: 'id')).to be_a Elasticsearch::API::Response - end - end - - context 'when no id is provided' do - let(:url) { '_nodes/shutdown' } - - let(:expected_args) do - [ - 'GET', - url, - {}, - nil, - {}, - { endpoint: 'shutdown.get_node' } - ] - end - - it 'performs the request' do - expect(client_double.shutdown.get_node).to be_a Elasticsearch::API::Response - end - end -end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb deleted file mode 100644 index d746c899d1..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.shutdown#put_node' do - let(:expected_args) do - [ - 'PUT', - '_nodes/id/shutdown', - {}, - {}, - {}, - { defined_params: { node_id: 'id' }, endpoint: 'shutdown.put_node' } - ] - end - - it 'performs the request' do - expect(client_double.shutdown.put_node(body: {}, node_id: 'id')).to be_a Elasticsearch::API::Response - end - - let(:client) do - Class.new { include Elasticsearch::API }.new - end - - it 'raises an error if no node_id is provided' do - expect { - client.shutdown.put_node(body: {}) - }.to raise_exception(ArgumentError) - end - - it 'raises an error if no body is provided' do - expect { - client.shutdown.put_node(node_id: 'id') - }.to raise_exception(ArgumentError) - end -end diff --git a/elasticsearch-api/spec/free/integration/capabilities_spec.rb b/elasticsearch-api/spec/free/integration/capabilities_spec.rb deleted file mode 100644 index 87f881d459..0000000000 --- a/elasticsearch-api/spec/free/integration/capabilities_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -# 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. -# TODO: These tests won't be necessary once we migrate to the new YAML tests -require_relative './spec_helper' - -describe 'Capabilities' do - it 'performs the request' do - response = CLIENT.capabilities(method: 'GET', path: '/_capabilities', parameters: 'unknown') - expect(response.status).to eq 200 - expect(response['cluster_name']).not_to be_nil - end -end diff --git a/elasticsearch-api/spec/platinum/unit/autoscaling/delete_autoscaling_policy_test.rb b/elasticsearch-api/spec/platinum/unit/autoscaling/delete_autoscaling_policy_test.rb deleted file mode 100644 index c973b47b43..0000000000 --- a/elasticsearch-api/spec/platinum/unit/autoscaling/delete_autoscaling_policy_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackAutoscalingDeleteAutoscalingPolicyTest < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Get Autoscaling Policy' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('DELETE', method) - assert_equal('_autoscaling/policy/a_policy', url) - assert_equal({}, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.autoscaling.delete_autoscaling_policy(name: 'a_policy') - end - - should 'raise argument error without name' do - assert_raises ArgumentError do - subject.autoscaling.delete_autoscaling_policy - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/autoscaling/get_autoscaling_capacity_test.rb b/elasticsearch-api/spec/platinum/unit/autoscaling/get_autoscaling_capacity_test.rb deleted file mode 100644 index e9e2b8d196..0000000000 --- a/elasticsearch-api/spec/platinum/unit/autoscaling/get_autoscaling_capacity_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackAutoscalingGetAutoscalingCapacityTest < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Get Autoscaling Capacity' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('_autoscaling/capacity', url) - assert_equal({}, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.autoscaling.get_autoscaling_capacity - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/autoscaling/get_autoscaling_policy_test.rb b/elasticsearch-api/spec/platinum/unit/autoscaling/get_autoscaling_policy_test.rb deleted file mode 100644 index 0fc6a38125..0000000000 --- a/elasticsearch-api/spec/platinum/unit/autoscaling/get_autoscaling_policy_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackAutoscalingGetAutoscalingPolicyTest < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Get Autoscaling Policy' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('_autoscaling/policy/a_policy', url) - assert_equal({}, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.autoscaling.get_autoscaling_policy(name: 'a_policy') - end - - should 'raise argument error without name' do - assert_raises ArgumentError do - subject.autoscaling.get_autoscaling_policy - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/autoscaling/put_autoscaling_policy_test.rb b/elasticsearch-api/spec/platinum/unit/autoscaling/put_autoscaling_policy_test.rb deleted file mode 100644 index 409aec0aaa..0000000000 --- a/elasticsearch-api/spec/platinum/unit/autoscaling/put_autoscaling_policy_test.rb +++ /dev/null @@ -1,52 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackAutoscalingPutAutoscalingPolicyTest < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Put Autoscaling Policy' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('PUT', method) - assert_equal('_autoscaling/policy/a_policy', url) - assert_equal({}, params) - assert_equal(body, {}) - true - end.returns(FakeResponse.new) - - subject.autoscaling.put_autoscaling_policy(name: 'a_policy', body: {}) - end - - should 'raise argument error without name' do - assert_raises ArgumentError do - subject.autoscaling.put_autoscaling_policy(body: {}) - end - end - - should 'raise argument error without body' do - assert_raises ArgumentError do - subject.autoscaling.put_autoscaling_policy(name: 'a_policy') - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/validate_detector_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/validate_detector_test.rb deleted file mode 100644 index 474535a82d..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/validate_detector_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlValidateDetectorTest < Minitest::Test - - context "XPack MachineLearning: Validate detector" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/anomaly_detectors/_validate/detector", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.ml.validate_detector :body => {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/validate_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/validate_test.rb deleted file mode 100644 index 78a9650628..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/validate_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlValidateTest < Minitest::Test - - context "XPack MachineLearning: Validate" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/anomaly_detectors/_validate", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.ml.validate :body => {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/monitoring/bulk_test.rb b/elasticsearch-api/spec/platinum/unit/monitoring/bulk_test.rb deleted file mode 100644 index 62d6868794..0000000000 --- a/elasticsearch-api/spec/platinum/unit/monitoring/bulk_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMonitoringBulkTest < Minitest::Test - - context "XPack Monitoring: Bulk" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal '_monitoring/bulk', url - assert_equal Hash.new, params - assert_equal "", body - true - end.returns(FakeResponse.new) - - subject.monitoring.bulk body: [] - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/activate_user_profile_test.rb b/elasticsearch-api/spec/platinum/unit/security/activate_user_profile_test.rb deleted file mode 100644 index 02af83e72d..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/activate_user_profile_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class SecurityAuthenticateTest < Minitest::Test - context 'Security: Activate User Profile' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_security/profile/_activate', url) - assert_equal({}, params) - assert_equal(body, {}) - true - end.returns(FakeResponse.new) - - subject.security.activate_user_profile(body: {}) - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/get_user_profile_test.rb b/elasticsearch-api/spec/platinum/unit/security/get_user_profile_test.rb deleted file mode 100644 index 4b38340354..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/get_user_profile_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class SecurityGetUserProfileTest < Minitest::Test - context 'Security: Get User Profile' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('_security/profile/1', url) - assert_equal({}, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.security.get_user_profile(uid: 1) - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/update_user_profile_data_test.rb b/elasticsearch-api/spec/platinum/unit/security/update_user_profile_data_test.rb deleted file mode 100644 index e87738bfe8..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/update_user_profile_data_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class SecurityUpdateUserProfileTest < Minitest::Test - context 'Security: Update User Profile Data' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('PUT', method) - assert_equal('_security/profile/1/_data', url) - assert_equal({}, params) - assert_equal(body, {}) - true - end.returns(FakeResponse.new) - - subject.security.update_user_profile_data(uid: 1, body: {}) - end - end - end - end -end From e1a477572653130618adc5aa63eaa9be1fc8e78a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 18 Sep 2024 10:06:52 +0100 Subject: [PATCH 351/540] Test Runner: Updates wipe_cluster --- elasticsearch-api/api-spec-testing/wipe_cluster.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/api-spec-testing/wipe_cluster.rb b/elasticsearch-api/api-spec-testing/wipe_cluster.rb index 083a20dd6e..9453105c1e 100644 --- a/elasticsearch-api/api-spec-testing/wipe_cluster.rb +++ b/elasticsearch-api/api-spec-testing/wipe_cluster.rb @@ -441,11 +441,11 @@ def clear_ml_filters(client) end def delete_all_node_shutdown_metadata(client) - nodes = client.shutdown.get_node - return unless nodes['nodes'] + nodes = client.perform_request(Elasticsearch::API::HTTP_GET, '_nodes/shutdown') + return unless nodes&.body['nodes'].any? - nodes['nodes'].each do |node| - client.shutdown.delete_node(node['node_id']) + nodes.body['nodes'].each do |node| + client.perform_request(Elasticsearch::API::HTTP_DELETE, "_nodes/#{node['node_id']}/shutdown") end end From 48039d737adbd105d65c97f597fbfe47f770b5d6 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 18 Sep 2024 13:01:33 +0100 Subject: [PATCH 352/540] Test Runner: Updates skipped platinum tests for private APIs --- .../spec/rest_api/skipped_tests_platinum.yml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml index 1a4c3ca323..e664bea503 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml @@ -212,3 +212,28 @@ - :file: 'esql/180_match_operator.yml' :description: '*' +# Private APIs +- + :file: 'ml/validate.yml' + :description: '*' +- + :file: 'ml/validate_detector.yml' + :description: '*' +- + :file: 'monitoring/bulk/10_basic.yml' + :description: '*' +- + :file: 'monitoring/bulk/20_privileges.yml' + :description: '*' +- + :file: 'profiling/10_basic.yml' + :description: '*' +- + :file: 'security/settings/10_update_security_settings.yml' + :description: '*' +- + :file: 'user_profile/10_basic.yml' + :description: '*' +- + :file: 'user_profile/40_has_privileges.yml' + :description: '*' From d727fedc1c713e886555b262c39f32c9f4c605b4 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 23 Sep 2024 14:13:24 +0100 Subject: [PATCH 353/540] Test Runner: Skips snapshot test --- elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml index e664bea503..c5b40819f6 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml @@ -212,6 +212,9 @@ - :file: 'esql/180_match_operator.yml' :description: '*' +- + :file: 'snapshot/10_basic.yml' + :description: 'Failed to snapshot indices with synthetic source' # Private APIs - :file: 'ml/validate.yml' From 635aa2ace4c71426148e95ed938cec4469a3643e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 2 Oct 2024 09:59:22 +0100 Subject: [PATCH 354/540] Test runner: Updates skipped tests --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index dfd8e2563c..88a70cfabe 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -150,3 +150,9 @@ - :file: 'simulate.ingest/10_basic.yml' :description: 'Test mapping validation from templates' +- + :file: 'indices.split/40_routing_partition_size.yml' + :description: '*' +- + :file: 'range/20_synthetic_source.yml' + :description: '*' From 9c9748673da8a7abbf44315a5e6d47d679c0aecf Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 2 Oct 2024 11:10:37 +0100 Subject: [PATCH 355/540] [API] Updates URL in source code docs for geoip apis Auto-generated API code --- .../elasticsearch/api/actions/ingest/delete_geoip_database.rb | 2 +- .../lib/elasticsearch/api/actions/ingest/get_geoip_database.rb | 2 +- .../lib/elasticsearch/api/actions/ingest/put_geoip_database.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb index 9a75e8c8ec..94b8bcbfd2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :id A comma-separated list of geoip database configurations to delete # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/TODO.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-geoip-database-api.html # def delete_geoip_database(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.delete_geoip_database' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb index c6d73252d5..1cc5f6078b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :id A comma-separated list of geoip database configurations to get; use `*` to get all geoip database configurations # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/TODO.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-geoip-database-api.html # def get_geoip_database(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.get_geoip_database' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb index e0db4adf5a..28b5bb464b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The database configuration definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/TODO.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-geoip-database-api.html # def put_geoip_database(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.put_geoip_database' } From c349c98a34610def68a8739ec1505d14ffb994d2 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 4 Oct 2024 16:49:42 +0100 Subject: [PATCH 356/540] Test Runner: Skips geoip databases test --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 88a70cfabe..31072f8c0b 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -156,3 +156,6 @@ - :file: 'range/20_synthetic_source.yml' :description: '*' +- + :file: 'ingest_geoip/40_geoip_databases.yml' + :description: 'Test adding, getting, and removing geoip databases' From 85c1e4e13b5e7fc28a62f4cc1505630607814d2f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 7 Oct 2024 09:39:11 +0100 Subject: [PATCH 357/540] [API] cluster.stats - removes flat_settings parameter and adds include_remotes --- .../lib/elasticsearch/api/actions/cluster/stats.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb index 917ea93bb1..a960c912f6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb @@ -25,7 +25,7 @@ module Actions # Returns high-level overview of cluster statistics. # # @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) + # @option arguments [Boolean] :include_remotes Include remote cluster data into the response (default: false) # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # From 1a722e40902d5b8c88986d8734e9c990641c4539 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 8 Oct 2024 13:45:36 +0100 Subject: [PATCH 358/540] [CI] Refactors Buildkite to move main testing to YAML runner --- .buildkite/pipeline.yml | 64 ++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index d7b6146663..6b7eb8b866 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,5 +1,5 @@ steps: - - label: ":ruby: {{ matrix.ruby_source}}:{{ matrix.ruby }} :phone: Transport: {{ matrix.transport }} :elasticsearch: Suite: {{ matrix.suite }}" + - label: ":elasticsearch: Elasticsearch :ruby: {{ matrix.ruby_source}}:{{ matrix.ruby }} :phone: Transport {{ matrix.transport }} - {{ matrix.suite }}" agents: provider: "gcp" env: @@ -14,63 +14,41 @@ steps: suite: - "free" - "platinum" + ruby: + - "3.3" + transport: + - "8.3" + ruby_source: + - "ruby" + command: ./.buildkite/run-tests.sh + # I'm publishing test results to HTML and JUnit in this directory and this directive makes them + # available in the Artifacts tab of a build in Buildkite. + artifact_paths: "elasticsearch-api/tmp/*" + - label: ":yaml: YAML test suite :ruby: {{ matrix.ruby_source}}:{{ matrix.ruby }} :phone: Transport {{ matrix.transport }}" + agents: + provider: "gcp" + matrix: + setup: ruby: - "3.3" - "3.2" - "3.1" - "3.0" + ruby_source: + - "ruby" transport: - "8.3" - ruby_source: - - 'ruby' - # Only run platinum once for the latest Ruby. You can use lots of combinations, check the - # documentation on https://buildkite.com/docs/pipelines/build-matrix for more information. adjustments: - with: - suite: "platinum" - ruby: "3.2" - skip: true - - with: - suite: "platinum" - ruby: "3.1" - skip: true - - with: - suite: "platinum" - ruby: "3.0" - skip: true - - with: - suite: "free" - ruby: "3.3" - ruby_source: "ruby" - transport: "8.1" - - with: - suite: "free" - ruby: "3.3" - ruby_source: "ruby" - transport: "8.2" - - with: - suite: "free" - ruby: "3.3" - ruby_source: "ruby" - transport: "main" - - with: - suite: "free" ruby: "9.4" ruby_source: "jruby" transport: "8.3" - command: ./.buildkite/run-tests.sh - # I'm publishing test results to HTML and JUnit in this directory and this directive makes them - # available in the Artifacts tab of a build in Buildkite. - artifact_paths: "elasticsearch-api/tmp/*" - - label: ":ruby: :yaml: Test suite" - agents: - provider: "gcp" env: - RUBY_VERSION: "3.3" + RUBY_VERSION: "{{ matrix.ruby }}" STACK_VERSION: 9.0.0-SNAPSHOT ES_YAML_TESTS_BRANCH: main - TRANSPORT_VERSION: "8.3" - RUBY_SOURCE: "ruby" + TRANSPORT_VERSION: "{{ matrix.transport }}" + RUBY_SOURCE: "{{ matrix.ruby_source }}" TEST_SUITE: "platinum" command: ./.buildkite/run-yaml-tests.sh - wait: ~ From fe33b6a7296067535d4fa4586e3681c46c51656e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 8 Oct 2024 15:54:58 +0100 Subject: [PATCH 359/540] [CI] Drop testing for Ruby 3.0 (EOL'ed) --- .buildkite/pipeline.yml | 1 - .github/workflows/main.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 6b7eb8b866..ce785fff29 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -33,7 +33,6 @@ steps: - "3.3" - "3.2" - "3.1" - - "3.0" ruby_source: - "ruby" transport: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6b08d20714..313a20892e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [ '3.0', '3.1', '3.2', '3.3', 'jruby-9.3', 'jruby-9.4' ] + ruby: ['3.1', '3.2', '3.3', 'jruby-9.3', 'jruby-9.4'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 81938e6bbfa545843d44be1c02a0fa80a2e1d8a1 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 8 Oct 2024 14:03:00 +0100 Subject: [PATCH 360/540] [API] Adds inference.stream_inference --- .../api/actions/inference/stream_inference.rb | 72 +++++++++++++++++++ .../inference/stream_inference_spec.rb | 35 +++++++++ 2 files changed, 107 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/inference/stream_inference_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb new file mode 100644 index 0000000000..06edf4726f --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb @@ -0,0 +1,72 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Inference + module Actions + # Perform streaming inference + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :inference_id The inference Id + # @option arguments [String] :task_type The task type + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The inference payload + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/post-stream-inference-api.html + # + def stream_inference(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.stream_inference' } + + defined_params = %i[inference_id task_type].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 'inference_id' missing" unless arguments[:inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _inference_id = arguments.delete(:inference_id) + + _task_type = arguments.delete(:task_type) + + method = Elasticsearch::API::HTTP_POST + path = if _task_type && _inference_id + "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}/_stream" + else + "_inference/#{Utils.__listify(_inference_id)}/_stream" + end + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/stream_inference_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/stream_inference_spec.rb new file mode 100644 index 0000000000..191ad643d5 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/stream_inference_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.stream_inference' do + let(:expected_args) do + [ + 'POST', + '_inference/foo/_stream', + {}, + nil, + {}, + { defined_params: { inference_id: 'foo' }, endpoint: 'inference.stream_inference' } + ] + end + + it 'performs the request' do + expect(client_double.inference.stream_inference(inference_id: 'foo')).to be_a Elasticsearch::API::Response + end +end From c5fa1f611bcd6a0c3624b84a1bddae88debe35fd Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 14 Oct 2024 11:10:20 +0100 Subject: [PATCH 361/540] Test Runner: Skips geoip free tests --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 31072f8c0b..525303c88a 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -159,3 +159,9 @@ - :file: 'ingest_geoip/40_geoip_databases.yml' :description: 'Test adding, getting, and removing geoip databases' +- + :file: 'ingest_geoip/50_ip_lookup_processor.yml' + :description: '*' +- + :file: 'ingest_geoip/60_ip_location_databases.yml' + :description: '*' From 160b924d63c7c4893eb8ed64cff30fe79a148f07 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 15 Oct 2024 11:07:21 +0100 Subject: [PATCH 362/540] [API] Adds ingest ip_location APIs - delete_ip_location_database - get_ip_location_database - put_ip_location_database --- .../ingest/delete_ip_location_database.rb | 60 ++++++++++++++++++ .../ingest/get_ip_location_database.rb | 62 +++++++++++++++++++ .../ingest/put_ip_location_database.rb | 62 +++++++++++++++++++ .../delete_ip_location_database_spec.rb | 39 ++++++++++++ .../ingest/get_ip_location_database_spec.rb | 39 ++++++++++++ .../ingest/put_ip_location_database_spec.rb | 45 ++++++++++++++ 6 files changed, 307 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_ip_location_database_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_ip_location_database_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_ip_location_database_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb new file mode 100644 index 0000000000..fae3f7f003 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb @@ -0,0 +1,60 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Ingest + module Actions + # Deletes an ip location database configuration + # + # @option arguments [List] :id A comma-separated list of ip location database configurations to delete + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-ip-location-database-api.html + # + def delete_ip_location_database(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'ingest.delete_ip_location_database' } + + defined_params = [:id].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 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_DELETE + path = "_ingest/ip_location/database/#{Utils.__listify(_id)}" + params = {} + + 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/ingest/get_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb new file mode 100644 index 0000000000..9292718d01 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb @@ -0,0 +1,62 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Ingest + module Actions + # Returns the specified ip location database configuration + # + # @option arguments [List] :id A comma-separated list of ip location database configurations to get; use `*` to get all ip location database configurations + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ip-location-database-api.html + # + def get_ip_location_database(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'ingest.get_ip_location_database' } + + defined_params = [:id].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 + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_GET + path = if _id + "_ingest/ip_location/database/#{Utils.__listify(_id)}" + else + '_ingest/ip_location/database' + end + params = {} + + 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/ingest/put_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb new file mode 100644 index 0000000000..35303f63b4 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb @@ -0,0 +1,62 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Ingest + module Actions + # Puts the configuration for a ip location database to be downloaded + # + # @option arguments [String] :id The id of the database configuration + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The database configuration definition (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-ip-location-database-api.html + # + def put_ip_location_database(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'ingest.put_ip_location_database' } + + defined_params = [:id].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 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_PUT + path = "_ingest/ip_location/database/#{Utils.__listify(_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_ip_location_database_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_ip_location_database_spec.rb new file mode 100644 index 0000000000..f070341d1d --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_ip_location_database_spec.rb @@ -0,0 +1,39 @@ +# 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. + +require 'spec_helper' + +describe 'client.ingest#delete_ip_location_database' do + let(:expected_args) do + [ + 'DELETE', + '_ingest/ip_location/database/foo', + {}, + nil, + {}, + { defined_params: { id: 'foo' }, endpoint: 'ingest.delete_ip_location_database' } + ] + end + + let(:client) do + Class.new { include Elasticsearch::API }.new + end + + it 'performs the request' do + expect(client_double.ingest.delete_ip_location_database(id: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_ip_location_database_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_ip_location_database_spec.rb new file mode 100644 index 0000000000..41c356c3d3 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_ip_location_database_spec.rb @@ -0,0 +1,39 @@ +# 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. + +require 'spec_helper' + +describe 'client.ingest#get_ip_location_database' do + let(:expected_args) do + [ + 'GET', + '_ingest/ip_location/database/foo', + {}, + nil, + {}, + { defined_params: { id: 'foo' }, endpoint: 'ingest.get_ip_location_database' } + ] + end + + let(:client) do + Class.new { include Elasticsearch::API }.new + end + + it 'performs the request' do + expect(client_double.ingest.get_ip_location_database(id: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_ip_location_database_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_ip_location_database_spec.rb new file mode 100644 index 0000000000..6e3ea29c77 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_ip_location_database_spec.rb @@ -0,0 +1,45 @@ +# 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. + +require 'spec_helper' + +describe 'client.ingest#put_ip_location_database' do + let(:expected_args) do + [ + 'PUT', + '_ingest/ip_location/database/foo', + {}, + {}, + {}, + { defined_params: { id: 'foo' }, endpoint: 'ingest.put_ip_location_database' } + ] + end + + let(:client) do + Class.new { include Elasticsearch::API }.new + end + + it 'requires the :id argument' do + expect { + client.ingest.put_ip_location_database + }.to raise_exception(ArgumentError) + end + + it 'performs the request' do + expect(client_double.ingest.put_ip_location_database(id: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end From bc3a06bf6e216f6123b30131ded2fee395780aeb Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 15 Oct 2024 11:11:33 +0100 Subject: [PATCH 363/540] [API] Adds query_rules.test API --- .../api/actions/query_rules/test.rb | 66 +++++++++++++++++++ .../api/actions/query_rules/test_spec.rb | 35 ++++++++++ 2 files changed, 101 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/query_rules/test_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb new file mode 100644 index 0000000000..0215f0656a --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module QueryRules + module Actions + # Tests a query ruleset to identify the rules that would match input criteria + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :ruleset_id The unique identifier of the ruleset to test. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The match criteria to test against the ruleset (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/test-query-ruleset.html + # + def test(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'query_rules.test' } + + defined_params = [:ruleset_id].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 'ruleset_id' missing" unless arguments[:ruleset_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _ruleset_id = arguments.delete(:ruleset_id) + + method = Elasticsearch::API::HTTP_POST + path = "_query_rules/#{Utils.__listify(_ruleset_id)}/_test" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/test_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/test_spec.rb new file mode 100644 index 0000000000..294013680f --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/test_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.query_rules#test' do + let(:expected_args) do + [ + 'POST', + '_query_rules/foo/_test', + {}, + {}, + {}, + { defined_params: { ruleset_id: 'foo' }, endpoint: 'query_rules.test' } + ] + end + + it 'performs the request' do + expect(client_double.query_rules.test(ruleset_id: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end From 655015c88c5c6ad2021f415e63b5572441361682 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 15 Oct 2024 12:47:42 +0100 Subject: [PATCH 364/540] Tests: suppress printing out every skipped test in report --- elasticsearch-api/spec/spec_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/spec/spec_helper.rb b/elasticsearch-api/spec/spec_helper.rb index e2ad892f05..fe0099ed41 100644 --- a/elasticsearch-api/spec/spec_helper.rb +++ b/elasticsearch-api/spec/spec_helper.rb @@ -59,6 +59,7 @@ def self.included(context) RSpec.configure do |config| config.include(HelperModule) config.add_formatter('documentation') + config.filter_run_excluding skip: true if defined?(JRUBY_VERSION) config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-jruby-#{JRUBY_VERSION}.html") else From 99a60c90be7acbc7c209df609132e93d240c9b74 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 15 Oct 2024 12:54:32 +0100 Subject: [PATCH 365/540] Raise exception in test runner --- elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb index 98e48c7f8e..9200dae676 100644 --- a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb +++ b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb @@ -82,6 +82,9 @@ def skip_test?(test) # ./run_task_groups.rb run_rspec_matchers_on_task_group(task_group, test) end + rescue StandardError => e + LOGGER.error e + raise e end end end From 9ece0e76089d147beaba28fe48854efdb6b2ecf1 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 15 Oct 2024 15:23:23 +0100 Subject: [PATCH 366/540] [API] Adds ignore 404 parameter to query_rules.delete_ruleset --- .../api/actions/query_rules/delete_ruleset.rb | 16 ++++++++++++---- .../utils/thor/endpoint_specifics.rb | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb index 057962e12a..f6739b40b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb @@ -48,11 +48,19 @@ def delete_ruleset(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = "_query_rules/#{Utils.__listify(_ruleset_id)}" - params = {} + params = Utils.process_params(arguments) - Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, request_opts) - ) + if Array(arguments[:ignore]).include?(404) + Utils.__rescue_from_not_found do + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + else + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end end end end diff --git a/elasticsearch-api/utils/thor/endpoint_specifics.rb b/elasticsearch-api/utils/thor/endpoint_specifics.rb index 5dc4d6fa65..eea5f46cdd 100644 --- a/elasticsearch-api/utils/thor/endpoint_specifics.rb +++ b/elasticsearch-api/utils/thor/endpoint_specifics.rb @@ -39,6 +39,7 @@ module EndpointSpecifics indices.delete indices.delete_template indices.flush_synced + query_rules.delete_ruleset security.get_role security.get_user snapshot.delete From 04b4f8a00898e190cb09c81a7c36d65da52bcf61 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 15 Oct 2024 10:57:55 +0100 Subject: [PATCH 367/540] Updates elasticsearch path in api Gemfile --- elasticsearch-api/Gemfile | 4 ++-- elasticsearch/lib/elasticsearch.rb | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/Gemfile b/elasticsearch-api/Gemfile index d65c401d73..6f2646fa20 100644 --- a/elasticsearch-api/Gemfile +++ b/elasticsearch-api/Gemfile @@ -20,8 +20,8 @@ source 'https://rubygems.org' # Specify your gem's dependencies in elasticsearch-api.gemspec gemspec -if File.exist? File.expand_path("../../elasticsearch/elasticsearch.gemspec", __dir__) - gem 'elasticsearch', path: File.expand_path('../../elasticsearch', __dir__), require: false +if File.exist? File.expand_path('../elasticsearch/elasticsearch.gemspec', __dir__) + gem 'elasticsearch', path: File.expand_path('../elasticsearch', __dir__), require: false end group :development do diff --git a/elasticsearch/lib/elasticsearch.rb b/elasticsearch/lib/elasticsearch.rb index 6b1639f383..5fb6750931 100644 --- a/elasticsearch/lib/elasticsearch.rb +++ b/elasticsearch/lib/elasticsearch.rb @@ -160,6 +160,7 @@ def elasticsearch_validation_request def sent_user_agent?(arguments) return unless (headers = arguments&.[](:transport_options)&.[](:headers)) + !!headers.keys.detect { |h| h =~ /user-?_?agent/ } end From 19b95aeb936b228a2fbf7fe86de51bc56f6e6345 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 16 Oct 2024 08:48:19 +0100 Subject: [PATCH 368/540] Test formatter for API tests --- elasticsearch-api/spec/spec_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/spec/spec_helper.rb b/elasticsearch-api/spec/spec_helper.rb index fe0099ed41..a550a4867f 100644 --- a/elasticsearch-api/spec/spec_helper.rb +++ b/elasticsearch-api/spec/spec_helper.rb @@ -58,12 +58,14 @@ def self.included(context) RSpec.configure do |config| config.include(HelperModule) - config.add_formatter('documentation') config.filter_run_excluding skip: true + config.add_formatter('progress') if defined?(JRUBY_VERSION) config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-jruby-#{JRUBY_VERSION}.html") + config.add_formatter('documentation', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-jruby-#{JRUBY_VERSION}.log") else config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}.html") + config.add_formatter('documentation', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}.html") end if ENV['BUILDKITE'] require_relative "./rspec_formatter.rb" From 5b9cb10e78f5e5fd1e8ccf1c9b1eca0b2f80aefa Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 16 Oct 2024 10:17:23 +0100 Subject: [PATCH 369/540] Updates logger for Elasticsearch rest specs --- .../spec/rest_api/rest_api_tests_helper.rb | 11 +++++++++-- elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/spec/rest_api/rest_api_tests_helper.rb b/elasticsearch-api/spec/rest_api/rest_api_tests_helper.rb index d7d7827f4d..e62eb6b8e1 100644 --- a/elasticsearch-api/spec/rest_api/rest_api_tests_helper.rb +++ b/elasticsearch-api/spec/rest_api/rest_api_tests_helper.rb @@ -48,14 +48,21 @@ transport_options = {} end -ADMIN_CLIENT = Elasticsearch::Client.new(host: host, transport_options: transport_options) +# DEBUG: For easier debugging, set LOG_STDOUT env variable to true +output = if ENV['LOG_STDOUT'] == 'true' + $stdout + else + File.expand_path("../../tmp/tracer_log-#{ENV['TEST_SUITE']}-#{ENV['RUBY_VERSION']}.log", __dir__) + end +logger = Logger.new(output) +ADMIN_CLIENT = Elasticsearch::Client.new(host: host, transport_options: transport_options, tracer: logger) DEFAULT_CLIENT = if ENV['QUIET'] == 'true' Elasticsearch::Client.new(host: host, transport_options: transport_options) else Elasticsearch::Client.new( host: host, - tracer: Logger.new($stdout), + tracer: logger, transport_options: transport_options ) end diff --git a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb index 9200dae676..1e933fa03e 100644 --- a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb +++ b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb @@ -19,6 +19,9 @@ require_relative 'rest_api_tests_helper' require_relative './run_rspec_matchers' +# LOGGER logs to stdout since we want to see if there are any errors in the running of the tests. +# The client has a tracer/logger defined in ./rest_api_tests_helper.rb, ENV['LOG_STDOUT'] set to +# true will log to stdout instead of a log file: LOGGER = Logger.new($stdout) CLUSTER_FEATURES = ADMIN_CLIENT.features.get_features['features'].map { |f| f['name'] } From 6f70d6b7887c75d4a1f42673195266d57652fb55 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 17 Oct 2024 17:05:29 +0100 Subject: [PATCH 370/540] Updates logger in wipe_cluster --- .../api-spec-testing/wipe_cluster.rb | 18 +++++++----------- .../spec/rest_api/rest_api_yaml_spec.rb | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/elasticsearch-api/api-spec-testing/wipe_cluster.rb b/elasticsearch-api/api-spec-testing/wipe_cluster.rb index 9453105c1e..7e83c2fbf3 100644 --- a/elasticsearch-api/api-spec-testing/wipe_cluster.rb +++ b/elasticsearch-api/api-spec-testing/wipe_cluster.rb @@ -15,9 +15,7 @@ # specific language governing permissions and limitations # under the License. -require_relative 'logging' require_relative 'custom_cleanup' -include Elasticsearch::RestAPIYAMLTests::Logging module Elasticsearch module RestAPIYAMLTests @@ -151,7 +149,7 @@ def check_for_unexpectedly_recreated_objects(client) unexpected_ilm_policies = client.index_lifecycle_management.get_lifecycle unexpected_ilm_policies.reject! { |k, _| preserve_policy?(k) } unless unexpected_ilm_policies.empty? - logger.info( + client.logger.info( "Expected no ILM policies after deletions, but found #{unexpected_ilm_policies.keys.join(',')}" ) end @@ -166,7 +164,7 @@ def check_for_unexpectedly_recreated_objects(client) unexpected_templates << legacy_templates.keys.reject { |t| platinum_template?(t) } unless unexpected_templates.reject(&:empty?).empty? - logger.info( + client.logger.info( "Expected no templates after deletions, but found #{unexpected_templates.join(',')}" ) end @@ -211,7 +209,7 @@ def wait_for_pending_rollup_tasks(client) end break unless count.positive? && Time.now.to_i < (start_time + 1) end - logger.debug("Waited for #{count} pending rollup tasks for #{Time.now.to_i - start_time}s.") if count.positive? + client.logger.debug("Waited for #{count} pending rollup tasks for #{Time.now.to_i - start_time}s.") if count.positive? end def delete_all_slm_policies(client) @@ -247,7 +245,7 @@ def wipe_snapshots(client) response = client.snapshot.get(repository: repository, snapshot: '_all', ignore_unavailable: true) response['snapshots'].each do |snapshot| if snapshot['state'] != 'SUCCESS' - logger.debug("Found snapshot that did not succeed #{snapshot}") + client.logger.debug("Found snapshot that did not succeed #{snapshot}") end client.snapshot.delete(repository: repository, snapshot: snapshot['snapshot'], ignore: 404) end @@ -261,7 +259,7 @@ def wipe_datastreams(client) begin client.indices.delete_data_stream(name: '*', expand_wildcards: 'all') rescue StandardError => e - logger.error "Caught exception attempting to delete data streams: #{e}" + client.logger.error "Caught exception attempting to delete data streams: #{e}" client.indices.delete_data_stream(name: '*') end end @@ -290,14 +288,13 @@ def wipe_all_templates(client) end # Always check for legacy templates - templates = client.indices.get_template - templates.each do |name, _| + client.indices.get_template.each_key do |name| next if platinum_template?(name) begin client.indices.delete_template(name: name) rescue StandardError => e - logger.info("Unable to remove index template #{name}") + client.logger.info("Unable to remove index template #{name} - #{e}") end end end @@ -331,7 +328,6 @@ def wait_for_cluster_tasks(client) end break unless count.positive? && Time.now.to_i < (start_time + 5) end - logger.debug("Waited for #{count} pending cluster tasks for #{Time.now.to_i - start_time}s.") if count.positive? end def skippable_task?(task) diff --git a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb index 1e933fa03e..b9bf5808d9 100644 --- a/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb +++ b/elasticsearch-api/spec/rest_api/rest_api_yaml_spec.rb @@ -86,7 +86,7 @@ def skip_test?(test) run_rspec_matchers_on_task_group(task_group, test) end rescue StandardError => e - LOGGER.error e + LOGGER.error "#{context_name} - #{e}" raise e end end From cada444c001c5326ea2a8ee9add81e3d16204d26 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 17 Oct 2024 14:29:52 +0100 Subject: [PATCH 371/540] Test Runner: Refactors perform action for header --- .../api-spec-testing/test_file/action.rb | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/elasticsearch-api/api-spec-testing/test_file/action.rb b/elasticsearch-api/api-spec-testing/test_file/action.rb index 869dd57605..22dfdd2a99 100644 --- a/elasticsearch-api/api-spec-testing/test_file/action.rb +++ b/elasticsearch-api/api-spec-testing/test_file/action.rb @@ -141,24 +141,12 @@ def perform_action(method, args, client, test) @response = client.send(method, arguments) client when 'headers' - headers = prepare_arguments(args, test) - host = client.transport.instance_variable_get('@hosts') transport_options = client.transport.instance_variable_get('@options')&.dig(:transport_options) || {} - if ENV['QUIET'] == 'true' - # todo: create a method on Elasticsearch::Client that can clone the client with new options - Elasticsearch::Client.new( - host: host, - transport_options: transport_options.merge(headers: headers) - ) - else - Elasticsearch::Client.new( - host: host, - tracer: Logger.new($stdout), - transport_options: transport_options.merge(headers: headers) - ) - end - when 'catch', 'warnings', 'allowed_warnings', 'allowed_warnings_regex', 'warnings_regex' - client + Elasticsearch::Client.new( + hosts: client.transport.hosts, + tracer: client.transport.tracer || nil, + transport_options: transport_options.merge(headers: prepare_arguments(args, test)) + ) when 'put_trained_model_alias' args.merge!('reassign' => true) unless args['reassign'] === false @response = client.send(method, prepare_arguments(args, test)) @@ -187,6 +175,8 @@ def perform_action(method, args, client, test) end @response = client.send(method, prepare_arguments(args, test)) client + when 'catch', 'warnings', 'allowed_warnings', 'allowed_warnings_regex', 'warnings_regex' + client else @response = client.send(method, prepare_arguments(args, test)) client From 02d3e84077eabf4669f14b4ff43d6159a70aa8b2 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 21 Oct 2024 09:33:33 +0100 Subject: [PATCH 372/540] [API] Removes min_compatible_shard_node parameter from search source code docs --- elasticsearch-api/lib/elasticsearch/api/actions/search.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb index af314d82db..b62d05935d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb @@ -67,7 +67,6 @@ module Actions # @option arguments [Number] :max_concurrent_shard_requests The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests # @option arguments [Number] :pre_filter_shard_size A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response - # @option arguments [String] :min_compatible_shard_node The minimum compatible version that all shards involved in search should have for this request to be successful # @option arguments [Boolean] :include_named_queries_score Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false) # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition using the Query DSL From f3a0a4fd0cf9e68b553a7285530cdaa770f9937a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 21 Oct 2024 09:33:59 +0100 Subject: [PATCH 373/540] [API] Promotes data lifecycle APIs from experimental to stable --- .../api/actions/indices/delete_data_lifecycle.rb | 4 ---- .../api/actions/indices/explain_data_lifecycle.rb | 4 ---- .../elasticsearch/api/actions/indices/get_data_lifecycle.rb | 4 ---- .../elasticsearch/api/actions/indices/put_data_lifecycle.rb | 4 ---- 4 files changed, 16 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb index f8b248bb2a..a3dd50251c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb @@ -23,10 +23,6 @@ module API module Indices module Actions # Deletes the data stream lifecycle of the selected data streams. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [List] :name A comma-separated list of data streams of which the data stream lifecycle will be deleted; use `*` to get all data streams # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb index c155af80e9..8e5ceca257 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb @@ -23,10 +23,6 @@ module API module Indices module Actions # Retrieves information about the index's current data stream lifecycle, such as any potential encountered error, time since creation etc. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :index The name of the index to explain # @option arguments [Boolean] :include_defaults indicates if the API should return the default values the system uses for the index's lifecycle diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb index 3661340ee5..a675850592 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb @@ -23,10 +23,6 @@ module API module Indices module Actions # Returns the data stream lifecycle of the selected data streams. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [List] :name A comma-separated list of data streams to get; use `*` to get all data streams # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb index f64a67418b..2f03fa0bd3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb @@ -23,10 +23,6 @@ module API module Indices module Actions # Updates the data stream lifecycle of the selected data streams. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [List] :name A comma-separated list of data streams whose lifecycle will be updated; use `*` to set the lifecycle to all data streams # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) From c88100513e8290a6802c81178dea0e09278ea137 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 22 Oct 2024 17:29:47 +0100 Subject: [PATCH 374/540] Minor updates to test runner --- .../api-spec-testing/rspec_matchers.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/elasticsearch-api/api-spec-testing/rspec_matchers.rb b/elasticsearch-api/api-spec-testing/rspec_matchers.rb index 410102af0e..cb8db34b5d 100644 --- a/elasticsearch-api/api-spec-testing/rspec_matchers.rb +++ b/elasticsearch-api/api-spec-testing/rspec_matchers.rb @@ -174,7 +174,7 @@ failure_message do |response| "the expected response pair/value(s) #{@mismatched_pairs}" + - " does not match the pair/value(s) in the response #{response}" + " does not match the pair/value(s) in the response #{response}" end def sanitize_pairs(expected_pairs) @@ -235,8 +235,14 @@ def compare_hash(expected_pairs, actual_hash, test) when Hash compare_hash(expected_value, actual_value, test) when Array - unless compare_array(expected_value, actual_value, test, actual_hash) - @mismatched_pairs.merge!(expected_key => expected_value) + begin + unless compare_array(expected_value.sort, actual_value.sort, test, actual_hash) + @mismatched_pairs.merge!(expected_key => expected_value) + end + rescue TypeError, ArgumentError + unless compare_array(expected_value, actual_value, test, actual_hash) + @mismatched_pairs.merge!(expected_key => expected_value) + end end when String unless compare_string(expected_value, actual_value, test, actual_hash) @@ -283,6 +289,8 @@ def compare_array(expected, actual, test, response) return false unless compare_array(value, actual[i], test, response) when String return false unless compare_string(value, actual[i], test, response) + else + true end end end From a8a4172c715d7d59531e406e487234c395fc03b5 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 22 Oct 2024 17:30:11 +0100 Subject: [PATCH 375/540] Test Runner: Skips synthetic tests --- .../spec/rest_api/skipped_tests_free.yml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 525303c88a..5810113377 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -165,3 +165,45 @@ - :file: 'ingest_geoip/60_ip_location_databases.yml' :description: '*' +- + :file: 'get/100_synthetic_source.yml' + :description: 'fetch without refresh also produces synthetic source' +- + :file: 'get/100_synthetic_source.yml' + :description: 'flattened field' +- + :file: 'get/100_synthetic_source.yml' + :description: 'flattened field with ignore_above and arrays' +- + :file: 'index/91_metrics_no_subobjects.yml' + :description: 'Metrics object indexing with synthetic source' +- + :file: 'indices.create/20_synthetic_source.yml' + :description: '*' +- + :file: 'indices.create/21_synthetic_source_stored.yml' + :description: '*' +- + :file: 'indices.put_mapping/10_basic.yml' + :description: 'disabling synthetic source fails' +- + :file: 'logsdb/20_source_mapping.yml' + :description: 'synthetic _source is default' +- + :file: 'index/92_metrics_auto_subobjects.yml' + :description: 'Metrics object indexing with synthetic source' +- + :file: 'tsdb/20_mapping.yml' + :description: 'Synthetic source' +- + :file: 'update/100_synthetic_source.yml' + :description: 'keyword' +- + :file: 'search.highlight/50_synthetic_source.yml' + :description: 'text multi fvh source order' +- + :file: 'search.highlight/50_synthetic_source.yml' + :description: 'text multi fvh score order' +- + :file: 'update/100_synthetic_source.yml' + :description: 'stored text' From 5bcdc0dc2dbc67d6903f080e4cebdf452119300b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 25 Oct 2024 09:52:18 +0100 Subject: [PATCH 376/540] Test Runner: Skips capabilities test esql api --- elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml index c5b40819f6..70861880c8 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml @@ -240,3 +240,6 @@ - :file: 'user_profile/40_has_privileges.yml' :description: '*' +- + :file: 'esql/60_usage.yml' + :description: 'Basic ESQL usage output (telemetry) non-snapshot version' From 3e8a95321fb5401c686a169514690fba92d4b0d3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 25 Oct 2024 13:57:57 +0100 Subject: [PATCH 377/540] Test runner: Skips old_formal desired nodes test --- elasticsearch-api/spec/rest_api/skipped_tests_free.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 5810113377..681452f91d 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -207,3 +207,6 @@ - :file: 'update/100_synthetic_source.yml' :description: 'stored text' +- + :file: 'cluster.desired_nodes/11_old_format.yml' + :description: '*' From 787a8d0b49a3820889df62df3ed1e2404765d1a3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 28 Oct 2024 09:59:00 +0000 Subject: [PATCH 378/540] [API] Removes local parameter from cat.aliases, indices.exist_alias, indices.get_alias --- elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb | 1 - .../lib/elasticsearch/api/actions/indices/exists_alias.rb | 1 - .../lib/elasticsearch/api/actions/indices/get_alias.rb | 1 - 3 files changed, 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb index 0b506b2ed0..6146764687 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb @@ -26,7 +26,6 @@ module Actions # # @option arguments [List] :name A comma-separated list of alias names to return # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [List] :h Comma-separated list of column names to display # @option arguments [Boolean] :help Return help information # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb index 597a9e010d..9fae4483e6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb @@ -29,7 +29,6 @@ module Actions # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb index 4e598e33a8..b1918c6705 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb @@ -29,7 +29,6 @@ module Actions # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html From 02299122aaf9bcb189b710b0630855c56d7902f1 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 4 Nov 2024 11:15:02 +0000 Subject: [PATCH 379/540] Test Runner: Timeout for deleting trained models --- elasticsearch-api/api-spec-testing/wipe_cluster.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/api-spec-testing/wipe_cluster.rb b/elasticsearch-api/api-spec-testing/wipe_cluster.rb index 7e83c2fbf3..6290445d98 100644 --- a/elasticsearch-api/api-spec-testing/wipe_cluster.rb +++ b/elasticsearch-api/api-spec-testing/wipe_cluster.rb @@ -459,7 +459,12 @@ def delete_trained_models(client) return unless models['trained_model_configs'] models['trained_model_configs'].each do |model| - client.ml.delete_trained_model(model_id: model['model_id'], force: true, ignore: 400) + client.ml.delete_trained_model( + model_id: model['model_id'], + force: true, + ignore: 400, + timeout: '10s' + ) end end end From 508987207c3c891cfe586a1da838ca933ebc0244 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 4 Nov 2024 12:58:45 +0000 Subject: [PATCH 380/540] [API] Removes deprecated parameter verbose in indices.segments --- .../lib/elasticsearch/api/actions/indices/segments.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb index b29bb72c65..52d5e8c9c3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb @@ -28,7 +28,6 @@ module Actions # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :verbose Includes detailed memory usage by Lucene. *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html From 0adf0c05d3dc67d51dd628d9dc80649269f15038 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 5 Nov 2024 16:13:52 +0000 Subject: [PATCH 381/540] Test Runner: Skips inference test, tested in elasticsearch-clients-tests --- elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml index 70861880c8..8fb1839d9a 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_platinum.yml @@ -243,3 +243,6 @@ - :file: 'esql/60_usage.yml' :description: 'Basic ESQL usage output (telemetry) non-snapshot version' +- + :file: 'ml/inference_crud.yml' + :description: '*' # Being tested in elasticsearch-clients-tests From 946acf740013b9295f8de1c6aa008ac623989821 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 4 Nov 2024 17:04:14 +0000 Subject: [PATCH 382/540] Test Runner: Skips tsdb, logsdb tests --- .../spec/rest_api/skipped_tests_free.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml index 681452f91d..44f000d8d3 100644 --- a/elasticsearch-api/spec/rest_api/skipped_tests_free.yml +++ b/elasticsearch-api/spec/rest_api/skipped_tests_free.yml @@ -210,3 +210,15 @@ - :file: 'cluster.desired_nodes/11_old_format.yml' :description: '*' +- + :file: 'tsdb/20_mapping.yml' + :description: 'disabled source is not supported' +- + :file: 'tsdb/20_mapping.yml' + :description: 'source include/exclude' +- + :file: 'logsdb/20_source_mapping.yml' + :description: 'disabled _source is not supported' +- + :file: 'logsdb/20_source_mapping.yml' + :description: 'include/exclude is not supported with synthetic _source' From a7e0c701af2f35f7d0683a99bed46fc94431a915 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 7 Nov 2024 09:35:33 +0000 Subject: [PATCH 383/540] [CI] Removes Elasticsearch REST tests from Buildkite --- .buildkite/pipeline.yml | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index ce785fff29..7458881c7d 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,29 +1,4 @@ steps: - - label: ":elasticsearch: Elasticsearch :ruby: {{ matrix.ruby_source}}:{{ matrix.ruby }} :phone: Transport {{ matrix.transport }} - {{ matrix.suite }}" - agents: - provider: "gcp" - env: - RUBY_VERSION: "{{ matrix.ruby }}" - TEST_SUITE: "{{ matrix.suite }}" - STACK_VERSION: 9.0.0-SNAPSHOT - TRANSPORT_VERSION: "{{ matrix.transport }}" - RUBY_SOURCE: "{{ matrix.ruby_source }}" - QUIET: false - matrix: - setup: - suite: - - "free" - - "platinum" - ruby: - - "3.3" - transport: - - "8.3" - ruby_source: - - "ruby" - command: ./.buildkite/run-tests.sh - # I'm publishing test results to HTML and JUnit in this directory and this directive makes them - # available in the Artifacts tab of a build in Buildkite. - artifact_paths: "elasticsearch-api/tmp/*" - label: ":yaml: YAML test suite :ruby: {{ matrix.ruby_source}}:{{ matrix.ruby }} :phone: Transport {{ matrix.transport }}" agents: provider: "gcp" @@ -38,10 +13,19 @@ steps: transport: - "8.3" adjustments: - - with: + - with: # JRuby tests ruby: "9.4" ruby_source: "jruby" transport: "8.3" + # Test for different versions of transport + - with: + ruby: "3.3" + ruby_source: "ruby" + transport: "main" + - with: + ruby: "3.3" + ruby_source: "ruby" + transport: "8.2" env: RUBY_VERSION: "{{ matrix.ruby }}" STACK_VERSION: 9.0.0-SNAPSHOT From f29f0b88135279a9ea6dbc32db3ff835e48fff74 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 7 Nov 2024 09:46:59 +0000 Subject: [PATCH 384/540] [DOCS] Adds CHANGELOG for 9.x --- CHANGELOG-9.x.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 CHANGELOG-9.x.md diff --git a/CHANGELOG-9.x.md b/CHANGELOG-9.x.md new file mode 100644 index 0000000000..27708b0f73 --- /dev/null +++ b/CHANGELOG-9.x.md @@ -0,0 +1,14 @@ +# CHANGELOG 9.x + +## Elasticsearch API + +### Development + +**Integration Tests** + +Migrated away from the Elasticsearch REST API tests and test runner in CI. We now run the [Elasticsearch Client tests](https://github.com/elastic/elasticsearch-clients-tests/) with the [Elasticsearch Tests Runner](https://github.com/elastic/es-test-runner-ruby/**. This gives us more control on what we're testing and makes the Buildkite build way faster in Pull Requests and scheduled builds. + + +**Rake tasks** + +Some old rake tasks that were not being used have been removed. The rest were streamlined, the `es` namespace has been streamlined to make it easier to run Elasticsearch with Docker during development. The `docker` namespace was merged into `es`. From 3adb1a9fc93d1a82c3a57eaaac99fd6489446836 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 7 Nov 2024 09:50:56 +0000 Subject: [PATCH 385/540] Removes outdated benchmarking code --- Rakefile | 1 - benchmarks/Dockerfile | 20 - benchmarks/Gemfile | 32 -- benchmarks/actions/001_ping.rb | 27 -- benchmarks/actions/002_info.rb | 26 -- benchmarks/actions/003_get.rb | 34 -- benchmarks/actions/004_index.rb | 35 -- benchmarks/actions/005_bulk.rb | 46 --- benchmarks/bin/run.rb | 139 ------- benchmarks/lib/benchmarks.rb | 339 ---------------- profile/benchmarking.rb | 85 ---- profile/benchmarking/benchmarking_tasks.rake | 201 --------- profile/benchmarking/complex.rb | 120 ------ profile/benchmarking/data/largedoc.json | 1 - profile/benchmarking/data/smalldoc.json | 1 - profile/benchmarking/measurable.rb | 287 ------------- profile/benchmarking/results.rb | 254 ------------ profile/benchmarking/simple.rb | 404 ------------------- profile/matrix.yml | 16 - 19 files changed, 2068 deletions(-) delete mode 100644 benchmarks/Dockerfile delete mode 100644 benchmarks/Gemfile delete mode 100644 benchmarks/actions/001_ping.rb delete mode 100644 benchmarks/actions/002_info.rb delete mode 100644 benchmarks/actions/003_get.rb delete mode 100644 benchmarks/actions/004_index.rb delete mode 100644 benchmarks/actions/005_bulk.rb delete mode 100755 benchmarks/bin/run.rb delete mode 100644 benchmarks/lib/benchmarks.rb delete mode 100644 profile/benchmarking.rb delete mode 100644 profile/benchmarking/benchmarking_tasks.rake delete mode 100644 profile/benchmarking/complex.rb delete mode 100644 profile/benchmarking/data/largedoc.json delete mode 100644 profile/benchmarking/data/smalldoc.json delete mode 100644 profile/benchmarking/measurable.rb delete mode 100644 profile/benchmarking/results.rb delete mode 100644 profile/benchmarking/simple.rb delete mode 100644 profile/matrix.yml diff --git a/Rakefile b/Rakefile index 062a1f62c4..605b210a33 100644 --- a/Rakefile +++ b/Rakefile @@ -52,7 +52,6 @@ import 'rake_tasks/test_tasks.rake' import 'rake_tasks/doc_generator.rake' import 'rake_tasks/docker_tasks.rake' import 'rake_tasks/update_version.rake' -import 'profile/benchmarking/benchmarking_tasks.rake' require 'pathname' CURRENT_PATH = Pathname(File.expand_path(__dir__)) diff --git a/benchmarks/Dockerfile b/benchmarks/Dockerfile deleted file mode 100644 index fb148f89d2..0000000000 --- a/benchmarks/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -# $ docker build --file benchmarks/Dockerfile --tag elastic/elasticsearch-ruby . - -ARG RUBY_VERSION=2.7 -FROM ruby:${RUBY_VERSION} - -ENV TERM xterm-256color -ENV GEM_HOME="/usr/local/bundle" -ENV PATH $GEM_HOME/bin:$GEM_HOME/gems/bin:$PATH - -VOLUME ["/data"] - -WORKDIR /elasticsearch-ruby - -# TODO(karmi): Copy dependencies first to make use of Docker layer caching -COPY . . - -RUN bundle install --retry=5 -RUN cd benchmarks && bundle install - -CMD ["/bin/bash"] diff --git a/benchmarks/Gemfile b/benchmarks/Gemfile deleted file mode 100644 index 45b087784b..0000000000 --- a/benchmarks/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# 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. - -# frozen_string_literal: true - -source "https://rubygems.org" - -git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } - -gem 'elasticsearch', path: File.expand_path('../../elasticsearch', __FILE__), require: false -gem 'elasticsearch-api', path: File.expand_path('../../elasticsearch-api', __FILE__), require: false -gem 'elasticsearch-transport', path: File.expand_path('../../elasticsearch-transport', __FILE__), require: false - -gem 'ansi' -gem 'patron' -gem 'oj' - -gem 'pry', group: :development diff --git a/benchmarks/actions/001_ping.rb b/benchmarks/actions/001_ping.rb deleted file mode 100644 index d7ea49a855..0000000000 --- a/benchmarks/actions/001_ping.rb +++ /dev/null @@ -1,27 +0,0 @@ -# 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. - -require_relative '../lib/benchmarks' - -Benchmarks.register \ - action: 'ping', - category: 'core', - warmups: Benchmarks::DEFAULT_WARMUPS, - repetitions: 10_000, - measure: Proc.new { |n, runner| - runner.runner_client.ping - } diff --git a/benchmarks/actions/002_info.rb b/benchmarks/actions/002_info.rb deleted file mode 100644 index 1b095ab02e..0000000000 --- a/benchmarks/actions/002_info.rb +++ /dev/null @@ -1,26 +0,0 @@ -# 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. -require_relative '../lib/benchmarks' - -Benchmarks.register \ - action: 'info', - category: 'core', - warmups: Benchmarks::DEFAULT_WARMUPS, - repetitions: 10_000, - measure: Proc.new { |n, runner| - runner.runner_client.info - } diff --git a/benchmarks/actions/003_get.rb b/benchmarks/actions/003_get.rb deleted file mode 100644 index dd612e77ed..0000000000 --- a/benchmarks/actions/003_get.rb +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - -require_relative '../lib/benchmarks' - -Benchmarks.register \ - action: 'get', - category: 'core', - warmups: 100, - repetitions: 10_000, - setup: Proc.new { |runner| - runner.runner_client.indices.delete(index: 'test-bench-get', ignore: 404) - runner.runner_client.index index: 'test-bench-get', id: '1', body: { title: 'Test' } - runner.runner_client.cluster.health(wait_for_status: 'yellow') - runner.runner_client.indices.refresh index: 'test-bench-get' - }, - measure: Proc.new { |n, runner| - response = runner.runner_client.get index: 'test-bench-get', id: '1' - raise RuntimeError.new("Incorrect data: #{response}") unless response["_source"]["title"] == "Test" - } diff --git a/benchmarks/actions/004_index.rb b/benchmarks/actions/004_index.rb deleted file mode 100644 index 5428228787..0000000000 --- a/benchmarks/actions/004_index.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require_relative '../lib/benchmarks' - -Benchmarks.register \ - action: 'index', - category: 'core', - warmups: 100, - repetitions: 10_000, - setup: Proc.new { |runner| - runner.runner_client.indices.delete(index: 'test-bench-index', ignore: 404) - runner.runner_client.indices.create(index: 'test-bench-index') - runner.runner_client.cluster.health(wait_for_status: 'yellow') - }, - measure: Proc.new { |n, runner| - doc_path = Benchmarks.data_path.join('small/document.json') - raise RuntimeError.new("Document at #{doc_path} not found") unless doc_path.exist? - response = runner.runner_client.index index: 'test-bench-index', id: "%04d-%04d" % [n, rand(1..1000)], body: doc_path.open.read - raise RuntimeError.new("Incorrect response: #{response}") unless response["result"] == "created" - } diff --git a/benchmarks/actions/005_bulk.rb b/benchmarks/actions/005_bulk.rb deleted file mode 100644 index 03213e7a1a..0000000000 --- a/benchmarks/actions/005_bulk.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require_relative '../lib/benchmarks' - -Benchmarks.register \ - action: 'bulk', - category: 'core', - warmups: 10, - repetitions: 1_000, - operations: 10_000, - setup: Proc.new { |runner| - runner.runner_client.indices.delete(index: 'test-bench-bulk', ignore: 404) - runner.runner_client.indices.create(index: 'test-bench-bulk', body: '{"settings": { "number_of_shards": 3, "refresh_interval":"5s"}}') - runner.runner_client.cluster.health(wait_for_status: 'yellow') - }, - measure: Proc.new { |n, runner| - doc_path = Benchmarks.data_path.join('small/document.json') - raise RuntimeError.new("Document at #{doc_path} not found") unless doc_path.exist? - doc_body = doc_path.open.read.tr("\n", "").gsub(/\s{2,}/, "") + "\n" - - op_meta = %Q|{"index":{}}\n|.freeze - op_body = '' - - 1.upto(runner.operations).each do |i| - op_body << op_meta - op_body << doc_body - end - - response = runner.runner_client.bulk index: 'test-bench-bulk', body: op_body - raise RuntimeError.new("Incorrect response: #{response}") if response["errors"] - } diff --git a/benchmarks/bin/run.rb b/benchmarks/bin/run.rb deleted file mode 100755 index 52866fb139..0000000000 --- a/benchmarks/bin/run.rb +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/env ruby -# 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. -require 'ansi/core' -require 'logger' -require 'patron' -require 'pathname' -require 'oj' - -require_relative '../lib/benchmarks' - -puts "Running benchmarks for elasticsearch-ruby@#{Elasticsearch::VERSION}".ansi(:bold,:underline) - -config = { - "ELASTICSEARCH_TARGET_URL" => "", - "ELASTICSEARCH_REPORT_URL" => "", - "DATA_SOURCE" => "", - "BUILD_ID" => "", - "TARGET_SERVICE_TYPE" => "", - "TARGET_SERVICE_NAME" => "", - "TARGET_SERVICE_VERSION" => "", - "TARGET_SERVICE_OS_FAMILY" => "", - "CLIENT_BRANCH" => "", - "CLIENT_COMMIT" => "", - "CLIENT_BENCHMARK_ENVIRONMENT" => "" -} - -missing_keys = [] - -config.keys.each do |key| - if ENV[key] && !ENV[key].to_s.empty? - config[key] = ENV[key] - else - missing_keys << key - end -end - -unless missing_keys.empty? -puts "ERROR: Required environment variables [#{missing_keys.join(',')}] missing".ansi(:bold, :red) - exit(1) -end - -start = Time.now.utc - -runner_client = Elasticsearch::Client.new(url: config["ELASTICSEARCH_TARGET_URL"]) -report_client = Elasticsearch::Client.new( - url: config["ELASTICSEARCH_REPORT_URL"], - request_timeout: 5*60, - retry_on_failure: 10 -) -if ENV['DEBUG'] - logger = Logger.new(STDOUT) - logger.level = Logger::INFO - logger.formatter = proc { |s, d, p, m| "#{m}\n".ansi(:faint) } - - runner_client.transport.logger = logger - report_client.transport.logger = logger -end - -runner = Benchmarks::Runner::Runner.new \ - build_id: config['BUILD_ID'], - environment: config['CLIENT_BENCHMARK_ENVIRONMENT'], - category: ENV['CLIENT_BENCHMARK_CATEGORY'].to_s, - runner_client: runner_client, - report_client: report_client, - target: { - service: { - type: config['TARGET_SERVICE_TYPE'], - name: config['TARGET_SERVICE_NAME'], - version: config['TARGET_SERVICE_VERSION'], - git: { - branch: ENV['TARGET_SERVICE_GIT_BRANCH'], - commit: ENV['TARGET_SERVICE_GIT_COMMIT'] - } - }, - os: { - family: config['TARGET_SERVICE_OS_FAMILY'] - } - }, - runner: { - service: { - git: { - branch: config['CLIENT_BRANCH'], - commit: config['CLIENT_COMMIT'] - } - } - } - -# ----- Run benchmarks -------------------------------------------------------- - -Benchmarks.data_path = Pathname(config["DATA_SOURCE"]) -unless Benchmarks.data_path.exist? - puts "ERROR: Data source at [#{Benchmarks.data_path}] not found".ansi(:bold, :red) - exit(1) -end - -Dir[File.expand_path("../../actions/*.rb", __FILE__)].each { |file| require file } - -Benchmarks.actions.each do |b| - next unless ENV['FILTER'].nil? or ENV['FILTER'].include? b.action - - runner.setup(&b.setup) if b.setup - - result = runner.measure( - action: b.action, - category: b.category, - warmups: b.warmups, - repetitions: b.repetitions, - operations: b.operations, - &b.measure).run! - - puts " " + - "[#{b.action}] ".ljust(16) + - "#{b.repetitions}x ".ljust(10) + - "mean=".ansi(:faint) + - "#{coll = runner.stats.map(&:duration); ((coll.sum / coll.size.to_f)/1e+6).round}ms " + - "runner=".ansi(:faint)+ - "#{runner.stats.any? { |s| s.outcome == 'failure' } ? 'failure' : 'success' } ".ansi( runner.stats.none? { |s| s.outcome == 'failure' } ? :green : :red ) + - "report=".ansi(:faint)+ - "#{result ? 'success' : 'failure' }".ansi( result ? :green : :red ) -end - -# ----------------------------------------------------------------------------- - -puts "Finished in #{(Time.mktime(0)+(Time.now.utc-start)).strftime("%H:%M:%S")}".ansi(:underline) diff --git a/benchmarks/lib/benchmarks.rb b/benchmarks/lib/benchmarks.rb deleted file mode 100644 index 09a621e471..0000000000 --- a/benchmarks/lib/benchmarks.rb +++ /dev/null @@ -1,339 +0,0 @@ -# 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. - -require "ostruct" -require "time" -require "rbconfig" - -require "ansi/core" -require "elasticsearch" - -## -# Module Benchmarks contains components for end-to-end benchmarking of the Ruby client for Elasticsearch. -# -module Benchmarks - DEFAULT_WARMUPS = 0 - DEFAULT_REPETITIONS = 1_000 - DEFAULT_OPERATIONS = 1 - - ## - # Represents the benchmarking action. - # - class Action - attr_reader :action, :category, :warmups, :repetitions, :operations, :setup, :measure - - # @param action [String] The name of the measured action - # @param category [String] The category of the measured action - # @param warmups [Number] The number of warmup runs - # @param repetitions [Number] The number of repetitions - # @param operations [Number] The number of operations in a single repetition - # @param setup [Block] The operation setup - # @param measure [Block] The measured operation - def initialize(action:, category:, warmups:, repetitions:, operations:, setup:, measure:) - raise ArgumentError.new("Required parameter [action] empty") if action.empty? - raise ArgumentError.new("Required parameter [category] empty") if category.empty? - - @action = action - @category = category - @warmups = warmups || DEFAULT_WARMUPS - @repetitions = repetitions || DEFAULT_REPETITIONS - @operations = operations || DEFAULT_OPERATIONS - @setup = setup - @measure = measure - end - end - - ## - # Registers an action for benchmarking. - # - # @option arguments [String] :action The name of the measured action - # @option arguments [String] :category The category of the measured action - # @option arguments [Number] :warmups The number of warmup runs - # @option arguments [Number] :repetitions The number of repetitions - # @option arguments [Number] :operations The number of operations in a single repetition - # @option arguments [Block] :setup The operation setup - # @option arguments [Block] :measure The measured operation - # - def self.register(arguments = {}) - self.actions << Action.new( - action: arguments[:action], - category: arguments[:category], - warmups: arguments[:warmups], - repetitions: arguments[:repetitions], - operations: arguments[:operations], - setup: arguments[:setup], - measure: arguments[:measure] - ) - end - - ## - # Set data path for benchmarks. - # - # @param path [Pathname,String] - # - def self.data_path=(path) - @data_path = Pathname(path) - end - - ## - # Return data path for benchmarks. - # - # @return [Pathname] - # - def self.data_path - @data_path - end - - ## - # Returns the registered actions. - # - # @return [Array] - # - def self.actions - @actions ||= [] - end - - ## - # Module Runner contains components for running the benchmarks. - # - module Runner - ## - # Stats represents the measured statistics. - # - class Stats < OpenStruct; end - - ## - # Errors contain error class for runner operations. - # - module Errors - ## - # ReportError represents an exception ocurring during reporting the results. - # - class ReportError < StandardError; end - - ## - # SetupError represents an exception occuring during operation setup. - # - class SetupError < StandardError; end - - ## - # WarmupError represents an exception occuring during operation warmup. - # - class WarmupError < StandardError; end - end - - ## - # The bulk size for reporting results. - # - BULK_BATCH_SIZE = 1000 - - ## - # The index name for reporting results. - # - INDEX_NAME="metrics-intake-#{Time.now.strftime("%Y-%m")}" - - ## - # Runner represents a benchmarking runner. - # - # It is initialized with two Elasticsearch clients, one for running the benchmarks, - # another one for reporting the results. - # - # Use the {#measure} method for adding a block which is executed and measured. - # - class Runner - attr_reader :stats, :runner_client, :report_client, :warmups, :repetitions, :operations - - ## - # @param runner_client [Elasticsearch::Client] The client for executing the measured operations. - # @param report_client [Elasticsearch::Client] The client for storing the results. - # - def initialize(build_id:, category:, environment:, runner_client:, report_client:, target:, runner:) - raise ArgumentError.new("Required parameter [build_id] empty") if build_id.empty? - raise ArgumentError.new("Required parameter [environment] empty") if environment.empty? - - @action = '' - @stats = [] - @warmups = 0 - @repetitions = 0 - @operations = 0 - - @build_id = build_id - @category = category - @environment = environment - @runner_client = runner_client - @report_client = report_client - @target_config = target - @runner_config = runner - end - - ## - # Executes the measured block, capturing statistics, and reports the results. - # - # @return [Boolean] - # @raise [Errors::ReportError] - # - def run! - @stats = [] - - # Run setup code - begin - @setup.arity < 1 ? self.instance_eval(&@setup) : @setup.call(self) if @setup - rescue StandardError => e - raise Errors::SetupError.new(e.inspect) - end - - # Run warmups - begin - @warmups.times do |n| - @measure.arity < 1 ? self.instance_eval(&@measure) : @measure.call(n, self) if @measure - end - rescue StandardError => e - raise Errors::WarmupError.new(e.inspect) - end - - # Run measured repetitions - # - # Cf. https://blog.dnsimple.com/2018/03/elapsed-time-with-ruby-the-right-way/ - @repetitions.times do |n| - stat = Stats.new(start: Time.now.utc) - start = Process.clock_gettime(Process::CLOCK_MONOTONIC) - begin - result = @measure.arity < 1 ? result = self.instance_eval(&@measure) : result = @measure.call(n, self) if @measure - if result == false - stat.outcome = "failure" - else - stat.outcome = "success" - end - rescue StandardError => e - stat.outcome = "failure" - ensure - stat.duration = ((Process.clock_gettime(Process::CLOCK_MONOTONIC)-start) * 1e+9 ).to_i - @stats << stat - end - end - - # Report results - begin - __report - rescue StandardError => e - puts "ERROR: #{e.inspect}" - return false - end - - return true - end - - ## - # Configure a setup for the measure operation. - # - # @return [self] - # - def setup &block - @setup = block - return self - end - - ## - # Configure the measure operation. - # - # @param action [String] A human-readable name of the operation. - # @param category [String] The operation category. - # @param warmups [Number] The number of warmups. - # @param repetitions [Number] The number of repetitions. - # @param operations [Number] The number of operations in a single repetition. - # - # @return [self] - # - def measure(action:, category:, warmups:, repetitions:, operations:, &block) - raise ArgumentError.new("Required parameter [action] empty") if action.empty? - raise ArgumentError.new("Required parameter [category] empty") if category.empty? - raise ArgumentError.new("Required parameter [repetitions] not a number") unless repetitions.is_a? Numeric - raise ArgumentError.new("Required parameter [operations] not a number") unless operations.is_a? Numeric - - @action = action - @category = category - @warmups = warmups - @repetitions = repetitions - @operations = operations - @measure = block - return self - end - - ## - # Stores the result in the reporting cluster. - # - # @api private - # - def __report - @stats.each_slice(BULK_BATCH_SIZE) do |slice| - payload = slice.map do |s| - { index: { - data: { - :'@timestamp' => s.start.iso8601, - labels: { - build_id: @build_id, - client: 'elasticsearch-ruby', - environment: @environment.to_s - }, - tags: ['bench', 'elasticsearch-ruby'], - event: { - action: @action, - duration: s.duration, - outcome: s.outcome - }, - benchmark: { - build_id: @build_id, - environment: @environment.to_s, - category: @category.to_s, - repetitions: @repetitions, - operations: @operations, - runner: { - service: @runner_config[:service].merge({ - type: 'client', - name: 'elasticsearch-ruby', - version: Elasticsearch::VERSION - }), - runtime: { - name: 'ruby', version: RbConfig::CONFIG['ruby_version'] - }, - os: { - family: RbConfig::CONFIG['host_os'].split('_').first[/[a-z]+/i].downcase - } - }, - target: @target_config - } - } - } - } - end - - begin - - rescue Elasticsearch::Transport::Transport::Error => e - puts "ERROR: #{e.inspect}" - raise e - end - - response = @report_client.bulk index: INDEX_NAME, body: payload - if response['errors'] || response['items'].any? { |i| i.values.first['status'] > 201 } - raise Errors::ReportError.new("Error saving benchmark results to report cluster") - end - end - end - end - end -end diff --git a/profile/benchmarking.rb b/profile/benchmarking.rb deleted file mode 100644 index 331259a509..0000000000 --- a/profile/benchmarking.rb +++ /dev/null @@ -1,85 +0,0 @@ -# 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. - -require 'benchmark' -require 'yaml' -require 'erb' -require 'json' -require_relative 'benchmarking/measurable' -require_relative 'benchmarking/simple' -require_relative 'benchmarking/complex' -require_relative 'benchmarking/results' - -module Elasticsearch - - # Module with all functionality for running client benchmark tests. - # - # @since 7.0.0 - module Benchmarking - - extend self - - # The default number of test repetitions. - # - # @return [ Integer ] The number of test repetitions. - # - # @since 7.0.0 - DEFAULT_TEST_REPETITIONS = 10.freeze - - # The number of default warmup repetitions of the test to do before - # recording times. - # - # @return [ Integer ] The default number of warmup repetitions. - # - # @since 7.0.0 - DEFAULT_WARMUP_REPETITIONS = 1.freeze - - # The default definition of a test run. - # - # @return [ Hash ] The default test run definition. - # - # @since 7.0.0 - DEFAULT_RUN = { 'description' => 'Default run', - 'repetitions' => { - 'measured' => DEFAULT_TEST_REPETITIONS, - 'warmup' => DEFAULT_WARMUP_REPETITIONS }, - 'name' => 'default', - 'metrics' => ['mean'] }.freeze - - # Parse a file of run definitions and yield each run. - # - # @params [ String ] file The YAML file containing the matrix of test run definitions. - # - # @yieldparam [ Hash ] A test run definition. - # - # @since 7.0.0 - def each_run(file) - if file - file = File.new(file) - matrix = YAML.load(ERB.new(file.read).result) - file.close - - matrix.each_with_index do |run, i| - DEFAULT_RUN.merge(run) - yield(run, i) - end - else - yield(DEFAULT_RUN) - end - end - end -end diff --git a/profile/benchmarking/benchmarking_tasks.rake b/profile/benchmarking/benchmarking_tasks.rake deleted file mode 100644 index aae5bef30e..0000000000 --- a/profile/benchmarking/benchmarking_tasks.rake +++ /dev/null @@ -1,201 +0,0 @@ -# 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. - -require_relative "../benchmarking" - -namespace :benchmark do - - namespace :simple do - - desc "Run the \'ping\' benchmark test" - task :ping do - require 'elasticsearch' - Elasticsearch::Benchmarking.each_run(ENV['matrix']) do |run| - task = Elasticsearch::Benchmarking::Simple.new(run) - puts "#{'*' * 5} PING #{'*' * 5} \n" - puts "#{task.run(:ping)}" - end - end - - desc "Run the \'create index\' benchmark test" - task :create_index do - require 'elasticsearch' - Elasticsearch::Benchmarking.each_run(ENV['matrix']) do |run| - task = Elasticsearch::Benchmarking::Simple.new(run) - puts "#{'*' * 5} CREATE INDEX #{'*' * 5} \n" - puts "#{task.run(:create_index)}" - end - end - - desc "Run the \'index smal document\' benchmark test with patron adapter" - task :index_document_small_patron do - require 'elasticsearch' - Elasticsearch::Benchmarking.each_run(ENV['matrix']) do |run| - begin - require 'patron' - rescue LoadError - puts "Patron not loaded, skipping test" - else - task = Elasticsearch::Benchmarking::Simple.new(run, :patron) - puts "#{'*' * 5} INDEX SMALL DOCUMENT, PATRON #{'*' * 5} \n" - puts "#{task.run(:index_document_small)}" - end - end - end - - desc "Run the \'index small document\' benchmark test" - task :index_document_small do - require 'elasticsearch' - Elasticsearch::Benchmarking.each_run(ENV['matrix']) do |run| - task = Elasticsearch::Benchmarking::Simple.new(run) - puts "#{'*' * 5} INDEX SMALL DOCUMENT #{'*' * 5} \n" - puts "#{task.run(:index_document_small)}" - end - end - - desc "Run the \'index large document\' benchmark test" - task :index_document_large do - require 'elasticsearch' - Elasticsearch::Benchmarking.each_run(ENV['matrix']) do |run| - task = Elasticsearch::Benchmarking::Simple.new(run) - puts "#{'*' * 5} INDEX LARGE DOCUMENT #{'*' * 5} \n" - puts "#{task.run(:index_document_large)}" - end - end - - desc "Run the \'get small document\' benchmark test" - task :get_document_small do - require 'elasticsearch' - Elasticsearch::Benchmarking.each_run(ENV['matrix']) do |run| - task = Elasticsearch::Benchmarking::Simple.new(run) - puts "#{'*' * 5} GET SMALL DOCUMENT #{'*' * 5} \n" - puts "#{task.run(:get_document_small)}" - end - end - - desc "Run the \'get large document\' benchmark test" - task :get_document_large do - require 'elasticsearch' - Elasticsearch::Benchmarking.each_run(ENV['matrix']) do |run| - task = Elasticsearch::Benchmarking::Simple.new(run) - puts "#{'*' * 5} GET LARGE DOCUMENT #{'*' * 5} \n" - puts "#{task.run(:get_document_large)}" - end - end - - desc "Run the \'search small document\' benchmark test" - task :search_document_small do - require 'elasticsearch' - Elasticsearch::Benchmarking.each_run(ENV['matrix']) do |run| - task = Elasticsearch::Benchmarking::Simple.new(run) - puts "#{'*' * 5} SEARCH SMALL DOCUMENT #{'*' * 5} \n" - puts "#{task.run(:search_document_small)}" - end - end - - desc "Run the \'search small document\' benchmark test" - task :search_document_large do - require 'elasticsearch' - Elasticsearch::Benchmarking.each_run(ENV['matrix']) do |run| - task = Elasticsearch::Benchmarking::Simple.new(run) - puts "#{'*' * 5} SEARCH LARGE DOCUMENT #{'*' * 5} \n" - puts "#{task.run(:search_document_large)}" - end - end - - desc "Run the \'update document\' benchmark test" - task :update_document do - require 'elasticsearch' - Elasticsearch::Benchmarking.each_run(ENV['matrix']) do |run| - task = Elasticsearch::Benchmarking::Simple.new(run) - puts "#{'*' * 5} UPDATE DOCUMENT #{'*' * 5} \n" - puts "#{task.run(:update_document)}" - end - end - - desc "Run all simple benchmark tests" - task :all, [:matrix] do |t, args| - %w[ benchmark:simple:ping - benchmark:simple:create_index - benchmark:simple:index_document_small - benchmark:simple:index_document_large - benchmark:simple:get_document_small - benchmark:simple:get_document_large - benchmark:simple:search_document_small - benchmark:simple:search_document_large - benchmark:simple:update_document - ].each do |task_name| - begin - require 'elasticsearch' - Rake::Task[task_name].invoke(*args) - rescue => ex - puts "Error in task [#{task_name}], #{ex.inspect}" - next - end - end - end - - # namespace :noop do - # - # desc "Run the \'search small document\' benchmark test with the noop plugin" - # task :search_document_small do - # puts "SIMPLE REQUEST BENCHMARK:: SEARCH SMALL DOCUMENT WITH NOOP PLUGIN" - # Elasticsearch::Benchmarking::Simple.new.run(:search_document_small, noop: true) - # end - # end - end - - namespace :complex do - - task :download_dataset do - current_path = File.expand_path(File.dirname(__FILE__)) - data_path = [current_path, 'data'].join('/') - unless File.exists?([data_path, 'stackoverflow.json'].join('/')) - `gsutil cp gs://clients-team-files/stackoverflow.json "#{data_path}/"` - end - end - - desc "Run the \'index documents\' benchmark test" - task :index_documents => :download_dataset do - require 'elasticsearch' - Elasticsearch::Benchmarking.each_run(ENV['matrix']) do |run| - task = Elasticsearch::Benchmarking::Complex.new(run) - puts "#{'*' * 5} INDEX DOCUMENTS #{'*' * 5} \n" - puts "#{task.run(:index_documents)}" - end - end - - desc "Run the \'search documents\' benchmark test" - task :search_documents do - require 'elasticsearch' - Elasticsearch::Benchmarking.each_run(ENV['matrix']) do |run| - task = Elasticsearch::Benchmarking::Complex.new(run) - puts "#{'*' * 5} SEARCH DOCUMENTS #{'*' * 5} \n" - puts "#{task.run(:search_documents)}" - end - end - - desc "Run all complex benchmark test" - task :all do - %w[ benchmark:complex:index_documents - ].each do |task_name| - require 'elasticsearch' - Rake::Task[task_name].invoke - end - end - end -end diff --git a/profile/benchmarking/complex.rb b/profile/benchmarking/complex.rb deleted file mode 100644 index b910ddd5bf..0000000000 --- a/profile/benchmarking/complex.rb +++ /dev/null @@ -1,120 +0,0 @@ -# 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. - -module Elasticsearch - module Benchmarking - - # Class encapsulating all settings and functionality for running benchmarking - # tests making complex requests. - # - # @since 7.0.0 - class Complex - include Measurable - - # Test sending a bulk request to index a large dataset. - # - # @example Test sending a bulk index request. - # task.create_documents(opts) - # - # @param [ Hash ] opts The test run options. - # - # @results [ Hash ] The results documents. - # - # @since 7.0.0 - def index_documents(opts = {}) - results = [] - slices = dataset_slices - - warmup_repetitions.times do - slices.each do |slice| - client.bulk(body: slice) - end - end - - duration = with_cleanup do - Benchmark.realtime do - results = measured_repetitions.times.collect do - Benchmark.realtime do - slices.each do |slice| - client.bulk(body: slice) - end - end - end - end - end - - options = { duration: duration, - operation: __method__, - dataset: File.basename(DATASET_FILE), - dataset_size: ObjectSpace.memsize_of(dataset), - dataset_n_documents: dataset.length } - index_results!(results, options) - end - - # Test sending a request a search request. - # - # @example Test sending a search request. - # Benchmarking::Complex.search_documents(10) - # - # @param [ Integer ] repetitions The number of test repetitions. - # - # @since 7.0.0 - def search_documents(opts = {}) - results = [] - - duration = with_cleanup do - slices = dataset_slices - sample_slice = slices.collect do |slice| - client.bulk(body: slice) - slice - end[rand(slices.size)-1] - - sample_document = sample_slice[rand(sample_slice.size)-1][:index][:data] - search_criteria = sample_document.find { |k,v| v.is_a?(String) } - request = { body: { query: { match: { search_criteria[0] => search_criteria[1] } } } } - - warmup_repetitions.times do - client.search(request) - end - - Benchmark.realtime do - results = measured_repetitions.times.collect do - Benchmark.realtime do - client.search(request) - end - end - end - end - - options = { duration: duration, - operation: __method__, - dataset: File.basename(DATASET_FILE), - dataset_size: ObjectSpace.memsize_of(dataset), - dataset_n_documents: dataset.length } - index_results!(results, options) - end - - # def mixed_bulk_small(repetitions) - # - # end - # - # def mixed_bulk_large(repetitions) - # - # end - end - end -end diff --git a/profile/benchmarking/data/largedoc.json b/profile/benchmarking/data/largedoc.json deleted file mode 100644 index 41fda56554..0000000000 --- a/profile/benchmarking/data/largedoc.json +++ /dev/null @@ -1 +0,0 @@ -{"text":"@wildfits you're not getting one.....","in_reply_to_status_id":22773233453,"retweet_count":null,"contributors":null,"created_at":"Thu Sep 02 19:38:18 +0000 2010","geo":null,"source":"web","coordinates":null,"in_reply_to_screen_name":"wildfits","truncated":false,"entities":{"user_mentions":[{"indices":[0,9],"screen_name":"wildfits","name":"Mairin Goetzinger","id":41832464}],"urls":[],"hashtags":[]},"retweeted":false,"place":null,"user":{"friends_count":179,"profile_sidebar_fill_color":"7a7a7a","location":"Minneapols, MN/Brookings SD","verified":false,"follow_request_sent":null,"favourites_count":0,"profile_sidebar_border_color":"a3a3a3","profile_image_url":"http://a1.twimg.com/profile_images/1110614677/Screen_shot_2010-08-25_at_10.12.40_AM_normal.png","geo_enabled":false,"created_at":"Sun Aug 17 00:23:13 +0000 2008","description":"graphic designer + foodie, with a love of music, movies, running, design, + the outdoors!","time_zone":"Mountain Time (US & Canada)","url":"http://jessiefarris.com/","screen_name":"jessiekf","notifications":null,"profile_background_color":"303030","listed_count":1,"lang":"en","profile_background_image_url":"http://a3.twimg.com/profile_background_images/133733613/Picture_4.png","statuses_count":1010,"following":null,"profile_text_color":"d9a980","protected":false,"show_all_inline_media":false,"profile_background_tile":true,"name":"Jessie Farris","contributors_enabled":false,"profile_link_color":"363636","followers_count":218,"id":15878015,"profile_use_background_image":true,"utc_offset":-25200},"favorited":false,"in_reply_to_user_id":41832464,"id":22824602300} \ No newline at end of file diff --git a/profile/benchmarking/data/smalldoc.json b/profile/benchmarking/data/smalldoc.json deleted file mode 100644 index c18279eb43..0000000000 --- a/profile/benchmarking/data/smalldoc.json +++ /dev/null @@ -1 +0,0 @@ -{"id": 49434,"cuisine": "mexican"} diff --git a/profile/benchmarking/measurable.rb b/profile/benchmarking/measurable.rb deleted file mode 100644 index 549e300ae8..0000000000 --- a/profile/benchmarking/measurable.rb +++ /dev/null @@ -1,287 +0,0 @@ -# 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. - -module Elasticsearch - - module Benchmarking - # Helper functions used by benchmarking tasks - module Measurable - - attr_reader :options - attr_reader :client_adapter - - # The default number of measured repetitions. - # - # @since 7.0.0 - DEFAULT_MEASURED_REPETITIONS = 5 - - # The default number of warmup repetitions. - # - # @since 7.0.0 - DEFAULT_WARMUP_REPETITIONS = 1 - - # The default number of action iterations. - # - # @since 7.0.0 - DEFAULT_ACTION_ITERATIONS = 1 - - # Create a benchmark test. - # - # @example Create a test. - # Benchmarking::Simple.new({ 'repetitions' => { 'warmup' => 1 }}, :patron) - # - # @param [ Hash ] options The options for the benchmarking task. - # @param [ Symbol ] adapter The adapter the client should be configured with. - # - # @since 7.0.0 - def initialize(options = {}, adapter = ::Faraday.default_adapter) - @options = options - @client_adapter = adapter - end - - # Run a benchmark test. - # - # @example Run a test. - # task.run(:ping) - # - # @param [ Symbol ] type The name of the test to run. - # - # @return [ Hash ] The test results document. - # - # @since 7.0.0 - def run(type, opts={}) - send(type, opts) - end - - # Get the nodes info on the elasticsearch server used for the benchmarking tests. - # - # @example Get the nodes info. - # task.nodes_info - # - # @return [ Hash ] The nodes info. - # - # @since 7.0.0 - def nodes_info - client.nodes.info(os: true) if client.ping - end - - # Get the version of the elasticsearch server used for the benchmarking tests. - # - # @example Get the server version. - # task.server_version - # - # @return [ String ] The server version. - # - # @since 7.0.0 - def server_version - client.perform_request('GET', '/').body['version']['number'] if client.ping - end - - # Get the description of the benchmarking task. - # - # @example Get the task description. - # task.description - # - # @return [ String ] The task description. - # - # @since 7.0.0 - def description - @options['description'] - end - - # Get number of measured repetitions. - # - # @example Get the number of measured repetitions. - # task.measured_repetitions - # - # @return [ Numeric ] The number of measured repetitions. - # - # @since 7.0.0 - def measured_repetitions - @options['repetitions']['measured'] || DEFAULT_MEASURED_REPETITIONS - end - - # Get number of warmup repetitions. - # - # @example Get the number of warmup repetitions. - # task.warmup_repetitions - # - # @return [ Numeric ] The number of warmup repetitions. - # - # @since 7.0.0 - def warmup_repetitions - @options['repetitions']['warmup'] || DEFAULT_WARMUP_REPETITIONS - end - - # Get number of iterations of the action. - # - # @example Get the number of iterations of the action. - # task.action_iterations - # - # @return [ Numeric ] The number of action iterations. - # - # @since 7.0.0 - def action_iterations - @options['repetitions']['action_iterations'] || DEFAULT_ACTION_ITERATIONS - end - - private - - attr_reader :adapter - - # The elasticsearch url to use for the tests. - # - # @return [ String ] The Elasticsearch URL to use in tests. - # - # @since 7.0.0 - ELASTICSEARCH_URL = ENV['ELASTICSEARCH_URL'] || "localhost:#{(ENV['TEST_CLUSTER_PORT'] || 9200)}" - - # The username for the results cluster. - # - # @return [ String ] The username for the results cluster. - # - # @since 7.0.0 - ES_RESULT_CLUSTER_USERNAME = ENV['ES_RESULT_CLUSTER_USERNAME'].freeze - - # The password for the results cluster. - # - # @return [ String ] The password for the results cluster. - # - # @since 7.0.0 - ES_RESULT_CLUSTER_PASSWORD = ENV['ES_RESULT_CLUSTER_PASSWORD'].freeze - - # The results cluster url. - # - # @return [ String ] The results cluster url. - # - # @since 7.0.0 - ES_RESULT_CLUSTER_URL = ENV['ES_RESULT_CLUSTER_URL'].freeze - - # The current path. - # - # @return [ String ] The current path. - # - # @since 7.0.0 - CURRENT_PATH = File.expand_path(File.dirname(__FILE__)).freeze - - # The path to data files used in Benchmarking tests. - # - # @return [ String ] Path to Benchmarking test files. - # - # @since 7.0.0 - DATA_PATH = [CURRENT_PATH, 'data'].join('/').freeze - - # The file path and name for the small document. - # - # @return [ String ] The file path and name for the small document. - # - # @since 7.0.0 - SMALL_DOCUMENT = [DATA_PATH, 'smalldoc.json'].join('/').freeze - - # The file path and name for the large document. - # - # @return [ String ] The file path and name for the large document. - # - # @since 7.0.0 - LARGE_DOCUMENT = [DATA_PATH, 'largedoc.json'].join('/').freeze - - # The file path and name for the dataset. - # - # @return [ String ] The file path and name for the dataset. - # - # @since 7.0.0 - DATASET_FILE = [DATA_PATH, 'stackoverflow.json'].join('/').freeze - - # The name of the index to use for benchmark tests. - # - # @return [ String ] The index to use for benchmarking tests. - # - # @since 7.0.0 - INDEX = 'benchmarking-ruby'.freeze - - def load_json_from_file(file_name) - File.open(file_name, "r") do |f| - f.each_line.collect do |line| - JSON.parse(line) - end - end - end - - def with_cleanup - client.indices.delete(index: 'benchmarking-*') - client.indices.create(index: INDEX) unless client.indices.exists?(index: INDEX) - results = yield - client.indices.delete(index: 'benchmarking-*') - results - end - - def client - @client ||= Elasticsearch::Transport::Client.new(host: ELASTICSEARCH_URL, - adapter: adapter, - tracer: nil) - end - - def dataset_slices(slice_size=10000) - @dataset_slices ||= begin - dataset.collect do |d| - { index: { _index: INDEX, _type: '_doc', data: d } } - end.each_slice(slice_size) - end - end - - def dataset - @dataset ||= load_json_from_file(DATASET_FILE) - end - - def small_document - @small_document ||= load_json_from_file(SMALL_DOCUMENT)[0] - end - - def large_document - @large_document ||= load_json_from_file(LARGE_DOCUMENT)[0] - end - - def noop_plugin? - false - end - - def index_results!(results, options = {}) - res = Results.new(self, results, options) - if result_cluster_client.ping - res.index!(result_cluster_client) - puts "#{'*' * 5} Indexed results #{'*' * 5} \n" - else - puts "#{'*' * 5} Results cluster not available, did not index results #{'*' * 5} \n" - end - res.results_doc - rescue => ex - puts "Could not index results, due to #{ex.class}.\n" - puts "Error: #{ex}.\n" - puts "#{ex.backtrace[0..15]}" - end - - def result_cluster_client - @result_cluster_client ||= begin - opts = { host: ES_RESULT_CLUSTER_URL } - opts.merge!(user: ES_RESULT_CLUSTER_USERNAME) if ES_RESULT_CLUSTER_USERNAME - opts.merge!(password: ES_RESULT_CLUSTER_PASSWORD) if ES_RESULT_CLUSTER_PASSWORD - Elasticsearch::Client.new(opts) - end - end - end - end -end diff --git a/profile/benchmarking/results.rb b/profile/benchmarking/results.rb deleted file mode 100644 index ecddb68e8b..0000000000 --- a/profile/benchmarking/results.rb +++ /dev/null @@ -1,254 +0,0 @@ -# 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. - -module Elasticsearch - module Benchmarking - - # Class encapsulating formatting and indexing the results from a benchmarking run. - # - # @since 7.0.0 - class Results - - attr_reader :raw_results - - # String constant for unit of time elapsed. - # - # @since 7.0.0 - MILLISECONDS = 'milliseconds'.freeze - - # Create a Results object. - # - # @example Create a results object. - # Benchmarking::Results.new(task, [...], options) - # - # @param [ Elasticsearch::Benchmarking ] task The task that executed the benchmarking run. - # @param [ Array ] results An array of the results. - # @param [ Hash ] options The options. - # - # @since 7.0.0 - def initialize(task, results, options = {}) - @task = task - @raw_results = results.map { |r| r * 1000 } - @options = options - end - - # Index the results document into elasticsearch. - # - # @example Index the results. - # results.index!(client) - # - # @param [ Elasticsearch::Client ] client The client to use to index the results. - # - # @return [ Hash ] The results document. - # - # @since 7.0.0 - def index!(client) - create_index!(client) - client.index(index: index_name, body: results_doc) - results_doc - end - - # The document recording the benchmarking run results, to index into the results cluster. - # - # @example Get the results document. - # results.results_doc - # - # @return [ Hash ] The results document. - # - # @since 7.0.0 - def results_doc - @results_doc ||= begin - { '@timestamp' => Time.now.iso8601, - event: event_doc, - agent: agent_doc, - server: server_doc } - end - end - - private - - attr_reader :options - - DEFAULT_INDEX_NAME = 'benchmarking_results'.freeze - - DEFAULT_METRICS = ['median'].freeze - - CLIENT_NAME = 'elasticsearch-ruby-client'.freeze - - COMPLEXITIES = { Elasticsearch::Benchmarking::Simple => :simple, - Elasticsearch::Benchmarking::Complex => :complex }.freeze - - def action_iterations - options[:action_iterations] - end - - def index_name - options[:index_name] || DEFAULT_INDEX_NAME - end - - def create_index!(client) - unless client.indices.exists?(index: index_name) - client.indices.create(index: index_name) - end - end - - def event_doc - { description: description, - category: category, - action: action, - duration: duration, - statistics: statistics_doc, - repetitions: repetitions_doc }.tap do |doc| - doc.merge!(dataset: dataset, - dataset_details: dataset_details) if dataset - end - end - - def description - @task.description - end - - def category - COMPLEXITIES[@task.class] - end - - def action - @options[:operation] - end - - - def dataset - @options[:dataset] - end - - def dataset_details - { size: @options[:dataset_size], - num_documents: @options[:dataset_n_documents] } - end - - def duration - @options[:duration] * 1000 - end - - def statistics_doc - { unit: MILLISECONDS, - mean: mean, - median: median, - max: max, - min: min, - standard_deviation: standard_deviation - } - end - - def median - raw_results.sort![raw_results.size / 2 - 1] - end - - def mean - raw_results.inject { |sum, el| sum + el }.to_f / raw_results.size - end - - def max - raw_results.max - end - - def min - raw_results.min - end - - def standard_deviation - return 0 if raw_results.size < 2 - Math.sqrt(sample_variance) - end - - def sample_variance - m = mean - sum = raw_results.inject(0) { |sum, i| sum +(i-m)**2 } - sum/(raw_results.length - 1).to_f - end - - def repetitions_doc - { warmup: @task.warmup_repetitions, - measured: @task.measured_repetitions, - iterations: action_iterations } - end - - def agent_doc - { version: Elasticsearch::VERSION, - name: CLIENT_NAME, - git: git_doc, - language: language_doc, - os: client_os_doc, - adapter: adapter } - end - - def adapter - @task.client_adapter - end - - def git_doc - sha = `git rev-parse HEAD` - branch = /\* (.+)/.match(`git branch`)[1] - commit_message = `git log -1 --pretty=%B` - repository = 'elasticsearch-ruby' - - { branch: branch, - sha: sha.chomp, - commit_message: commit_message.gsub(/\n/, ''), - repository: repository.chomp } - end - - def language_doc - version = [ - RUBY_VERSION, - RUBY_PLATFORM, - RbConfig::CONFIG['build'] - ].compact.join(', ') - { runtime_version: version } - end - - def client_os_doc - { platform: platform, - type: type, - architecture: architecture } - end - - def type - (RbConfig::CONFIG && RbConfig::CONFIG['host_os']) ? - RbConfig::CONFIG['host_os'].split('_').first[/[a-z]+/i].downcase : 'unknown' - end - - def architecture - RbConfig::CONFIG['target_cpu'] - end - - def platform - [ - @platform, - RUBY_VERSION, - RUBY_PLATFORM, - RbConfig::CONFIG['build'] - ].compact.join(', ') - end - - def server_doc - { version: @task.server_version, - nodes_info: @task.nodes_info } - end - end - end -end diff --git a/profile/benchmarking/simple.rb b/profile/benchmarking/simple.rb deleted file mode 100644 index 7701f9bc4a..0000000000 --- a/profile/benchmarking/simple.rb +++ /dev/null @@ -1,404 +0,0 @@ -# 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. - -require 'objspace' - -module Elasticsearch - module Benchmarking - - # Class encapsulating all settings and functionality for running benchmarking - # tasks making simple requests. - # - # @since 7.0.0 - class Simple - include Measurable - - # Test sending a ping request. - # - # @example Test sending a ping request. - # task.ping(opts) - # - # @param [ Hash ] opts The test run options. - # - # @results [ Hash ] The results document. - # - # @since 7.0.0 - def ping(opts = {}) - results = [] - action_iterations = 1_000 - - warmup_repetitions.times { client.ping } - - duration = Benchmark.realtime do - results = measured_repetitions.times.collect do - Benchmark.realtime do - action_iterations.times do - client.ping - end - end - end - end - - options = { duration: duration, - operation: __method__, - action_iterations: action_iterations } - index_results!(results, options) - end - - # Test sending a create_index request. - # - # @example Test sending a create index request. - # task.create_index(opts) - # - # @param [ Hash ] opts The test run options. - # - # @results [ Hash ] The results document. - # - # @since 7.0.0 - def create_index(opts = {}) - results = [] - action_iterations = 10 - - warmup_repetitions.times do - client.indices.create(index: "benchmarking-#{Time.now.to_f}") - end - - duration = with_cleanup do - Benchmark.realtime do - results = measured_repetitions.times.collect do |i| - index_names = action_iterations.times.collect { |j| (measured_repetitions*i) + j } - Benchmark.realtime do - action_iterations.times do |j| - client.indices.create(index: "benchmarking-#{index_names[j]}") - end - end - end - end - end - - options = { duration: duration, - operation: __method__, - action_iterations: action_iterations } - index_results!(results, options) - end - - # Test sending an index document request for a small document. - # - # @example Test sending an index document request. - # task.index_document_small - # - # @param [ Hash ] opts The test run options. - # - # @results [ Hash ] The results document. - # - # @since 7.0.0 - def index_document_small(opts={}) - results = [] - document = small_document - action_iterations = 10 - - warmup_repetitions.times do - client.create(index: INDEX, body: document) - end - - duration = with_cleanup do - Benchmark.realtime do - results = measured_repetitions.times.collect do - Benchmark.realtime do - action_iterations.times do - client.create(index: INDEX, body: document) - end - end - end - end - end - - options = { duration: duration, - operation: __method__, - dataset: 'small_document', - dataset_size: ObjectSpace.memsize_of(small_document), - dataset_n_documents: 1, - action_iterations: action_iterations } - index_results!(results, options) - end - - # Test sending an index document request for a large document. - # - # @example Test sending an index document request. - # task.index_document_large - # - # @param [ Hash ] opts The test run options. - # - # @results [ Hash ] The results document. - # - # @since 7.0.0 - def index_document_large(opts={}) - results = [] - document = large_document - action_iterations = 1_000 - - warmup_repetitions.times do - client.create(index: INDEX, body: document) - end - - duration = with_cleanup do - Benchmark.realtime do - results = measured_repetitions.times.collect do - Benchmark.realtime do - action_iterations.times do - client.create(index: INDEX, body: document) - end - end - end - end - end - - options = { duration: duration, - operation: __method__, - dataset: 'large_document', - dataset_size: ObjectSpace.memsize_of(large_document), - dataset_n_documents: 1, - action_iterations: action_iterations } - index_results!(results, options) - end - - # Test sending a get document request for a small document. - # - # @example Test sending a get document request. - # Benchmarking::Simple.get_document_small - # - # @param [ Hash ] opts The test run options. - # - # @results [ Hash ] The results document. - # - # @since 7.0.0 - def get_document_small(opts={}) - results = [] - action_iterations = 1_000 - - duration = with_cleanup do - id = client.create(index: INDEX, body: small_document)['_id'] - warmup_repetitions.times do - client.get(index: INDEX, id: id) - end - - Benchmark.realtime do - results = measured_repetitions.times.collect do - Benchmark.realtime do - action_iterations.times do - client.get(index: INDEX, id: id) - end - end - end - end - end - - options = { duration: duration, - operation: __method__, - dataset: 'small_document', - dataset_size: ObjectSpace.memsize_of(small_document), - dataset_n_documents: 1, - action_iterations: action_iterations } - index_results!(results, options) - end - - # Test sending a get document request for a large document. - # - # @example Test sending a get document request. - # Benchmarking::Simple.get_document_large - # - # @param [ Hash ] opts The test run options. - # - # @results [ Hash ] The results document. - # - # @since 7.0.0 - def get_document_large(opts={}) - duration = 0 - results = [] - action_iterations = 1_000 - - duration = with_cleanup do - id = client.create(index: INDEX, body: large_document)['_id'] - warmup_repetitions.times do - client.get(index: INDEX, id: id) - end - - Benchmark.realtime do - results = measured_repetitions.times.collect do - Benchmark.realtime do - action_iterations.times do - client.get(index: INDEX, id: id) - end - end - end - end - end - - options = { duration: duration, - operation: __method__, - dataset: 'large_document', - dataset_size: ObjectSpace.memsize_of(large_document), - dataset_n_documents: 1, - action_iterations: action_iterations } - index_results!(results, options) - end - - # Test sending a search request and retrieving a small document. - # - # @example Test sending a search request for a small document. - # task.search_document_small - # - # @param [ Hash ] opts The test run options. - # - # @results [ Hash ] The results documents. - # - # @since 7.0.0 - def search_document_small(opts={}) - duration = 0 - results = [] - action_iterations = 1_000 - - duration = with_cleanup do - client.create(index: INDEX, body: small_document) - search_criteria = { match: { cuisine: 'mexican' } } - request = { body: { query: search_criteria } } - if noop_plugin? - Elasticsearch::API.const_set('UNDERSCORE_SEARCH', '_noop_search') - else - request.merge!(index: INDEX) - end - - warmup_repetitions.times do - client.search(request) - end - - Benchmark.realtime do - results = measured_repetitions.times.collect do - Benchmark.realtime do - action_iterations.times do - client.search(request) - end - end - end - end - end - - options = { duration: duration, - operation: __method__, - dataset: 'small_document', - dataset_size: ObjectSpace.memsize_of(small_document), - dataset_n_documents: 1, - action_iterations: action_iterations } - index_results!(results, options) - end - - # Test sending a search request and retrieving a large document. - # - # @example Test sending a search request for a large document. - # task.search_document_large - # - # @param [ Hash ] opts The test run options. - # - # @results [ Hash ] The results documents. - # - # @since 7.0.0 - def search_document_large(opts={}) - results = [] - action_iterations = 1_000 - - duration = with_cleanup do - client.create(index: INDEX, body: large_document) - search_criteria = { match: { 'user.lang': 'en' } } - request = { body: { query: search_criteria } } - if noop_plugin? - Elasticsearch::API.const_set('UNDERSCORE_SEARCH', '_noop_search') - else - request.merge!(index: INDEX) - end - warmup_repetitions.times do - client.search(request) - end - - Benchmark.realtime do - results = measured_repetitions.times.collect do - Benchmark.realtime do - action_iterations.times do - client.search(request) - end - end - end - end - end - - options = { duration: duration, - operation: __method__, - dataset: 'large_document', - dataset_size: ObjectSpace.memsize_of(large_document), - dataset_n_documents: 1, - action_iterations: action_iterations } - index_results!(results, options) - end - - # Test sending a update request for a small document. - # - # @example Test sending an update request for a small document. - # Benchmarking::Simple.update_document - # - # @param [ Hash ] opts The test run options. - # - # @results [ Hash ] The results documents. - # - # @since 7.0.0 - def update_document(opts={}) - results = [] - action_iterations = 1_000 - - duration = with_cleanup do - document = small_document - id = client.create(index: INDEX, body: document)['_id'] - field = document.find { |k,v| k != 'id' && v.is_a?(String) }.first - - warmup_repetitions.times do |i| - client.update(index: INDEX, - id: id, - body: { doc: { field: "#{document[field]}-#{i}" } }) - end - - Benchmark.realtime do - results = measured_repetitions.times.collect do - Benchmark.realtime do - action_iterations.times do |i| - client.update(index: INDEX, - id: id, - body: { doc: { field: "#{document[field]}-#{i}" } }) - end - end - end - end - end - - options = { duration: duration, - operation: __method__, - dataset: 'small_document', - dataset_size: ObjectSpace.memsize_of(small_document), - dataset_n_documents: 1, - action_iterations: action_iterations } - index_results!(results, options) - end - end - end -end diff --git a/profile/matrix.yml b/profile/matrix.yml deleted file mode 100644 index d331ff58d6..0000000000 --- a/profile/matrix.yml +++ /dev/null @@ -1,16 +0,0 @@ -- description: Basic benchmark, 5 repetitions - repetitions: - warmup: 1 - measured: 5 - metrics: - - mean - - median - - max - - min - -- description: Ten Repetitions - repetitions: - warmup: 5 - measured: 10 - metrics: - - mean \ No newline at end of file From 8de7406a7090f799c266df7435c625f62c25cc40 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 7 Nov 2024 09:52:56 +0000 Subject: [PATCH 386/540] Adds version task --- rake_tasks/automation.rake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rake_tasks/automation.rake b/rake_tasks/automation.rake index 6edce27267..4320bb508b 100644 --- a/rake_tasks/automation.rake +++ b/rake_tasks/automation.rake @@ -122,4 +122,9 @@ namespace :automation do File.open(file, 'w') { |f| f.puts content } end end + + desc 'Show current client version' + task :version do + puts Elasticsearch::VERSION + end end From 66c6ddc04436c8a71044583409717ea7adc2b664 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 7 Nov 2024 09:56:46 +0000 Subject: [PATCH 387/540] Removes outdated rake tasks --- Rakefile | 1 - rake_tasks/update_version.rake | 111 --------------------------------- 2 files changed, 112 deletions(-) delete mode 100644 rake_tasks/update_version.rake diff --git a/Rakefile b/Rakefile index 605b210a33..3d1cbacdea 100644 --- a/Rakefile +++ b/Rakefile @@ -51,7 +51,6 @@ import 'rake_tasks/elasticsearch_tasks.rake' import 'rake_tasks/test_tasks.rake' import 'rake_tasks/doc_generator.rake' import 'rake_tasks/docker_tasks.rake' -import 'rake_tasks/update_version.rake' require 'pathname' CURRENT_PATH = Pathname(File.expand_path(__dir__)) diff --git a/rake_tasks/update_version.rake b/rake_tasks/update_version.rake deleted file mode 100644 index bd59232768..0000000000 --- a/rake_tasks/update_version.rake +++ /dev/null @@ -1,111 +0,0 @@ -# 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. - -desc <<-DESC - Update Rubygems versions in version.rb and *.gemspec files - - Example: - - $ rake update_version[5.0.0,5.0.1] -DESC -task :update_version, :old, :new do |_, args| - require 'ansi' - - puts '[!!!] Required argument [old] missing'.ansi(:red) unless args[:old] - puts '[!!!] Required argument [new] missing'.ansi(:red) unless args[:new] - - files = Dir['**/**/version.rb','**/**/*.gemspec'] - - longest_line = files.map(&:size).max - - puts "\n", '= FILES '.ansi(:faint) + ('='*92).ansi(:faint), "\n" - - files.each do |file| - begin - content = File.read(file) - if content.match Regexp.new(args[:old]) - content.gsub! Regexp.new(args[:old]), args[:new] - puts "+ [#{file}]".ansi(:green).ljust(longest_line+20) + " [#{args[:old]}] -> [#{args[:new]}]".ansi(:green,:bold) - File.open(file, 'w') { |f| f.puts content } - else - puts "- [#{file}]".ansi(:yellow).ljust(longest_line+20) + " -".ansi(:faint,:strike) - end - rescue Exception => e - puts "[!!!] #{e.class} : #{e.message}".ansi(:red,:bold) - raise e - end - end -end - -task :update_changelog do - puts "\n\n", '= CHANGELOG '.ansi(:faint) + ('='*88).ansi(:faint), "\n" - - log = `git --no-pager log --reverse --no-color --pretty='* %s' HEAD --not v#{args[:old]} elasticsearch*`.split("\n") - - puts log.join("\n") - - log_entries = {} - log_entries[:client] = log.select { |l| l =~ /\[CLIENT\]/ } - log_entries[:api] = log.select { |l| l =~ /\[API\]/ } - - changelog = File.read(File.open('CHANGELOG.md', 'r')) - - changelog_update = '' - - if log.any? { |l| l =~ /CLIENT|API/ } - changelog_update << "## #{args[:new]}\n\n" - end - - unless log_entries[:client].empty? - changelog_update << "### Client\n\n" - changelog_update << log_entries[:client] - .map { |l| l.gsub /\[CLIENT\] /, '' } - .map { |l| "#{l}" } - .join("\n") - changelog_update << "\n\n" - end - - unless log_entries[:api].empty? - changelog_update << "### API\n\n" - changelog_update << log_entries[:api] - .map { |l| l.gsub /\[API\] /, '' } - .map { |l| "#{l}" } - .join("\n") - changelog_update << "\n\n" - end - - File.open('CHANGELOG.md', 'w+') { |f| f.write changelog_update and f.write changelog } - - puts "\n\n", "= DIFF ".ansi(:faint) + ('='*93).ansi(:faint) - - diff = `git --no-pager diff --patch --word-diff=color --minimal elasticsearch*`.split("\n") - - puts diff - .reject { |l| l =~ /^\e\[1mdiff \-\-git/ } - .reject { |l| l =~ /^\e\[1mindex [a-z0-9]{7}/ } - .reject { |l| l =~ /^\e\[1m\-\-\- i/ } - .reject { |l| l =~ /^\e\[36m@@/ } - .map { |l| l =~ /^\e\[1m\+\+\+ w/ ? "\n#{l} " + '-'*(104-l.size) : l } - .join("\n") - - puts "\n\n", '= COMMIT '.ansi(:faint) + ('='*91).ansi(:faint), "\n" - - puts 'git add CHANGELOG.md elasticsearch*', - "git commit --verbose --message='Release #{args[:new]}' --edit", - 'rake release', - '' -end From 2f7b405280519915f9f7279f51386ad16fb9a7df Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 7 Nov 2024 14:31:53 +0000 Subject: [PATCH 388/540] [DOCS] Updates elasticsearch-api docs --- elasticsearch-api/README.md | 18 +++++++++--------- elasticsearch-api/lib/elasticsearch/api.rb | 2 ++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/elasticsearch-api/README.md b/elasticsearch-api/README.md index c87ec9ab5d..30d4489ed6 100644 --- a/elasticsearch-api/README.md +++ b/elasticsearch-api/README.md @@ -4,7 +4,7 @@ **Refer to the [official documentation on Elasticsearch API](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/api.html).** -The `elasticsearch-api` library provides a Ruby implementation of the [Elasticsearch](http://elasticsearch.com) REST API. It does not provide an Elasticsearch client; see the [`elastic-transport`](https://github.com/elastic/elastic-transport-ruby/) library. +The `elasticsearch-api` library provides a Ruby implementation of the [Elasticsearch](http://elasticsearch.com) REST API. It does not provide an Elasticsearch client. See [elasticsearch](https://github.com/elastic/elasticsearch-ruby) and the [`elastic-transport`](https://github.com/elastic/elastic-transport-ruby/) libraries for a full Elasticsearch client and HTTP transport layer respectively. We follow Ruby’s own maintenance policy and officially support all currently maintained versions per [Ruby Maintenance Branches](https://www.ruby-lang.org/en/downloads/branches/). @@ -15,17 +15,17 @@ Language clients are forward compatible; meaning that clients support communicat Refer to [CONTRIBUTING](https://github.com/elastic/elasticsearch-ruby/blob/main/CONTRIBUTING.md). -We run the test suite for Elasticsearch's Rest API tests. You can read more about this in [the test runner README](https://github.com/elastic/elasticsearch-ruby/tree/main/api-spec-testing#rest-api-yaml-test-runner). +The integration tests on this project run the [Elasticsearch Client tests](https://github.com/elastic/elasticsearch-clients-tests/) with the [Elasticsearch Tests Runner](https://github.com/elastic/es-test-runner-ruby/) library. This runs in CI against an Elasticsearch cluster in Docker. You can run a docker container with Elasticsearch with a Rake task from the root directory of this project: -The `rest_api` task needs the test files from Elasticsearch. You can run the rake task to download the test artifacts in the root folder of the project. You can pass in a version to the task as a parameter: +```bash +$ rake es:up +``` -`rake download_artifacts[8.5.0-SNAPSHOT]` +This will start whatever version of Elasticsearch is set in the Buildkite pipeline file (`../.buildkite/pipeline.yml`) with security enabled. You can also specify a version and a suite ('free' or 'platinum' for security disabled/enabled): -Or it can get the version from a running cluster to determine which version and build hash of Elasticsearch to use and test against: - -`TEST_ES_SERVER=http://localhost:9200 rake es:download_artifacts` - -This will download the necessary files used for the integration tests to `./tmp`. +```bash +$ rake es:start[version,suite] # e.g. rake es:start[9.0.0-SNAPSHOT, free] +``` ### Code generation diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index 02ec70f9ea..1a8471002e 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -27,6 +27,8 @@ Dir[ File.expand_path('../api/namespace/**/*.rb', __FILE__) ].each { |f| require f } module Elasticsearch + # This is the main module for including all API endpoint functions + # It includes the namespace modules from ./api/actions module API DEFAULT_SERIALIZER = MultiJson From eaa00a61c9ec2bf4688256466b20065a972839bf Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 7 Nov 2024 14:32:12 +0000 Subject: [PATCH 389/540] Rake tasks: Streamlines es namespace --- rake_tasks/docker_tasks.rake | 29 ++++++++++++++--------------- rake_tasks/elasticsearch_tasks.rake | 3 +-- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/rake_tasks/docker_tasks.rake b/rake_tasks/docker_tasks.rake index b26af2b60b..478ecd7d42 100644 --- a/rake_tasks/docker_tasks.rake +++ b/rake_tasks/docker_tasks.rake @@ -16,40 +16,39 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -require 'mkmf' -namespace :docker do +require 'mkmf' # For find_executable + +namespace :es do desc <<~DOC Start Elasticsearch in a Docker container. Default: - rake docker:start[version] + rake es:start[version] E.g.: - rake docker:start[7.x-SNAPSHOT] + rake es:start[9.x-SNAPSHOT] To start the container with Platinum, pass it in as a parameter: - rake docker:start[7.x-SNAPSHOT,platinum] + rake es:start[9.x-SNAPSHOT,platinum] DOC task :start, [:version, :suite] do |_, params| abort 'Docker not installed' unless find_executable 'docker' - abort 'You need to set a version, e.g. rake docker:start[7.x-SNAPSHOT]' unless params[:version] + abort 'You need to set a version, e.g. rake docker:start[9.x-SNAPSHOT]' unless params[:version] test_suite = params[:suite] || 'free' system("STACK_VERSION=#{params[:version]} TEST_SUITE=#{test_suite} ./.buildkite/run-elasticsearch.sh") end -end -namespace :es do desc <<~DOC Start Elasticsearch docker container (shortcut), reads STACK_VERSION from buildkite pipeline DOC task :up do - version = File.read('./.buildkite/pipeline.yml'). - split("\n"). - select { |a| a.include? 'STACK_VERSION' } - .first - .strip - .gsub('STACK_VERSION: ','') - Rake.application.invoke_task("docker:start[#{version}]") + version = File.read('./.buildkite/pipeline.yml') + .split("\n") + .select { |a| a.include? 'STACK_VERSION' } + .first + .strip + .gsub('STACK_VERSION: ', '') + Rake.application.invoke_task("es:start[#{version}, platinum]") end end diff --git a/rake_tasks/elasticsearch_tasks.rake b/rake_tasks/elasticsearch_tasks.rake index a38989ab85..9d7deb50a5 100644 --- a/rake_tasks/elasticsearch_tasks.rake +++ b/rake_tasks/elasticsearch_tasks.rake @@ -44,9 +44,8 @@ namespace :es do desc 'Automatically update to latest version' task :autoupdate_version do require 'tempfile' - branch = `git branch --show-current`.strip - url = "https://snapshots.elastic.co/latest/#{branch}.json" + url = "https://artifacts-snapshot.elastic.co/elasticsearch/latest/#{branch}.json" file = Tempfile.new('version') download_file!(url, file) version = JSON.parse(file.read)['version'] From d574d0fd138989028f271c1891f3d2713b9cf922 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 12 Nov 2024 11:32:53 +0000 Subject: [PATCH 390/540] Automation: Updates bumpmatrix task Fixes getting yaml tests branch since previous step was removed from Buildkite pipeline. Exit loop if new version equals old version --- rake_tasks/automation.rake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rake_tasks/automation.rake b/rake_tasks/automation.rake index 4320bb508b..c95bc548db 100644 --- a/rake_tasks/automation.rake +++ b/rake_tasks/automation.rake @@ -107,7 +107,7 @@ namespace :automation do require 'yaml' yaml = YAML.safe_load(content) branch = version.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1] - yaml_tests_branch = yaml['steps'][1]['env']['ES_YAML_TESTS_BRANCH'] + yaml_tests_branch = yaml['steps'][0]['env']['ES_YAML_TESTS_BRANCH'] next if yaml_tests_branch == 'main' content.gsub!(yaml_tests_branch, branch) @@ -117,6 +117,8 @@ namespace :automation do next if match.nil? old_version = match[1] + next if old_version == args[:version] + content.gsub!(old_version, args[:version]) puts "[#{old_version}] -> [#{version}] in #{file.gsub('./', '')}" File.open(file, 'w') { |f| f.puts content } From 3ef769123afdbb4c6fc4776a4b71a6e568eaa394 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 12 Nov 2024 18:01:19 +0000 Subject: [PATCH 391/540] Updates build badges on README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9178cb70f2..f519dbc53c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Elasticsearch -[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.14](https://github.com/elastic/elasticsearch-ruby/actions/workflows/tests.yml/badge.svg?branch=8.14)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/tests.yml) [![8.15](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.15.yml/badge.svg?branch=8.15)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.15.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) +[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.15](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.15.yml/badge.svg?branch=8.15)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.15.yml) [![8.16](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.16.yml/badge.svg?branch=8.16)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.16.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) **[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)** or From 44ad89ffa812950def259e8601bc209671432faf Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 18 Nov 2024 10:20:17 +0000 Subject: [PATCH 392/540] Fixes codegen rake task --- rake_tasks/automation.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/rake_tasks/automation.rake b/rake_tasks/automation.rake index c95bc548db..1f7dfe77f9 100644 --- a/rake_tasks/automation.rake +++ b/rake_tasks/automation.rake @@ -16,6 +16,7 @@ # under the License. require 'fileutils' +require 'yaml' require_relative '../elasticsearch/lib/elasticsearch/version' namespace :automation do From 0f83aa6eb4af23e95cb670fb2f882f22a901386e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 18 Nov 2024 10:20:35 +0000 Subject: [PATCH 393/540] [API] Updates inference APIs, migrated from experimental to stable --- .../lib/elasticsearch/api/actions/inference/delete.rb | 4 ---- .../lib/elasticsearch/api/actions/inference/get.rb | 4 ---- .../lib/elasticsearch/api/actions/inference/inference.rb | 4 ---- .../lib/elasticsearch/api/actions/inference/put.rb | 4 ---- .../elasticsearch/api/actions/inference/stream_inference.rb | 4 ---- 5 files changed, 20 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb index f9186d3c76..02d5f328cd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb @@ -23,10 +23,6 @@ module API module Inference module Actions # Delete an inference endpoint - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb index cb227aa9b2..a3fec86adb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb @@ -23,10 +23,6 @@ module API module Inference module Actions # Get an inference endpoint - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb index de5e7b797c..1e7fd39d7c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb @@ -23,10 +23,6 @@ module API module Inference module Actions # Perform inference - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb index 9d485bcd17..aabcd25a4e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb @@ -23,10 +23,6 @@ module API module Inference module Actions # Configure an inference endpoint for use in the Inference API - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb index 06edf4726f..539b4922a1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb @@ -23,10 +23,6 @@ module API module Inference module Actions # Perform streaming inference - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type From 73ad06bfbc5d517768a7074b38dd2154ef7dea08 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 13 Nov 2024 10:05:07 +0000 Subject: [PATCH 394/540] YAML test runner: Ability to run SINGLE_TEST --- elasticsearch-api/spec/yaml-test-runner/run.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index c25c3a71c3..67bf2e565a 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -64,4 +64,4 @@ current_branch = `git rev-parse --abbrev-ref HEAD`.strip branch = current_branch.match(/[0-9]\.[0-9]+/)&.[](0) || ENV['ES_YAML_TESTS_BRANCH'] || nil Elasticsearch::Tests::Downloader::run(tests_path, branch) -Elasticsearch::Tests::TestRunner.new(CLIENT, tests_path, logger).run +Elasticsearch::Tests::TestRunner.new(CLIENT, tests_path, logger).run(ENV['SINGLE_TEST'] || []) From 0630fd18222398910cd94e2236068d99f6644fcc Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 7 Nov 2024 14:45:25 +0000 Subject: [PATCH 395/540] [CI] Log test results to a file in Buildkite --- .buildkite/pipeline.yml | 2 ++ elasticsearch-api/spec/yaml-test-runner/run.rb | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 7458881c7d..47724d0f5f 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -33,7 +33,9 @@ steps: TRANSPORT_VERSION: "{{ matrix.transport }}" RUBY_SOURCE: "{{ matrix.ruby_source }}" TEST_SUITE: "platinum" + DEBUG: true command: ./.buildkite/run-yaml-tests.sh + artifact_paths: "elasticsearch-api/tmp/*" - wait: ~ continue_on_failure: true - label: "Log Results" diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index 67bf2e565a..f29d91922e 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -56,9 +56,9 @@ end tests_path = File.expand_path('./tmp', __dir__) - -logger = Logger.new($stdout) -logger.level = Logger::WARN unless ENV['DEBUG'] +logfile = File.expand_path "../../tmp/tests-#{Elasticsearch::VERSION}-transport-#{ENV['TRANSPORT_VERSION']}-ruby-#{ENV['RUBY_VERSION']}.log", __dir__ +logger = Logger.new(File.open(logfile, 'w')) +logger.level = ENV['DEBUG'] ? Logger::DEBUG : Logger::WARN # If we're running in a release branch, download the corresponding branch for tests current_branch = `git rev-parse --abbrev-ref HEAD`.strip From 0dfaaedaac6771803342af4dd235cfde5fa2f1e5 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 19 Nov 2024 10:41:28 +0000 Subject: [PATCH 396/540] [CI] Updates logging and script for buildkite summary --- .buildkite/log-results.sh | 31 +++++-------------- .buildkite/run-yaml-tests.sh | 1 + .../spec/yaml-test-runner/run.rb | 8 ++++- 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/.buildkite/log-results.sh b/.buildkite/log-results.sh index 913c2a7277..85963fa432 100755 --- a/.buildkite/log-results.sh +++ b/.buildkite/log-results.sh @@ -5,33 +5,18 @@ buildkite-agent annotate --style info "## :rspec: Tests summary :rspec: " buildkite-agent artifact download "elasticsearch-api/tmp/*" . -# Test result summary: -files="elasticsearch-api/tmp/*.html" +files="elasticsearch-api/tmp/*.log" for f in $files; do - TEST_SUITE=`echo $f | grep -o "\(free\|platinum\)"` - RUBY_VERSION=`echo $f | grep -Po "(jruby-|\d+\.)+\d+"` - EXAMPLES=`cat $f | grep -o "[0-9]\+ examples\?" | tail -1` - FAILURES=`cat $f | grep -o "[0-9]\+ failures\?" | tail -1` - PENDING=`cat $f | grep -o "[0-9]\+ pending" | tail -1` + RUBY_VERSION=`echo $f | grep -Po "(j?ruby-|\d+\.)+\d+" | tail -1` + TRANSPORT_VERSION=`echo $f | grep -Po "transport-([\d.]+|main)"` buildkite-agent annotate --append " -:ruby: $RUBY_VERSION :test_tube: $TEST_SUITE :rspec: $EXAMPLES - :x: $FAILURES - :suspect: $PENDING +:ruby: $RUBY_VERSION :phone: $TRANSPORT_VERSION `tail --lines=2 $f | awk -F "-- :" '{print $2}'` + " -done -# Failed tests: -files="elasticsearch-api/tmp/*.log" -for f in $files; do - FAILED_TESTS=`awk 'BEGIN { FS = " | "}; /\| failed \|/{ print $1 }' $f | uniq` + FAILED_TESTS=`grep "E," $f` if [[ -n "$FAILED_TESTS" ]]; then - buildkite-agent annotate --append " -#### Failures in $f -" - FAILURES_ARRAY=($(echo $FAILED_TESTS | tr ' ' "\n")) - for f in "${FAILURES_ARRAY[@]}" - do - buildkite-agent annotate --append " -- $f -" - done + buildkite-agent annotate --append "#### Failures in $f " + buildkite-agent annotate --append `grep "E," $f | awk -F '-- :' '{print $2}'` fi done diff --git a/.buildkite/run-yaml-tests.sh b/.buildkite/run-yaml-tests.sh index ba04b78cad..a463972037 100644 --- a/.buildkite/run-yaml-tests.sh +++ b/.buildkite/run-yaml-tests.sh @@ -37,6 +37,7 @@ docker run \ --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ --env "STACK_VERSION=${STACK_VERSION}" \ --env "ES_YAML_TESTS_BRANCH=${ES_YAML_TESTS_BRANCH}" \ + --env "DEBUG=${DEBUG}" \ --volume $repo:/usr/src/app \ --name elasticsearch-ruby \ --rm \ diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index f29d91922e..53ea8ea134 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -56,7 +56,13 @@ end tests_path = File.expand_path('./tmp', __dir__) -logfile = File.expand_path "../../tmp/tests-#{Elasticsearch::VERSION}-transport-#{ENV['TRANSPORT_VERSION']}-ruby-#{ENV['RUBY_VERSION']}.log", __dir__ +ruby_version = if defined? JRUBY_VERSION + "jruby-#{JRUBY_VERSION}" + else + "ruby-#{RUBY_VERSION}" + end +log_filename = "es-#{Elasticsearch::VERSION}-transport-#{ENV['TRANSPORT_VERSION']}-#{ruby_version}.log" +logfile = File.expand_path "../../tmp/#{log_filename}", __dir__ logger = Logger.new(File.open(logfile, 'w')) logger.level = ENV['DEBUG'] ? Logger::DEBUG : Logger::WARN From 30c8fbc21a7ebbb0e8afe83ded43f4abcbda635c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 20 Nov 2024 12:47:58 +0000 Subject: [PATCH 397/540] [DOCS] Minor updates in styling for Example docs --- docs/examples.asciidoc | 52 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/examples.asciidoc b/docs/examples.asciidoc index 49afcaf3a5..22e9619505 100644 --- a/docs/examples.asciidoc +++ b/docs/examples.asciidoc @@ -90,11 +90,11 @@ Index several documents in one request: ```ruby body = [ { index: { _index: 'books', _id: '42' } }, - { name: "The Hitchhiker's Guide to the Galaxy", author: 'Douglas Adams', release_date: '1979-10-12', page_count: 180}, + { name: "The Hitchhiker's Guide to the Galaxy", author: 'Douglas Adams', release_date: '1979-10-12', page_count: 180 }, { index: { _index: 'books', _id: '43' } }, { name: 'Snow Crash', author: 'Neal Stephenson', release_date: '1992-06-01', page_count: 470 }, { index: { _index: 'books', _id: '44' } }, - { name: 'Starship Troopers', author: 'Robert A. Heinlein', release_date: '1959-12-01', page_count: 335} + { name: 'Starship Troopers', author: 'Robert A. Heinlein', release_date: '1959-12-01', page_count: 335 } ] client.bulk(body: body) ``` @@ -134,30 +134,30 @@ First, bulk index it: [source,ruby] ---- body = [ - { index: { _index: 'books', data: {name: "Leviathan Wakes", "author": "James S.A. Corey", "release_date": "2011-06-02", "page_count": 561} } }, - { index: { _index: 'books', data: {name: "Hyperion", "author": "Dan Simmons", "release_date": "1989-05-26", "page_count": 482} } }, - { index: { _index: 'books', data: {name: "Dune", "author": "Frank Herbert", "release_date": "1965-06-01", "page_count": 604} } }, - { index: { _index: 'books', data: {name: "Dune Messiah", "author": "Frank Herbert", "release_date": "1969-10-15", "page_count": 331} } }, - { index: { _index: 'books', data: {name: "Children of Dune", "author": "Frank Herbert", "release_date": "1976-04-21", "page_count": 408} } }, - { index: { _index: 'books', data: {name: "God Emperor of Dune", "author": "Frank Herbert", "release_date": "1981-05-28", "page_count": 454} } }, - { index: { _index: 'books', data: {name: "Consider Phlebas", "author": "Iain M. Banks", "release_date": "1987-04-23", "page_count": 471} } }, - { index: { _index: 'books', data: {name: "Pandora's Star", "author": "Peter F. Hamilton", "release_date": "2004-03-02", "page_count": 768} } }, - { index: { _index: 'books', data: {name: "Revelation Space", "author": "Alastair Reynolds", "release_date": "2000-03-15", "page_count": 585} } }, - { index: { _index: 'books', data: {name: "A Fire Upon the Deep", "author": "Vernor Vinge", "release_date": "1992-06-01", "page_count": 613} } }, - { index: { _index: 'books', data: {name: "Ender's Game", "author": "Orson Scott Card", "release_date": "1985-06-01", "page_count": 324} } }, - { index: { _index: 'books', data: {name: "1984", "author": "George Orwell", "release_date": "1985-06-01", "page_count": 328} } }, - { index: { _index: 'books', data: {name: "Fahrenheit 451", "author": "Ray Bradbury", "release_date": "1953-10-15", "page_count": 227} } }, - { index: { _index: 'books', data: {name: "Brave New World", "author": "Aldous Huxley", "release_date": "1932-06-01", "page_count": 268} } }, - { index: { _index: 'books', data: {name: "Foundation", "author": "Isaac Asimov", "release_date": "1951-06-01", "page_count": 224} } }, - { index: { _index: 'books', data: {name: "The Giver", "author": "Lois Lowry", "release_date": "1993-04-26", "page_count": 208} } }, - { index: { _index: 'books', data: {name: "Slaughterhouse-Five", "author": "Kurt Vonnegut", "release_date": "1969-06-01", "page_count": 275} } }, - { index: { _index: 'books', data: {name: "The Hitchhiker's Guide to the Galaxy", "author": "Douglas Adams", "release_date": "1979-10-12", "page_count": 180} } }, - { index: { _index: 'books', data: {name: "Snow Crash", "author": "Neal Stephenson", "release_date": "1992-06-01", "page_count": 470} } }, - { index: { _index: 'books', data: {name: "Neuromancer", "author": "William Gibson", "release_date": "1984-07-01", "page_count": 271} } }, - { index: { _index: 'books', data: {name: "The Handmaid's Tale", "author": "Margaret Atwood", "release_date": "1985-06-01", "page_count": 311} } }, - { index: { _index: 'books', data: {name: "Starship Troopers", "author": "Robert A. Heinlein", "release_date": "1959-12-01", "page_count": 335} } }, - { index: { _index: 'books', data: {name: "The Left Hand of Darkness", "author": "Ursula K. Le Guin", "release_date": "1969-06-01", "page_count": 304} } }, - { index: { _index: 'books', data: {name: "The Moon is a Harsh Mistress", "author": "Robert A. Heinlein", "release_date": "1966-04-01", "page_count": 288 } } } + { index: { _index: 'books', data: { name: 'Leviathan Wakes', author: 'James S.A. Corey', release_date: '2011-06-02', page_count: 561 } } }, + { index: { _index: 'books', data: { name: 'Hyperion', author: 'Dan Simmons', release_date: '1989-05-26', page_count: 482 } } }, + { index: { _index: 'books', data: { name: 'Dune', author: 'Frank Herbert', release_date: '1965-06-01', page_count: 604 } } }, + { index: { _index: 'books', data: { name: 'Dune Messiah', author: 'Frank Herbert', release_date: '1969-10-15', page_count: 331 } } }, + { index: { _index: 'books', data: { name: 'Children of Dune', author: 'Frank Herbert', release_date: '1976-04-21', page_count: 408 } } }, + { index: { _index: 'books', data: { name: 'God Emperor of Dune', author: 'Frank Herbert', release_date: '1981-05-28', page_count: 454 } } }, + { index: { _index: 'books', data: { name: 'Consider Phlebas', author: 'Iain M. Banks', release_date: '1987-04-23', page_count: 471 } } }, + { index: { _index: 'books', data: { name: 'Pandora\'s Star', author: 'Peter F. Hamilton', release_date: '2004-03-02', page_count: 768 } } }, + { index: { _index: 'books', data: { name: 'Revelation Space', author: 'Alastair Reynolds', release_date: '2000-03-15', page_count: 585 } } }, + { index: { _index: 'books', data: { name: 'A Fire Upon the Deep', author: 'Vernor Vinge', release_date: '1992-06-01', page_count: 613 } } }, + { index: { _index: 'books', data: { name: 'Ender\'s Game', author: 'Orson Scott Card', release_date: '1985-06-01', page_count: 324 } } }, + { index: { _index: 'books', data: { name: '1984', author: 'George Orwell', release_date: '1985-06-01', page_count: 328 } } }, + { index: { _index: 'books', data: { name: 'Fahrenheit 451', author: 'Ray Bradbury', release_date: '1953-10-15', page_count: 227 } } }, + { index: { _index: 'books', data: { name: 'Brave New World', author: 'Aldous Huxley', release_date: '1932-06-01', page_count: 268 } } }, + { index: { _index: 'books', data: { name: 'Foundation', author: 'Isaac Asimov', release_date: '1951-06-01', page_count: 224 } } }, + { index: { _index: 'books', data: { name: 'The Giver', author: 'Lois Lowry', release_date: '1993-04-26', page_count: 208 } } }, + { index: { _index: 'books', data: { name: 'Slaughterhouse-Five', author: 'Kurt Vonnegut', release_date: '1969-06-01', page_count: 275 } } }, + { index: { _index: 'books', data: { name: 'The Hitchhiker\'s Guide to the Galaxy', author: 'Douglas Adams', release_date: '1979-10-12', page_count: 180 } } }, + { index: { _index: 'books', data: { name: 'Snow Crash', author: 'Neal Stephenson', release_date: '1992-06-01', page_count: 470 } } }, + { index: { _index: 'books', data: { name: 'Neuromancer', author: 'William Gibson', release_date: '1984-07-01', page_count: 271 } } }, + { index: { _index: 'books', data: { name: 'The Handmaid\'s Tale', author: 'Margaret Atwood', release_date: '1985-06-01', page_count: 311 } } }, + { index: { _index: 'books', data: { name: 'Starship Troopers', author: 'Robert A. Heinlein', release_date: '1959-12-01', page_count: 335 } } }, + { index: { _index: 'books', data: { name: 'The Left Hand of Darkness', author: 'Ursula K. Le Guin', release_date: '1969-06-01', page_count: 304 } } }, + { index: { _index: 'books', data: { name: 'The Moon is a Harsh Mistress', author: 'Robert A. Heinlein', release_date: '1966-04-01', page_count: 288 } } } ] client.bulk(body: body) ---- From 4925c5e4dc8492f7fefdc58113f2d0da8c7f4971 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 3 Dec 2024 14:11:29 +0000 Subject: [PATCH 398/540] [API] Updates async_search.submit and open_point_in_time async_search.submit: * Removes keep_alive * Adds css_minimize_roundtrips, rest_total_hits_as_int open_point_in_time: * Adds allow_partial_search_results --- .../lib/elasticsearch/api/actions/async_search/submit.rb | 3 ++- .../lib/elasticsearch/api/actions/open_point_in_time.rb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb index c782d56b3e..318b4e0e90 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb @@ -27,11 +27,11 @@ module Actions # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response # @option arguments [Boolean] :keep_on_completion Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false) - # @option arguments [Time] :keep_alive Update the time interval in which the results (partial or final) for this search will be available # @option arguments [Number] :batched_reduce_size The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available. # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to true # @option arguments [String] :analyzer The analyzer to use for the query string # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false) + # @option arguments [Boolean] :ccs_minimize_roundtrips When doing a cross-cluster search, setting it to true may improve overall search latency, particularly when searching clusters with a large number of shards. However, when set to true, the progress of searches on the remote clusters will not be received until the search finishes on all clusters. # @option arguments [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR) # @option arguments [String] :df The field to use as default where no field prefix is given in the query string # @option arguments [Boolean] :explain Specify whether to return detailed information about score computation as part of a hit @@ -44,6 +44,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) + # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response # @option arguments [String] :q Query in the Lucene query string syntax # @option arguments [List] :routing A comma-separated list of specific routing values # @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb index 3324db458f..79bda5d140 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb @@ -29,6 +29,7 @@ module Actions # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [String] :keep_alive Specific the time to live for the point in time (*Required*) + # @option arguments [Boolean] :allow_partial_search_results Specify whether to tolerate shards missing when creating the point-in-time, or otherwise throw an exception. (default: false) # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An index_filter specified with the Query DSL # From 683e80bf6bf1e4e36cd0fc1ff4f6104160775ec7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 5 Dec 2024 13:58:33 +0000 Subject: [PATCH 399/540] [Gem] Updates gemspecs so unnecessary files are not included in build --- elasticsearch-api/elasticsearch-api.gemspec | 4 +++- elasticsearch/elasticsearch.gemspec | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/elasticsearch-api.gemspec b/elasticsearch-api/elasticsearch-api.gemspec index f2149ebda2..edf2593d13 100644 --- a/elasticsearch-api/elasticsearch-api.gemspec +++ b/elasticsearch-api/elasticsearch-api.gemspec @@ -34,7 +34,9 @@ Gem::Specification.new do |s| 'source_code_uri' => 'https://github.com/elastic/elasticsearch-ruby/tree/main/elasticsearch-api', 'bug_tracker_uri' => 'https://github.com/elastic/elasticsearch-ruby/issues' } - s.files = `git ls-files`.split($/) + s.files = `git ls-files`.split($/).reject do |file| + file.match(/^utils\/|^spec\/|^api-spec-testing\/|^Gemfile|^Rakefile/) + end s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) } s.test_files = s.files.grep(%r{^(test|spec|features)/}) s.require_paths = ['lib'] diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index c30c83e263..89b824e36a 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -33,7 +33,10 @@ Gem::Specification.new do |s| 'source_code_uri' => 'https://github.com/elastic/elasticsearch-ruby/tree/main', 'bug_tracker_uri' => 'https://github.com/elastic/elasticsearch-ruby/issues' } - s.files = `git ls-files`.split($/) + s.files = `git ls-files`.split($/).reject do |file| + file.match(/^spec\/|^Gemfile|^Rakefile/) + end + s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) } s.executables << 'elastic_ruby_console' s.test_files = s.files.grep(%r{^(test|spec|features)/}) From e8d1fbc4aab9388dd8219d805ab821fa8e8b1653 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 5 Dec 2024 14:08:35 +0000 Subject: [PATCH 400/540] [Gem] Removes unnecessary and deprecated configs from gemspecs --- elasticsearch-api/elasticsearch-api.gemspec | 2 -- elasticsearch/elasticsearch.gemspec | 1 - 2 files changed, 3 deletions(-) diff --git a/elasticsearch-api/elasticsearch-api.gemspec b/elasticsearch-api/elasticsearch-api.gemspec index edf2593d13..0e728c3cb1 100644 --- a/elasticsearch-api/elasticsearch-api.gemspec +++ b/elasticsearch-api/elasticsearch-api.gemspec @@ -37,8 +37,6 @@ Gem::Specification.new do |s| s.files = `git ls-files`.split($/).reject do |file| file.match(/^utils\/|^spec\/|^api-spec-testing\/|^Gemfile|^Rakefile/) end - s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) } - s.test_files = s.files.grep(%r{^(test|spec|features)/}) s.require_paths = ['lib'] s.extra_rdoc_files = ['README.md', 'LICENSE.txt'] diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index 89b824e36a..16e050849c 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -39,7 +39,6 @@ Gem::Specification.new do |s| s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) } s.executables << 'elastic_ruby_console' - s.test_files = s.files.grep(%r{^(test|spec|features)/}) s.require_paths = ['lib'] s.bindir = 'bin' From f8c8472652dfe0c5528ca610d9409bda66f63579 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 5 Dec 2024 14:37:59 +0000 Subject: [PATCH 401/540] [Gem] Styling, refactor for elasticsearch Gem --- elasticsearch/Gemfile | 4 +--- elasticsearch/elasticsearch.gemspec | 7 +++---- elasticsearch/lib/elasticsearch.rb | 14 ++++++++------ 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/elasticsearch/Gemfile b/elasticsearch/Gemfile index 6d0fccc45b..21c38fe230 100644 --- a/elasticsearch/Gemfile +++ b/elasticsearch/Gemfile @@ -30,6 +30,4 @@ if ENV['TRANSPORT_VERSION'] == 'main' gem 'elastic-transport', git: 'https://github.com/elastic/elastic-transport-ruby.git', branch: 'main' end -if RUBY_VERSION >= '3.0' - gem 'opentelemetry-sdk', require: false -end +gem 'opentelemetry-sdk', require: false if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0') diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index 16e050849c..c9159c6be4 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -lib = File.expand_path('../lib', __FILE__) +lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'elasticsearch/version' @@ -45,10 +45,9 @@ Gem::Specification.new do |s| s.extra_rdoc_files = ['README.md', 'LICENSE.txt'] s.rdoc_options = ['--charset=UTF-8'] - s.required_ruby_version = '>= 2.5' - - s.add_dependency 'elastic-transport', '~> 8.3' + s.required_ruby_version = '>= 2.6' # For compatibility with JRuby 9.3 s.add_dependency 'elasticsearch-api', '9.0.0' + s.add_dependency 'elastic-transport', '~> 8.3' s.add_development_dependency 'base64' s.add_development_dependency 'bundler' diff --git a/elasticsearch/lib/elasticsearch.rb b/elasticsearch/lib/elasticsearch.rb index 5fb6750931..77b2ba0ffc 100644 --- a/elasticsearch/lib/elasticsearch.rb +++ b/elasticsearch/lib/elasticsearch.rb @@ -37,8 +37,9 @@ class Client # # @param [Hash] arguments - initializer arguments # @option arguments [String] :cloud_id - The Cloud ID to connect to Elastic Cloud - # @option arguments [String, Hash] :api_key Use API Key Authentication, either the base64 encoding of `id` and `api_key` - # joined by a colon as a String, or a hash with the `id` and `api_key` values. + # @option arguments [String, Hash] :api_key Use API Key Authentication, either the base64 encoding of `id` and + # `api_key` joined by a colon as a String, or a hash with the `id` and + # `api_key` values. # @option arguments [String] :opaque_id_prefix set a prefix for X-Opaque-Id when initializing the client. # This will be prepended to the id you set before each request # if you're using X-Opaque-Id @@ -65,10 +66,10 @@ def method_missing(name, *args, &block) opaque_id = @opaque_id_prefix ? "#{@opaque_id_prefix}#{opaque_id}" : opaque_id args[4] = headers.merge('X-Opaque-Id' => opaque_id) end - unless @verified - verify_elasticsearch(*args, &block) - else + if @verified @transport.perform_request(*args, &block) + else + verify_elasticsearch(*args, &block) end else @transport.send(name, *args, &block) @@ -101,6 +102,7 @@ def verify_elasticsearch(*args, &block) raise e end raise Elasticsearch::UnsupportedProductError unless response.headers['x-elastic-product'] == 'Elasticsearch' + @verified = true response end @@ -175,7 +177,7 @@ def set_user_agent!(arguments) end arguments[:transport_options] ||= {} arguments[:transport_options][:headers] ||= {} - arguments[:transport_options][:headers].merge!({ user_agent: user_agent.join('; ')}) + arguments[:transport_options][:headers].merge!({ user_agent: user_agent.join('; ') }) end end From ef9aea9ab175dd7558dc69e5de34f6e798754c71 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 5 Dec 2024 14:42:17 +0000 Subject: [PATCH 402/540] [Gem] Styling, Ruby >= 2.6 for elasticsearch-api Gem --- elasticsearch-api/elasticsearch-api.gemspec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/elasticsearch-api/elasticsearch-api.gemspec b/elasticsearch-api/elasticsearch-api.gemspec index 0e728c3cb1..73f8917072 100644 --- a/elasticsearch-api/elasticsearch-api.gemspec +++ b/elasticsearch-api/elasticsearch-api.gemspec @@ -38,12 +38,10 @@ Gem::Specification.new do |s| file.match(/^utils\/|^spec\/|^api-spec-testing\/|^Gemfile|^Rakefile/) end s.require_paths = ['lib'] - s.extra_rdoc_files = ['README.md', 'LICENSE.txt'] s.rdoc_options = ['--charset=UTF-8'] - s.required_ruby_version = '>= 2.5' - + s.required_ruby_version = '>= 2.6' # For compatibility with JRuby 9.3 s.add_dependency 'multi_json' s.add_development_dependency 'ansi' @@ -66,13 +64,10 @@ Gem::Specification.new do |s| s.add_development_dependency 'cane' s.add_development_dependency 'escape_utils' unless defined? JRUBY_VERSION - s.add_development_dependency 'require-prof' unless defined?(JRUBY_VERSION) || defined?(Rubinius) s.add_development_dependency 'ruby-prof' unless defined?(JRUBY_VERSION) || defined?(Rubinius) s.add_development_dependency 'simplecov' - s.add_development_dependency 'test-unit', '~> 2' - s.description = <<-DESC.gsub(/^ /, '') Ruby API for Elasticsearch. See the `elasticsearch` gem for full integration. DESC From 130dc6f6dd3b72ef4284e70abb33110b22e2d4a0 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 5 Dec 2024 14:55:35 +0000 Subject: [PATCH 403/540] [DOCS] Updates Changelog for 9.x --- CHANGELOG-9.x.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG-9.x.md b/CHANGELOG-9.x.md index 27708b0f73..a0ed0e0de1 100644 --- a/CHANGELOG-9.x.md +++ b/CHANGELOG-9.x.md @@ -1,14 +1,19 @@ # CHANGELOG 9.x +## Gem + +The size of both `elasticsearch` and `elasticsearch-api` gems will be smaller, since some unnecessary files that were being included in the gem have been removed. + +The required Ruby version is set to `2.6` to keep compatiblity wit JRuby 9.3. However, we only test the code against currently supported Ruby versions. + ## Elasticsearch API ### Development -**Integration Tests** - -Migrated away from the Elasticsearch REST API tests and test runner in CI. We now run the [Elasticsearch Client tests](https://github.com/elastic/elasticsearch-clients-tests/) with the [Elasticsearch Tests Runner](https://github.com/elastic/es-test-runner-ruby/**. This gives us more control on what we're testing and makes the Buildkite build way faster in Pull Requests and scheduled builds. +#### Testing +Migrated away from the Elasticsearch REST API tests and test runner in CI. We now run the [Elasticsearch Client tests](https://github.com/elastic/elasticsearch-clients-tests/) with the [Elasticsearch Tests Runner](https://github.com/elastic/es-test-runner-ruby). This gives us more control on what we're testing and makes the Buildkite build way faster in Pull Requests and scheduled builds. -**Rake tasks** +#### Rake tasks Some old rake tasks that were not being used have been removed. The rest were streamlined, the `es` namespace has been streamlined to make it easier to run Elasticsearch with Docker during development. The `docker` namespace was merged into `es`. From c6b5583b80f65885d107c2472a55bb4ee0c5c1c7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 10 Dec 2024 10:20:37 +0000 Subject: [PATCH 404/540] [API] Adds master_timeout to cat.aliases, indices.exists_aliases, indices.get_alias --- elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb | 1 + .../lib/elasticsearch/api/actions/indices/exists_alias.rb | 1 + .../lib/elasticsearch/api/actions/indices/get_alias.rb | 1 + 3 files changed, 3 insertions(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb index 6146764687..8c13623618 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb @@ -31,6 +31,7 @@ module Actions # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-alias.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb index 9fae4483e6..dc414c862e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb @@ -29,6 +29,7 @@ module Actions # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb index b1918c6705..a216dd6c10 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb @@ -29,6 +29,7 @@ module Actions # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html From 240257e668d21768251ca4399456c91ccb1336d3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 11 Dec 2024 10:12:35 +0000 Subject: [PATCH 405/540] [DOCS] Release notes for 8.17.0 and 8.16.0 --- CHANGELOG.md | 67 +++++++++++++++++++++++++++++++ docs/release_notes/816.asciidoc | 57 ++++++++++++++++++++++++++ docs/release_notes/817.asciidoc | 20 +++++++++ docs/release_notes/index.asciidoc | 5 +++ 4 files changed, 149 insertions(+) create mode 100644 docs/release_notes/816.asciidoc create mode 100644 docs/release_notes/817.asciidoc diff --git a/CHANGELOG.md b/CHANGELOG.md index 257dcea000..ac3416994b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,72 @@ *See the full release notes on the official documentation website: https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/release_notes.html* +## 8.17.0 Release notes + +### Client +* Tested versions of Ruby for 8.17.0: Ruby (MRI) 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. + +### API + +#### API changes +* `async_search.submit` - Removes `keep_alive` parameter. Adds: + * `ccs_minimize_roundtrips` (Boolean): When doing a cross-cluster search, setting it to true may improve overall search latency, particularly when searching clusters with a large number of shards. However, when set to true, the progress of searches on the remote clusters will not be received until the search finishes on all clusters. + * `rest_total_hits_as_int` (Boolean): Indicates whether hits.total should be rendered as an integer or an object in the rest search response. +* `open_point_in_time` - Adds `allow_partial_search_results` (Boolean) parameter: Specify whether to tolerate shards missing when creating the point-in-time, or otherwise throw an exception (default: false). + + +## 8.16.0 Release notes + +### Client +* Tested versions of Ruby for 8.16.0: Ruby (MRI) 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. + +### API + +#### API changes + +* `capabilities` - Adds `local_only` boolean parameter: True if only the node being called should be considered. +* `cluster.stats`- Removes `flat_settings` parameter, adds `include_remotes` boolean parameter: Include remote cluster data into the response (default: false) +* `indices.get_data_stream` - Adds `verbose` boolean parameter: Whether the maximum timestamp for each data stream should be calculated and returned (default: false). Adds `master_timeout` (see below). +* `query_rules.delete_ruleset` - Accepts `ignore: 404` common parameter. + +##### Timeout parameters: + +These parameters have been added to several APIs: + +* `master_timeout` timeout for processing on master node. +* `timeout` timeout for acknowledgement of update from all nodes in cluster parameters. + +Added in: + +* `indices.create_data_stream` - both. +* `indices.delete_data_stream` - `master_timeout`. +* `indices.get_data_lifecycle` - `master_timeout`. +* `indices.get_data_stream` - `master_timeout`. +* `indices.migrate_to_data_stream` - both. +* `indices.promote_data_stream` - `master_timeout`. +* `search_shards` - `master_timeout`. + +#### APIs Promoted from Experimental to Stable: + +* `indices.delete_data_lifecycle` +* `indices.explain_data_lifecycle` +* `indices.get_data_lifecycle` +* `indices.put_data_lifecycle` +* `security.create_cross_cluster_api_key` +* `security.update_cross_cluster_api_key` + +#### New APIs + +* `ingest.delete_ip_location_database` - Deletes an ip location database configuration. +* `ingest.get_ip_location_database` - Returns the specified ip location database configuration. +* `ingest.put_ip_location_database` - Puts the configuration for a ip location database to be downloaded. + + +#### New Experimental APIs + +* `inference.stream_inference` - Perform streaming inference. +* `query_rules.test` - Tests a query ruleset to identify the rules that would match input criteria. + + ## 8.15.0 Release notes ### Client diff --git a/docs/release_notes/816.asciidoc b/docs/release_notes/816.asciidoc new file mode 100644 index 0000000000..c32e719f57 --- /dev/null +++ b/docs/release_notes/816.asciidoc @@ -0,0 +1,57 @@ +[[release_notes_8_16]] +=== 8.16 Release notes + +[discrete] +[[release_notes_8_16_0]] +=== 8.16.0 Release notes + +[discrete] +==== Client +* Tested versions of Ruby for 8.16.0: Ruby (MRI) 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. + +[discrete] +==== API + +[discrete] +===== API changes + +* `capabilities` - Adds `local_only` boolean parameter: True if only the node being called should be considered. +* `cluster.stats`- Removes `flat_settings` parameter, adds `include_remotes` boolean parameter: Include remote cluster data into the response (default: false). +* `indices.get_data_stream` - Adds `verbose` boolean parameter: Whether the maximum timestamp for each data stream should be calculated and returned (default: false). Adds `master_timeout` (see below). +* `query_rules.delete_ruleset` - Accepts `ignore: 404` common parameter. + +These parameters have been added to several APIs: + +* `master_timeout` timeout for processing on master node. +* `timeout` timeout for acknowledgement of update from all nodes in cluster parameters. + +Added in: + +* `indices.create_data_stream` - both. +* `indices.delete_data_stream` - `master_timeout`. +* `indices.get_data_lifecycle` - `master_timeout`. +* `indices.get_data_stream` - `master_timeout`. +* `indices.migrate_to_data_stream` - both. +* `indices.promote_data_stream` - `master_timeout`. +* `search_shards` - `master_timeout`. + +**APIs Promoted from Experimental to Stable:** + +* `indices.delete_data_lifecycle` +* `indices.explain_data_lifecycle` +* `indices.get_data_lifecycle` +* `indices.put_data_lifecycle` +* `security.create_cross_cluster_api_key` +* `security.update_cross_cluster_api_key` + +**New APIs** + +* `ingest.delete_ip_location_database` - Deletes an ip location database configuration. +* `ingest.get_ip_location_database` - Returns the specified ip location database configuration. +* `ingest.put_ip_location_database` - Puts the configuration for a ip location database to be downloaded. + + +**New Experimental APIs** + +* `inference.stream_inference` - Perform streaming inference. +* `query_rules.test` - Tests a query ruleset to identify the rules that would match input criteria. diff --git a/docs/release_notes/817.asciidoc b/docs/release_notes/817.asciidoc new file mode 100644 index 0000000000..2963eeb0d1 --- /dev/null +++ b/docs/release_notes/817.asciidoc @@ -0,0 +1,20 @@ +[[release_notes_8_17]] +=== 8.17 Release notes + +[discrete] +[[release_notes_8_17_0]] +=== 8.17.0 Release notes + +[discrete] +==== Client +* Tested versions of Ruby for 8.17.0: Ruby (MRI) 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. + +[discrete] +==== API + +[discrete] +===== API changes +* `async_search.submit` - Removes `keep_alive` parameter. Adds: +** `ccs_minimize_roundtrips` (Boolean): When doing a cross-cluster search, setting it to true may improve overall search latency, particularly when searching clusters with a large number of shards. However, when set to true, the progress of searches on the remote clusters will not be received until the search finishes on all clusters. +** `rest_total_hits_as_int` (Boolean): Indicates whether hits.total should be rendered as an integer or an object in the rest search response. +* `open_point_in_time` - Adds `allow_partial_search_results` (Boolean) parameter: Specify whether to tolerate shards missing when creating the point-in-time, or otherwise throw an exception (default: false). diff --git a/docs/release_notes/index.asciidoc b/docs/release_notes/index.asciidoc index 2c6223c830..3b2ef35788 100644 --- a/docs/release_notes/index.asciidoc +++ b/docs/release_notes/index.asciidoc @@ -3,6 +3,9 @@ [discrete] === 8.x + +* <> +* <> * <> * <> * <> @@ -37,6 +40,8 @@ * <> * <> +include::817.asciidoc[] +include::816.asciidoc[] include::815.asciidoc[] include::814.asciidoc[] include::813.asciidoc[] From 33d0c88e313573af78b34816285fcddf50c8be54 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 11 Dec 2024 17:07:27 +0000 Subject: [PATCH 406/540] [CI] Update error display in log-results --- .buildkite/log-results.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.buildkite/log-results.sh b/.buildkite/log-results.sh index 85963fa432..9481b6b5ce 100755 --- a/.buildkite/log-results.sh +++ b/.buildkite/log-results.sh @@ -14,9 +14,11 @@ for f in $files; do " - FAILED_TESTS=`grep "E," $f` + FAILED_TESTS=`grep -A1 "E,.*" $f` if [[ -n "$FAILED_TESTS" ]]; then - buildkite-agent annotate --append "#### Failures in $f " - buildkite-agent annotate --append `grep "E," $f | awk -F '-- :' '{print $2}'` + buildkite-agent annotate --append "Failures in $f + +$FAILED_TESTS +" fi done From a030610c818ef813dd3ea0c983212515edb777a8 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 12 Dec 2024 16:38:38 +0000 Subject: [PATCH 407/540] [Test Runner] Skips knn_search test --- elasticsearch-api/spec/yaml-test-runner/run.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index 53ea8ea134..d1896627f6 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -70,4 +70,6 @@ current_branch = `git rev-parse --abbrev-ref HEAD`.strip branch = current_branch.match(/[0-9]\.[0-9]+/)&.[](0) || ENV['ES_YAML_TESTS_BRANCH'] || nil Elasticsearch::Tests::Downloader::run(tests_path, branch) -Elasticsearch::Tests::TestRunner.new(CLIENT, tests_path, logger).run(ENV['SINGLE_TEST'] || []) +runner = Elasticsearch::Tests::TestRunner.new(CLIENT, tests_path, logger) +runner.add_tests_to_skip('knn_search.yml') # TODO: Extract into file +runner.run(ENV['SINGLE_TEST'] || []) From 01ea80d40394b5ef384320f4892a5705f958bdfd Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 23 Dec 2024 13:43:48 +0000 Subject: [PATCH 408/540] [API] Auto-generated API code * eql.search - adds allow_partial_search_results and allow_partial_sequence_results boolean parameters. * ilm.delete_lifecycle - adds timeout and master_timeout Time parameters. * ilm.explain_lifecycle - adds master_timout Time parameter. * ilm.get_lifecycle - adds timeout and master_timeout Time parameters. * ilm.put_lifecycle - adds timeout and master_timeout Time parameters. * ilm.start - adds timeout and master_timeout Time parameters. * ilm.stop - adds timeout and master_timeout Time parameters. * ingest.delete_geoip_database - adds timeout and master_timeout Time parameters. * ingest.delete_ip_location_database - adds timeout and master_timeout Time parameters. * ingest.put_geoip_database - adds timeout and master_timeout Time parameters. * ingest.put_ip_location_database - adds timeout and master_timeout Time parameters. --- elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb | 5 ++--- .../lib/elasticsearch/api/actions/eql/search.rb | 2 ++ .../actions/index_lifecycle_management/delete_lifecycle.rb | 4 +++- .../actions/index_lifecycle_management/explain_lifecycle.rb | 1 + .../api/actions/index_lifecycle_management/get_lifecycle.rb | 4 +++- .../api/actions/index_lifecycle_management/put_lifecycle.rb | 4 +++- .../api/actions/index_lifecycle_management/start.rb | 4 +++- .../api/actions/index_lifecycle_management/stop.rb | 4 +++- .../api/actions/ingest/delete_geoip_database.rb | 4 +++- .../api/actions/ingest/delete_ip_location_database.rb | 4 +++- .../elasticsearch/api/actions/ingest/put_geoip_database.rb | 4 +++- .../api/actions/ingest/put_ip_location_database.rb | 4 +++- 12 files changed, 32 insertions(+), 12 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index a78a1d3463..2d33e77108 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -28,13 +28,12 @@ module Actions # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [String] :routing Specific routing value # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [String] :type Default document type for items which don't provide one # @option arguments [List] :_source True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request # @option arguments [List] :_source_excludes Default list of fields to exclude from the returned _source field, can be overridden on each sub-request # @option arguments [List] :_source_includes Default list of fields to extract and return from the _source field, can be overridden on each sub-request # @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with - # @option arguments [Boolean] :require_alias Sets require_alias for all incoming documents. Defaults to unset (false) - # @option arguments [Boolean] :require_data_stream When true, requires the destination to be a data stream (existing or to-be-created). Default is false + # @option arguments [Boolean] :require_alias If true, the request’s actions must target an index alias. Defaults to false. + # @option arguments [Boolean] :require_data_stream If true, the request's actions must target a data stream (existing or to-be-created). Default to false # @option arguments [Boolean] :list_executed_pipelines Sets list_executed_pipelines for all incoming documents. Defaults to unset (false) # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [String|Array] :body The operation definition and data (action-data pairs), separated by newlines. Array of Strings, Header/Data pairs, diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb index 097aa24509..870291cd16 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb @@ -28,6 +28,8 @@ module Actions # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response # @option arguments [Boolean] :keep_on_completion Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false) # @option arguments [Time] :keep_alive Update the time interval in which the results (partial or final) for this search will be available + # @option arguments [Boolean] :allow_partial_search_results Control whether the query should keep running in case of shard failures, and return partial results + # @option arguments [Boolean] :allow_partial_sequence_results Control whether a sequence query should return partial results or no results at all in case of shard failures. This option has effect only if [allow_partial_search_results] is true. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Eql request body. Use the `query` to limit the query scope. (*Required*) # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb index 824ecf28ed..a73ec735ae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb @@ -25,6 +25,8 @@ module Actions # Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted. # # @option arguments [String] :policy The name of the index lifecycle policy + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html @@ -48,7 +50,7 @@ def delete_lifecycle(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = "_ilm/policy/#{Utils.__listify(_policy)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb index 5480ccb531..dc5f6b9dcf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb @@ -27,6 +27,7 @@ module Actions # @option arguments [String] :index The name of the index to explain # @option arguments [Boolean] :only_managed filters the indices included in the response to ones managed by ILM # @option arguments [Boolean] :only_errors filters the indices included in the response to ones in an ILM error state, implies only_managed + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb index dc898b2659..92b8c607b3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb @@ -25,6 +25,8 @@ module Actions # Returns the specified policy definition. Includes the policy version and last modified date. # # @option arguments [String] :policy The name of the index lifecycle policy + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html @@ -50,7 +52,7 @@ def get_lifecycle(arguments = {}) else '_ilm/policy' end - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb index da5fcecdfc..9035c24731 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb @@ -25,6 +25,8 @@ module Actions # Creates a lifecycle policy # # @option arguments [String] :policy The name of the index lifecycle policy + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The lifecycle policy definition to register # @@ -49,7 +51,7 @@ def put_lifecycle(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = "_ilm/policy/#{Utils.__listify(_policy)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb index 0f30639b52..de72ec031f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb @@ -24,6 +24,8 @@ module IndexLifecycleManagement module Actions # Start the index lifecycle management (ILM) plugin. # + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html @@ -38,7 +40,7 @@ def start(arguments = {}) method = Elasticsearch::API::HTTP_POST path = '_ilm/start' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb index 23e0761b67..81009ecb9c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb @@ -24,6 +24,8 @@ module IndexLifecycleManagement module Actions # Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin # + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html @@ -38,7 +40,7 @@ def stop(arguments = {}) method = Elasticsearch::API::HTTP_POST path = '_ilm/stop' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb index 94b8bcbfd2..a242aaea65 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb @@ -25,6 +25,8 @@ module Actions # Deletes a geoip database configuration # # @option arguments [List] :id A comma-separated list of geoip database configurations to delete + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-geoip-database-api.html @@ -48,7 +50,7 @@ def delete_geoip_database(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = "_ingest/geoip/database/#{Utils.__listify(_id)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb index fae3f7f003..f3a329a184 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb @@ -25,6 +25,8 @@ module Actions # Deletes an ip location database configuration # # @option arguments [List] :id A comma-separated list of ip location database configurations to delete + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-ip-location-database-api.html @@ -48,7 +50,7 @@ def delete_ip_location_database(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = "_ingest/ip_location/database/#{Utils.__listify(_id)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb index 28b5bb464b..235affce79 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb @@ -25,6 +25,8 @@ module Actions # Puts the configuration for a geoip database to be downloaded # # @option arguments [String] :id The id of the database configuration + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The database configuration definition (*Required*) # @@ -50,7 +52,7 @@ def put_geoip_database(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = "_ingest/geoip/database/#{Utils.__listify(_id)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb index 35303f63b4..0305aef837 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb @@ -25,6 +25,8 @@ module Actions # Puts the configuration for a ip location database to be downloaded # # @option arguments [String] :id The id of the database configuration + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The database configuration definition (*Required*) # @@ -50,7 +52,7 @@ def put_ip_location_database(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = "_ingest/ip_location/database/#{Utils.__listify(_id)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From 9571341c1183eb9fc0adeb9d6d1a649cc255f60f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 23 Dec 2024 13:48:59 +0000 Subject: [PATCH 409/540] [API] Fixes ingest unit tests --- .../api/actions/ingest/delete_geoip_database_spec.rb | 2 +- .../api/actions/ingest/delete_ip_location_database_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_geoip_database_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_geoip_database_spec.rb index 4a3e4e9b6e..a7a3622777 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_geoip_database_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_geoip_database_spec.rb @@ -34,6 +34,6 @@ end it 'performs the request' do - expect(client_double.ingest.delete_geoip_database(id: 'foo', body: {})).to be_a Elasticsearch::API::Response + expect(client_double.ingest.delete_geoip_database(id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_ip_location_database_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_ip_location_database_spec.rb index f070341d1d..429faebe9c 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_ip_location_database_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_ip_location_database_spec.rb @@ -34,6 +34,6 @@ end it 'performs the request' do - expect(client_double.ingest.delete_ip_location_database(id: 'foo', body: {})).to be_a Elasticsearch::API::Response + expect(client_double.ingest.delete_ip_location_database(id: 'foo')).to be_a Elasticsearch::API::Response end end From 1c87be65dbc1e8672c08614e7312d7f9cf75d17c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 24 Dec 2024 10:21:47 +0000 Subject: [PATCH 410/540] [DOCS] Updates build badges on README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f519dbc53c..615ce9580e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Elasticsearch -[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.15](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.15.yml/badge.svg?branch=8.15)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.15.yml) [![8.16](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.16.yml/badge.svg?branch=8.16)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.16.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) +[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.16](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.16.yml/badge.svg?branch=8.16)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.16.yml) [![8.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.17.yml/badge.svg?branch=8.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.17.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) **[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)** or From e4ad6e9f7008ea2e1fbc1442b6bdd697df130160 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 27 Dec 2024 09:46:54 +0000 Subject: [PATCH 411/540] [CI] Adds Ruby 3.4 --- .buildkite/pipeline.yml | 5 +++-- .github/workflows/license.yml | 2 +- .github/workflows/main.yml | 2 +- .github/workflows/otel.yml | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 47724d0f5f..ba30184799 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -5,6 +5,7 @@ steps: matrix: setup: ruby: + - "3.4" - "3.3" - "3.2" - "3.1" @@ -19,11 +20,11 @@ steps: transport: "8.3" # Test for different versions of transport - with: - ruby: "3.3" + ruby: "3.4" ruby_source: "ruby" transport: "main" - with: - ruby: "3.3" + ruby: "3.4" ruby_source: "ruby" transport: "8.2" env: diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml index 8816ff40dd..e556b833ee 100644 --- a/.github/workflows/license.yml +++ b/.github/workflows/license.yml @@ -7,7 +7,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: '3.3' + ruby-version: '3.4' - name: Check license headers run: | ruby ./.github/check_license_headers.rb diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 313a20892e..e2c29dc2d2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['3.1', '3.2', '3.3', 'jruby-9.3', 'jruby-9.4'] + ruby: ['3.1', '3.2', '3.3', '3.4', 'jruby-9.3', 'jruby-9.4'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/otel.yml b/.github/workflows/otel.yml index 238305e750..c78dea09d9 100644 --- a/.github/workflows/otel.yml +++ b/.github/workflows/otel.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [ '3.3', 'jruby-9.4' ] + ruby: ['3.4', 'jruby-9.4'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From adc01e32f369b4cec8e302c9b68cfa7107453d60 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 27 Dec 2024 10:12:12 +0000 Subject: [PATCH 412/540] [API] Adds timeout, local parameters * cluster.exists_component_template - adds master_timeout, local parameters * cluster.get_component_template - adds master_timeout, local parameters * snapshot_lifecycle_management.delete_lifecycle - adds master_timeout, timeout parameters * snapshot_lifecycle_management.execute_lifecycle - adds master_timeout, timeout parameters * snapshot_lifecycle_management.execute_retention - adds master_timeout, timeout parameters * snapshot_lifecycle_management.get_lifecycle - adds master_timeout, timeout parameters * snapshot_lifecycle_management.get_stats - adds master_timeout, timeout parameters * snapshot_lifecycle_management.get_status - adds master_timeout, timeout parameters * snapshot_lifecycle_management.put_lifecycle - adds master_timeout, timeout parameters --- .../api/actions/cluster/exists_component_template.rb | 4 ++-- .../api/actions/cluster/get_component_template.rb | 4 ++-- .../actions/snapshot_lifecycle_management/delete_lifecycle.rb | 4 +++- .../snapshot_lifecycle_management/execute_lifecycle.rb | 4 +++- .../snapshot_lifecycle_management/execute_retention.rb | 4 +++- .../actions/snapshot_lifecycle_management/get_lifecycle.rb | 4 +++- .../api/actions/snapshot_lifecycle_management/get_stats.rb | 4 +++- .../api/actions/snapshot_lifecycle_management/get_status.rb | 4 +++- .../actions/snapshot_lifecycle_management/put_lifecycle.rb | 4 +++- 9 files changed, 25 insertions(+), 11 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb index b0ac619b26..505979897d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb @@ -25,8 +25,8 @@ module Actions # Returns information about whether a particular component template exist # # @option arguments [String] :name The name of the template - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) + # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked + # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb index 51bb22bc01..d4570f23aa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb @@ -25,8 +25,8 @@ module Actions # Returns one or more component templates # # @option arguments [List] :name The comma separated names of the component templates - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) + # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked + # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated* # @option arguments [Boolean] :include_defaults Return all default configurations for the component template (default: false) # @option arguments [Hash] :headers Custom HTTP headers # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb index 5a9f45b135..96088812ca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb @@ -25,6 +25,8 @@ module Actions # Deletes an existing snapshot lifecycle policy. # # @option arguments [String] :policy_id The id of the snapshot lifecycle policy to remove + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html @@ -48,7 +50,7 @@ def delete_lifecycle(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = "_slm/policy/#{Utils.__listify(_policy_id)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb index 910f03a94c..de3210fc9a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb @@ -25,6 +25,8 @@ module Actions # Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time. # # @option arguments [String] :policy_id The id of the snapshot lifecycle policy to be executed + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html @@ -48,7 +50,7 @@ def execute_lifecycle(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = "_slm/policy/#{Utils.__listify(_policy_id)}/_execute" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb index e7ee4d4e3c..6a16a045ef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb @@ -24,6 +24,8 @@ module SnapshotLifecycleManagement module Actions # Deletes any snapshots that are expired according to the policy's retention rules. # + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html @@ -38,7 +40,7 @@ def execute_retention(arguments = {}) method = Elasticsearch::API::HTTP_POST path = '_slm/_execute_retention' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb index 56a4c31795..a697d0624f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb @@ -25,6 +25,8 @@ module Actions # Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts. # # @option arguments [List] :policy_id Comma-separated list of snapshot lifecycle policies to retrieve + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html @@ -50,7 +52,7 @@ def get_lifecycle(arguments = {}) else '_slm/policy' end - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb index 9f86cb46c5..2a80670fa1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb @@ -24,6 +24,8 @@ module SnapshotLifecycleManagement module Actions # Returns global and policy-level statistics about actions taken by snapshot lifecycle management. # + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-stats.html @@ -38,7 +40,7 @@ def get_stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = '_slm/stats' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb index c0fc5de920..5e2172e4c2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb @@ -24,6 +24,8 @@ module SnapshotLifecycleManagement module Actions # Retrieves the status of snapshot lifecycle management (SLM). # + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html @@ -38,7 +40,7 @@ def get_status(arguments = {}) method = Elasticsearch::API::HTTP_GET path = '_slm/status' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb index 0107fe34f6..23e3d41bda 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb @@ -25,6 +25,8 @@ module Actions # Creates or updates a snapshot lifecycle policy. # # @option arguments [String] :policy_id The id of the snapshot lifecycle policy + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The snapshot lifecycle policy definition to register # @@ -49,7 +51,7 @@ def put_lifecycle(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = "_slm/policy/#{Utils.__listify(_policy_id)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From b83532cc4662cf0d29dcb6343164cdb86b863a50 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 6 Jan 2025 10:24:30 +0000 Subject: [PATCH 413/540] [API] Adds new endpoints: esql.async_query_delete indices.get_data_lifecycle_stats inference.update security.delegate_pki --- .../api/actions/esql/async_query_delete.rb | 60 ++++++++++++++++ .../indices/get_data_lifecycle_stats.rb | 50 ++++++++++++++ .../api/actions/inference/update.rb | 68 +++++++++++++++++++ .../api/actions/security/delegate_pki.rb | 53 +++++++++++++++ .../actions/esql/async_query_delete_spec.rb | 35 ++++++++++ .../indices/get_data_lifecycle_stats_spec.rb | 35 ++++++++++ .../api/actions/inference/update_spec.rb | 36 ++++++++++ .../api/actions/security/delegate_pki_spec.rb | 39 +++++++++++ 8 files changed, 376 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_delete_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/indices/get_data_lifecycle_stats_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/inference/update_spec.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/security/delegate_pki_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb new file mode 100644 index 0000000000..647470b44a --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb @@ -0,0 +1,60 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Esql + module Actions + # Delete an async query request given its ID. + # + # @option arguments [String] :id The async query ID + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-delete-api.html + # + def async_query_delete(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_delete' } + + defined_params = [:id].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 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_DELETE + path = "_query/async/#{Utils.__listify(_id)}" + params = {} + + 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/indices/get_data_lifecycle_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb new file mode 100644 index 0000000000..3446984630 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb @@ -0,0 +1,50 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Indices + module Actions + # Get data stream lifecycle statistics. + # + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-get-lifecycle-stats.html + # + def get_data_lifecycle_stats(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'indices.get_data_lifecycle_stats' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = '_lifecycle/stats' + params = {} + + 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/inference/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb new file mode 100644 index 0000000000..2a3fb1a22e --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb @@ -0,0 +1,68 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Inference + module Actions + # Update inference + # + # @option arguments [String] :inference_id The inference Id + # @option arguments [String] :task_type The task type + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The inference endpoint's task and service settings + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-inference-api.html + # + def update(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.update' } + + defined_params = %i[inference_id task_type].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 'inference_id' missing" unless arguments[:inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _inference_id = arguments.delete(:inference_id) + + _task_type = arguments.delete(:task_type) + + method = Elasticsearch::API::HTTP_POST + path = if _task_type && _inference_id + "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}/_update" + else + "_inference/#{Utils.__listify(_inference_id)}/_update" + end + params = {} + + 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/security/delegate_pki.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb new file mode 100644 index 0000000000..1d637ba77e --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb @@ -0,0 +1,53 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Security + module Actions + # Delegate PKI authentication. + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The X509Certificate chain. (*Required*) + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delegate-pki-authentication.html + # + def delegate_pki(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.delegate_pki' } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = '_security/delegate_pki' + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_delete_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_delete_spec.rb new file mode 100644 index 0000000000..2eb85ef6eb --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_delete_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.esql#async_query_delete' do + let(:expected_args) do + [ + 'DELETE', + '_query/async/foo', + {}, + nil, + {}, + { defined_params: {id: 'foo' }, endpoint: 'esql.async_query_delete' } + ] + end + + it 'performs the request' do + expect(client_double.esql.async_query_delete(id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_data_lifecycle_stats_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_data_lifecycle_stats_spec.rb new file mode 100644 index 0000000000..8938b5a156 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_data_lifecycle_stats_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.indices#get_data_lifecycle_stats' do + let(:expected_args) do + [ + 'GET', + '_lifecycle/stats', + {}, + nil, + {}, + { endpoint: 'indices.get_data_lifecycle_stats' } + ] + end + + it 'performs the request' do + expect(client_double.indices.get_data_lifecycle_stats).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/update_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/update_spec.rb new file mode 100644 index 0000000000..a8fdbf1b7a --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/update_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.update' do + let(:expected_args) do + [ + 'POST', + '_inference/foo/bar/_update', + {}, + nil, + {}, + { defined_params: { inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.update' } + ] + end + + it 'performs the request' do + expect(client_double.inference.update(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/delegate_pki_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/security/delegate_pki_spec.rb new file mode 100644 index 0000000000..d21418f212 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/security/delegate_pki_spec.rb @@ -0,0 +1,39 @@ +# 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. + +require 'spec_helper' + +describe 'client#security#delegate_pki' do + let(:expected_args) do + [ + 'POST', + '_security/delegate_pki', + params, + {}, + {}, + { endpoint: 'security.delegate_pki' } + ] + end + + let(:params) do + {} + end + + it 'performs the request' do + expect(client_double.security.delegate_pki(body: {})).to be_a Elasticsearch::API::Response + end +end From 66ecf845899dca077721b769216404b1f85bbe8e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 13 Jan 2025 09:47:26 +0000 Subject: [PATCH 414/540] [API] Updates parameters and source code documentation connector.get, connector.list - add include_deleted, a flag indicating whether to return connectors that have been soft-deleted. indices.rollover - removes target_failure_store parameter license.post_start_trial - removes timeout parameter xpack.info - adds human, defines whether additional human-readable information is included in the response. In particular, it adds descriptions and a tag line. The default value is true --- .../lib/elasticsearch/api/actions/connector/get.rb | 3 ++- .../lib/elasticsearch/api/actions/connector/list.rb | 1 + .../lib/elasticsearch/api/actions/indices/exists_template.rb | 4 ++-- .../elasticsearch/api/actions/indices/get_index_template.rb | 4 ++-- .../lib/elasticsearch/api/actions/indices/get_template.rb | 4 ++-- .../lib/elasticsearch/api/actions/indices/rollover.rb | 1 - .../lib/elasticsearch/api/actions/license/post_start_trial.rb | 1 - elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb | 1 + 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb index d71a01db6c..23b7109386 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb @@ -29,6 +29,7 @@ module Actions # support SLA of official GA features. # # @option arguments [String] :connector_id The unique identifier of the connector to be returned. + # @option arguments [Boolean] :include_deleted A flag indicating whether to return connectors that have been soft-deleted. # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-api.html @@ -52,7 +53,7 @@ def get(arguments = {}) method = Elasticsearch::API::HTTP_GET path = "_connector/#{Utils.__listify(_connector_id)}" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb index 115f7745ab..e79a2ca64e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb @@ -34,6 +34,7 @@ module Actions # @option arguments [List] :connector_name A comma-separated list of connector names to fetch connector documents for # @option arguments [List] :service_type A comma-separated list of connector service types to fetch connector documents for # @option arguments [String] :query A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names + # @option arguments [Boolean] :include_deleted A flag indicating whether to return connectors that have been soft-deleted. # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-api.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb index 3d1defc508..3593eed264 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb @@ -26,8 +26,8 @@ module Actions # # @option arguments [List] :name The comma separated names of the index templates # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) + # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked + # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-template-exists-v1.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb index 620537f86c..a56bd60806 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb @@ -26,8 +26,8 @@ module Actions # # @option arguments [String] :name A pattern that returned template names must match # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) + # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked + # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated* # @option arguments [Boolean] :include_defaults Return all relevant default configurations for the index template (default: false) # @option arguments [Hash] :headers Custom HTTP headers # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb index 2a19f7f48b..8c15a38ae5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb @@ -26,8 +26,8 @@ module Actions # # @option arguments [List] :name The comma separated names of the index templates # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) + # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked + # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template-v1.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index 7ddd3b5df0..fe1c79258f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -32,7 +32,6 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the newly created rollover index before the operation returns. # @option arguments [Boolean] :lazy If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams. - # @option arguments [Boolean] :target_failure_store If set to true, the rollover action will be applied on the failure store of the data stream. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The conditions that needs to be met for executing rollover # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb index 4a3a20ae6c..561bb0f061 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb @@ -27,7 +27,6 @@ module Actions # @option arguments [String] :type The type of trial license to generate (default: "trial") # @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false) # @option arguments [Time] :master_timeout Timeout for processing on master node - # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trial.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb index 6074bf9ac0..89cb118784 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb @@ -24,6 +24,7 @@ module XPack module Actions # Retrieves information about the installed X-Pack features. # + # @option arguments [Boolean] :human Defines whether additional human-readable information is included in the response. In particular, it adds descriptions and a tag line. The default value is true. # @option arguments [List] :categories Comma-separated list of info categories. Can be any of: build, license, features # @option arguments [Boolean] :accept_enterprise If this param is used it must be set to true *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers From c8e3d982961cf63d194c576dac1194bee063b3c3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 15 Jan 2025 10:13:37 +0000 Subject: [PATCH 415/540] [Gem] Fixes ScrollHelper Fixes #2556 The iteration implementation has been fixed. There was a bug where an additional search (with scroll) request was made to Elasticsearch for each resulting hit. It was rewritten so that the docs are retrieved as needed and the Helper instance doesn't store documents internally, with big savings in memory and requests to Elasticsearch. --- .../lib/elasticsearch/helpers/scroll_helper.rb | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/elasticsearch/lib/elasticsearch/helpers/scroll_helper.rb b/elasticsearch/lib/elasticsearch/helpers/scroll_helper.rb index 747750cfa6..ead41314ac 100644 --- a/elasticsearch/lib/elasticsearch/helpers/scroll_helper.rb +++ b/elasticsearch/lib/elasticsearch/helpers/scroll_helper.rb @@ -43,12 +43,8 @@ def initialize(client, index, body, scroll = '1m') # @yieldparam document [Hash] yields a document found in the search hits. # def each(&block) - @docs = [] - @scroll_id = nil - refresh_docs - for doc in @docs do - refresh_docs - yield doc + until (docs = results).empty? + docs.each(&block) end clear end @@ -70,17 +66,11 @@ def results # def clear @client.clear_scroll(body: { scroll_id: @scroll_id }) if @scroll_id - @docs = [] + @scroll_id = nil end private - def refresh_docs - @docs ||= [] - @docs << results - @docs.flatten! - end - def initial_search response = @client.search(index: @index, scroll: @scroll, body: @body) @scroll_id = response['_scroll_id'] @@ -88,7 +78,7 @@ def initial_search end def scroll_request - @client.scroll(body: {scroll: @scroll, scroll_id: @scroll_id})['hits']['hits'] + @client.scroll(body: { scroll: @scroll, scroll_id: @scroll_id })['hits']['hits'] end end end From 2c1869da7382e4ebddc70fb8c5aaf64d4deeaffb Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 15 Jan 2025 10:21:43 +0000 Subject: [PATCH 416/540] Adds context to Scroll Helper spec --- .../integration/helpers/scroll_helper_spec.rb | 108 +++++++++--------- 1 file changed, 55 insertions(+), 53 deletions(-) diff --git a/elasticsearch/spec/integration/helpers/scroll_helper_spec.rb b/elasticsearch/spec/integration/helpers/scroll_helper_spec.rb index 8cd63f9869..ec59731b54 100644 --- a/elasticsearch/spec/integration/helpers/scroll_helper_spec.rb +++ b/elasticsearch/spec/integration/helpers/scroll_helper_spec.rb @@ -18,64 +18,66 @@ require 'elasticsearch/helpers/scroll_helper' context 'Elasticsearch client helpers' do - let(:index) { 'books' } - let(:body) { { size: 12, query: { match_all: {} } } } - let(:scroll_helper) { Elasticsearch::Helpers::ScrollHelper.new(client, index, body) } + context 'ScrollHelper' do + let(:index) { 'books' } + let(:body) { { size: 12, query: { match_all: {} } } } + let(:scroll_helper) { Elasticsearch::Helpers::ScrollHelper.new(client, index, body) } - before do - documents = [ - { index: { _index: index, data: {name: "Leviathan Wakes", "author": "James S.A. Corey", "release_date": "2011-06-02", "page_count": 561} } }, - { index: { _index: index, data: {name: "Hyperion", "author": "Dan Simmons", "release_date": "1989-05-26", "page_count": 482} } }, - { index: { _index: index, data: {name: "Dune", "author": "Frank Herbert", "release_date": "1965-06-01", "page_count": 604} } }, - { index: { _index: index, data: {name: "Dune Messiah", "author": "Frank Herbert", "release_date": "1969-10-15", "page_count": 331} } }, - { index: { _index: index, data: {name: "Children of Dune", "author": "Frank Herbert", "release_date": "1976-04-21", "page_count": 408} } }, - { index: { _index: index, data: {name: "God Emperor of Dune", "author": "Frank Herbert", "release_date": "1981-05-28", "page_count": 454} } }, - { index: { _index: index, data: {name: "Consider Phlebas", "author": "Iain M. Banks", "release_date": "1987-04-23", "page_count": 471} } }, - { index: { _index: index, data: {name: "Pandora's Star", "author": "Peter F. Hamilton", "release_date": "2004-03-02", "page_count": 768} } }, - { index: { _index: index, data: {name: "Revelation Space", "author": "Alastair Reynolds", "release_date": "2000-03-15", "page_count": 585} } }, - { index: { _index: index, data: {name: "A Fire Upon the Deep", "author": "Vernor Vinge", "release_date": "1992-06-01", "page_count": 613} } }, - { index: { _index: index, data: {name: "Ender's Game", "author": "Orson Scott Card", "release_date": "1985-06-01", "page_count": 324} } }, - { index: { _index: index, data: {name: "1984", "author": "George Orwell", "release_date": "1985-06-01", "page_count": 328} } }, - { index: { _index: index, data: {name: "Fahrenheit 451", "author": "Ray Bradbury", "release_date": "1953-10-15", "page_count": 227} } }, - { index: { _index: index, data: {name: "Brave New World", "author": "Aldous Huxley", "release_date": "1932-06-01", "page_count": 268} } }, - { index: { _index: index, data: {name: "Foundation", "author": "Isaac Asimov", "release_date": "1951-06-01", "page_count": 224} } }, - { index: { _index: index, data: {name: "The Giver", "author": "Lois Lowry", "release_date": "1993-04-26", "page_count": 208} } }, - { index: { _index: index, data: {name: "Slaughterhouse-Five", "author": "Kurt Vonnegut", "release_date": "1969-06-01", "page_count": 275} } }, - { index: { _index: index, data: {name: "The Hitchhiker's Guide to the Galaxy", "author": "Douglas Adams", "release_date": "1979-10-12", "page_count": 180} } }, - { index: { _index: index, data: {name: "Snow Crash", "author": "Neal Stephenson", "release_date": "1992-06-01", "page_count": 470} } }, - { index: { _index: index, data: {name: "Neuromancer", "author": "William Gibson", "release_date": "1984-07-01", "page_count": 271} } }, - { index: { _index: index, data: {name: "The Handmaid's Tale", "author": "Margaret Atwood", "release_date": "1985-06-01", "page_count": 311} } }, - { index: { _index: index, data: {name: "Starship Troopers", "author": "Robert A. Heinlein", "release_date": "1959-12-01", "page_count": 335} } }, - { index: { _index: index, data: {name: "The Left Hand of Darkness", "author": "Ursula K. Le Guin", "release_date": "1969-06-01", "page_count": 304} } }, - { index: { _index: index, data: {name: "The Moon is a Harsh Mistress", "author": "Robert A. Heinlein", "release_date": "1966-04-01", "page_count": 288 } } } - ] - client.bulk(body: documents, refresh: 'wait_for') - end - - after do - client.indices.delete(index: index) - end + before do + documents = [ + { index: { _index: index, data: {name: "Leviathan Wakes", "author": "James S.A. Corey", "release_date": "2011-06-02", "page_count": 561} } }, + { index: { _index: index, data: {name: "Hyperion", "author": "Dan Simmons", "release_date": "1989-05-26", "page_count": 482} } }, + { index: { _index: index, data: {name: "Dune", "author": "Frank Herbert", "release_date": "1965-06-01", "page_count": 604} } }, + { index: { _index: index, data: {name: "Dune Messiah", "author": "Frank Herbert", "release_date": "1969-10-15", "page_count": 331} } }, + { index: { _index: index, data: {name: "Children of Dune", "author": "Frank Herbert", "release_date": "1976-04-21", "page_count": 408} } }, + { index: { _index: index, data: {name: "God Emperor of Dune", "author": "Frank Herbert", "release_date": "1981-05-28", "page_count": 454} } }, + { index: { _index: index, data: {name: "Consider Phlebas", "author": "Iain M. Banks", "release_date": "1987-04-23", "page_count": 471} } }, + { index: { _index: index, data: {name: "Pandora's Star", "author": "Peter F. Hamilton", "release_date": "2004-03-02", "page_count": 768} } }, + { index: { _index: index, data: {name: "Revelation Space", "author": "Alastair Reynolds", "release_date": "2000-03-15", "page_count": 585} } }, + { index: { _index: index, data: {name: "A Fire Upon the Deep", "author": "Vernor Vinge", "release_date": "1992-06-01", "page_count": 613} } }, + { index: { _index: index, data: {name: "Ender's Game", "author": "Orson Scott Card", "release_date": "1985-06-01", "page_count": 324} } }, + { index: { _index: index, data: {name: "1984", "author": "George Orwell", "release_date": "1985-06-01", "page_count": 328} } }, + { index: { _index: index, data: {name: "Fahrenheit 451", "author": "Ray Bradbury", "release_date": "1953-10-15", "page_count": 227} } }, + { index: { _index: index, data: {name: "Brave New World", "author": "Aldous Huxley", "release_date": "1932-06-01", "page_count": 268} } }, + { index: { _index: index, data: {name: "Foundation", "author": "Isaac Asimov", "release_date": "1951-06-01", "page_count": 224} } }, + { index: { _index: index, data: {name: "The Giver", "author": "Lois Lowry", "release_date": "1993-04-26", "page_count": 208} } }, + { index: { _index: index, data: {name: "Slaughterhouse-Five", "author": "Kurt Vonnegut", "release_date": "1969-06-01", "page_count": 275} } }, + { index: { _index: index, data: {name: "The Hitchhiker's Guide to the Galaxy", "author": "Douglas Adams", "release_date": "1979-10-12", "page_count": 180} } }, + { index: { _index: index, data: {name: "Snow Crash", "author": "Neal Stephenson", "release_date": "1992-06-01", "page_count": 470} } }, + { index: { _index: index, data: {name: "Neuromancer", "author": "William Gibson", "release_date": "1984-07-01", "page_count": 271} } }, + { index: { _index: index, data: {name: "The Handmaid's Tale", "author": "Margaret Atwood", "release_date": "1985-06-01", "page_count": 311} } }, + { index: { _index: index, data: {name: "Starship Troopers", "author": "Robert A. Heinlein", "release_date": "1959-12-01", "page_count": 335} } }, + { index: { _index: index, data: {name: "The Left Hand of Darkness", "author": "Ursula K. Le Guin", "release_date": "1969-06-01", "page_count": 304} } }, + { index: { _index: index, data: {name: "The Moon is a Harsh Mistress", "author": "Robert A. Heinlein", "release_date": "1966-04-01", "page_count": 288 } } } + ] + client.bulk(body: documents, refresh: 'wait_for') + end - it 'instantiates a scroll helper' do - expect(scroll_helper).to be_an_instance_of Elasticsearch::Helpers::ScrollHelper - end + after do + client.indices.delete(index: index) + end - it 'searches an index' do - my_documents = [] - while !(documents = scroll_helper.results).empty? - my_documents << documents + it 'instantiates a scroll helper' do + expect(scroll_helper).to be_an_instance_of Elasticsearch::Helpers::ScrollHelper end - expect(my_documents.flatten.size).to eq 24 - end + it 'searches an index' do + my_documents = [] + while !(documents = scroll_helper.results).empty? + my_documents << documents + end - it 'uses enumerable' do - count = 0 - scroll_helper.each { |a| count += 1 } - expect(count).to eq 24 - expect(scroll_helper).to respond_to(:count) - expect(scroll_helper).to respond_to(:reject) - expect(scroll_helper).to respond_to(:uniq) - expect(scroll_helper.map { |a| a['_id'] }.uniq.count).to eq 24 + expect(my_documents.flatten.size).to eq 24 + end + + it 'uses enumerable' do + count = 0 + scroll_helper.each { count += 1 } + expect(count).to eq 24 + expect(scroll_helper).to respond_to(:count) + expect(scroll_helper).to respond_to(:reject) + expect(scroll_helper).to respond_to(:uniq) + expect(scroll_helper.map { |a| a['_id'] }.uniq.count).to eq 24 + end end end From 7f25e4d8a82c9fd0837e314e08684cb0775d04f1 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 3 Jan 2025 10:22:12 +0000 Subject: [PATCH 417/540] [CI] Run Serverless tests --- .buildkite/pipeline.yml | 21 +++++++++++++++++ .buildkite/run-client.sh | 50 +++++++++++++++++++++++++++------------- 2 files changed, 55 insertions(+), 16 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index ba30184799..7bf8cbf506 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -41,3 +41,24 @@ steps: continue_on_failure: true - label: "Log Results" command: ./.buildkite/log-results.sh + - label: ":elasticsearch: Serverless :rspec: API Tests :ruby:" + agents: + provider: "gcp" + env: + RUBY_VERSION: "{{ matrix.ruby }}" + TEST_SUITE: 'api' + RUBY_SOURCE: "{{ matrix.ruby_source }}" + QUIET: false + EC_PROJECT_PREFIX: 'sl_ruby' + CLOUD_CREDENTIALS_PATH: 'secret/ci/elastic-elasticsearch-serverless-ruby/cloud-access' + matrix: + setup: + ruby: + - "3.4" + ruby_source: + - 'ruby' + adjustments: + - with: + ruby_source: 'jruby' + ruby: '9.4' + command: './.buildkite/run-serverless-tests.sh' diff --git a/.buildkite/run-client.sh b/.buildkite/run-client.sh index 01287fe78b..2d2cdb2c2e 100755 --- a/.buildkite/run-client.sh +++ b/.buildkite/run-client.sh @@ -20,20 +20,38 @@ docker build \ mkdir -p elasticsearch-api/tmp +# TODO: Use TEST_SUITE for serverless/stack + echo "--- :ruby: Running $TEST_SUITE tests" -docker run \ - -u "$(id -u)" \ - --network="${network_name}" \ - --env "TEST_ES_SERVER=${elasticsearch_url}" \ - --env "ELASTIC_PASSWORD=${elastic_password}" \ - --env "TEST_SUITE=${TEST_SUITE}" \ - --env "ELASTIC_USER=elastic" \ - --env "BUILDKITE=true" \ - --env "QUIET=${QUIET}" \ - --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ - --env "STACK_VERSION=${STACK_VERSION}" \ - --volume $repo:/usr/src/app \ - --name elasticsearch-ruby \ - --rm \ - elastic/elasticsearch-ruby \ - bundle exec rake es:download_artifacts test:platinum:integration test:rest_api + +if [[ "$TEST_SUITE" == "serverless" ]]; then + docker run \ + -e "ELASTIC_USER=elastic" \ + -e "BUILDKITE=true" \ + -e "QUIET=${QUIET}" \ + -e "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ + -e "ELASTICSEARCH_URL=${ELASTICSEARCH_URL}" \ + -e "API_KEY=${ES_API_SECRET_KEY}" \ + --volume $repo:/usr/src/app \ + --name elasticsearch-ruby \ + --rm \ + elastic/elasticsearch-ruby \ + bundle exec rake info +else + docker run \ + -u "$(id -u)" \ + --network="${network_name}" \ + --env "TEST_ES_SERVER=${elasticsearch_url}" \ + --env "ELASTIC_PASSWORD=${elastic_password}" \ + --env "TEST_SUITE=${TEST_SUITE}" \ + --env "ELASTIC_USER=elastic" \ + --env "BUILDKITE=true" \ + --env "QUIET=${QUIET}" \ + --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ + --env "STACK_VERSION=${STACK_VERSION}" \ + --volume $repo:/usr/src/app \ + --name elasticsearch-ruby \ + --rm \ + elastic/elasticsearch-ruby \ + bundle exec rake es:download_artifacts test:platinum:integration test:rest_api +fi From ca41a398485013f73cfd6ec66ce23a97c213ea09 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 3 Jan 2025 10:23:59 +0000 Subject: [PATCH 418/540] [CI] Create Serverless project --- .buildkite/create-serverless.sh | 47 +++++++++++++++++++++++++++++++++ .buildkite/pipeline.yml | 2 +- .buildkite/run-client.sh | 13 +++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 .buildkite/create-serverless.sh diff --git a/.buildkite/create-serverless.sh b/.buildkite/create-serverless.sh new file mode 100644 index 0000000000..3975748a63 --- /dev/null +++ b/.buildkite/create-serverless.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +set -euo pipefail + +export EC_REGISTER_BACKEND=appex-qa-team-cluster +export EC_ENV=qa +export EC_REGION=aws-eu-west-1 +# Using BUILDKITE_JOB_ID for the name to make it unique: +export EC_PROJECT_NAME="$EC_PROJECT_PREFIX-$BUILDKITE_JOB_ID" + +# fetch cloud creds used by qaf +CLOUD_ACCESS_KEY=$(vault read -field="$EC_ENV" $CLOUD_CREDENTIALS_PATH) +echo "{\"api_key\":{\"$EC_ENV\":\"$CLOUD_ACCESS_KEY\"}}" > "$(pwd)/cloud.json" + +run_qaf() { + cmd=$1 + docker run --rm \ + -e EC_REGISTER_BACKEND \ + -e EC_ENV \ + -e EC_REGION \ + -e EC_PROJECT_NAME \ + -e VAULT_TOKEN \ + -e BUILDKITE \ + -v "$(pwd)/cloud.json:/root/.elastic/cloud.json" \ + docker.elastic.co/appex-qa/qaf:latest \ + bash -c "$cmd" +} + +# ensure serverless instance is deleted even if script errors +cleanup() { + echo -e "--- :elasticsearch: :broom::sparkles: Tear down serverless instance $EC_PROJECT_NAME" + run_qaf 'qaf elastic-cloud projects delete' + rm -rf "$(pwd)/cloud.json" +} +trap cleanup EXIT + +echo -e "--- :elasticsearch: Start serverless instance $EC_PROJECT_NAME" + +run_qaf "qaf elastic-cloud projects create --project-type elasticsearch" +deployment=$(run_qaf "qaf elastic-cloud projects describe $EC_PROJECT_NAME --as-json --show-credentials") + +# Set ELASTICSEARCH_URL and API_KEY variables +export ES_API_SECRET_KEY=$(echo "$deployment" | jq -r '.credentials.api_key') +export ELASTICSEARCH_URL=$(echo "$deployment" | jq -r '.elasticsearch.url') + +echo -e "--- :computer: Environment variables" +echo -e "ELASTICSEARCH_URL $ELASTICSEARCH_URL" diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 7bf8cbf506..dbe8a57ca4 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -46,7 +46,7 @@ steps: provider: "gcp" env: RUBY_VERSION: "{{ matrix.ruby }}" - TEST_SUITE: 'api' + TEST_SUITE: 'serverless' RUBY_SOURCE: "{{ matrix.ruby_source }}" QUIET: false EC_PROJECT_PREFIX: 'sl_ruby' diff --git a/.buildkite/run-client.sh b/.buildkite/run-client.sh index 2d2cdb2c2e..1c9040037c 100755 --- a/.buildkite/run-client.sh +++ b/.buildkite/run-client.sh @@ -9,6 +9,19 @@ repo=`pwd` export RUBY_VERSION=${RUBY_VERSION:-3.1} export TRANSPORT_VERSION=${TRANSPORT_VERSION:-8} +if [[ "$TEST_SUITE" == "serverless" ]]; then + if [[ -z $EC_PROJECT_PREFIX ]]; then + echo -e "\033[31;1mERROR:\033[0m Required environment variable [EC_PROJECT_PREFIX] not set\033[0m" + exit 1 + fi + + # Create a serverless project: + source $script_path/create-serverless.sh + + # Make sure we remove projects: + trap cleanup EXIT +fi + echo "--- :ruby: Building Docker image" docker build \ --file $script_path/Dockerfile \ From 92f6912a170b74e952047e9bada4f1ee6aebe50d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 3 Jan 2025 10:27:40 +0000 Subject: [PATCH 419/540] [CI] Updates pipeline, adds info task --- .buildkite/pipeline.yml | 12 ++--- .buildkite/run-client.sh | 70 ------------------------------ .buildkite/run-serverless-tests.sh | 43 ++++++++++++++++++ rake_tasks/serverless.rake | 24 ++++++++++ 4 files changed, 73 insertions(+), 76 deletions(-) delete mode 100755 .buildkite/run-client.sh create mode 100755 .buildkite/run-serverless-tests.sh create mode 100644 rake_tasks/serverless.rake diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index dbe8a57ca4..14c869df09 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -37,11 +37,7 @@ steps: DEBUG: true command: ./.buildkite/run-yaml-tests.sh artifact_paths: "elasticsearch-api/tmp/*" - - wait: ~ - continue_on_failure: true - - label: "Log Results" - command: ./.buildkite/log-results.sh - - label: ":elasticsearch: Serverless :rspec: API Tests :ruby:" + - label: ":elasticsearch: Serverless :rspec: API Tests :ruby: {{ matrix.ruby_source }} - {{ matrix.ruby }}" agents: provider: "gcp" env: @@ -61,4 +57,8 @@ steps: - with: ruby_source: 'jruby' ruby: '9.4' - command: './.buildkite/run-serverless-tests.sh' + command: ./.buildkite/run-serverless-tests.sh + - wait: ~ + continue_on_failure: true + - label: "Log Results" + command: ./.buildkite/log-results.sh diff --git a/.buildkite/run-client.sh b/.buildkite/run-client.sh deleted file mode 100755 index 1c9040037c..0000000000 --- a/.buildkite/run-client.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env bash -# -# Once called Elasticsearch should be up and running -# -script_path=$(dirname $(realpath -s $0)) -set -euo pipefail -repo=`pwd` - -export RUBY_VERSION=${RUBY_VERSION:-3.1} -export TRANSPORT_VERSION=${TRANSPORT_VERSION:-8} - -if [[ "$TEST_SUITE" == "serverless" ]]; then - if [[ -z $EC_PROJECT_PREFIX ]]; then - echo -e "\033[31;1mERROR:\033[0m Required environment variable [EC_PROJECT_PREFIX] not set\033[0m" - exit 1 - fi - - # Create a serverless project: - source $script_path/create-serverless.sh - - # Make sure we remove projects: - trap cleanup EXIT -fi - -echo "--- :ruby: Building Docker image" -docker build \ - --file $script_path/Dockerfile \ - --tag elastic/elasticsearch-ruby \ - --build-arg RUBY_VERSION=$RUBY_VERSION \ - --build-arg TRANSPORT_VERSION=$TRANSPORT_VERSION \ - --build-arg RUBY_SOURCE=$RUBY_SOURCE \ - . - -mkdir -p elasticsearch-api/tmp - -# TODO: Use TEST_SUITE for serverless/stack - -echo "--- :ruby: Running $TEST_SUITE tests" - -if [[ "$TEST_SUITE" == "serverless" ]]; then - docker run \ - -e "ELASTIC_USER=elastic" \ - -e "BUILDKITE=true" \ - -e "QUIET=${QUIET}" \ - -e "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ - -e "ELASTICSEARCH_URL=${ELASTICSEARCH_URL}" \ - -e "API_KEY=${ES_API_SECRET_KEY}" \ - --volume $repo:/usr/src/app \ - --name elasticsearch-ruby \ - --rm \ - elastic/elasticsearch-ruby \ - bundle exec rake info -else - docker run \ - -u "$(id -u)" \ - --network="${network_name}" \ - --env "TEST_ES_SERVER=${elasticsearch_url}" \ - --env "ELASTIC_PASSWORD=${elastic_password}" \ - --env "TEST_SUITE=${TEST_SUITE}" \ - --env "ELASTIC_USER=elastic" \ - --env "BUILDKITE=true" \ - --env "QUIET=${QUIET}" \ - --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ - --env "STACK_VERSION=${STACK_VERSION}" \ - --volume $repo:/usr/src/app \ - --name elasticsearch-ruby \ - --rm \ - elastic/elasticsearch-ruby \ - bundle exec rake es:download_artifacts test:platinum:integration test:rest_api -fi diff --git a/.buildkite/run-serverless-tests.sh b/.buildkite/run-serverless-tests.sh new file mode 100755 index 0000000000..c85b8bcd4a --- /dev/null +++ b/.buildkite/run-serverless-tests.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Once called Elasticsearch should be up and running +# +script_path=$(dirname $(realpath -s $0)) +set -euo pipefail +repo=`pwd` + +export RUBY_VERSION=${RUBY_VERSION:-3.4} +export TRANSPORT_VERSION=${TRANSPORT_VERSION:-8} + +if [[ -z $EC_PROJECT_PREFIX ]]; then + echo -e "\033[31;1mERROR:\033[0m Required environment variable [EC_PROJECT_PREFIX] not set\033[0m" + exit 1 +fi + +# Create a serverless project: +source $script_path/create-serverless.sh +# Make sure we remove projects: +trap cleanup EXIT + +echo "--- :ruby: Building Docker image" +docker build \ + --file $script_path/Dockerfile \ + --tag elastic/elasticsearch-ruby \ + --build-arg RUBY_VERSION=$RUBY_VERSION \ + --build-arg TRANSPORT_VERSION=$TRANSPORT_VERSION \ + --build-arg RUBY_SOURCE=$RUBY_SOURCE \ + . + +echo "--- :ruby: Running $TEST_SUITE tests" +docker run \ + -e "ELASTIC_USER=elastic" \ + -e "BUILDKITE=true" \ + -e "QUIET=${QUIET}" \ + -e "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ + -e "ELASTICSEARCH_URL=${ELASTICSEARCH_URL}" \ + -e "API_KEY=${ES_API_SECRET_KEY}" \ + --volume $repo:/usr/src/app \ + --name elasticsearch-ruby \ + --rm \ + elastic/elasticsearch-ruby \ + bundle exec rake info diff --git a/rake_tasks/serverless.rake b/rake_tasks/serverless.rake new file mode 100644 index 0000000000..bec2194c39 --- /dev/null +++ b/rake_tasks/serverless.rake @@ -0,0 +1,24 @@ +# 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. +require 'elasticsearch' + +desc 'Server info' +task :info do + client = Elasticsearch::Client.new(url: ENV['ELASTICSEARCH_URL'], api_key: ENV['API_KEY']) + info = client.info + puts "Connected to Elasticsearch cluster #{info['cluster_name']}" +end From 93c567ae80041a22c5002870b87eccf9fd41101e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 3 Jan 2025 16:23:58 +0000 Subject: [PATCH 420/540] [CI] Renames ENV variables for info task --- .buildkite/run-serverless-tests.sh | 2 +- Rakefile | 7 ++++++ .../spec/yaml-test-runner/run.rb | 1 + rake_tasks/serverless.rake | 24 ------------------- 4 files changed, 9 insertions(+), 25 deletions(-) delete mode 100644 rake_tasks/serverless.rake diff --git a/.buildkite/run-serverless-tests.sh b/.buildkite/run-serverless-tests.sh index c85b8bcd4a..2bad4e5a9e 100755 --- a/.buildkite/run-serverless-tests.sh +++ b/.buildkite/run-serverless-tests.sh @@ -35,7 +35,7 @@ docker run \ -e "QUIET=${QUIET}" \ -e "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ -e "ELASTICSEARCH_URL=${ELASTICSEARCH_URL}" \ - -e "API_KEY=${ES_API_SECRET_KEY}" \ + -e "ES_API_KEY=${ES_API_SECRET_KEY}" \ --volume $repo:/usr/src/app \ --name elasticsearch-ruby \ --rm \ diff --git a/Rakefile b/Rakefile index 3d1cbacdea..37377b47d3 100644 --- a/Rakefile +++ b/Rakefile @@ -129,3 +129,10 @@ task :release do puts '-' * 80 end end + +desc 'Server info' +task :info do + client = Elasticsearch::Client.new(url: ENV['TEST_ES_SERVER'], api_key: ENV['ES_API_KEY']) + info = client.info + puts "Connected to Elasticsearch cluster #{info['cluster_name']}" +end diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index d1896627f6..3170865ea2 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -70,6 +70,7 @@ current_branch = `git rev-parse --abbrev-ref HEAD`.strip branch = current_branch.match(/[0-9]\.[0-9]+/)&.[](0) || ENV['ES_YAML_TESTS_BRANCH'] || nil Elasticsearch::Tests::Downloader::run(tests_path, branch) + runner = Elasticsearch::Tests::TestRunner.new(CLIENT, tests_path, logger) runner.add_tests_to_skip('knn_search.yml') # TODO: Extract into file runner.run(ENV['SINGLE_TEST'] || []) diff --git a/rake_tasks/serverless.rake b/rake_tasks/serverless.rake deleted file mode 100644 index bec2194c39..0000000000 --- a/rake_tasks/serverless.rake +++ /dev/null @@ -1,24 +0,0 @@ -# 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. -require 'elasticsearch' - -desc 'Server info' -task :info do - client = Elasticsearch::Client.new(url: ENV['ELASTICSEARCH_URL'], api_key: ENV['API_KEY']) - info = client.info - puts "Connected to Elasticsearch cluster #{info['cluster_name']}" -end From f8b2793ed61055dea574aae1a526383e56bd8b94 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 6 Jan 2025 15:19:09 +0000 Subject: [PATCH 421/540] [CI] Fixes cloud credentials path --- .buildkite/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 14c869df09..36dc65f6da 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -46,7 +46,7 @@ steps: RUBY_SOURCE: "{{ matrix.ruby_source }}" QUIET: false EC_PROJECT_PREFIX: 'sl_ruby' - CLOUD_CREDENTIALS_PATH: 'secret/ci/elastic-elasticsearch-serverless-ruby/cloud-access' + CLOUD_CREDENTIALS_PATH: 'secret/ci/elastic-elasticsearch-ruby/cloud-access' matrix: setup: ruby: From 1fe712d94dec3ae46bf2756966db99f56eee1115 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 9 Jan 2025 16:20:00 +0000 Subject: [PATCH 422/540] [CI] Updates using BUILDKITE env variable --- .buildkite/run-serverless-tests.sh | 3 ++- .buildkite/run-yaml-tests.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 .buildkite/run-yaml-tests.sh diff --git a/.buildkite/run-serverless-tests.sh b/.buildkite/run-serverless-tests.sh index 2bad4e5a9e..b8894e7c3a 100755 --- a/.buildkite/run-serverless-tests.sh +++ b/.buildkite/run-serverless-tests.sh @@ -7,6 +7,7 @@ set -euo pipefail repo=`pwd` export RUBY_VERSION=${RUBY_VERSION:-3.4} +export BUILDKITE=${BUILDKITE:-false} export TRANSPORT_VERSION=${TRANSPORT_VERSION:-8} if [[ -z $EC_PROJECT_PREFIX ]]; then @@ -31,8 +32,8 @@ docker build \ echo "--- :ruby: Running $TEST_SUITE tests" docker run \ -e "ELASTIC_USER=elastic" \ - -e "BUILDKITE=true" \ -e "QUIET=${QUIET}" \ + -e "BUILDKITE=${BUILDKITE}" \ -e "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ -e "ELASTICSEARCH_URL=${ELASTICSEARCH_URL}" \ -e "ES_API_KEY=${ES_API_SECRET_KEY}" \ diff --git a/.buildkite/run-yaml-tests.sh b/.buildkite/run-yaml-tests.sh old mode 100644 new mode 100755 index a463972037..26834810f5 --- a/.buildkite/run-yaml-tests.sh +++ b/.buildkite/run-yaml-tests.sh @@ -13,6 +13,7 @@ echo "--- :elasticsearch: Starting Elasticsearch" DETACH=true bash $script_path/run-elasticsearch.sh export RUBY_VERSION=${RUBY_VERSION:-3.1} +export BUILDKITE=${BUILDKITE:-false} export TRANSPORT_VERSION=${TRANSPORT_VERSION:-8} echo "--- :ruby: Building Docker image" @@ -33,7 +34,7 @@ docker run \ --env "TEST_ES_SERVER=${elasticsearch_url}" \ --env "ELASTIC_PASSWORD=${elastic_password}" \ --env "ELASTIC_USER=elastic" \ - --env "BUILDKITE=true" \ + --env "BUILDKITE=${BUILDKITE}" \ --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ --env "STACK_VERSION=${STACK_VERSION}" \ --env "ES_YAML_TESTS_BRANCH=${ES_YAML_TESTS_BRANCH}" \ From de51e3dd2e39e159e99fc841656ba51e0ca59904 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 9 Jan 2025 16:27:19 +0000 Subject: [PATCH 423/540] [Tests] Refactors initialization of the client for YAML test runner --- elasticsearch-api/spec/yaml-test-runner/run.rb | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index 3170865ea2..24871d5311 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -49,18 +49,13 @@ transport_options = {} end -CLIENT = if ENV['ES_API_KEY'] - Elasticsearch::Client.new(host: host, api_key: ENV['ES_API_KEY'], transport_options: transport_options) - else - Elasticsearch::Client.new(host: host, transport_options: transport_options) - end +options = { host: host, transport_options: transport_options, compression: true } +options.merge!({ api_key: ENV['ES_API_KEY'] }) if ENV['ES_API_KEY'] +CLIENT = Elasticsearch::Client.new(options) tests_path = File.expand_path('./tmp', __dir__) -ruby_version = if defined? JRUBY_VERSION - "jruby-#{JRUBY_VERSION}" - else - "ruby-#{RUBY_VERSION}" - end +ruby_version = defined?(JRUBY_VERSION) ? "jruby-#{JRUBY_VERSION}" : "ruby-#{RUBY_VERSION}" + log_filename = "es-#{Elasticsearch::VERSION}-transport-#{ENV['TRANSPORT_VERSION']}-#{ruby_version}.log" logfile = File.expand_path "../../tmp/#{log_filename}", __dir__ logger = Logger.new(File.open(logfile, 'w')) From 2d3e92f0b9c650f0d568f093bbca15516ef985fc Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 10 Jan 2025 17:28:07 +0000 Subject: [PATCH 424/540] [CI] Set backend to buildkite for qaf --- .buildkite/create-serverless.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/create-serverless.sh b/.buildkite/create-serverless.sh index 3975748a63..e4f6444f10 100644 --- a/.buildkite/create-serverless.sh +++ b/.buildkite/create-serverless.sh @@ -2,7 +2,7 @@ set -euo pipefail -export EC_REGISTER_BACKEND=appex-qa-team-cluster +export EC_REGISTER_BACKEND=buildkite export EC_ENV=qa export EC_REGION=aws-eu-west-1 # Using BUILDKITE_JOB_ID for the name to make it unique: From 383af6788b2c3d1772f25dc678c25e35d01be960 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 10 Jan 2025 17:36:44 +0000 Subject: [PATCH 425/540] [CI] Updates Serverless env --- .buildkite/create-serverless.sh | 4 +++- .buildkite/pipeline.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.buildkite/create-serverless.sh b/.buildkite/create-serverless.sh index e4f6444f10..194708bab2 100644 --- a/.buildkite/create-serverless.sh +++ b/.buildkite/create-serverless.sh @@ -12,6 +12,8 @@ export EC_PROJECT_NAME="$EC_PROJECT_PREFIX-$BUILDKITE_JOB_ID" CLOUD_ACCESS_KEY=$(vault read -field="$EC_ENV" $CLOUD_CREDENTIALS_PATH) echo "{\"api_key\":{\"$EC_ENV\":\"$CLOUD_ACCESS_KEY\"}}" > "$(pwd)/cloud.json" +echo -e "--- Buildkite: ${BUILDKITE}" + run_qaf() { cmd=$1 docker run --rm \ @@ -20,7 +22,7 @@ run_qaf() { -e EC_REGION \ -e EC_PROJECT_NAME \ -e VAULT_TOKEN \ - -e BUILDKITE \ + -e "BUILDKITE=${BUILDKITE}" \ -v "$(pwd)/cloud.json:/root/.elastic/cloud.json" \ docker.elastic.co/appex-qa/qaf:latest \ bash -c "$cmd" diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 36dc65f6da..f32764528b 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -45,7 +45,7 @@ steps: TEST_SUITE: 'serverless' RUBY_SOURCE: "{{ matrix.ruby_source }}" QUIET: false - EC_PROJECT_PREFIX: 'sl_ruby' + EC_PROJECT_PREFIX: 'ruby' CLOUD_CREDENTIALS_PATH: 'secret/ci/elastic-elasticsearch-ruby/cloud-access' matrix: setup: From 676e1ad1169f0a124ccb405f174cf2725c4e498d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 13 Jan 2025 12:44:26 +0000 Subject: [PATCH 426/540] [CI] Install qaf and run directly --- .buildkite/create-serverless.sh | 31 ++++--------------------------- .buildkite/pipeline.yml | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 33 deletions(-) diff --git a/.buildkite/create-serverless.sh b/.buildkite/create-serverless.sh index 194708bab2..cbc03268a5 100644 --- a/.buildkite/create-serverless.sh +++ b/.buildkite/create-serverless.sh @@ -2,44 +2,21 @@ set -euo pipefail -export EC_REGISTER_BACKEND=buildkite -export EC_ENV=qa -export EC_REGION=aws-eu-west-1 # Using BUILDKITE_JOB_ID for the name to make it unique: export EC_PROJECT_NAME="$EC_PROJECT_PREFIX-$BUILDKITE_JOB_ID" -# fetch cloud creds used by qaf -CLOUD_ACCESS_KEY=$(vault read -field="$EC_ENV" $CLOUD_CREDENTIALS_PATH) -echo "{\"api_key\":{\"$EC_ENV\":\"$CLOUD_ACCESS_KEY\"}}" > "$(pwd)/cloud.json" - -echo -e "--- Buildkite: ${BUILDKITE}" - -run_qaf() { - cmd=$1 - docker run --rm \ - -e EC_REGISTER_BACKEND \ - -e EC_ENV \ - -e EC_REGION \ - -e EC_PROJECT_NAME \ - -e VAULT_TOKEN \ - -e "BUILDKITE=${BUILDKITE}" \ - -v "$(pwd)/cloud.json:/root/.elastic/cloud.json" \ - docker.elastic.co/appex-qa/qaf:latest \ - bash -c "$cmd" -} - # ensure serverless instance is deleted even if script errors cleanup() { echo -e "--- :elasticsearch: :broom::sparkles: Tear down serverless instance $EC_PROJECT_NAME" - run_qaf 'qaf elastic-cloud projects delete' - rm -rf "$(pwd)/cloud.json" + qaf elastic-cloud projects delete + rm -rf "~/.elastic/cloud.json" } trap cleanup EXIT echo -e "--- :elasticsearch: Start serverless instance $EC_PROJECT_NAME" -run_qaf "qaf elastic-cloud projects create --project-type elasticsearch" -deployment=$(run_qaf "qaf elastic-cloud projects describe $EC_PROJECT_NAME --as-json --show-credentials") +qaf elastic-cloud projects create --project-type elasticsearch +deployment=$(qaf elastic-cloud projects describe $EC_PROJECT_NAME --as-json --show-credentials) # Set ELASTICSEARCH_URL and API_KEY variables export ES_API_SECRET_KEY=$(echo "$deployment" | jq -r '.credentials.api_key') diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index f32764528b..f34413dba2 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -39,25 +39,31 @@ steps: artifact_paths: "elasticsearch-api/tmp/*" - label: ":elasticsearch: Serverless :rspec: API Tests :ruby: {{ matrix.ruby_source }} - {{ matrix.ruby }}" agents: - provider: "gcp" + image: docker.elastic.co/appex-qa/qaf:latest env: RUBY_VERSION: "{{ matrix.ruby }}" - TEST_SUITE: 'serverless' RUBY_SOURCE: "{{ matrix.ruby_source }}" + TEST_SUITE: serverless QUIET: false - EC_PROJECT_PREFIX: 'ruby' - CLOUD_CREDENTIALS_PATH: 'secret/ci/elastic-elasticsearch-ruby/cloud-access' + EC_PROJECT_PREFIX: ruby + EC_REGISTER_BACKEND: local + EC_REGION: aws-eu-west-1 + EC_ENV: qa matrix: setup: ruby: - - "3.4" + - '3.4' ruby_source: - 'ruby' adjustments: - with: ruby_source: 'jruby' ruby: '9.4' - command: ./.buildkite/run-serverless-tests.sh + commands: + - mkdir ~/.elastic + - touch ~/.elastic/cloud.json + - echo "{\"api_key\":{\"qa\":\"$(vault read -field=qa secret/ci/elastic-elasticsearch-ruby/cloud-access)\"}}" > ~/.elastic/cloud.json + - ./.buildkite/run-serverless-tests.sh - wait: ~ continue_on_failure: true - label: "Log Results" From 09c47467b39b7cc8b1dd5f042f3b8d577a57c343 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 14 Jan 2025 17:46:40 +0000 Subject: [PATCH 427/540] [CI] Separating jobs in pipeline for Serverless --- .buildkite/create-serverless.sh | 19 ++++++++------- .buildkite/pipeline.yml | 37 +++++++++++++++++++++++++----- .buildkite/run-serverless-tests.sh | 12 ++-------- 3 files changed, 42 insertions(+), 26 deletions(-) mode change 100644 => 100755 .buildkite/create-serverless.sh diff --git a/.buildkite/create-serverless.sh b/.buildkite/create-serverless.sh old mode 100644 new mode 100755 index cbc03268a5..65fd9b9e7b --- a/.buildkite/create-serverless.sh +++ b/.buildkite/create-serverless.sh @@ -2,17 +2,14 @@ set -euo pipefail -# Using BUILDKITE_JOB_ID for the name to make it unique: -export EC_PROJECT_NAME="$EC_PROJECT_PREFIX-$BUILDKITE_JOB_ID" - -# ensure serverless instance is deleted even if script errors -cleanup() { - echo -e "--- :elasticsearch: :broom::sparkles: Tear down serverless instance $EC_PROJECT_NAME" - qaf elastic-cloud projects delete - rm -rf "~/.elastic/cloud.json" -} -trap cleanup EXIT +if [[ -z $EC_PROJECT_PREFIX ]]; then + echo -e "\033[31;1mERROR:\033[0m Required environment variable [EC_PROJECT_PREFIX] not set\033[0m" + exit 1 +fi +# Using BUILDKITE_JOB_ID for the name to make it unique: +# export EC_PROJECT_NAME="$EC_PROJECT_PREFIX-$BUILDKITE_JOB_ID" +export EC_PROJECT_NAME="$EC_PROJECT_PREFIX-test" echo -e "--- :elasticsearch: Start serverless instance $EC_PROJECT_NAME" qaf elastic-cloud projects create --project-type elasticsearch @@ -21,6 +18,8 @@ deployment=$(qaf elastic-cloud projects describe $EC_PROJECT_NAME --as-json --sh # Set ELASTICSEARCH_URL and API_KEY variables export ES_API_SECRET_KEY=$(echo "$deployment" | jq -r '.credentials.api_key') export ELASTICSEARCH_URL=$(echo "$deployment" | jq -r '.elasticsearch.url') +buildkite-agent meta-data set "ES_API_SECRET_KEY" $ES_API_SECRET_KEY +buildkite-agent meta-data set "ELASTICSEARCH_URL" $ELASTICSEARCH_URL echo -e "--- :computer: Environment variables" echo -e "ELASTICSEARCH_URL $ELASTICSEARCH_URL" diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index f34413dba2..dada048185 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -37,18 +37,31 @@ steps: DEBUG: true command: ./.buildkite/run-yaml-tests.sh artifact_paths: "elasticsearch-api/tmp/*" - - label: ":elasticsearch: Serverless :rspec: API Tests :ruby: {{ matrix.ruby_source }} - {{ matrix.ruby }}" + - label: "Create :elasticsearch: Serverless projects" + key: "create-serverless" agents: image: docker.elastic.co/appex-qa/qaf:latest + env: + EC_PROJECT_PREFIX: ruby + EC_REGISTER_BACKEND: buildkite + EC_REGION: aws-eu-west-1 + EC_ENV: qa + commands: + - mkdir ~/.elastic + - touch ~/.elastic/cloud.json + - echo "{\"api_key\":{\"qa\":\"$(vault read -field=qa secret/ci/elastic-elasticsearch-ruby/cloud-access)\"}}" > ~/.elastic/cloud.json + - ./.buildkite/create-serverless.sh + - label: "Run :elasticsearch: Serverless :rspec: Tests :ruby:" + key: run-serverless-tests + depends_on: + - step: create-serverless + agents: + provider: "gcp" env: RUBY_VERSION: "{{ matrix.ruby }}" RUBY_SOURCE: "{{ matrix.ruby_source }}" TEST_SUITE: serverless QUIET: false - EC_PROJECT_PREFIX: ruby - EC_REGISTER_BACKEND: local - EC_REGION: aws-eu-west-1 - EC_ENV: qa matrix: setup: ruby: @@ -59,11 +72,23 @@ steps: - with: ruby_source: 'jruby' ruby: '9.4' + command: ./.buildkite/run-serverless-tests.sh + - label: "Destroy :elasticsearch: Serverless projects" + depends_on: + - step: run-serverless-tests + allow_failure: true + agents: + image: docker.elastic.co/appex-qa/qaf:latest + env: + EC_REGISTER_BACKEND: buildkite + EC_ENV: qa + EC_REGION: aws-eu-west-1 + EC_PROJECT_NAME: ruby-test commands: - mkdir ~/.elastic - touch ~/.elastic/cloud.json - echo "{\"api_key\":{\"qa\":\"$(vault read -field=qa secret/ci/elastic-elasticsearch-ruby/cloud-access)\"}}" > ~/.elastic/cloud.json - - ./.buildkite/run-serverless-tests.sh + - qaf elastic-cloud projects delete - wait: ~ continue_on_failure: true - label: "Log Results" diff --git a/.buildkite/run-serverless-tests.sh b/.buildkite/run-serverless-tests.sh index b8894e7c3a..00eef890e5 100755 --- a/.buildkite/run-serverless-tests.sh +++ b/.buildkite/run-serverless-tests.sh @@ -9,16 +9,8 @@ repo=`pwd` export RUBY_VERSION=${RUBY_VERSION:-3.4} export BUILDKITE=${BUILDKITE:-false} export TRANSPORT_VERSION=${TRANSPORT_VERSION:-8} - -if [[ -z $EC_PROJECT_PREFIX ]]; then - echo -e "\033[31;1mERROR:\033[0m Required environment variable [EC_PROJECT_PREFIX] not set\033[0m" - exit 1 -fi - -# Create a serverless project: -source $script_path/create-serverless.sh -# Make sure we remove projects: -trap cleanup EXIT +ELASTICSEARCH_URL=`buildkite-agent meta-data get "ELASTICSEARCH_URL"` +ES_API_SECRET_KEY=`buildkite-agent meta-data get "ES_API_SECRET_KEY"` echo "--- :ruby: Building Docker image" docker build \ From dc1c202df2776c973c23bf58dad8659749df6a70 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 14 Jan 2025 18:23:21 +0000 Subject: [PATCH 428/540] Require gem in Rakefile --- Rakefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Rakefile b/Rakefile index 37377b47d3..62a6205a2b 100644 --- a/Rakefile +++ b/Rakefile @@ -132,6 +132,8 @@ end desc 'Server info' task :info do + require 'elasticsearch' + client = Elasticsearch::Client.new(url: ENV['TEST_ES_SERVER'], api_key: ENV['ES_API_KEY']) info = client.info puts "Connected to Elasticsearch cluster #{info['cluster_name']}" From deb8a32519574d5eb31233592620d53ee701ecbf Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 14 Jan 2025 18:37:25 +0000 Subject: [PATCH 429/540] [CI] Run Serverless tests --- .buildkite/pipeline.yml | 4 +++- .buildkite/run-serverless-tests.sh | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index dada048185..4f3689d8f4 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -51,7 +51,7 @@ steps: - touch ~/.elastic/cloud.json - echo "{\"api_key\":{\"qa\":\"$(vault read -field=qa secret/ci/elastic-elasticsearch-ruby/cloud-access)\"}}" > ~/.elastic/cloud.json - ./.buildkite/create-serverless.sh - - label: "Run :elasticsearch: Serverless :rspec: Tests :ruby:" + - label: "Run :elasticsearch: Serverless :rspec: Tests :ruby: {{ matrix.ruby_source }} {{ matrix.ruby }}" key: run-serverless-tests depends_on: - step: create-serverless @@ -61,6 +61,7 @@ steps: RUBY_VERSION: "{{ matrix.ruby }}" RUBY_SOURCE: "{{ matrix.ruby_source }}" TEST_SUITE: serverless + ES_YAML_TESTS_BRANCH: main QUIET: false matrix: setup: @@ -73,6 +74,7 @@ steps: ruby_source: 'jruby' ruby: '9.4' command: ./.buildkite/run-serverless-tests.sh + artifact_paths: "elasticsearch-api/tmp/*" - label: "Destroy :elasticsearch: Serverless projects" depends_on: - step: run-serverless-tests diff --git a/.buildkite/run-serverless-tests.sh b/.buildkite/run-serverless-tests.sh index 00eef890e5..d145d6e6d3 100755 --- a/.buildkite/run-serverless-tests.sh +++ b/.buildkite/run-serverless-tests.sh @@ -21,8 +21,11 @@ docker build \ --build-arg RUBY_SOURCE=$RUBY_SOURCE \ . +mkdir -p elasticsearch-api/tmp + echo "--- :ruby: Running $TEST_SUITE tests" docker run \ + -u "$(id -u)" \ -e "ELASTIC_USER=elastic" \ -e "QUIET=${QUIET}" \ -e "BUILDKITE=${BUILDKITE}" \ @@ -33,4 +36,4 @@ docker run \ --name elasticsearch-ruby \ --rm \ elastic/elasticsearch-ruby \ - bundle exec rake info + bundle exec bundle exec rake test:yaml From 8bb9618df6e9a03a8e7b71beb968c91645ce959c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 15 Jan 2025 15:15:00 +0000 Subject: [PATCH 430/540] [CI] Refactors Serverless and Stack into one script --- .buildkite/functions/wait-for-container.sh | 2 +- .buildkite/pipeline.yml | 18 ++--- .buildkite/run-yaml-tests.sh | 72 +++++++++++++------ .../spec/yaml-test-runner/run.rb | 2 +- 4 files changed, 57 insertions(+), 37 deletions(-) diff --git a/.buildkite/functions/wait-for-container.sh b/.buildkite/functions/wait-for-container.sh index 32a4498f46..89d65f4e7d 100755 --- a/.buildkite/functions/wait-for-container.sh +++ b/.buildkite/functions/wait-for-container.sh @@ -14,7 +14,7 @@ function wait_for_container { echo "" docker inspect -f "{{range .State.Health.Log}}{{.Output}}{{end}}" ${1} echo -e "\033[34;1mINFO:\033[0m waiting for node $1 to be up\033[0m" - sleep 5; + sleep 10; done; # Always show logs if the container is running, this is very useful both on CI as well as while developing diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 4f3689d8f4..044f2c71e5 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -51,29 +51,19 @@ steps: - touch ~/.elastic/cloud.json - echo "{\"api_key\":{\"qa\":\"$(vault read -field=qa secret/ci/elastic-elasticsearch-ruby/cloud-access)\"}}" > ~/.elastic/cloud.json - ./.buildkite/create-serverless.sh - - label: "Run :elasticsearch: Serverless :rspec: Tests :ruby: {{ matrix.ruby_source }} {{ matrix.ruby }}" + - label: "Run :elasticsearch: Serverless :rspec: Tests :ruby:" key: run-serverless-tests depends_on: - step: create-serverless agents: provider: "gcp" env: - RUBY_VERSION: "{{ matrix.ruby }}" - RUBY_SOURCE: "{{ matrix.ruby_source }}" + RUBY_VERSION: "3.4" + RUBY_SOURCE: "ruby" TEST_SUITE: serverless ES_YAML_TESTS_BRANCH: main QUIET: false - matrix: - setup: - ruby: - - '3.4' - ruby_source: - - 'ruby' - adjustments: - - with: - ruby_source: 'jruby' - ruby: '9.4' - command: ./.buildkite/run-serverless-tests.sh + command: ./.buildkite/run-yaml-tests.sh artifact_paths: "elasticsearch-api/tmp/*" - label: "Destroy :elasticsearch: Serverless projects" depends_on: diff --git a/.buildkite/run-yaml-tests.sh b/.buildkite/run-yaml-tests.sh index 26834810f5..1370d5a5dd 100755 --- a/.buildkite/run-yaml-tests.sh +++ b/.buildkite/run-yaml-tests.sh @@ -5,16 +5,27 @@ # Version 0.1 # script_path=$(dirname $(realpath -s $0)) -source $script_path/functions/imports.sh + +if [[ "$TEST_SUITE" == "serverless" ]]; then + # Get Elasticsearch Serverless credentials and endpoint + export TEST_ES_SERVER=`buildkite-agent meta-data get "ELASTICSEARCH_URL"` + export ES_API_SECRET_KEY=`buildkite-agent meta-data get "ES_API_SECRET_KEY"` +else + # Start Elasticsearch Stack on Docker + source $script_path/functions/imports.sh + echo "--- :elasticsearch: Starting Elasticsearch" + DETACH=true bash $script_path/run-elasticsearch.sh +fi + set -euo pipefail repo=`pwd` -echo "--- :elasticsearch: Starting Elasticsearch" -DETACH=true bash $script_path/run-elasticsearch.sh - export RUBY_VERSION=${RUBY_VERSION:-3.1} export BUILDKITE=${BUILDKITE:-false} export TRANSPORT_VERSION=${TRANSPORT_VERSION:-8} +export QUIET=${QUIET:-false} +export DEBUG=${DEBUG:-false} +export TEST_SUITE=${TEST_SUITE:-platinum} echo "--- :ruby: Building Docker image" docker build \ @@ -27,20 +38,39 @@ docker build \ mkdir -p elasticsearch-api/tmp -echo "--- :ruby: Running :yaml: tests" -docker run \ - -u "$(id -u)" \ - --network="${network_name}" \ - --env "TEST_ES_SERVER=${elasticsearch_url}" \ - --env "ELASTIC_PASSWORD=${elastic_password}" \ - --env "ELASTIC_USER=elastic" \ - --env "BUILDKITE=${BUILDKITE}" \ - --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ - --env "STACK_VERSION=${STACK_VERSION}" \ - --env "ES_YAML_TESTS_BRANCH=${ES_YAML_TESTS_BRANCH}" \ - --env "DEBUG=${DEBUG}" \ - --volume $repo:/usr/src/app \ - --name elasticsearch-ruby \ - --rm \ - elastic/elasticsearch-ruby \ - bundle exec rake test:yaml +if [[ "$TEST_SUITE" == "serverless" ]]; then + echo "--- :ruby: Running :yaml: tests" + docker run \ + -u "$(id -u)" \ + --env "TEST_ES_SERVER=${TEST_ES_SERVER}" \ + --env "ES_API_KEY=${ES_API_SECRET_KEY}" \ + --env "BUILDKITE=${BUILDKITE}" \ + --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ + --env "ES_YAML_TESTS_BRANCH=${ES_YAML_TESTS_BRANCH}" \ + --env "DEBUG=${DEBUG}" \ + --env "QUIET=${QUIET}" \ + --volume $repo:/usr/src/app \ + --name elasticsearch-ruby \ + --rm \ + elastic/elasticsearch-ruby \ + bundle exec rake test:yaml +else + echo "--- :ruby: Running stack tests" + docker run \ + -u "$(id -u)" \ + --network="${network_name}" \ + --env "TEST_ES_SERVER=${elasticsearch_url}" \ + --env "ELASTIC_PASSWORD=${elastic_password}" \ + --env "ELASTIC_USER=elastic" \ + --env "STACK_VERSION=${STACK_VERSION}" \ + --env "BUILDKITE=${BUILDKITE}" \ + --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ + --env "ES_YAML_TESTS_BRANCH=${ES_YAML_TESTS_BRANCH}" \ + --env "DEBUG=${DEBUG}" \ + --env "QUIET=${QUIET}" \ + --volume $repo:/usr/src/app \ + --name elasticsearch-ruby \ + --rm \ + elastic/elasticsearch-ruby \ + bundle exec rake test:yaml +fi diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index 24871d5311..760c2b09a0 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -35,7 +35,7 @@ raw_key = File.read("#{CERTS_PATH}/testnode.key") key = OpenSSL::PKey::RSA.new(raw_key) ca_file = File.expand_path("#{CERTS_PATH}/ca.crt") - host = "https://elastic:#{password}@#{uri.host}:#{uri.port}".freeze + host = "https://elastic:#{password}@#{uri.host}:#{uri.port}".freeze unless ENV['TEST_SUITE'] == 'serverless' transport_options = { ssl: { client_cert: certificate, From ca7e6133b6805a5bcddf7a18e943fbd54d174a30 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 16 Jan 2025 10:30:51 +0000 Subject: [PATCH 431/540] [CI] Allow Serverless tests failure while migrating --- .buildkite/pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 044f2c71e5..fc6dd40faf 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -55,6 +55,8 @@ steps: key: run-serverless-tests depends_on: - step: create-serverless + soft_fail: + - exit_status: 1 agents: provider: "gcp" env: From da921e3aeb324ce2ac2650069b77379b47a5fc2b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 16 Jan 2025 11:17:45 +0000 Subject: [PATCH 432/540] [CI] Log Results error format --- .buildkite/log-results.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.buildkite/log-results.sh b/.buildkite/log-results.sh index 9481b6b5ce..2ee3d01b3a 100755 --- a/.buildkite/log-results.sh +++ b/.buildkite/log-results.sh @@ -14,11 +14,11 @@ for f in $files; do " - FAILED_TESTS=`grep -A1 "E,.*" $f` + FAILED_TESTS=`grep -A1 "E,.*" $f | sed 's/\#/-/g' | sed 's/^--/\n/g'` if [[ -n "$FAILED_TESTS" ]]; then - buildkite-agent annotate --append "Failures in $f - + buildkite-agent annotate --append "
" + buildkite-agent annotate --append "Failures in $f $FAILED_TESTS -" +
" fi done From b0f7dc545c21e49cf73832359b283b360d8111e6 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 16 Jan 2025 14:13:59 +0000 Subject: [PATCH 433/540] [CI] Make Serverless project name unique --- .buildkite/create-serverless.sh | 4 ++-- .buildkite/pipeline.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildkite/create-serverless.sh b/.buildkite/create-serverless.sh index 65fd9b9e7b..7b7d2c1dcf 100755 --- a/.buildkite/create-serverless.sh +++ b/.buildkite/create-serverless.sh @@ -8,8 +8,7 @@ if [[ -z $EC_PROJECT_PREFIX ]]; then fi # Using BUILDKITE_JOB_ID for the name to make it unique: -# export EC_PROJECT_NAME="$EC_PROJECT_PREFIX-$BUILDKITE_JOB_ID" -export EC_PROJECT_NAME="$EC_PROJECT_PREFIX-test" +export EC_PROJECT_NAME="$EC_PROJECT_PREFIX-$BUILDKITE_JOB_ID" echo -e "--- :elasticsearch: Start serverless instance $EC_PROJECT_NAME" qaf elastic-cloud projects create --project-type elasticsearch @@ -20,6 +19,7 @@ export ES_API_SECRET_KEY=$(echo "$deployment" | jq -r '.credentials.api_key') export ELASTICSEARCH_URL=$(echo "$deployment" | jq -r '.elasticsearch.url') buildkite-agent meta-data set "ES_API_SECRET_KEY" $ES_API_SECRET_KEY buildkite-agent meta-data set "ELASTICSEARCH_URL" $ELASTICSEARCH_URL +buildkite-agent meta-data set "EC_PROJECT_NAME" $EC_PROJECT_NAME echo -e "--- :computer: Environment variables" echo -e "ELASTICSEARCH_URL $ELASTICSEARCH_URL" diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index fc6dd40faf..5696edca12 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -77,10 +77,10 @@ steps: EC_REGISTER_BACKEND: buildkite EC_ENV: qa EC_REGION: aws-eu-west-1 - EC_PROJECT_NAME: ruby-test commands: - mkdir ~/.elastic - touch ~/.elastic/cloud.json + - export EC_PROJECT_NAME=`buildkite-agent meta-data get "EC_PROJECT_NAME"` - echo "{\"api_key\":{\"qa\":\"$(vault read -field=qa secret/ci/elastic-elasticsearch-ruby/cloud-access)\"}}" > ~/.elastic/cloud.json - qaf elastic-cloud projects delete - wait: ~ From 2fdad800dc8ed34223ce95edbd4e270ecd966001 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 16 Jan 2025 14:20:30 +0000 Subject: [PATCH 434/540] [Gem] Lock concurrent-ruby for JRuby 9.3 --- elasticsearch-api/elasticsearch-api.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/elasticsearch-api.gemspec b/elasticsearch-api/elasticsearch-api.gemspec index 73f8917072..f576910773 100644 --- a/elasticsearch-api/elasticsearch-api.gemspec +++ b/elasticsearch-api/elasticsearch-api.gemspec @@ -47,7 +47,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'ansi' s.add_development_dependency 'bundler' s.add_development_dependency 'elasticsearch' - s.add_development_dependency 'elasticsearch-test-runner' unless defined?(JRUBY_VERSION) && JRUBY_VERSION <= "9.4" + s.add_development_dependency 'elasticsearch-test-runner' unless defined?(JRUBY_VERSION) && JRUBY_VERSION <= '9.4' s.add_development_dependency 'minitest' s.add_development_dependency 'minitest-reporters', '>= 1.6' s.add_development_dependency 'mocha' @@ -57,6 +57,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'yard' # Gems for testing integrations + s.add_development_dependency 'concurrent-ruby', '1.3.4' if defined? JRUBY_VERSION && JRUBY_VERSION < '9.4' s.add_development_dependency 'activesupport' s.add_development_dependency 'hashie' s.add_development_dependency 'jbuilder' From 61b8ff63c455eca4a47abf986344abdc9c4dda4a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 17 Jan 2025 09:57:11 +0000 Subject: [PATCH 435/540] [CI] Add test_suite to log filename --- .buildkite/run-yaml-tests.sh | 2 ++ elasticsearch-api/spec/yaml-test-runner/run.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.buildkite/run-yaml-tests.sh b/.buildkite/run-yaml-tests.sh index 1370d5a5dd..59faabb19c 100755 --- a/.buildkite/run-yaml-tests.sh +++ b/.buildkite/run-yaml-tests.sh @@ -47,6 +47,7 @@ if [[ "$TEST_SUITE" == "serverless" ]]; then --env "BUILDKITE=${BUILDKITE}" \ --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ --env "ES_YAML_TESTS_BRANCH=${ES_YAML_TESTS_BRANCH}" \ + --env "TEST_SUITE=${TEST_SUITE}" \ --env "DEBUG=${DEBUG}" \ --env "QUIET=${QUIET}" \ --volume $repo:/usr/src/app \ @@ -66,6 +67,7 @@ else --env "BUILDKITE=${BUILDKITE}" \ --env "TRANSPORT_VERSION=${TRANSPORT_VERSION}" \ --env "ES_YAML_TESTS_BRANCH=${ES_YAML_TESTS_BRANCH}" \ + --env "TEST_SUITE=${TEST_SUITE}" \ --env "DEBUG=${DEBUG}" \ --env "QUIET=${QUIET}" \ --volume $repo:/usr/src/app \ diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index 760c2b09a0..c0167c5ec9 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -56,7 +56,7 @@ tests_path = File.expand_path('./tmp', __dir__) ruby_version = defined?(JRUBY_VERSION) ? "jruby-#{JRUBY_VERSION}" : "ruby-#{RUBY_VERSION}" -log_filename = "es-#{Elasticsearch::VERSION}-transport-#{ENV['TRANSPORT_VERSION']}-#{ruby_version}.log" +log_filename = "es-#{Elasticsearch::VERSION}-#{ENV['TEST_SUITE']}-transport-#{ENV['TRANSPORT_VERSION']}-#{ruby_version}.log" logfile = File.expand_path "../../tmp/#{log_filename}", __dir__ logger = Logger.new(File.open(logfile, 'w')) logger.level = ENV['DEBUG'] ? Logger::DEBUG : Logger::WARN From d7bc81b78034e3f81bd761c4216cbcd6a9a8ce1d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 17 Jan 2025 10:38:06 +0000 Subject: [PATCH 436/540] [CI] Adds client options for running Serverless YAML tests --- .../spec/yaml-test-runner/run.rb | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index c0167c5ec9..701d26b801 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -29,13 +29,17 @@ password = ENV['ELASTIC_PASSWORD'] || 'changeme' uri = URI.parse(host) +def serverless? + ENV['TEST_SUITE'] == 'serverless' +end + if uri.is_a?(URI::HTTPS) raw_certificate = File.read("#{CERTS_PATH}/testnode.crt") certificate = OpenSSL::X509::Certificate.new(raw_certificate) raw_key = File.read("#{CERTS_PATH}/testnode.key") key = OpenSSL::PKey::RSA.new(raw_key) ca_file = File.expand_path("#{CERTS_PATH}/ca.crt") - host = "https://elastic:#{password}@#{uri.host}:#{uri.port}".freeze unless ENV['TEST_SUITE'] == 'serverless' + host = "https://elastic:#{password}@#{uri.host}:#{uri.port}".freeze unless serverless? transport_options = { ssl: { client_cert: certificate, @@ -49,8 +53,22 @@ transport_options = {} end -options = { host: host, transport_options: transport_options, compression: true } +options = { + host: host, + transport_options: transport_options, +} options.merge!({ api_key: ENV['ES_API_KEY'] }) if ENV['ES_API_KEY'] + +if serverless? + options.merge!( + { + retry_on_status: [409], + retry_on_failure: 10, + delay_on_retry: 60_000, + request_timeout: 120 + } + ) +end CLIENT = Elasticsearch::Client.new(options) tests_path = File.expand_path('./tmp', __dir__) From e57adc0d2df6b44f8f2d6aea20930d3508176e8a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 20 Jan 2025 08:56:10 +0000 Subject: [PATCH 437/540] [API] Adds hard boolean parameter to connector.delete, updates docs --- .../lib/elasticsearch/api/actions/cluster/get_settings.rb | 2 +- .../lib/elasticsearch/api/actions/connector/delete.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb index 8cff9de9d4..12beaf9acc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb @@ -25,7 +25,7 @@ module Actions # Returns cluster settings. # # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Boolean] :include_defaults Whether to return all default clusters setting. # @option arguments [Hash] :headers Custom HTTP headers diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb index 4e73882b30..a10c9e3058 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb @@ -29,6 +29,7 @@ module Actions # support SLA of official GA features. # # @option arguments [String] :connector_id The unique identifier of the connector to be deleted. + # @option arguments [Boolean] :hard If true, the connector doc is deleted. If false, connector doc is marked as deleted (soft-deleted). # @option arguments [Boolean] :delete_sync_jobs Determines whether associated sync jobs are also deleted. # @option arguments [Hash] :headers Custom HTTP headers # From f33224d7f12767e2aab818234f732f8236bd8d18 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 20 Jan 2025 08:56:23 +0000 Subject: [PATCH 438/540] [API] Removes indices.unfreeze --- .../api/actions/indices/unfreeze.rb | 71 -------------- .../api/actions/indices/unfreeze_spec.rb | 97 ------------------- 2 files changed, 168 deletions(-) delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb delete mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb deleted file mode 100644 index 6263d97b2b..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb +++ /dev/null @@ -1,71 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Indices - module Actions - # Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again. - # - # @option arguments [String] :index The name of the index to unfreeze - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [String] :wait_for_active_shards Sets the number of active shards to wait for before the operation returns. - # @option arguments [Hash] :headers Custom HTTP headers - # - # *Deprecation notice*: - # Frozen indices are deprecated because they provide no benefit given improvements in heap memory utilization. They will be removed in a future release. - # Deprecated since version 7.14.0 - # - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html - # - def unfreeze(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'indices.unfreeze' } - - defined_params = [:index].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 'index' missing" unless arguments[:index] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _index = arguments.delete(:index) - - method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_unfreeze" - 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/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb deleted file mode 100644 index b9e48d1c44..0000000000 --- a/elasticsearch-api/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb +++ /dev/null @@ -1,97 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.indices#unfreeze' do - - let(:expected_args) do - [ - 'POST', - url, - params, - nil, - {}, - { defined_params: { index: 'foo' }, endpoint: 'indices.unfreeze' } - ] - end - - let(:params) do - {} - end - - context 'when there is no index specified' do - - let(:client) do - Class.new { include Elasticsearch::API }.new - end - - it 'raises an exception' do - expect { - client.indices.unfreeze - }.to raise_exception(ArgumentError) - end - end - - context 'when an index is specified' do - - let(:url) do - 'foo/_unfreeze' - end - - it 'performs the request' do - expect(client_double.indices.unfreeze(index: 'foo')).to be_a Elasticsearch::API::Response - end - end - - context 'when params are specified' do - - let(:params) do - { timeout: '1s' } - end - - let(:url) do - 'foo/_unfreeze' - end - - it 'performs the request' do - expect(client_double.indices.unfreeze(index: 'foo', timeout: '1s')).to be_a Elasticsearch::API::Response - end - end - - context 'when the path must be URL-escaped' do - - let(:url) do - 'foo%5Ebar/_unfreeze' - end - - let(:expected_args) do - [ - 'POST', - url, - params, - nil, - {}, - { defined_params: { index: 'foo^bar' }, endpoint: 'indices.unfreeze' } - ] - end - - it 'performs the request' do - expect(client_double.indices.unfreeze(index: 'foo^bar')).to be_a Elasticsearch::API::Response - end - end -end From 4689b2e81df97affe0ddbfa8ba0cf0fb8973b94a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 20 Jan 2025 09:09:15 +0000 Subject: [PATCH 439/540] [CI] Visual detail in failures - log results --- .buildkite/log-results.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/log-results.sh b/.buildkite/log-results.sh index 2ee3d01b3a..d3fb1c4e43 100755 --- a/.buildkite/log-results.sh +++ b/.buildkite/log-results.sh @@ -17,7 +17,7 @@ for f in $files; do FAILED_TESTS=`grep -A1 "E,.*" $f | sed 's/\#/-/g' | sed 's/^--/\n/g'` if [[ -n "$FAILED_TESTS" ]]; then buildkite-agent annotate --append "
" - buildkite-agent annotate --append "Failures in $f + buildkite-agent annotate --append ":x: Failures in $f $FAILED_TESTS
" fi From 51aed0881a56ebfc1507cdf464215936feaaebdf Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 22 Jan 2025 16:59:16 +0000 Subject: [PATCH 440/540] [CI] Removes old buildkite job --- .buildkite/run-tests.sh | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100755 .buildkite/run-tests.sh diff --git a/.buildkite/run-tests.sh b/.buildkite/run-tests.sh deleted file mode 100755 index 4aab738b3d..0000000000 --- a/.buildkite/run-tests.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# -# Script to run Elasticsearch container and Elasticsearch client integration tests on Buildkite -# -# Version 0.1 -# -script_path=$(dirname $(realpath -s $0)) -source $script_path/functions/imports.sh -set -euo pipefail - -echo "--- :elasticsearch: Starting Elasticsearch" -DETACH=true bash $script_path/run-elasticsearch.sh - -bash $script_path/run-client.sh From 8f1bda962a94f957b53cd824f0aef88ebe5ee35d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 22 Jan 2025 17:10:46 +0000 Subject: [PATCH 441/540] [CI] Renames Elasticsearch test suite tasks --- elasticsearch-api/Rakefile | 2 +- rake_tasks/test_tasks.rake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/elasticsearch-api/Rakefile b/elasticsearch-api/Rakefile index 58c9dede1e..8903d68c92 100644 --- a/elasticsearch-api/Rakefile +++ b/elasticsearch-api/Rakefile @@ -38,7 +38,7 @@ namespace :test do t.exclude_pattern = 'spec/platinum/**/*_spec.rb' end - desc 'Run Rest API Spec tests' + desc 'Run Elasticsearch test suite free tests.' RSpec::Core::RakeTask.new(:rest_api) do |t| test_dir = Rake.application.original_dir t.pattern = "#{test_dir}/spec/rest_api/rest_api_yaml_spec.rb" diff --git a/rake_tasks/test_tasks.rake b/rake_tasks/test_tasks.rake index bd375d779f..f29b14909f 100644 --- a/rake_tasks/test_tasks.rake +++ b/rake_tasks/test_tasks.rake @@ -47,15 +47,15 @@ namespace :test do end end - desc 'Run rest api tests' - task rest_api: ['es:wait_for_green'] do + desc 'Run Elasticsearch test suite free tests.' + task es_free: ['es:wait_for_green'] do puts '-' * 80 sh "cd #{CURRENT_PATH.join('elasticsearch-api')} && unset BUNDLE_GEMFILE && bundle exec rake test:rest_api" puts "\n" end - desc 'Run security (Platinum) rest api yaml tests' - task security: 'es:wait_for_green' do + desc 'Run Elasticsearch test suite platinum tests.' + task es_platinum: 'es:wait_for_green' do puts '-' * 80 sh "cd #{CURRENT_PATH.join('elasticsearch-api')} && unset BUNDLE_GEMFILE && TEST_SUITE=platinum bundle exec rake test:rest_api" puts "\n" From 996e3b3c00977cfef7a3a09465fb4113a503e15a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 22 Jan 2025 17:15:35 +0000 Subject: [PATCH 442/540] [DOCS] Updates docs for Elasticsearch test suite in api --- elasticsearch-api/api-spec-testing/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/api-spec-testing/README.md b/elasticsearch-api/api-spec-testing/README.md index a1dcffce0d..0e03647e40 100644 --- a/elasticsearch-api/api-spec-testing/README.md +++ b/elasticsearch-api/api-spec-testing/README.md @@ -1,6 +1,10 @@ # Rest API YAML Test Runner -The specs in `elasticsearch-api` automatically run the tests from [Elasticsearch's REST API Spec tests](https://github.com/elastic/elasticsearch/tree/main/rest-api-spec/src/main/resources/rest-api-spec/test#test-suite). The test runner is defined in the `spec` folder, starting with the `rest_api_yaml_spec.rb` file. +The integration tests on this project run the [Elasticsearch Client tests](https://github.com/elastic/elasticsearch-clients-tests/) with the [Elasticsearch Tests Runner](https://github.com/elastic/es-test-runner-ruby/) library. This runs in CI against an Elasticsearch cluster in Docker. The [Elasticsearch's REST API Spec tests](https://github.com/elastic/elasticsearch/tree/main/rest-api-spec/src/main/resources/rest-api-spec/test#test-suite) can still be ran following the instructions below: + +## Elasticsearch Test Suite + +The specs in `elasticsearch-api` can run the tests from [Elasticsearch's REST API Spec tests](https://github.com/elastic/elasticsearch/tree/main/rest-api-spec/src/main/resources/rest-api-spec/test#test-suite). The test runner is defined in the `spec` folder, starting with the `rest_api_yaml_spec.rb` file. You can run the tests with Rake. The main task is `rake test:rest_api`. This task will evaluate the `TEST_SUITE` environment variable. It will run either the `free` or `platinum` tests suites depending on the value of `TEST_SUITE`. If you don't set this value, the task will run the `free` test suite by default. To run the `platinum` test suite use: ``` From 6dcae4f8a39450d40f18cad6b948cbc690b8b8af Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 22 Jan 2025 17:19:11 +0000 Subject: [PATCH 443/540] [DOCS] Updates 9.x CHANGELOG --- CHANGELOG-9.x.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG-9.x.md b/CHANGELOG-9.x.md index a0ed0e0de1..c94e5aa0d6 100644 --- a/CHANGELOG-9.x.md +++ b/CHANGELOG-9.x.md @@ -6,14 +6,19 @@ The size of both `elasticsearch` and `elasticsearch-api` gems will be smaller, s The required Ruby version is set to `2.6` to keep compatiblity wit JRuby 9.3. However, we only test the code against currently supported Ruby versions. +## Elasticsearch Serverless + +The CI build now runs tests to ensure compatibility with Elasticsearch Serverless. You can use this gem for your Serverless deployments. + ## Elasticsearch API ### Development #### Testing -Migrated away from the Elasticsearch REST API tests and test runner in CI. We now run the [Elasticsearch Client tests](https://github.com/elastic/elasticsearch-clients-tests/) with the [Elasticsearch Tests Runner](https://github.com/elastic/es-test-runner-ruby). This gives us more control on what we're testing and makes the Buildkite build way faster in Pull Requests and scheduled builds. +The gem migrated away from the Elasticsearch REST API tests and test runner in CI. We now run the [Elasticsearch Client tests](https://github.com/elastic/elasticsearch-clients-tests/) with the [Elasticsearch Tests Runner](https://github.com/elastic/es-test-runner-ruby). This gives us more control on what we're testing and makes the Buildkite build way faster in Pull Requests and scheduled builds. #### Rake tasks -Some old rake tasks that were not being used have been removed. The rest were streamlined, the `es` namespace has been streamlined to make it easier to run Elasticsearch with Docker during development. The `docker` namespace was merged into `es`. +* Some old rake tasks that were not being used have been removed. The rest were streamlined, the `es` namespace has been streamlined to make it easier to run Elasticsearch with Docker during development. The `docker` namespace was merged into `es`. +* Elasticsearch's REST API Spec tests can still be ran with `rake test:es_free` and `rake test:es_platinum`. From 32e25314e4c06efecf9d333684300b660807e1e7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 22 Jan 2025 17:25:00 +0000 Subject: [PATCH 444/540] [API] Adds unified_inference --- .../actions/inference/unified_inference.rb | 68 +++++++++++++++++++ .../inference/unified_inference_spec.rb | 36 ++++++++++ 2 files changed, 104 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/unified_inference.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/inference/unified_inference_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/unified_inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/unified_inference.rb new file mode 100644 index 0000000000..f06a42fbef --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/unified_inference.rb @@ -0,0 +1,68 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Inference + module Actions + # Perform inference using the Unified Schema + # + # @option arguments [String] :inference_id The inference Id + # @option arguments [String] :task_type The task type + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The inference payload + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/unified-inference-api.html + # + def unified_inference(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.unified_inference' } + + defined_params = %i[inference_id task_type].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 'inference_id' missing" unless arguments[:inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _inference_id = arguments.delete(:inference_id) + + _task_type = arguments.delete(:task_type) + + method = Elasticsearch::API::HTTP_POST + path = if _task_type && _inference_id + "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}/_unified" + else + "_inference/#{Utils.__listify(_inference_id)}/_unified" + end + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/unified_inference_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/unified_inference_spec.rb new file mode 100644 index 0000000000..daed8332d7 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/unified_inference_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.unified_inference' do + let(:expected_args) do + [ + 'POST', + '_inference/foo/bar/_unified', + {}, + nil, + {}, + { defined_params: { inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.unified_inference' } + ] + end + + it 'performs the request' do + expect(client_double.inference.unified_inference(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end From c894b6b3aedeb5d55d7841d4dec4b805d85360f3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 4 Oct 2024 11:56:00 +0100 Subject: [PATCH 445/540] [DOCS] Updates README with start-local --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 615ce9580e..8e87f0340e 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,18 @@ Elasticsearch language clients are only backwards compatible with default distri | 8.x | → | 8.x | 8.x | | main | → | main | | +## Try Elasticsearch and Kibana locally + +If you want to try Elasticsearch and Kibana locally, you can run the following command: + +```bash +curl -fsSL https://elastic.co/start-local | sh +``` + +This will run Elasticsearch at http://localhost:9200 and Kibana at http://localhost:5601 using Docker. + +More information is available [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/run-elasticsearch-locally.html). + ## Development See [CONTRIBUTING](https://github.com/elastic/elasticsearch-ruby/blob/main/CONTRIBUTING.md). From 8d8a67835d63bafd0fa3aa51f721ca49e60a1518 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 29 Jan 2025 14:21:35 +0000 Subject: [PATCH 446/540] [API] Adds keep_alive Time parameter to async_search.submit --- .../lib/elasticsearch/api/actions/async_search/submit.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb index 318b4e0e90..34c9b80ae1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb @@ -27,6 +27,7 @@ module Actions # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response # @option arguments [Boolean] :keep_on_completion Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false) + # @option arguments [Time] :keep_alive Update the time interval in which the results (partial or final) for this search will be available # @option arguments [Number] :batched_reduce_size The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available. # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to true # @option arguments [String] :analyzer The analyzer to use for the query string From 22eedabb388d40f8ae7e76349f251928430113a3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 29 Jan 2025 14:23:44 +0000 Subject: [PATCH 447/540] [API] Adds esql.async_query_stop --- .../api/actions/esql/async_query_stop.rb | 60 +++++++++++++++++++ .../api/actions/esql/async_query_stop_spec.rb | 35 +++++++++++ 2 files changed, 95 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb create mode 100644 elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_stop_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb new file mode 100644 index 0000000000..0897edd15a --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb @@ -0,0 +1,60 @@ +# 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. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Esql + module Actions + # Stops a previously submitted async query request given its ID and collects the results. + # + # @option arguments [String] :id The async query ID + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-stop-api.html + # + def async_query_stop(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_stop' } + + defined_params = [:id].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 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_POST + path = "_query/async/#{Utils.__listify(_id)}/stop" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_stop_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_stop_spec.rb new file mode 100644 index 0000000000..48f61e409f --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_stop_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.esql#async_query_stop' do + let(:expected_args) do + [ + 'POST', + '_query/async/foo/stop', + {}, + nil, + {}, + { endpoint: 'esql.async_query_stop', defined_params: { id: 'foo' } } + ] + end + + it 'performs the request' do + expect(client_double.esql.async_query_stop(id: 'foo')).to be_a Elasticsearch::API::Response + end +end From 47f7a2d2898c2929e6e5ffc92f79e0620fe6f8ea Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Thu, 30 Jan 2025 17:18:44 +0100 Subject: [PATCH 448/540] github-action: Add AsciiDoc freeze warning (#2570) * github-action: Add AsciiDoc freeze warning * github-action: Add AsciiDoc freeze warning --- .../workflows/comment-on-asciidoc-changes.yml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/comment-on-asciidoc-changes.yml diff --git a/.github/workflows/comment-on-asciidoc-changes.yml b/.github/workflows/comment-on-asciidoc-changes.yml new file mode 100644 index 0000000000..8e5f836b14 --- /dev/null +++ b/.github/workflows/comment-on-asciidoc-changes.yml @@ -0,0 +1,21 @@ +--- +name: Comment on PR for .asciidoc changes + +on: + # We need to use pull_request_target to be able to comment on PRs from forks + pull_request_target: + types: + - synchronize + - opened + - reopened + branches: + - main + - master + - "9.0" + +jobs: + comment-on-asciidoc-change: + permissions: + contents: read + pull-requests: write + uses: elastic/docs-builder/.github/workflows/comment-on-asciidoc-changes.yml@main From 5b16656669082dfe0460e2a54859b63d53f2640a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 3 Feb 2025 10:51:12 +0000 Subject: [PATCH 449/540] [API] Adds `include_source_on_error` parameter: True or false if to include the document source in the error message in case of parsing errors. Defaults to true. APIs affected: bulk, create, index, update --- elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb | 1 + elasticsearch-api/lib/elasticsearch/api/actions/create.rb | 1 + .../lib/elasticsearch/api/actions/enrich/get_policy.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/index.rb | 1 + .../actions/index_lifecycle_management/migrate_to_data_tiers.rb | 1 + elasticsearch-api/lib/elasticsearch/api/actions/update.rb | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index 2d33e77108..c1a0491414 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -35,6 +35,7 @@ module Actions # @option arguments [Boolean] :require_alias If true, the request’s actions must target an index alias. Defaults to false. # @option arguments [Boolean] :require_data_stream If true, the request's actions must target a data stream (existing or to-be-created). Default to false # @option arguments [Boolean] :list_executed_pipelines Sets list_executed_pipelines for all incoming documents. Defaults to unset (false) + # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Defaults to true. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [String|Array] :body The operation definition and data (action-data pairs), separated by newlines. Array of Strings, Header/Data pairs, # or the conveniency "combined" format can be passed, refer to Elasticsearch::API::Utils.__bulkify documentation. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb index b17cc55635..cc1cc723a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb @@ -34,6 +34,7 @@ module Actions # @option arguments [Number] :version Explicit version number for concurrency control # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) # @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with + # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Defaults to true. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The document (*Required*) # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb index 802e5d1027..76ef6e7367 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb @@ -25,7 +25,7 @@ module Actions # Gets information about an enrich policy. # # @option arguments [List] :name A comma-separated list of enrich policy names - # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb index d691aa13d9..311e3d1a3d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb @@ -37,6 +37,7 @@ module Actions # @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with # @option arguments [Boolean] :require_alias When true, requires destination to be an alias. Default is false # @option arguments [Boolean] :require_data_stream When true, requires the destination to be a data stream (existing or to-be-created). Default is false + # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Defaults to true. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The document (*Required*) # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb index c75e5a8bb0..f459f1115d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb @@ -24,6 +24,7 @@ module IndexLifecycleManagement module Actions # Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing # + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Boolean] :dry_run If set to true it will simulate the migration, providing a way to retrieve the ILM policies and indices that need to be migrated. The default is false # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Optionally specify a legacy index template name to delete and optionally specify a node attribute name used for index shard routing (defaults to "data") diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb index 8039f1a25b..1454a5e592 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb @@ -37,6 +37,7 @@ module Actions # @option arguments [Number] :if_seq_no only perform the update operation if the last operation that has changed the document has the specified sequence number # @option arguments [Number] :if_primary_term only perform the update operation if the last operation that has changed the document has the specified primary term # @option arguments [Boolean] :require_alias When true, requires destination is an alias. Default is false + # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Defaults to true. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The request definition requires either `script` or partial `doc` (*Required*) # From b1abea82dd0b23eb701bb1d425ef0bde7139f5e9 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 3 Feb 2025 10:52:19 +0000 Subject: [PATCH 450/540] [API] Updates inference.update to use PUT --- .../lib/elasticsearch/api/actions/inference/update.rb | 2 +- .../spec/elasticsearch/api/actions/inference/update_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb index 2a3fb1a22e..00bb270ee5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb @@ -50,7 +50,7 @@ def update(arguments = {}) _task_type = arguments.delete(:task_type) - method = Elasticsearch::API::HTTP_POST + method = Elasticsearch::API::HTTP_PUT path = if _task_type && _inference_id "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}/_update" else diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/update_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/update_spec.rb index a8fdbf1b7a..6f29cd0b58 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/update_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/update_spec.rb @@ -20,7 +20,7 @@ describe 'client#inference.update' do let(:expected_args) do [ - 'POST', + 'PUT', '_inference/foo/bar/_update', {}, nil, From 7d2aaed00fe77995179a0ae1d6adf831757f3de8 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 23 Jan 2025 16:07:29 +0000 Subject: [PATCH 451/540] [API] Refactors testing in elasticsearch-api Reorganizes directories, removes unnecessary tests. Keeping a minimal integration test suite and counting on YAML test runner for API coverage. Migrating minitest unit tests for api/actions to RSpec. --- .../api_key_spec.rb} | 58 +++---- .../health => integration}/health_spec.rb | 24 ++- .../spec_helper.rb} | 15 +- .../integration/analytics/usage_spec.rb | 56 ------- .../api_key/api_key_admin_user_spec.rb | 127 -------------- .../api_key/api_key_cross_cluster_spec.rb | 113 ------------- .../api_key/api_key_invalidation_spec.rb | 105 ------------ .../integration/api_key/api_key_query_spec.rb | 149 ----------------- .../api_key/api_key_query_with_aggs_spec.rb | 120 -------------- .../integration/api_key/api_key_spec.rb | 156 ------------------ .../api_key/api_key_update_spec.rb | 134 --------------- .../integration/eql/eql_async_spec.rb | 72 -------- .../integration/ml/get_memory_stats_spec.rb | 47 ------ .../integration/security/users_query_spec.rb | 49 ------ .../service_accounts/service_accounts_spec.rb | 65 -------- .../integration/snapshots/snapshots_spec.rb | 84 ---------- .../spatial/script_doc_values_spec.rb | 147 ----------------- .../platinum/integration/token/token_spec.rb | 94 ----------- .../platinum/unit/async_search/delete_test.rb | 39 ----- .../platinum/unit/async_search/get_test.rb | 39 ----- .../platinum/unit/async_search/status_test.rb | 39 ----- .../platinum/unit/async_search/submit_test.rb | 50 ------ .../unit/enrich/delete_policy_test.rb | 43 ----- .../spec/platinum/unit/eql/delete_test.rb | 46 ------ .../spec/platinum/unit/eql/get_status_test.rb | 46 ------ .../spec/platinum/unit/eql/get_test.rb | 46 ------ .../spec/platinum/unit/eql/search_test.rb | 52 ------ .../spec/platinum/unit/graph/explore_test.rb | 43 ----- .../explain_test.rb | 43 ----- .../get_status_test.rb | 43 ----- .../move_to_step.rb | 43 ----- .../remove_policy_test.rb | 43 ----- .../retry_policy_test.rb | 43 ----- .../index_lifecycle_management/start_test.rb | 43 ----- .../index_lifecycle_management/stop_test.rb | 43 ----- .../unit/indices/create_data_stream_test.rb | 46 ------ .../unit/indices/data_stream_stats_test.rb | 54 ------ .../unit/indices/delete_data_stream_test.rb | 46 ------ .../platinum/unit/indices/downsample_test.rb | 58 ------- .../unit/indices/get_data_stream_test.rb | 50 ------ .../indices/migrate_to_data_stream_test.rb | 46 ------ .../unit/indices/modify_data_stream_test.rb | 46 ------ .../unit/indices/promote_data_stream_test.rb | 46 ------ .../spec/platinum/unit/info_test.rb | 40 ----- .../spec/platinum/unit/knn_search_test.rb | 40 ----- .../spec/platinum/unit/license/delete_test.rb | 43 ----- .../spec/platinum/unit/license/get_test.rb | 43 ----- .../spec/platinum/unit/license/post_test.rb | 43 ----- .../unit/logstash/delete_pipeline_test.rb | 46 ------ .../unit/logstash/get_pipeline_test.rb | 46 ------ .../unit/logstash/put_pipeline_test.rb | 46 ------ ...ear_trained_model_deployment_cache_test.rb | 40 ----- .../unit/machine_learning/close_job_test.rb | 43 ----- .../machine_learning/delete_datafeed_test.rb | 43 ----- .../delete_expired_data_test.rb | 43 ----- .../machine_learning/delete_filter_test.rb | 43 ----- .../machine_learning/delete_forecast_test.rb | 43 ----- .../unit/machine_learning/delete_job_test.rb | 43 ----- .../delete_model_alias_test.rb | 40 ----- .../delete_model_snapshot_test.rb | 43 ----- .../unit/machine_learning/flush_job_test.rb | 43 ----- .../unit/machine_learning/forecast_test.rb | 43 ----- .../unit/machine_learning/get_buckets_test.rb | 43 ----- .../machine_learning/get_categories_test.rb | 43 ----- .../get_datafeed_stats_test.rb | 43 ----- .../machine_learning/get_datafeeds_test.rb | 43 ----- .../unit/machine_learning/get_filters_test.rb | 43 ----- .../machine_learning/get_influencers_test.rb | 43 ----- .../machine_learning/get_job_stats_test.rb | 43 ----- .../unit/machine_learning/get_jobs_test.rb | 43 ----- .../get_model_snapshots_test.rb | 43 ----- .../get_overall_buckets_test.rb | 43 ----- .../unit/machine_learning/get_records_test.rb | 43 ----- .../unit/machine_learning/open_job_test.rb | 43 ----- .../unit/machine_learning/post_data_test.rb | 43 ----- .../preview_data_frame_analytics_test.rb | 64 ------- .../machine_learning/preview_datafeed_test.rb | 43 ----- .../machine_learning/put_datafeed_test.rb | 43 ----- .../unit/machine_learning/put_filter_test.rb | 43 ----- .../unit/machine_learning/put_job_test.rb | 43 ----- .../put_trained_model_alias_test.rb | 40 ----- .../revert_model_snapshot_test.rb | 43 ----- .../machine_learning/start_datafeed_test.rb | 43 ----- .../machine_learning/stop_datafeed_test.rb | 43 ----- .../update_data_frame_analytics_test.rb | 40 ----- .../machine_learning/update_datafeed_test.rb | 43 ----- .../machine_learning/update_filter_test.rb | 43 ----- .../unit/machine_learning/update_job_test.rb | 43 ----- .../update_model_snapshot_test.rb | 43 ----- .../upgrade_job_snapshot_test.rb | 43 ----- .../unit/migration/deprecations_test.rb | 42 ----- .../unit/rollup/get_rollup_index_caps_test.rb | 40 ----- .../unit/security/authenticate_test.rb | 43 ----- .../unit/security/bulk_update_api_key_test.rb | 40 ----- .../unit/security/change_password_test.rb | 55 ------ .../unit/security/clear_api_key_cache_test.rb | 40 ----- .../security/clear_cached_privileges_test.rb | 40 ----- .../unit/security/clear_cached_realms_test.rb | 43 ----- .../unit/security/clear_cached_roles_test.rb | 43 ----- .../unit/security/delete_privileges_test.rb | 43 ----- .../unit/security/delete_role_mapping_test.rb | 43 ----- .../unit/security/delete_role_test.rb | 43 ----- .../unit/security/delete_user_test.rb | 43 ----- .../unit/security/disable_user_test.rb | 43 ----- .../unit/security/enable_user_test.rb | 43 ----- .../unit/security/get_privileges_test.rb | 78 --------- .../unit/security/get_role_mapping_test.rb | 54 ------ .../platinum/unit/security/get_role_test.rb | 62 ------- .../platinum/unit/security/get_token_test.rb | 43 ----- .../unit/security/get_user_privileges_test.rb | 43 ----- .../platinum/unit/security/get_user_test.rb | 61 ------- .../unit/security/grant_api_key_test.rb | 41 ----- .../unit/security/has_privileges_test.rb | 55 ------ .../unit/security/invalidate_token_test.rb | 43 ----- .../unit/security/oidc_authenticate_test.rb | 40 ----- .../unit/security/oidc_logout_test.rb | 40 ----- .../oidc_prepare_authentication_test.rb | 40 ----- .../unit/security/put_privileges_test.rb | 43 ----- .../unit/security/put_role_mapping_test.rb | 43 ----- .../platinum/unit/security/put_role_test.rb | 43 ----- .../platinum/unit/security/put_user_test.rb | 43 ----- .../platinum/unit/ssl/certificates_test.rb | 43 ----- .../spec/platinum/unit/usage_test.rb | 40 ----- .../platinum/unit/watcher/ack_watch_test.rb | 55 ------ .../unit/watcher/activate_watch_test.rb | 43 ----- .../unit/watcher/deactivate_watch_test.rb | 43 ----- .../unit/watcher/delete_watch_test.rb | 43 ----- .../unit/watcher/execute_watch_test.rb | 55 ------ .../platinum/unit/watcher/get_watch_test.rb | 43 ----- .../platinum/unit/watcher/put_watch_test.rb | 43 ----- .../unit/watcher/query_watches_test.rb | 52 ------ .../spec/platinum/unit/watcher/start_test.rb | 41 ----- .../spec/platinum/unit/watcher/stats_test.rb | 43 ----- .../spec/platinum/unit/watcher/stop_test.rb | 43 ----- elasticsearch-api/spec/spec_helper.rb | 2 +- .../actions/async_search/delete_spec.rb} | 23 ++- .../actions/async_search/get_spec.rb} | 11 +- .../actions/async_search/status_spec.rb} | 25 ++- .../actions/async_search/submit_spec.rb} | 9 +- .../api => unit}/actions/bulk_spec.rb | 0 .../api => unit}/actions/cat/aliases_spec.rb | 0 .../actions/cat/allocation_spec.rb | 0 .../actions/cat/component_templates_spec.rb | 0 .../api => unit}/actions/cat/count_spec.rb | 0 .../actions/cat/fielddata_spec.rb | 0 .../api => unit}/actions/cat/health_spec.rb | 0 .../api => unit}/actions/cat/help_spec.rb | 0 .../api => unit}/actions/cat/indices_spec.rb | 0 .../api => unit}/actions/cat/master_spec.rb | 0 .../actions/cat/nodeattrs_spec.rb | 0 .../api => unit}/actions/cat/nodes_spec.rb | 0 .../actions/cat/pending_tasks_spec.rb | 0 .../api => unit}/actions/cat/plugins_spec.rb | 0 .../api => unit}/actions/cat/recovery_spec.rb | 0 .../actions/cat/repositories_spec.rb | 0 .../api => unit}/actions/cat/segments_spec.rb | 0 .../api => unit}/actions/cat/shards_spec.rb | 0 .../api => unit}/actions/cat/snapshot_spec.rb | 0 .../api => unit}/actions/cat/tasks_spec.rb | 0 .../actions/cat/templates_spec.rb | 0 .../actions/cat/thread_pool_spec.rb | 0 .../api => unit}/actions/clear_scroll_spec.rb | 0 .../actions/close_point_in_time_spec.rb | 0 .../cluster/allocation_explain_spec.rb | 0 .../actions/cluster/get_settings_spec.rb | 0 .../actions/cluster/health_spec.rb | 0 .../api => unit}/actions/cluster/info_spec.rb | 0 .../actions/cluster/pending_tasks_spec.rb | 0 .../actions/cluster/put_settings_spec.rb | 0 .../actions/cluster/remote_info_spec.rb | 0 .../actions/cluster/reroute_spec.rb | 0 .../actions/cluster/state_spec.rb | 0 .../actions/cluster/stats_spec.rb | 0 .../actions/connector/check_in_spec.rb | 0 .../actions/connector/delete_spec.rb | 0 .../actions/connector/get_spec.rb | 0 .../actions/connector/last_sync_spec.rb | 0 .../actions/connector/list_spec.rb | 0 .../actions/connector/post_spec.rb | 0 .../actions/connector/put_spec.rb | 0 .../actions/connector/sync_job_claim_spec.rb | 0 .../connector/update_active_filtering_spec.rb | 0 .../connector/update_api_key_id_spec.rb | 0 .../connector/update_configuration_spec.rb | 0 .../actions/connector/update_error_spec.rb | 0 .../actions/connector/update_features_spec.rb | 0 .../connector/update_filtering_spec.rb | 0 .../update_filtering_validation_spec.rb | 0 .../connector/update_index_name_spec.rb | 0 .../actions/connector/update_name_spec.rb | 0 .../actions/connector/update_native_spec.rb | 0 .../actions/connector/update_pipeline_spec.rb | 0 .../connector/update_scheduling_spec.rb | 0 .../connector/update_service_type_spec.rb | 0 .../actions/connector/update_status_spec.rb | 0 .../actions/connector_sync_job/cancel_spec.rb | 0 .../connector_sync_job/check_in_spec.rb | 0 .../actions/connector_sync_job/delete_spec.rb | 0 .../actions/connector_sync_job/error_spec.rb | 0 .../actions/connector_sync_job/get_spec.rb | 0 .../actions/connector_sync_job/list_spec.rb | 0 .../actions/connector_sync_job/post_spec.rb | 0 .../connector_sync_job/update_stats_spec.rb | 0 .../api => unit}/actions/count_spec.rb | 0 .../actions/create_document_spec.rb | 0 .../delete_dangling_indices_spec.rb | 0 .../import_dangling_indices_spec.rb | 0 .../list_dangling_indices_spec.rb | 0 .../update_data_frame_transform_spec.rb | 0 .../actions/delete_by_query_spec.rb | 0 .../actions/delete_document_spec.rb | 0 .../actions/delete_script_spec.rb | 0 .../actions/esql/async_query_delete_spec.rb | 0 .../actions/esql/async_query_get._spec.rb | 0 .../actions/esql/async_query_spec.rb | 0 .../actions/esql/async_query_stop_spec.rb | 0 .../api => unit}/actions/esql/query_spec.rb | 0 .../actions/exists_document_spec.rb | 0 .../actions/explain_document_spec.rb | 0 .../actions/features/get_features_spec.rb | 0 .../actions/features/reset_features_spec.rb | 0 .../api => unit}/actions/field_caps_spec.rb | 0 .../actions/fleet/global_checkpoints_spec.rb | 0 .../actions/fleet/msearch_spec.rb | 0 .../api => unit}/actions/fleet/search_spec.rb | 0 .../actions/get_document_source_spec.rb | 0 .../api => unit}/actions/get_document_spec.rb | 0 .../api => unit}/actions/get_script_spec.rb | 0 .../api => unit}/actions/hashie_spec.rb | 0 .../actions/health_report_spec.rb | 0 .../actions/index_document_spec.rb | 0 .../migrate_to_data_tiers_spec.rb | 0 .../actions/indices/add_block_spec.rb | 0 .../actions/indices/analyze_spec.rb | 0 .../actions/indices/clear_cache_spec.rb | 0 .../actions/indices/clone_spec.rb | 0 .../actions/indices/close_spec.rb | 0 .../actions/indices/create_spec.rb | 0 .../indices/data_streams_stats_spec.rb | 0 .../actions/indices/delete_alias_spec.rb | 0 .../indices/delete_data_lifecycle_spec.rb | 0 .../actions/indices/delete_spec.rb | 0 .../actions/indices/delete_template_spec.rb | 0 .../actions/indices/disk_usage_spec.rb | 0 .../actions/indices/exists_alias_spec.rb | 0 .../actions/indices/exists_spec.rb | 0 .../actions/indices/exists_template_spec.rb | 0 .../indices/explain_data_lifecycle_spec.rb | 0 .../actions/indices/field_usage_stats_spec.rb | 0 .../actions/indices/flush_spec.rb | 0 .../actions/indices/forcemerge_spec.rb | 0 .../actions/indices/get_alias_spec.rb | 0 .../indices/get_data_lifecycle_spec.rb | 0 .../indices/get_data_lifecycle_stats_spec.rb | 0 .../actions/indices/get_field_mapping_spec.rb | 0 .../actions/indices/get_mapping_spec.rb | 0 .../actions/indices/get_settings_spec.rb | 0 .../api => unit}/actions/indices/get_spec.rb | 0 .../api => unit}/actions/indices/open_spec.rb | 0 .../actions/indices/put_alias_spec.rb | 0 .../indices/put_data_lifecycle_spec.rb | 0 .../actions/indices/put_mapping_spec.rb | 0 .../actions/indices/put_settings_spec.rb | 0 .../actions/indices/put_template_spec.rb | 0 .../actions/indices/recovery_spec.rb | 0 .../actions/indices/refresh_spec.rb | 0 .../actions/indices/resolve_cluster_spec.rb | 0 .../actions/indices/rollover_spec.rb | 0 .../actions/indices/segments_spec.rb | 0 .../actions/indices/shard_stores_spec.rb | 0 .../actions/indices/shrink_spec.rb | 0 .../actions/indices/split_spec.rb | 0 .../actions/indices/stats_spec.rb | 0 .../actions/indices/update_aliases_spec.rb | 0 .../actions/indices/validate_query_spec.rb | 0 .../actions/inference/delete_spec.rb | 0 .../actions/inference/get_spec.rb | 0 .../actions/inference/inference_spec.rb | 0 .../actions/inference/put_spec.rb | 0 .../inference/stream_inference_spec.rb | 0 .../inference/unified_inference_spec.rb | 0 .../actions/inference/update_spec.rb | 0 .../api => unit}/actions/info_spec.rb | 0 .../ingest/delete_geoip_database_spec.rb | 0 .../delete_ip_location_database_spec.rb | 0 .../actions/ingest/delete_pipeline_spec.rb | 0 .../actions/ingest/geo_ip_stats_spec.rb | 0 .../actions/ingest/get_geoip_database_spec.rb | 0 .../ingest/get_ip_location_database_spec.rb | 0 .../actions/ingest/get_pipeline_spec.rb | 0 .../actions/ingest/put_geoip_database_spec.rb | 0 .../ingest/put_ip_location_database_spec.rb | 0 .../actions/ingest/put_pipeline_spec.rb | 0 .../actions/ingest/simulate_spec.rb | 0 .../actions/json_builders_spec.rb | 0 .../machine_learning/get_memory_stats_spec.rb | 0 .../get_model_snapshot_upgrade_stats_spec.rb | 0 .../infer_trained_model_deployment_spec.rb | 0 .../put_trained_model_definition_part_spec.rb | 0 .../put_trained_model_vocabulary_spec.rb | 0 .../machine_learning/reset_job_spec.rb | 0 .../machine_learning/set_upgrade_mode_spec.rb | 0 .../start_trained_model_deployment_spec.rb | 0 .../stop_trained_model_deployment_spec.rb | 0 .../update_trained_model_deployment_spec.rb | 0 .../api => unit}/actions/mget_spec.rb | 0 .../get_feature_upgrade_status_spec.rb | 0 .../migration/post_feature_upgrade_spec.rb | 0 .../api => unit}/actions/msearch_spec.rb | 0 .../actions/msearch_template_spec.rb | 0 .../api => unit}/actions/mtermvectors_spec.rb | 0 ...lear_repositories_metering_archive_spec.rb | 0 .../get_repositories_metering_info_spec.rb | 0 .../actions/nodes/hot_threads_spec.rb | 0 .../api => unit}/actions/nodes/info_spec.rb | 0 .../nodes/reload_secure_settings_spec.rb | 0 .../api => unit}/actions/nodes/stats_spec.rb | 0 .../actions/open_point_in_time_spec.rb | 0 .../api => unit}/actions/ping_spec.rb | 0 .../api => unit}/actions/put_script_spec.rb | 0 .../query_rules/delete_ruleset_spec.rb | 0 .../actions/query_rules/delete_spec.rb | 0 .../actions/query_rules/get_ruleset_spec.rb | 0 .../actions/query_rules/get_spec.rb | 0 .../actions/query_rules/put_ruleset_spec.rb | 0 .../actions/query_rules/put_spec.rb | 0 .../actions/query_rules/test_spec.rb | 0 .../api => unit}/actions/rank_eval_spec.rb | 0 .../api => unit}/actions/reindex_spec.rb | 0 .../actions/render_search_template_spec.rb | 0 .../api => unit}/actions/scroll_spec.rb | 0 .../delete_behavioral_analytics_spec.rb | 0 .../actions/search_application/delete_spec.rb | 0 .../get_behavioral_analytics_spec.rb | 0 .../actions/search_application/get_spec.rb | 0 .../actions/search_application/list_spec.rb | 0 .../post_behavioral_analytics_event_spec.rb | 0 .../put_behavioral_analytics_spec.rb | 0 .../actions/search_application/put_spec.rb | 0 .../search_application/render_query_spec.rb | 0 .../actions/search_application/search_spec.rb | 0 .../api => unit}/actions/search_mvt_spec.rb | 0 .../actions/search_shards_spec.rb | 0 .../api => unit}/actions/search_spec.rb | 0 .../actions/search_template_spec.rb | 0 .../searchable_snapshots/cache_stats_spec.rb | 0 .../searchable_snapshots/clear_cache_spec.rb | 0 .../searchable_snapshots/mount_spec.rb | 0 .../searchable_snapshots/stats_spec.rb | 0 .../actions/security/bulk_delete_role_spec.rb | 0 .../actions/security/bulk_put_role_spec.rb | 0 .../clear_cached_service_tokens_spec.rb | 0 .../actions/security/create_api_key_spec.rb | 0 .../create_cross_cluster_api_key_spec.rb | 0 .../security/create_service_token_spec.rb | 0 .../actions/security/delegate_pki_spec.rb | 0 .../security/delete_service_token_spec.rb | 0 .../actions/security/enroll_kibana_spec.rb | 0 .../actions/security/get_api_key_spec.rb | 0 .../security/get_builtin_privileges_spec.rb | 0 .../security/get_service_accounts_spec.rb | 0 .../security/get_service_credentials_spec.rb | 0 .../security/invalidate_api_key_spec.rb | 0 .../actions/security/query_api_keys_spec.rb | 0 .../actions/security/query_role_spec.rb | 0 .../actions/security/query_user_spec.rb | 0 .../security/saml_authenticate_spec.rb | 0 .../security/saml_complete_logout_spec.rb | 0 .../actions/security/saml_invalidate_spec.rb | 0 .../actions/security/saml_logout_spec.rb | 0 .../saml_prepare_authentication_spec.rb | 0 .../saml_service_provider_metadata_spec.rb | 0 .../actions/security/update_api_key_spec.rb | 0 .../update_cross_cluster_api_key_spec.rb | 0 .../actions/simulate/ingest_spec.rb | 0 .../actions/snapshot/clone_spec.rb | 0 .../snapshot/create_repository_spec.rb | 0 .../actions/snapshot/create_spec.rb | 0 .../snapshot/delete_repository_spec.rb | 0 .../actions/snapshot/delete_spec.rb | 0 .../actions/snapshot/get_repository_spec.rb | 0 .../api => unit}/actions/snapshot/get_spec.rb | 0 .../snapshot/repository_analize_spec.rb | 0 .../actions/snapshot/restore_spec.rb | 0 .../actions/snapshot/status_spec.rb | 0 .../snapshot/verify_repository_spec.rb | 0 .../actions/sql/delete_async_spec.rb | 0 .../actions/sql/get_async_spec.rb | 0 .../actions/sql/get_async_stats_spec.rb | 0 .../api => unit}/actions/tasks/cancel_spec.rb | 0 .../api => unit}/actions/tasks/get_spec.rb | 0 .../api => unit}/actions/tasks/list_spec.rb | 0 .../api => unit}/actions/terms_enum_spec.rb | 0 .../api => unit}/actions/termvectors_spec.rb | 0 .../find_field_structure_spec.rb | 0 .../find_message_structure_spec.rb | 0 .../text_structure/find_structure_spec.rb | 0 .../text_structure/test_grok_pattern_spec.rb | 0 .../actions/transform/get_node_stats_spec.rb | 0 .../transform/schedule_now_transform_spec.rb | 0 .../actions/update_by_query_spec.rb | 0 .../actions/update_document_spec.rb | 0 .../actions/watcher/get_settings_spec.rb | 0 .../actions/watcher/update_settings_spec.rb | 0 .../api => unit}/api_response_spec.rb | 0 .../{elasticsearch/api => unit}/api_spec.rb | 0 .../api => unit}/client_spec.rb | 0 .../api => unit}/perform_request_spec.rb | 4 +- .../spec/{platinum => }/unit/test_helper.rb | 0 .../{elasticsearch/api => unit}/utils_spec.rb | 0 410 files changed, 99 insertions(+), 6762 deletions(-) rename elasticsearch-api/spec/{platinum/integration/api_key/admin_user_query_api_keys_spec.rb => integration/api_key_spec.rb} (64%) rename elasticsearch-api/spec/{platinum/integration/health => integration}/health_spec.rb (67%) rename elasticsearch-api/spec/{platinum/integration/platinum_helper.rb => integration/spec_helper.rb} (83%) delete mode 100644 elasticsearch-api/spec/platinum/integration/analytics/usage_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/api_key/api_key_admin_user_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/api_key/api_key_cross_cluster_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/api_key/api_key_invalidation_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/api_key/api_key_query_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/api_key/api_key_query_with_aggs_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/api_key/api_key_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/api_key/api_key_update_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/eql/eql_async_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/ml/get_memory_stats_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/security/users_query_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/service_accounts/service_accounts_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/snapshots/snapshots_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/spatial/script_doc_values_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/integration/token/token_spec.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/async_search/delete_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/async_search/get_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/async_search/status_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/async_search/submit_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/enrich/delete_policy_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/eql/delete_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/eql/get_status_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/eql/get_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/eql/search_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/graph/explore_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/index_lifecycle_management/explain_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/index_lifecycle_management/get_status_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/index_lifecycle_management/move_to_step.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/index_lifecycle_management/remove_policy_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/index_lifecycle_management/retry_policy_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/index_lifecycle_management/start_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/index_lifecycle_management/stop_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/indices/create_data_stream_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/indices/data_stream_stats_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/indices/delete_data_stream_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/indices/downsample_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/indices/get_data_stream_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/indices/migrate_to_data_stream_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/indices/modify_data_stream_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/indices/promote_data_stream_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/info_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/knn_search_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/license/delete_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/license/get_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/license/post_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/logstash/delete_pipeline_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/logstash/get_pipeline_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/logstash/put_pipeline_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/clear_trained_model_deployment_cache_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/close_job_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/delete_datafeed_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/delete_expired_data_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/delete_filter_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/delete_forecast_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/delete_job_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/delete_model_alias_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/delete_model_snapshot_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/flush_job_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/forecast_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/get_buckets_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/get_categories_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/get_datafeed_stats_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/get_datafeeds_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/get_filters_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/get_influencers_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/get_job_stats_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/get_jobs_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/get_model_snapshots_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/get_overall_buckets_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/get_records_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/open_job_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/post_data_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/preview_data_frame_analytics_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/preview_datafeed_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/put_datafeed_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/put_filter_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/put_job_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/put_trained_model_alias_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/revert_model_snapshot_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/start_datafeed_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/stop_datafeed_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/update_data_frame_analytics_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/update_datafeed_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/update_filter_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/update_job_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/update_model_snapshot_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/machine_learning/upgrade_job_snapshot_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/migration/deprecations_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/rollup/get_rollup_index_caps_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/authenticate_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/bulk_update_api_key_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/change_password_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/clear_api_key_cache_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/clear_cached_privileges_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/clear_cached_realms_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/clear_cached_roles_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/delete_privileges_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/delete_role_mapping_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/delete_role_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/delete_user_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/disable_user_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/enable_user_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/get_privileges_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/get_role_mapping_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/get_role_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/get_token_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/get_user_privileges_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/get_user_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/grant_api_key_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/has_privileges_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/invalidate_token_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/oidc_authenticate_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/oidc_logout_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/oidc_prepare_authentication_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/put_privileges_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/put_role_mapping_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/put_role_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/security/put_user_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/ssl/certificates_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/usage_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/watcher/ack_watch_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/watcher/activate_watch_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/watcher/deactivate_watch_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/watcher/delete_watch_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/watcher/execute_watch_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/watcher/get_watch_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/watcher/put_watch_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/watcher/query_watches_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/watcher/start_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/watcher/stats_test.rb delete mode 100644 elasticsearch-api/spec/platinum/unit/watcher/stop_test.rb rename elasticsearch-api/spec/{free/integration/health_spec.rb => unit/actions/async_search/delete_spec.rb} (63%) rename elasticsearch-api/spec/{platinum/unit/transform/upgrade_transforms_spec.rb => unit/actions/async_search/get_spec.rb} (78%) rename elasticsearch-api/spec/{free/integration/spec_helper.rb => unit/actions/async_search/status_spec.rb} (63%) rename elasticsearch-api/spec/{platinum/unit/transform/reset_transform_spec.rb => unit/actions/async_search/submit_spec.rb} (78%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/bulk_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/aliases_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/allocation_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/component_templates_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/count_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/fielddata_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/health_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/help_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/indices_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/master_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/nodeattrs_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/nodes_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/pending_tasks_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/plugins_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/recovery_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/repositories_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/segments_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/shards_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/snapshot_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/tasks_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/templates_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cat/thread_pool_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/clear_scroll_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/close_point_in_time_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cluster/allocation_explain_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cluster/get_settings_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cluster/health_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cluster/info_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cluster/pending_tasks_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cluster/put_settings_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cluster/remote_info_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cluster/reroute_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cluster/state_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/cluster/stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/check_in_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/delete_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/get_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/last_sync_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/list_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/post_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/put_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/sync_job_claim_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_active_filtering_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_api_key_id_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_configuration_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_error_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_features_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_filtering_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_filtering_validation_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_index_name_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_name_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_native_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_pipeline_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_scheduling_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_service_type_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector/update_status_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector_sync_job/cancel_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector_sync_job/check_in_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector_sync_job/delete_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector_sync_job/error_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector_sync_job/get_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector_sync_job/list_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector_sync_job/post_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/connector_sync_job/update_stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/count_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/create_document_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/dangling_indices/delete_dangling_indices_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/dangling_indices/import_dangling_indices_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/dangling_indices/list_dangling_indices_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/data_frame/update_data_frame_transform_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/delete_by_query_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/delete_document_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/delete_script_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/esql/async_query_delete_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/esql/async_query_get._spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/esql/async_query_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/esql/async_query_stop_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/esql/query_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/exists_document_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/explain_document_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/features/get_features_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/features/reset_features_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/field_caps_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/fleet/global_checkpoints_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/fleet/msearch_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/fleet/search_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/get_document_source_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/get_document_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/get_script_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/hashie_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/health_report_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/index_document_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/index_lifecycle_management/migrate_to_data_tiers_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/add_block_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/analyze_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/clear_cache_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/clone_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/close_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/create_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/data_streams_stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/delete_alias_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/delete_data_lifecycle_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/delete_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/delete_template_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/disk_usage_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/exists_alias_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/exists_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/exists_template_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/explain_data_lifecycle_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/field_usage_stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/flush_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/forcemerge_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/get_alias_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/get_data_lifecycle_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/get_data_lifecycle_stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/get_field_mapping_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/get_mapping_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/get_settings_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/get_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/open_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/put_alias_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/put_data_lifecycle_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/put_mapping_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/put_settings_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/put_template_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/recovery_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/refresh_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/resolve_cluster_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/rollover_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/segments_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/shard_stores_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/shrink_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/split_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/update_aliases_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/indices/validate_query_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/inference/delete_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/inference/get_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/inference/inference_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/inference/put_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/inference/stream_inference_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/inference/unified_inference_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/inference/update_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/info_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/ingest/delete_geoip_database_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/ingest/delete_ip_location_database_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/ingest/delete_pipeline_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/ingest/geo_ip_stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/ingest/get_geoip_database_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/ingest/get_ip_location_database_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/ingest/get_pipeline_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/ingest/put_geoip_database_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/ingest/put_ip_location_database_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/ingest/put_pipeline_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/ingest/simulate_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/json_builders_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/machine_learning/get_memory_stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/machine_learning/get_model_snapshot_upgrade_stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/machine_learning/infer_trained_model_deployment_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/machine_learning/put_trained_model_definition_part_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/machine_learning/put_trained_model_vocabulary_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/machine_learning/reset_job_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/machine_learning/set_upgrade_mode_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/machine_learning/start_trained_model_deployment_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/machine_learning/stop_trained_model_deployment_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/machine_learning/update_trained_model_deployment_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/mget_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/migration/get_feature_upgrade_status_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/migration/post_feature_upgrade_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/msearch_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/msearch_template_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/mtermvectors_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/nodes/clear_repositories_metering_archive_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/nodes/get_repositories_metering_info_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/nodes/hot_threads_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/nodes/info_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/nodes/reload_secure_settings_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/nodes/stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/open_point_in_time_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/ping_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/put_script_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/query_rules/delete_ruleset_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/query_rules/delete_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/query_rules/get_ruleset_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/query_rules/get_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/query_rules/put_ruleset_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/query_rules/put_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/query_rules/test_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/rank_eval_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/reindex_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/render_search_template_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/scroll_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_application/delete_behavioral_analytics_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_application/delete_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_application/get_behavioral_analytics_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_application/get_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_application/list_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_application/post_behavioral_analytics_event_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_application/put_behavioral_analytics_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_application/put_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_application/render_query_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_application/search_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_mvt_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_shards_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/search_template_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/searchable_snapshots/cache_stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/searchable_snapshots/clear_cache_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/searchable_snapshots/mount_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/searchable_snapshots/stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/bulk_delete_role_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/bulk_put_role_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/clear_cached_service_tokens_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/create_api_key_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/create_cross_cluster_api_key_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/create_service_token_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/delegate_pki_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/delete_service_token_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/enroll_kibana_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/get_api_key_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/get_builtin_privileges_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/get_service_accounts_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/get_service_credentials_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/invalidate_api_key_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/query_api_keys_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/query_role_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/query_user_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/saml_authenticate_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/saml_complete_logout_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/saml_invalidate_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/saml_logout_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/saml_prepare_authentication_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/saml_service_provider_metadata_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/update_api_key_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/security/update_cross_cluster_api_key_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/simulate/ingest_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/snapshot/clone_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/snapshot/create_repository_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/snapshot/create_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/snapshot/delete_repository_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/snapshot/delete_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/snapshot/get_repository_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/snapshot/get_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/snapshot/repository_analize_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/snapshot/restore_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/snapshot/status_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/snapshot/verify_repository_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/sql/delete_async_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/sql/get_async_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/sql/get_async_stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/tasks/cancel_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/tasks/get_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/tasks/list_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/terms_enum_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/termvectors_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/text_structure/find_field_structure_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/text_structure/find_message_structure_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/text_structure/find_structure_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/text_structure/test_grok_pattern_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/transform/get_node_stats_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/transform/schedule_now_transform_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/update_by_query_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/update_document_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/watcher/get_settings_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/actions/watcher/update_settings_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/api_response_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/api_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/client_spec.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/perform_request_spec.rb (95%) rename elasticsearch-api/spec/{platinum => }/unit/test_helper.rb (100%) rename elasticsearch-api/spec/{elasticsearch/api => unit}/utils_spec.rb (100%) diff --git a/elasticsearch-api/spec/platinum/integration/api_key/admin_user_query_api_keys_spec.rb b/elasticsearch-api/spec/integration/api_key_spec.rb similarity index 64% rename from elasticsearch-api/spec/platinum/integration/api_key/admin_user_query_api_keys_spec.rb rename to elasticsearch-api/spec/integration/api_key_spec.rb index 5939b2ac2b..55c9d977af 100644 --- a/elasticsearch-api/spec/platinum/integration/api_key/admin_user_query_api_keys_spec.rb +++ b/elasticsearch-api/spec/integration/api_key_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # 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 @@ -16,21 +18,21 @@ # under the License. require 'base64' -require_relative '../platinum_helper' +require_relative './spec_helper' describe 'API keys' do before do - ADMIN_CLIENT.security.put_user( + CLIENT.security.put_user( username: client_username, body: { password: 'test-password', roles: ['superuser'] } ) end after do - ADMIN_CLIENT.security.delete_user(username: client_username) + CLIENT.security.delete_user(username: client_username) end - let(:client_username) { "query_api_keys_#{Time.new.to_i}"} + let(:client_username) { "query_api_keys_#{Time.new.to_i}" } let(:credentials) { Base64.strict_encode64("#{client_username}:test-password") } let(:client) do @@ -41,71 +43,71 @@ end it 'queries API keys' do - key_name_1 = "query-key-1-#{Time.new.to_i}" + key_name1 = "query-key-1-#{Time.new.to_i}" response = client.security.create_api_key( body: { - name: key_name_1, + name: key_name1, role_descriptors: {}, - expiration: "1d", - metadata: { search: "this" } + expiration: '1d', + metadata: { search: 'this' } } ) - expect(response['name']).to eq key_name_1 + expect(response['name']).to eq key_name1 expect(response['api_key']).not_to be nil - api_key_id_1 = response['id'] + api_key_id1 = response['id'] - key_name_2 = "query-key-2-#{Time.new.to_i}" + key_name2 = "query-key-2-#{Time.new.to_i}" response = client.security.create_api_key( body: { - name: key_name_2, - expiration: "2d", - role_descriptors: { "role-a" => { "cluster": [ "monitor"] } }, + name: key_name2, + expiration: '2d', + role_descriptors: { 'role-a' => { "cluster": ['monitor'] } }, metadata: { search: false } } ) - expect(response['name']).to eq key_name_2 + expect(response['name']).to eq key_name2 expect(response['api_key']).not_to be nil - api_key_id_2 = response['id'] + api_key_id2 = response['id'] - key_name_3 = "query-key-3#{Time.new.to_i}" + key_name3 = "query-key-3#{Time.new.to_i}" response = client.security.create_api_key( body: { - name: key_name_3, - expiration: "3d", + name: key_name3, + expiration: '3d' } ) - expect(response['name']).to eq key_name_3 + expect(response['name']).to eq key_name3 expect(response['api_key']).not_to be nil - api_key_id_3 = response['id'] + api_key_id3 = response['id'] response = client.security.authenticate - owner_name = response['username'] + response['username'] response = client.security.query_api_keys( body: { - query: { wildcard: { name: key_name_1 }} + query: { wildcard: { name: key_name1 } } } ) expect(response['total']).to eq 1 expect(response['count']).to eq 1 - expect(response['api_keys'].first['id']).to eq api_key_id_1 + expect(response['api_keys'].first['id']).to eq api_key_id1 response = client.security.query_api_keys( body: { - query: { wildcard: { name: key_name_2 }} + query: { wildcard: { name: key_name2 } } } ) expect(response['total']).to eq 1 expect(response['count']).to eq 1 - expect(response['api_keys'].first['id']).to eq api_key_id_2 + expect(response['api_keys'].first['id']).to eq api_key_id2 response = client.security.query_api_keys( body: { - query: { wildcard: { name: key_name_3 }} + query: { wildcard: { name: key_name3 } } } ) expect(response['total']).to eq 1 expect(response['count']).to eq 1 - expect(response['api_keys'].first['id']).to eq api_key_id_3 + expect(response['api_keys'].first['id']).to eq api_key_id3 end end diff --git a/elasticsearch-api/spec/platinum/integration/health/health_spec.rb b/elasticsearch-api/spec/integration/health_spec.rb similarity index 67% rename from elasticsearch-api/spec/platinum/integration/health/health_spec.rb rename to elasticsearch-api/spec/integration/health_spec.rb index eefa5f6237..8abad8dcc7 100644 --- a/elasticsearch-api/spec/platinum/integration/health/health_spec.rb +++ b/elasticsearch-api/spec/integration/health_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # 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 @@ -15,12 +17,20 @@ # specific language governing permissions and limitations # under the License. -require_relative '../platinum_helper' +require_relative './spec_helper' + +describe 'Health basic test' do + it 'performs the request' do + response = CLIENT.health_report + expect(response.status).to eq 200 + expect(response['cluster_name']).not_to be_nil + expect(response.dig('indicators', 'master_is_stable', 'symptom')).to eq 'The cluster has a stable master node' + expect(response.dig('indicators', 'master_is_stable', 'status')).to eq 'green' + end -describe 'Health API' do context 'Usage stats on the health API' do before do - ADMIN_CLIENT.indices.create( + CLIENT.indices.create( index: 'red_index', body: { settings: { @@ -33,13 +43,13 @@ end after do - ADMIN_CLIENT.indices.delete(index: 'red_index') + CLIENT.indices.delete(index: 'red_index') end it 'responds with health report' do - expect(ADMIN_CLIENT.health_report.status).to eq 200 - expect(ADMIN_CLIENT.health_report(feature: 'disk').status).to eq 200 - response = ADMIN_CLIENT.xpack.usage + expect(CLIENT.health_report.status).to eq 200 + expect(CLIENT.health_report(feature: 'disk').status).to eq 200 + response = CLIENT.xpack.usage expect(response['health_api']['available']).to eq true expect(response['health_api']['enabled']).to eq true expect(response['health_api']['invocations']['total']).to be >= 2 diff --git a/elasticsearch-api/spec/platinum/integration/platinum_helper.rb b/elasticsearch-api/spec/integration/spec_helper.rb similarity index 83% rename from elasticsearch-api/spec/platinum/integration/platinum_helper.rb rename to elasticsearch-api/spec/integration/spec_helper.rb index d74421d63a..343f1dc4a8 100644 --- a/elasticsearch-api/spec/platinum/integration/platinum_helper.rb +++ b/elasticsearch-api/spec/integration/spec_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # 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 @@ -14,13 +16,11 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. - require 'openssl' require 'elasticsearch' -CERTS_PATH = File.expand_path('./../.buildkite/certs') - -host = ENV['TEST_ES_SERVER'] || 'https://localhost:9200' +CERTS_PATH = File.expand_path('./../../../.buildkite/certs', __dir__) +host = ENV['TEST_ES_SERVER'] || 'http://localhost:9200' raise URI::InvalidURIError unless host =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/ password = ENV['ELASTIC_PASSWORD'] || 'changeme' @@ -31,12 +31,11 @@ key = OpenSSL::PKey::RSA.new(raw_key) ca_file = File.expand_path("#{CERTS_PATH}/ca.crt") TRANSPORT_OPTIONS = { ssl: { verify: false, client_cert: certificate, client_key: key, ca_file: ca_file } } -HOST = "https://elastic:#{password}@#{HOST_URI.host}:#{HOST_URI.port}".freeze - -ADMIN_CLIENT = Elasticsearch::Client.new(host: HOST, transport_options: TRANSPORT_OPTIONS) +HOST = "https://elastic:#{password}@#{HOST_URI.host}:#{HOST_URI.port}" +CLIENT = Elasticsearch::Client.new(host: HOST, transport_options: TRANSPORT_OPTIONS) RSpec.configure do |config| config.add_formatter('documentation') - config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/platinum-#{ENV['RUBY_VERSION']}-manual-integration.html") + config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/#{ENV['RUBY_VERSION']}-manual-integration.html") config.color_mode = :on end diff --git a/elasticsearch-api/spec/platinum/integration/analytics/usage_spec.rb b/elasticsearch-api/spec/platinum/integration/analytics/usage_spec.rb deleted file mode 100644 index 2f88973d9e..0000000000 --- a/elasticsearch-api/spec/platinum/integration/analytics/usage_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -# 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. - -require_relative '../platinum_helper' - -describe 'analytics/usage stats API' do - let(:index) { 'analytics_test' } - before do - body = [ - {"index": {}}, - {"timestamp": "2017-01-01T05:00:00Z", "s": 1, "v1": 3.1415, "v2": 2.1415, "str": "a"}, - {"index": {}}, - {"timestamp": "2017-01-01T05:00:00Z", "s": 2, "v1": 1.0, "v2": 2.0, "str": "a"}, - {"index": {}}, - {"timestamp": "2017-01-01T05:00:00Z", "s": 3, "v1": 2.71828, "v2": 3.71828, "str": "b"}, - ] - ADMIN_CLIENT.bulk(body: body, index: index, refresh: true) - end - - after do - ADMIN_CLIENT.indices.delete(index: index) - end - - it 'gets memory for all nodes' do - response = ADMIN_CLIENT.xpack.usage - expect(response['analytics']['available']).to eq true - expect(response['analytics']['enabled']).to eq true - - boxplot_usage = response['analytics']['stats']['boxplot_usage'] - - response = ADMIN_CLIENT.search( - index: index, - body: { size: 0, aggs: { plot: { boxplot: { field: 's' } } } } - ) - expect(response['aggregations']['plot']['q2']).to eq 2.0 - - response = ADMIN_CLIENT.xpack.usage - expect(response['analytics']['available']).to eq true - expect(response['analytics']['enabled']).to eq true - expect(response['analytics']['stats']['boxplot_usage']).to be > boxplot_usage - end -end diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_admin_user_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_admin_user_spec.rb deleted file mode 100644 index b5ca398a5e..0000000000 --- a/elasticsearch-api/spec/platinum/integration/api_key/api_key_admin_user_spec.rb +++ /dev/null @@ -1,127 +0,0 @@ -# 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. - -require 'base64' -require_relative '../platinum_helper' - -describe 'API keys' do - before do - ADMIN_CLIENT.security.put_user( - username: client_username, - body: { password: 'test-password', roles: ['superuser'] } - ) - end - - after do - ADMIN_CLIENT.security.delete_user(username: client_username) - end - - let(:client_username) { "superuser#{Time.now.to_i}"} - - let(:client) do - Elasticsearch::Client.new( - host: "https://#{HOST_URI.host}:#{HOST_URI.port}", - user: client_username, - password: 'test-password', - transport_options: TRANSPORT_OPTIONS - ) - end - - it 'gets api key (with role descriptors + metadata)' do - response = client.security.create_api_key( - body: { - name: "api-key-role", - expiration: "1d", - role_descriptors: { - 'role-a': { - cluster: ["all"], - index: [ - { - names: ["index-a"], - privileges: ["read"] - } - ] - } - }, - metadata: { - string: "bean", - number: 5, - boolean: true - } - } - ) - expect(response['name']).to eq 'api-key-role' - expect(response['id']).not_to be nil - expect(response['api_key']).not_to be nil - expect(response['expiration']).not_to be nil - api_key_id = response['id'] - api_key_name = response['name'] - credentials = response['encoded'] - - response = client.security.authenticate - owner_name = response['username'] - - response = client.security.get_api_key(id: api_key_id) - expect(response['api_keys'].first['id']).to eq api_key_id - expect(response['api_keys'].first['name']).to eq api_key_name - expect(response['api_keys'].first['username']).to eq owner_name - expect(response['api_keys'].first['invalidated']).to eq false - expect(response['api_keys'].first['creation']).not_to be nil - expect(response['api_keys'].first['metadata']['string']).to eq 'bean' - expect(response['api_keys'].first['metadata']['number']).to eq 5 - expect(response['api_keys'].first['metadata']['boolean']).to eq true - expect(response['api_keys'].first['role_descriptors']) - .to eq( - { - 'role-a' => { - 'cluster' => ['all'], - 'indices' => [ - { - 'names' => ['index-a'], - 'privileges' => ['read'], - 'allow_restricted_indices' => false - } - ], - 'applications' => [ ], - 'run_as' => [ ], - 'metadata' => { }, - 'transient_metadata' => { 'enabled' => true } - } - } - ) - - response = client.security.get_api_key(owner: true) - expect(response['api_keys'].length).to eq 1 - expect(response['api_keys'].first['id']).to eq api_key_id - expect(response['api_keys'].first['name']).to eq api_key_name - expect(response['api_keys'].first['username']).to eq owner_name - expect(response['api_keys'].first['invalidated']).to eq false - expect(response['api_keys'].first['creation']).not_to be nil - - client = Elasticsearch::Client.new( - host: "https://#{HOST_URI.host}:#{HOST_URI.port}", - api_key: credentials, - transport_options: TRANSPORT_OPTIONS - ) - - response = client.security.get_api_key(id: api_key_id) - expect(response['api_keys'].length).to eq 1 - expect(response['api_keys'].first['id']).to eq api_key_id - expect(response['api_keys'].first['name']).to eq api_key_name - expect(response['api_keys'].first['username']).to eq owner_name - end -end diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_cross_cluster_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_cross_cluster_spec.rb deleted file mode 100644 index 5b1ee7e7f7..0000000000 --- a/elasticsearch-api/spec/platinum/integration/api_key/api_key_cross_cluster_spec.rb +++ /dev/null @@ -1,113 +0,0 @@ -# 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. - -require 'base64' -require_relative '../platinum_helper' - -describe 'API keys API' do - let(:user) { 'admin_user' } - let(:password) { 'x-pack-test-password' } - before do - ADMIN_CLIENT.security.put_role( - name: 'admin_role', - body: { cluster: ['manage_security'] } - ) - ADMIN_CLIENT.security.put_user( - username: user, - body: { - password: password, - roles: ['admin_role'], - full_name: 'Admin user' - } - ) - end - - after do - ADMIN_CLIENT.security.delete_role(name: 'admin_role', ignore: 404) - ADMIN_CLIENT.security.delete_user(username: user, ignore: 404) - end - - describe 'Cross Cluster API Key' do - it 'updates api key' do - response = ADMIN_CLIENT.security.create_cross_cluster_api_key( - body: { - name: 'my-cc-api-key', - expiration: '1d', - access: { - search: [ - { names: ['logs*'] } - ], - replication: [ - { - names: ['archive'], - allow_restricted_indices: false - } - ] - }, - metadata: { - answer: 42, - tag: 'dev' - } - } - ) - expect(response.status).to eq 200 - expect(response['name']).to eq 'my-cc-api-key' - id = response['id'] - expect(id).not_to be nil - expect(response['api_key']).not_to be nil - expect(response['expiration']).not_to be nil - credentials = Base64.strict_encode64("#{response['id']}:#{response['api_key']}") - expect(credentials).to eq response['encoded'] - - new_client = Elasticsearch::Client.new( - host: "https://#{HOST_URI.host}:#{HOST_URI.port}", - transport_options: TRANSPORT_OPTIONS - ) - expect do - new_client.security.authenticate(headers: { authorization: "ApiKey #{credentials}" }) - end.to raise_error(Elastic::Transport::Transport::Errors::Unauthorized) - - response = ADMIN_CLIENT.security.get_api_key(id: id, with_limited_by: true) - expect(response.status).to eq 200 - api_key = response['api_keys'].first - expect(api_key['name']) == 'my-cc-api-key' - expect(api_key['type']) == 'cross_cluster' - expect(api_key['invalidated']).to be false - expect(api_key['metadata']).to eq({'answer' => 42, 'tag' => 'dev'}) - - # Tests update cc api_key - response = ADMIN_CLIENT.security.update_cross_cluster_api_key( - id: id, - body: { - access: { - replication: [{ names: ["archive"] }] - }, - metadata: { "tag": "prod" } - } - ) - expect(response['updated']).to be true - - response = ADMIN_CLIENT.security.get_api_key(id: id, with_limited_by: true) - expect(response['api_keys'].length).to eq 1 - api_key = response['api_keys'].first - expect(api_key['name']) == 'my-cc-api-key' - expect(api_key['type']) == 'cross_cluster' - expect(api_key['invalidated']).to be false - expect(api_key['metadata']).to eq({'tag' => 'prod'}) - end - end -end diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_invalidation_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_invalidation_spec.rb deleted file mode 100644 index 5464412f4d..0000000000 --- a/elasticsearch-api/spec/platinum/integration/api_key/api_key_invalidation_spec.rb +++ /dev/null @@ -1,105 +0,0 @@ -# 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. - -require 'base64' -require_relative '../platinum_helper' - -describe 'API keys API invalidation' do - before do - ADMIN_CLIENT.security.put_role( - name: 'admin_role', - body: { - cluster: ['manage_api_key'] - } - ) - ADMIN_CLIENT.security.put_role( - name: 'user_role', - body: { - cluster: ['manage_own_api_key'] - } - ) - ADMIN_CLIENT.security.put_user( - username: 'api_key_manager', - body: { - password: 'changeme', - roles: [ 'admin_role' ], - full_name: 'API key manager' - } - ) - ADMIN_CLIENT.security.put_user( - username: 'api_key_test_user1', - body: { - password: 'x-pack-test-password', - roles: [ 'user_role' ], - full_name: 'API key user' - } - ) - end - - after do - ADMIN_CLIENT.security.delete_role(name: "admin_role", ignore: 404) - ADMIN_CLIENT.security.delete_role(name: "user_role", ignore: 404) - ADMIN_CLIENT.security.delete_user(username: "api_key_user1", ignore: 404) - ADMIN_CLIENT.security.delete_user(username: "api_key_manager", ignore: 404) - end - - let(:credentials) { Base64.strict_encode64("api_key_manager:changeme") } - - let(:client) do - Elasticsearch::Client.new( - host: HOST, - transport_options: TRANSPORT_OPTIONS.merge(headers: { Authorization: "Basic #{credentials}" }) - ) - end - - it 'invalidates by realm name' do - response = client.security.create_api_key( - body: { - name: "manager-api-key", - expiration: "1d", - role_descriptors: {} - } - ) - expect(response['name']).to eq 'manager-api-key' - id = response['id'] - expect(id).not_to be nil - expect(response['api_key']).not_to be nil - expect(response['expiration']).not_to be nil - - user_credentials = Base64.strict_encode64('api_key_test_user1:x-pack-test-password') - user_client = Elasticsearch::Client.new( - host: HOST, - transport_options: TRANSPORT_OPTIONS.merge(headers: { Authentication: "Basic #{user_credentials}" }) - ) - response = user_client.security.create_api_key( - body: { - name: "user1-api-key", - expiration: "1d", - role_descriptors: {} - } - ) - expect(response['name']).to eq 'user1-api-key' - id = response['id'] - expect(id).not_to be nil - expect(response['api_key']).not_to be nil - expect(response['expiration']).not_to be nil - - response = client.security.invalidate_api_key(body: { realm_name: 'default_native'}) - expect(response['invalidated_api_keys'].count).to be >= 2 - expect(response['error_count']).to eq 0 - end -end diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_query_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_query_spec.rb deleted file mode 100644 index 238d1aa4bb..0000000000 --- a/elasticsearch-api/spec/platinum/integration/api_key/api_key_query_spec.rb +++ /dev/null @@ -1,149 +0,0 @@ -# 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. - -require_relative '../platinum_helper' - -describe 'API keys' do - before do - ADMIN_CLIENT.security.put_role( - name: 'admin_role', - body: { cluster: ['manage_api_key'] } - ) - ADMIN_CLIENT.security.put_role( - name: 'user_role', - body: { - cluster: ['manage_own_api_key'], - } - ) - ADMIN_CLIENT.security.put_user( - username: 'api_key_manager', - body: { - password: 'x-pack-test-password', - roles: [ 'admin_role' ], - full_name: 'API key manager' - } - ) - ADMIN_CLIENT.security.put_user( - username: 'api_key_user_1', - body: { - password: 'x-pack-test-password', - roles: [ 'user_role' ], - full_name: 'API key user 1' - } - ) - ADMIN_CLIENT.security.put_user( - username: 'api_key_user_2', - body: { - password: 'x-pack-test-password', - roles: [ 'user_role' ], - full_name: 'API key user 2' - } - ) - end - - after do - ADMIN_CLIENT.security.delete_role(name: "admin_role", ignore: 404) - ADMIN_CLIENT.security.delete_role(name: "user_role", ignore: 404) - ADMIN_CLIENT.security.delete_user(username: "api_key_user_1", ignore: 404) - ADMIN_CLIENT.security.delete_user(username: "api_key_user_2", ignore: 404) - ADMIN_CLIENT.security.delete_user(username: "api_key_manager", ignore: 404) - end - - def client(headers) - Elasticsearch::Client.new( - host: "https://#{HOST_URI.host}:#{HOST_URI.port}", - transport_options: TRANSPORT_OPTIONS.merge(headers: headers) - ) - end - - let(:manager_auth) do - { Authorization: "Basic YXBpX2tleV9tYW5hZ2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } - end - let(:user1_auth) do - { Authorization: "Basic YXBpX2tleV91c2VyXzE6eC1wYWNrLXRlc3QtcGFzc3dvcmQ=" } - end - let(:user2_auth) do - { Authorization: "Basic YXBpX2tleV91c2VyXzI6eC1wYWNrLXRlc3QtcGFzc3dvcmQ=" } - end - - it 'queries api key' do - # api_key_manager authorization: - client = client(manager_auth) - response = client.security.create_api_key( - body: { - name: 'manager-api-key', - expiration: '10d', - metadata: { - letter: 'a', - number: 42 - } - } - ) - expect(response.status).to eq 200 - manager_key_id = response['id'] - - # api_key_user1 authorization: - client = client(user1_auth) - response = client.security.create_api_key( - body: { - name: 'user1-api-key', - expiration: '1d', - metadata: { - letter: 'a', - number: 1 - } - } - ) - expect(response.status).to eq 200 - user1_key_id = response['id'] - - # api_key_user2 authorization - client = client(user2_auth) - response = client.security.create_api_key( - body: { - name: 'user2-api-key', - expiration: '1d', - metadata: { - letter: 'b', - number: 42 - } - } - ) - expect(response.status).to eq 200 - user1_key_id = response['id'] - - client = client(manager_auth) - response = client.security.query_api_keys - expect(response.status).to eq 200 - manager_total = response['total'] - expect(manager_total).to be >= 3 - - client = client(user1_auth) - response = client.security.query_api_keys - expect(response.status).to eq 200 - user_1_total = response['total'] - expect(user_1_total).to be >= 1 - expect(user_1_total).to be < manager_total - - client = client(user2_auth) - response = client.security.query_api_keys - expect(response.status).to eq 200 - user_2_total = response['total'] - expect(user_2_total).to be >= 1 - expect(user_2_total).to be < manager_total - end -end diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_query_with_aggs_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_query_with_aggs_spec.rb deleted file mode 100644 index c17120d444..0000000000 --- a/elasticsearch-api/spec/platinum/integration/api_key/api_key_query_with_aggs_spec.rb +++ /dev/null @@ -1,120 +0,0 @@ -# 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. - -require_relative '../platinum_helper' - -describe 'API keys' do - before do - ADMIN_CLIENT.security.put_role( - name: 'admin_role', - body: { cluster: ['manage_api_key'] } - ) - ADMIN_CLIENT.security.put_role( - name: 'user_role', - body: { - cluster: ['manage_own_api_key'], - } - ) - ADMIN_CLIENT.security.put_user( - username: 'api_key_manager', - body: { - password: 'x-pack-test-password', - roles: [ 'admin_role' ], - full_name: 'API key manager' - } - ) - - ADMIN_CLIENT.security.put_user( - username: 'api_key_user', - body: { - password: 'x-pack-test-password', - roles: [ 'user_role' ], - full_name: 'API key user' - } - ) - end - after do - ADMIN_CLIENT.security.delete_role(name: "admin_role", ignore: 404) - ADMIN_CLIENT.security.delete_role(name: "user_role", ignore: 404) - ADMIN_CLIENT.security.delete_user(username: "api_key_user", ignore: 404) - ADMIN_CLIENT.security.delete_user(username: "api_key_manager", ignore: 404) - end - - def client(headers) - Elasticsearch::Client.new( - host: "https://#{HOST_URI.host}:#{HOST_URI.port}", - transport_options: TRANSPORT_OPTIONS.merge(headers: headers) - ) - end - - let(:manager_auth) do - { Authorization: "Basic YXBpX2tleV9tYW5hZ2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } - end - let(:user_auth) do - { Authorization: "Basic YXBpX2tleV9tYW5hZ2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } - end - - it 'queries api key with args' do - # api_key_manager authorization: - client = client(manager_auth) - response = client.security.create_api_key( - body: { - name: 'manager-api-key', - expiration: '10d', - metadata: { - letter: 'a', - number: 42 - } - } - ) - expect(response.status).to eq 200 - id = response['id'] - api_key = response['api_key'] - expect(response['encoded']).to eq Base64.strict_encode64("#{id}:#{api_key}") - - client = client(user_auth) - response = client.security.create_api_key( - body: { - name: 'user-api-key', - expiration: '1d', - metadata: { - letter: 'a', - number: 1 - } - } - ) - expect(response.status).to eq 200 - id = response['id'] - api_key = response['api_key'] - expect(response['encoded']).to eq Base64.strict_encode64("#{id}:#{api_key}") - - response = client.security.query_api_keys( - body: { - size: 0, - aggs: { - my_buckets: { - composite: { - sources: [{ key_name: { terms: { field: "name" } } } ] - } - } - } - } - ) - expect(response.dig('aggregations', 'my_buckets', 'buckets').find { |a| a.dig('key', 'key_name') == 'manager-api-key'}) - expect(response.dig('aggregations', 'my_buckets', 'buckets').find { |a| a.dig('key', 'key_name') == 'user-api-key'}) - end -end diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_spec.rb deleted file mode 100644 index 8b5c829f32..0000000000 --- a/elasticsearch-api/spec/platinum/integration/api_key/api_key_spec.rb +++ /dev/null @@ -1,156 +0,0 @@ -# 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. - -require 'base64' -require_relative '../platinum_helper' - -describe 'API keys' do - before do - ADMIN_CLIENT.security.put_role( - name: 'admin_role', - body: { - cluster: ['manage_api_key'], - indices: [ - { - names: '*', - privileges: ['all'] - } - ], - applications: [ - { - application: 'myapp', - privileges: ['*'], - resources: ['*'] - } - ] - } - ) - ADMIN_CLIENT.security.put_user( - username: 'api_key_user', - body: { - password: 'test-password', - roles: [ 'admin_role' ], - full_name: 'API key user' - } - ) - ADMIN_CLIENT.security.put_privileges( - body: - { - myapp: { - read: { - application: 'myapp', - name: 'read', - actions: [ 'data:read/*' ] - }, - write: { - application: 'myapp', - name: 'write', - actions: [ 'data:write/*' ] - } - } - } - ) - end - - after do - ADMIN_CLIENT.security.delete_role(name: "admin_role", ignore: 404) - ADMIN_CLIENT.security.delete_user(username: "api_key_user", ignore: 404) - ADMIN_CLIENT.security.delete_privileges(application: 'myapp', name: "read,write", ignore: 404) - end - - let(:credentials) { Base64.strict_encode64("api_key_user:test-password") } - let(:client) do - Elasticsearch::Client.new( - host: HOST, - transport_options: TRANSPORT_OPTIONS.merge(headers: { Authorization: "Basic #{credentials}" }) - ) - end - - it 'creates api key' do - response = client.security.create_api_key( - body: { - name: "my-api-key", - expiration: "1d", - role_descriptors: { - 'role-a' => { - cluster: ["all"], - index: [ - { - names: ["index-a"], - privileges: ["read"] - } - ] - }, - 'role-b' => { - cluster: ["manage"], - index: [ - { - names: ["index-b"], - privileges: ["all"] - } - ] - } - } - } - ) - expect(response['name']).to eq 'my-api-key' - id = response['id'] - expect(id).not_to be nil - expect(response['api_key']).not_to be nil - expect(response['expiration']).not_to be nil - credentials = Base64.strict_encode64("#{response['id']}:#{response['api_key']}") - expect(credentials).to eq response['encoded'] - new_client = Elasticsearch::Client.new( - host: "https://#{HOST_URI.host}:#{HOST_URI.port}", - transport_options: TRANSPORT_OPTIONS, - api_key: credentials - ) - response = new_client.security.authenticate - expect(response['username']).to eq 'api_key_user' - expect(response['roles'].length).to eq 0 - expect(response['authentication_realm']['name']).to eq '_es_api_key' - expect(response['authentication_realm']['type']).to eq '_es_api_key' - expect(response['api_key']['id']).to eq id - expect(response['api_key']['name']).to eq 'my-api-key' - response = ADMIN_CLIENT.security.clear_api_key_cache(ids: id) - expect(response['_nodes']['failed']).to eq 0 - end - - context 'Test get api key' do - let(:name) { 'my-api-key-2'} - - it 'gets api key' do - response = ADMIN_CLIENT.security.create_api_key( - body: { name: name, expiration: '1d' } - ) - expect(response['name']).to eq name - id = response['id'] - expect(id).not_to be nil - expect(response['api_key']).not_to be nil - expect(response['expiration']).not_to be nil - - response = ADMIN_CLIENT.security.get_api_key(id: id) - expect(response['api_keys'].first['id']).to eq id - expect(response['api_keys'].first['name']).to eq name - expect(response['api_keys'].first['username']).to eq 'elastic' - expect(response['api_keys'].first['invalidated']).to eq false - expect(response['api_keys'].first['creation']).not_to be nil - response = ADMIN_CLIENT.security.get_api_key(owner: true) - expect(response['api_keys'].length).to be > 0 - end - end -end diff --git a/elasticsearch-api/spec/platinum/integration/api_key/api_key_update_spec.rb b/elasticsearch-api/spec/platinum/integration/api_key/api_key_update_spec.rb deleted file mode 100644 index f37eeae8fe..0000000000 --- a/elasticsearch-api/spec/platinum/integration/api_key/api_key_update_spec.rb +++ /dev/null @@ -1,134 +0,0 @@ -# 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. - -require 'base64' -require_relative '../platinum_helper' - -describe 'API keys API' do - before do - ADMIN_CLIENT.security.put_role( - name: 'user_role', - body: { - cluster: ['manage_own_api_key'], - indices: [ - { - names: '*', - privileges: ['all'] - } - ] - } - ) - ADMIN_CLIENT.security.put_user( - username: 'api_key_user_1', - body: { - password: 'x-pack-test-password', - roles: [ 'user_role' ], - full_name: 'API key user 1' - } - ) - end - - after do - ADMIN_CLIENT.security.delete_role(name: "user_role", ignore: 404) - ADMIN_CLIENT.security.delete_user(username: "api_key_user_1", ignore: 404) - end - - let(:client) do - Elasticsearch::Client.new( - host: "https://#{HOST_URI.host}:#{HOST_URI.port}", - transport_options: TRANSPORT_OPTIONS.merge( - headers: { Authorization: "Basic YXBpX2tleV91c2VyXzE6eC1wYWNrLXRlc3QtcGFzc3dvcmQ=" } - ) - ) - end - - it 'updates api key' do - response = client.security.create_api_key( - body: { - name: 'user1-api-key', - role_descriptors: { - "role-a" => { - cluster: ["none"], - index: [ - { - names: ["index-a"], - privileges: ["read"] - } - ] - } - } - } - ) - expect(response.status).to eq 200 - expect(response['name']).to eq 'user1-api-key' - id = response['id'] - expect(id).not_to be nil - expect(response['api_key']).not_to be nil - credentials = Base64.strict_encode64("#{response['id']}:#{response['api_key']}") - expect(credentials).to eq response['encoded'] - - new_client = Elasticsearch::Client.new( - host: "https://#{HOST_URI.host}:#{HOST_URI.port}", - transport_options: TRANSPORT_OPTIONS, - api_key: credentials - ) - privileges_body = { - cluster: ['manage_own_api_key'], - index: [ - { - names: ['index-a'], - privileges: ['write'] - }, - { - names: ['index-b'], - privileges: ['read'] - } - ] - } - response = new_client.security.has_privileges(body: privileges_body) - expect(response['has_all_requested']).to eq false - - response = client.security.update_api_key( - id: id, - body: { - role_descriptors: { - "role-a" => { - cluster: ["all"], - index: [ - { - names: ["index-a"], - privileges: ["write"] - }, - { - names: ["index-b"], - privileges: ["read"] - } - ] - } - }, - metadata: { - letter: "a", - number: 42 - } - } - ) - expect(response['updated']).to eq true - - response = new_client.security.has_privileges(user: nil, body: privileges_body) - expect(response['has_all_requested']).to eq true - end -end diff --git a/elasticsearch-api/spec/platinum/integration/eql/eql_async_spec.rb b/elasticsearch-api/spec/platinum/integration/eql/eql_async_spec.rb deleted file mode 100644 index 9149a1c3b6..0000000000 --- a/elasticsearch-api/spec/platinum/integration/eql/eql_async_spec.rb +++ /dev/null @@ -1,72 +0,0 @@ -# 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. - -require_relative '../platinum_helper' - -describe 'eql/Executes async EQL with missing events' do - let(:index) { 'eql_test_m' } - before do - ADMIN_CLIENT.indices.create( - index: index, - body: { - mappings: { - properties: { - '@timestamp' => { type: 'date' }, - 'event.category' => { type: 'keyword' }, - user: { type: 'keyword' } - } - } - } - ) - ADMIN_CLIENT.bulk( - refresh: true, - body: [ - { index: { _index: 'eql_test_m', _id: '1' } }, - { event: [{ category: 'process' }], '@timestamp' => '2023-07-11T11:09:05.529Z', user: 'foo' }, - { index: { _index: 'eql_test_m', _id: '2'} }, - { event: [{ category: 'process' }], '@timestamp' => '2023-07-11T11:09:06.529Z', user: 'bar' } - ] - ) - end - - after do - ADMIN_CLIENT.indices.delete(index: index) - end - - it 'Executes async EQL with missing events' do - response = ADMIN_CLIENT.eql.search( - index: 'eql_test_m', - wait_for_completion_timeout: '0ms', - keep_on_completion: true, - body: { query: 'sequence with maxspan=24h [ process where true ] ![ process where true ]' } - ) - expect(response.status).to eq 200 - expect(response['id']).not_to be_nil - id = response['id'] - - response = ADMIN_CLIENT.eql.get(id: id, wait_for_completion_timeout: '10s') - expect(response.status).to eq 200 - expect(response['is_running']).to be false - expect(response['is_partial']).to be false - expect(response['timed_out']).to be false - expect(response['hits']['total']['value']).to eq 1 - expect(response['hits']['total']['relation']).to eq 'eq' - expect(response['hits']['total']['relation']).to eq 'eq' - expect(response['hits']['sequences'].first['events'].first['_source']['user']).to eq 'bar' - expect(response['hits']['sequences'].first['events'].last['missing']).to be true - end -end diff --git a/elasticsearch-api/spec/platinum/integration/ml/get_memory_stats_spec.rb b/elasticsearch-api/spec/platinum/integration/ml/get_memory_stats_spec.rb deleted file mode 100644 index a2932733f6..0000000000 --- a/elasticsearch-api/spec/platinum/integration/ml/get_memory_stats_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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. - -require_relative '../platinum_helper' - -describe 'ML/Get Memory Stats API' do - it 'gets memory for all nodes' do - response = ADMIN_CLIENT.ml.get_memory_stats - expect(response.status).to eq 200 - expect(response['cluster_name']).not_to be_nil - expect(response['_nodes']['total']).to be >= 1 - expect(response['nodes'].first[1]['mem']['total_in_bytes']).to be > 1 - end - - it 'gets memory for ML nodes' do - response = ADMIN_CLIENT.ml.get_memory_stats - expect(response.status).to eq 200 - expect(response['cluster_name']).not_to be_nil - expect(response['nodes'].first[1]['mem']['total_in_bytes']).to be > 1 - end - - it 'gets memory for specific node' do - response = ADMIN_CLIENT.ml.get_memory_stats - expect(response.status).to eq 200 - node_id = response['nodes'].keys.first - - response = ADMIN_CLIENT.ml.get_memory_stats(node_id: node_id, timeout: '29s') - expect(response.status).to eq 200 - expect(response['cluster_name']).not_to be_nil - expect(response['nodes'].first[1]['mem']['total_in_bytes']).to be > 1 - expect(response['_nodes']['total']).to be 1 - end -end diff --git a/elasticsearch-api/spec/platinum/integration/security/users_query_spec.rb b/elasticsearch-api/spec/platinum/integration/security/users_query_spec.rb deleted file mode 100644 index 8eaf047410..0000000000 --- a/elasticsearch-api/spec/platinum/integration/security/users_query_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -# 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. - -require_relative '../platinum_helper' - -describe 'security/Query User' do - before do - ADMIN_CLIENT.security.put_user( - username: "query_users_test", - body: { - password: "x-pack-test-password", - roles: [ "manage_users_role" ], - full_name: "Read User" - } - ) - end - - it 'queries users' do - response = ADMIN_CLIENT.security.query_user(body: {}) - expect(response.status).to eq 200 - expect(response['count']).to be > 0 - expect(response['total']).to be > 0 - end - - it 'queries user and finds created one' do - body = { - query: { wildcard: { username: 'query_users_*' } } - } - response = ADMIN_CLIENT.security.query_user(body: body) - expect(response.status).to eq 200 - expect(response['count']).to be 1 - expect(response['total']).to be 1 - expect(response['users'].first['username']).to eq 'query_users_test' - end -end diff --git a/elasticsearch-api/spec/platinum/integration/service_accounts/service_accounts_spec.rb b/elasticsearch-api/spec/platinum/integration/service_accounts/service_accounts_spec.rb deleted file mode 100644 index d3c8a8bb48..0000000000 --- a/elasticsearch-api/spec/platinum/integration/service_accounts/service_accounts_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -# 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. - -require_relative '../platinum_helper' - -describe 'Service Accounts API' do - context 'service account tokens' do - before do - - end - - after do - ADMIN_CLIENT.security.delete_service_token( - namespace: 'elastic', - service: 'fleet-server', - name: 'api-token-fleet' - ) - end - - it 'responds with health report' do - response = ADMIN_CLIENT.security.create_service_token( - namespace: 'elastic', - service: 'fleet-server', - name: 'api-token-fleet' - ) - expect(response.status).to eq 200 - expect(response['created']).to eq true - service_token_fleet = response['token']['value'] - headers = { 'Authorization' => "Bearer #{service_token_fleet}"} - client = Elasticsearch::Client.new( - host: HOST, - transport_options: TRANSPORT_OPTIONS.merge(headers: headers) - ) - response = client.security.authenticate - - expect(response.status).to eq 200 - expect(response['username']).to eq 'elastic/fleet-server' - expect(response['full_name']).to eq 'Service account - elastic/fleet-server' - - - expect do - client.security.delete_user(username: 'foo') - end.to raise_error Elastic::Transport::Transport::Errors::Forbidden - - response = ADMIN_CLIENT.security.get_service_credentials( - namespace: 'elastic', service: 'fleet-server' - ) - expect(response['service_account']).to eq 'elastic/fleet-server' - end - end -end diff --git a/elasticsearch-api/spec/platinum/integration/snapshots/snapshots_spec.rb b/elasticsearch-api/spec/platinum/integration/snapshots/snapshots_spec.rb deleted file mode 100644 index 755915fcdf..0000000000 --- a/elasticsearch-api/spec/platinum/integration/snapshots/snapshots_spec.rb +++ /dev/null @@ -1,84 +0,0 @@ -# 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. - -require_relative '../platinum_helper' - -describe 'Snapshots API' do - before do - ADMIN_CLIENT.snapshot.create_repository( - repository: 'test_repo_restore_1', - body: { - type: 'source', - settings: { - delegate_type: 'fs', - location: "test_repo_restore_1_loc" - } - } - ) - ADMIN_CLIENT.indices.create( - index: index, - body: { - settings: { - number_of_shards: 1, - number_of_replicas: 0 - } - } - ) - end - - after do - ADMIN_CLIENT.indices.delete(index: 'test_index') - ADMIN_CLIENT.snapshot.delete(repository: 'test_repo_restore_1', snapshot: 'test_snapshot') - end - - let(:index) { 'test_index' } - - it 'creates a source only snapshot and then restores it' do - ADMIN_CLIENT.index(index: index, id: '1', body: { foo: 'bar' }) - ADMIN_CLIENT.indices.flush(index: index) - response = ADMIN_CLIENT.snapshot.create( - repository: 'test_repo_restore_1', - snapshot: 'test_snapshot', - wait_for_completion: true, - body: { "indices": "test_index" } - ) - expect(response.status).to eq 200 - expect(response['snapshot']['snapshot']).to eq 'test_snapshot' - expect(response['snapshot']['state']).to eq 'SUCCESS' - expect(response['snapshot']['version']).not_to be_nil - - ADMIN_CLIENT.indices.close(index: index) - ADMIN_CLIENT.snapshot.restore( - repository: 'test_repo_restore_1', - snapshot: 'test_snapshot', - wait_for_completion: true, - ) - response = ADMIN_CLIENT.indices.recovery(index: 'test_index') - expect(response.status).to eq 200 - expect(response['test_index']['shards'].first['type']).to eq 'SNAPSHOT' - expect(response['test_index']['shards'].first['stage']).to eq 'DONE' - response = ADMIN_CLIENT.search( - rest_total_hits_as_int: true, - index: index, - body: { query: { match_all: {} } } - ) - expect(response.status).to eq 200 - expect(response['hits']['total']).to eq 1 - expect(response['hits']['hits'].length).to eq 1 - expect(response['hits']['hits'].first['_id']).to eq '1' - end -end diff --git a/elasticsearch-api/spec/platinum/integration/spatial/script_doc_values_spec.rb b/elasticsearch-api/spec/platinum/integration/spatial/script_doc_values_spec.rb deleted file mode 100644 index 5061eb8427..0000000000 --- a/elasticsearch-api/spec/platinum/integration/spatial/script_doc_values_spec.rb +++ /dev/null @@ -1,147 +0,0 @@ -# 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. - -require_relative '../platinum_helper' - -describe 'Spatial API' do - context 'script doc values tests' do - index = 'geospatial_test' - before(:all) do - ADMIN_CLIENT.indices.create( - index: index, - body: { - settings: { number_of_shards: 1}, - mappings: { properties: { geo_shape: { type: 'geo_shape' } } } - } - ) - ADMIN_CLIENT.index( - index: index, - id: '1', - body: { - geo_shape: 'POLYGON((24.04725 59.942,24.04825 59.94125,24.04875 59.94125,24.04875 59.94175,24.048 59.9425,24.0475 59.94275,24.0465 59.94225,24.046 59.94225,24.04575 59.9425,24.04525 59.94225,24.04725 59.942))' - }, - refresh: true - ) - ADMIN_CLIENT.indices.refresh - end - - after(:all) do - ADMIN_CLIENT.indices.delete(index: index) - end - - it 'centroid' do - response = ADMIN_CLIENT.search( - rest_total_hits_as_int: true, - body: { - script_fields: { centroid: { script: { source: "doc['geo_shape'].getCentroid()" } } } - } - ) - expect(response['hits']['hits'].first['fields']['centroid'].first['lat']).to eq 59.942043484188616 - expect(response['hits']['hits'].first['fields']['centroid'].first['lon']).to eq 24.047588920220733 - end - - it 'bounding box' do - response = ADMIN_CLIENT.search( - rest_total_hits_as_int: true, - body: { - script_fields: { bbox: { script: { source: "doc['geo_shape'].getBoundingBox()" } } } - } - ) - expect(response['hits']['hits'].first['fields']['bbox'].first['top_left']['lat']).to eq 59.942749994806945 - expect(response['hits']['hits'].first['fields']['bbox'].first['top_left']['lon']).to eq 24.045249950140715 - expect(response['hits']['hits'].first['fields']['bbox'].first['bottom_right']['lat']).to eq 59.94124996941537 - expect(response['hits']['hits'].first['fields']['bbox'].first['bottom_right']['lon']).to eq 24.048749981448054 - end - - it 'label position' do - response = ADMIN_CLIENT.search( - rest_total_hits_as_int: true, - body: { - script_fields: { label_position: { script: { source: "doc['geo_shape'].getLabelPosition()" } } } - } - ) - expect(response['hits']['hits'].first['fields']['label_position'].first['lat']).to eq 59.942043484188616 - expect(response['hits']['hits'].first['fields']['label_position'].first['lon']).to eq 24.047588920220733 - end - - it 'bounding box points' do - response = ADMIN_CLIENT.search( - rest_total_hits_as_int: true, - body: { - script_fields: { - topLeft: { script: { source: "doc['geo_shape'].getBoundingBox().topLeft()" } }, - bottomRight: { script: { source: "doc['geo_shape'].getBoundingBox().bottomRight()" } } - } - } - ) - expect(response['hits']['hits'].first['fields']['topLeft'].first['lat']).to eq 59.942749994806945 - expect(response['hits']['hits'].first['fields']['topLeft'].first['lon']).to eq 24.045249950140715 - expect(response['hits']['hits'].first['fields']['bottomRight'].first['lat']).to eq 59.94124996941537 - expect(response['hits']['hits'].first['fields']['bottomRight'].first['lon']).to eq 24.048749981448054 - end - - it 'dimensional type' do - response = ADMIN_CLIENT.search( - rest_total_hits_as_int: true, - body: { - script_fields: { type: { script: { source: "doc['geo_shape'].getDimensionalType()" } } } - } - ) - expect(response['hits']['hits'].first['fields']['type'].first).to eq 2 - end - - it 'geoshape value' do - response = ADMIN_CLIENT.search( - rest_total_hits_as_int: true, - body: { - script_fields: { type: { script: { source: "doc['geo_shape'].get(0)" } } } - } - ) - expect(response['hits']['hits'].first['fields']['type'].first).to eq '' - - response = ADMIN_CLIENT.search( - rest_total_hits_as_int: true, - body: { - script_fields: { type: { script: { source: "field('geo_shape').get(null)"} } } - } - ) - expect(response['hits']['hits'].first['fields']['type'].first).to eq '' - - response = ADMIN_CLIENT.search( - rest_total_hits_as_int: true, - body: { - script_fields: { type: { script: { source: "$('geo_shape', null)"} } } - } - ) - expect(response['hits']['hits'].first['fields']['type'].first).to eq '' - end - - it 'diagonal length' do - response = ADMIN_CLIENT.search( - rest_total_hits_as_int: true, - body: { - script_fields: { - width: { script: { source: "doc['geo_shape'].getMercatorWidth()" } }, - height: { script: { source: "doc['geo_shape'].getMercatorHeight()" } } - } - } - ) - expect(response['hits']['hits'].first['fields']['width'].first).to eq 389.62170283915475 - expect(response['hits']['hits'].first['fields']['height'].first).to eq 333.37976841442287 - end - end -end diff --git a/elasticsearch-api/spec/platinum/integration/token/token_spec.rb b/elasticsearch-api/spec/platinum/integration/token/token_spec.rb deleted file mode 100644 index 10c2fe589c..0000000000 --- a/elasticsearch-api/spec/platinum/integration/token/token_spec.rb +++ /dev/null @@ -1,94 +0,0 @@ -# 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. - -require_relative '../platinum_helper' - -describe 'Token API' do - before do - ADMIN_CLIENT.security.put_role( - name: 'admin_role', - body: { cluster: ['manage_security'] } - ) - ADMIN_CLIENT.security.put_user( - username: 'token_user', - body: { - password: 'x-pack-test-password', - roles: [ 'admin_role' ], - full_name: 'Token user' - } - ) - end - - after do - ADMIN_CLIENT.security.delete_role(name: "admin_role", ignore: 404) - ADMIN_CLIENT.security.delete_user(username: "token_user", ignore: 404) - end - - it 'invalidates user token' do - response = ADMIN_CLIENT.security.get_token( - body: { grant_type: "password", username: "token_user", password: "x-pack-test-password" } - ) - - expect(response.status).to eq 200 - expect(response['type']).to eq 'Bearer' - expect(response['access_token']).not_to be_nil - access_token = response['access_token'] - client = Elasticsearch::Client.new( - host: "https://#{HOST_URI.host}:#{HOST_URI.port}", - transport_options: TRANSPORT_OPTIONS.merge( - headers: { Authorization: "Bearer #{access_token}" } - ) - ) - response = client.security.authenticate - expect(response.status).to eq 200 - expect(response['username']).to eq 'token_user' - expect(response['roles'].first).to eq 'admin_role' - ADMIN_CLIENT.security.invalidate_token( - body: { username: 'token_user' } - ) - - expect do - client.security.authenticate - end.to raise_error(Elastic::Transport::Transport::Errors::Unauthorized) - end - - it 'invalidates realm token' do - response = ADMIN_CLIENT.security.get_token( - body: { grant_type: "password", username: "token_user", password: "x-pack-test-password" } - ) - expect(response.status).to eq 200 - expect(response['type']).to eq 'Bearer' - expect(response['access_token']).not_to be_nil - access_token = response['access_token'] - client = Elasticsearch::Client.new( - host: "https://#{HOST_URI.host}:#{HOST_URI.port}", - transport_options: TRANSPORT_OPTIONS.merge( - headers: { Authorization: "Bearer #{access_token}" } - ) - ) - response = client.security.authenticate - expect(response.status).to eq 200 - expect(response['username']).to eq 'token_user' - expect(response['roles'].first).to eq 'admin_role' - response = ADMIN_CLIENT.security.invalidate_token(body: { realm_name: 'default_native' }) - expect(response.status).to eq 200 - - expect do - client.security.authenticate - end.to raise_error(Elastic::Transport::Transport::Errors::Unauthorized) - end -end diff --git a/elasticsearch-api/spec/platinum/unit/async_search/delete_test.rb b/elasticsearch-api/spec/platinum/unit/async_search/delete_test.rb deleted file mode 100644 index 7efcde4ced..0000000000 --- a/elasticsearch-api/spec/platinum/unit/async_search/delete_test.rb +++ /dev/null @@ -1,39 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackAsyncSearchDelete < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Async Search Delete' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('DELETE', method) - assert_equal('_async_search/foo', url) - assert_equal({}, params) - assert_nil(body) - end.returns(FakeResponse.new) - - subject.async_search.delete(id: 'foo') - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/async_search/get_test.rb b/elasticsearch-api/spec/platinum/unit/async_search/get_test.rb deleted file mode 100644 index 76b5df5f79..0000000000 --- a/elasticsearch-api/spec/platinum/unit/async_search/get_test.rb +++ /dev/null @@ -1,39 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackAsyncSearchGet < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Async Search Get' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('_async_search/foo', url) - assert_equal({}, params) - assert_nil(body) - end.returns(FakeResponse.new) - - subject.async_search.get(id: 'foo') - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/async_search/status_test.rb b/elasticsearch-api/spec/platinum/unit/async_search/status_test.rb deleted file mode 100644 index c65ca5e1da..0000000000 --- a/elasticsearch-api/spec/platinum/unit/async_search/status_test.rb +++ /dev/null @@ -1,39 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackAsyncSearchStatus < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Async Search Status' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('_async_search/status/foo', url) - assert_equal({}, params) - assert_nil(body) - end.returns(FakeResponse.new) - - subject.async_search.status(id: 'foo') - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/async_search/submit_test.rb b/elasticsearch-api/spec/platinum/unit/async_search/submit_test.rb deleted file mode 100644 index 89261a1dbb..0000000000 --- a/elasticsearch-api/spec/platinum/unit/async_search/submit_test.rb +++ /dev/null @@ -1,50 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackAsyncSearchSubmit < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Async Search Submit' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_async_search', url) - assert_equal({}, params) - assert_nil(body) - end.returns(FakeResponse.new) - - subject.async_search.submit - end - - should 'perform correct request with index' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('foo/_async_search', url) - assert_equal({}, params) - assert_nil(body) - end.returns(FakeResponse.new) - - subject.async_search.submit(index: 'foo') - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/enrich/delete_policy_test.rb b/elasticsearch-api/spec/platinum/unit/enrich/delete_policy_test.rb deleted file mode 100644 index 4f661d5cb2..0000000000 --- a/elasticsearch-api/spec/platinum/unit/enrich/delete_policy_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackEnrichDeletePolicyTest < Minitest::Test - - context "XPack Enrich: Delete policy" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal '_enrich/policy/foo', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.enrich.delete_policy(name: 'foo') - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/eql/delete_test.rb b/elasticsearch-api/spec/platinum/unit/eql/delete_test.rb deleted file mode 100644 index 202daa6cf6..0000000000 --- a/elasticsearch-api/spec/platinum/unit/eql/delete_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackEqlDeleteTest < Minitest::Test - context 'Eql: Delete' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal '_eql/search/foo', url - assert_equal({}, params) - assert_nil body - true - end.returns(FakeResponse.new) - - subject.eql.delete(id: 'foo') - end - - should 'raise argument error without id' do - assert_raises ArgumentError do - subject.eql.delete - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/eql/get_status_test.rb b/elasticsearch-api/spec/platinum/unit/eql/get_status_test.rb deleted file mode 100644 index 552cd30404..0000000000 --- a/elasticsearch-api/spec/platinum/unit/eql/get_status_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackEqlGetStatusTest < Minitest::Test - context 'Eql: Get Status' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_eql/search/status/foo', url - assert_equal({}, params) - assert_nil body - true - end.returns(FakeResponse.new) - - subject.eql.get_status(id: 'foo') - end - - should 'raise argument error without id' do - assert_raises ArgumentError do - subject.eql.get_status - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/eql/get_test.rb b/elasticsearch-api/spec/platinum/unit/eql/get_test.rb deleted file mode 100644 index 7f63be2e8a..0000000000 --- a/elasticsearch-api/spec/platinum/unit/eql/get_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackEqlGetTest < Minitest::Test - context 'Eql: Get' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_eql/search/foo', url - assert_equal({}, params) - assert_nil body - true - end.returns(FakeResponse.new) - - subject.eql.get(id: 'foo') - end - - should 'raise argument error without id' do - assert_raises ArgumentError do - subject.eql.get - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/eql/search_test.rb b/elasticsearch-api/spec/platinum/unit/eql/search_test.rb deleted file mode 100644 index 5b5bc3015d..0000000000 --- a/elasticsearch-api/spec/platinum/unit/eql/search_test.rb +++ /dev/null @@ -1,52 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackEqlSearchTest < Minitest::Test - context 'Eql: Search' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal 'foo/_eql/search', url - assert_equal({}, params) - assert_equal body, 'test' - true - end.returns(FakeResponse.new) - - subject.eql.search(index: 'foo', body: 'test') - end - - should 'raise argument error without body' do - assert_raises ArgumentError do - subject.eql.search(index: 'foo') - end - end - - should 'raise argument error without index' do - assert_raises ArgumentError do - subject.eql.search(body: 'test') - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/graph/explore_test.rb b/elasticsearch-api/spec/platinum/unit/graph/explore_test.rb deleted file mode 100644 index 0d9d581ca3..0000000000 --- a/elasticsearch-api/spec/platinum/unit/graph/explore_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class GraphExploreTest < Minitest::Test - - context "Graph: Explore" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal 'my_index/_graph/explore', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.graph.explore(index: 'my_index') - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/explain_test.rb b/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/explain_test.rb deleted file mode 100644 index 6dbe35d209..0000000000 --- a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/explain_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndexLifecycleManagementExplainTest < Minitest::Test - - context "XPack Index Lifecycle Management: explain" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal 'foo/_ilm/explain', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ilm.explain_lifecycle(index: 'foo') - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/get_status_test.rb b/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/get_status_test.rb deleted file mode 100644 index 069e84bcf9..0000000000 --- a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/get_status_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndexLifecycleManagementGetStatusTest < Minitest::Test - - context "XPack Index Lifecycle Management: Get status" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_ilm/status', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ilm.get_status - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/move_to_step.rb b/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/move_to_step.rb deleted file mode 100644 index 273ef80c5b..0000000000 --- a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/move_to_step.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndexLifecycleManagementMoveStepTest < Minitest::Test - - context "XPack Index Lifecycle Management: Move to step" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal '_ilm/move/foo', url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.ilm.move_to_step :index => 'foo', :body => {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/remove_policy_test.rb b/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/remove_policy_test.rb deleted file mode 100644 index 29da1c4a98..0000000000 --- a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/remove_policy_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndexLifecycleManagementRemovePolicyTest < Minitest::Test - - context "XPack Index Lifecycle Management: Remove policy" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal 'foo/_ilm/remove', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ilm.remove_policy :index => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/retry_policy_test.rb b/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/retry_policy_test.rb deleted file mode 100644 index 8b5593dfb5..0000000000 --- a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/retry_policy_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndexLifecycleManagementRetryTest < Minitest::Test - - context "XPack Index Lifecycle Management: retry" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal 'foo/_ilm/retry', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ilm.retry(index: 'foo') - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/start_test.rb b/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/start_test.rb deleted file mode 100644 index cc393a0ff2..0000000000 --- a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/start_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndexLifecycleManagementStartTest < Minitest::Test - - context "XPack Index Lifecycle Management: start" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal '_ilm/start', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ilm.start - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/stop_test.rb b/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/stop_test.rb deleted file mode 100644 index 0f51d8aec2..0000000000 --- a/elasticsearch-api/spec/platinum/unit/index_lifecycle_management/stop_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndexLifecycleManagementStopTest < Minitest::Test - - context "XPack Index Lifecycle Management: stop" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal '_ilm/stop', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ilm.stop - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/indices/create_data_stream_test.rb b/elasticsearch-api/spec/platinum/unit/indices/create_data_stream_test.rb deleted file mode 100644 index 04ba1fd10d..0000000000 --- a/elasticsearch-api/spec/platinum/unit/indices/create_data_stream_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndicesCreateDataStreamTest < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Create Data Stream' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('PUT', method) - assert_equal('_data_stream/foo', url) - assert_equal({}, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.indices.create_data_stream(name: 'foo') - end - - should 'raise argument error without name' do - assert_raises ArgumentError do - subject.indices.create_data_stream - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/indices/data_stream_stats_test.rb b/elasticsearch-api/spec/platinum/unit/indices/data_stream_stats_test.rb deleted file mode 100644 index de4efba9d0..0000000000 --- a/elasticsearch-api/spec/platinum/unit/indices/data_stream_stats_test.rb +++ /dev/null @@ -1,54 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndicesDataStreamStatsTest < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Data Stream Stats' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('_data_stream/_stats', url) - assert_equal({}, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.indices.data_streams_stats - end - end - - context 'when name is specified' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('_data_stream/foo/_stats', url) - assert_equal({}, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.indices.data_streams_stats(name: 'foo') - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/indices/delete_data_stream_test.rb b/elasticsearch-api/spec/platinum/unit/indices/delete_data_stream_test.rb deleted file mode 100644 index c8d4233783..0000000000 --- a/elasticsearch-api/spec/platinum/unit/indices/delete_data_stream_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndicesDeleteDataStreamTest < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Delete Data Stream' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('DELETE', method) - assert_equal('_data_stream/foo', url) - assert_equal({}, params) - assert_nil(body) - end.returns(FakeResponse.new) - - subject.indices.delete_data_stream(name: 'foo') - end - end - - - should 'raise argument error without name' do - assert_raises ArgumentError do - subject.indices.create_data_stream - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/indices/downsample_test.rb b/elasticsearch-api/spec/platinum/unit/indices/downsample_test.rb deleted file mode 100644 index 4b6e917907..0000000000 --- a/elasticsearch-api/spec/platinum/unit/indices/downsample_test.rb +++ /dev/null @@ -1,58 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class IndicesDownsampleTest < Minitest::Test - context "Indices Downsample: Downsample an index" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('foo/_downsample/bar', url) - assert_equal({}, params) - assert_equal(body, {}) - true - end.returns(FakeResponse.new) - - subject.indices.downsample(body: {}, index: 'foo', target_index: 'bar') - end - - should 'raise argument error without body' do - assert_raises ArgumentError do - subject.indices.downsample(index: 'foo', target_index: 'bar') - end - end - - should 'raise argument error without index' do - assert_raises ArgumentError do - subject.indices.downsample(body: {}, target_index: 'bar') - end - end - - should 'raise argument error without rollup_index' do - assert_raises ArgumentError do - subject.indices.downsample(body: {}, index: 'foo') - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/indices/get_data_stream_test.rb b/elasticsearch-api/spec/platinum/unit/indices/get_data_stream_test.rb deleted file mode 100644 index 38d3c828cd..0000000000 --- a/elasticsearch-api/spec/platinum/unit/indices/get_data_stream_test.rb +++ /dev/null @@ -1,50 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndicesGetDataStreamTest < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Get Data Stream' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('_data_stream', url) - assert_equal({}, params) - assert_nil(body) - end.returns(FakeResponse.new) - - subject.indices.get_data_stream - end - end - - context 'Get Data Stream with name' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('_data_stream/foo', url) - end.returns(FakeResponse.new) - - subject.indices.get_data_stream(name: 'foo') - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/indices/migrate_to_data_stream_test.rb b/elasticsearch-api/spec/platinum/unit/indices/migrate_to_data_stream_test.rb deleted file mode 100644 index c9b4151571..0000000000 --- a/elasticsearch-api/spec/platinum/unit/indices/migrate_to_data_stream_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndicesMigrateToDataStream < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Migrate to Data Stream' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_data_stream/_migrate/foo', url) - assert_equal({}, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.indices.migrate_to_data_stream(name: 'foo') - end - - should 'raise argument error without name' do - assert_raises ArgumentError do - subject.indices.create_data_stream - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/indices/modify_data_stream_test.rb b/elasticsearch-api/spec/platinum/unit/indices/modify_data_stream_test.rb deleted file mode 100644 index 79a5c23f3e..0000000000 --- a/elasticsearch-api/spec/platinum/unit/indices/modify_data_stream_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndicesModifyDataStreamTest < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Modify Data Stream' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_data_stream/_modify', url) - assert_equal({}, params) - assert_equal({}, body) - true - end.returns(FakeResponse.new) - - subject.indices.modify_data_stream(body: {}) - end - - should 'raise argument error without name' do - assert_raises ArgumentError do - subject.indices.modify_data_stream - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/indices/promote_data_stream_test.rb b/elasticsearch-api/spec/platinum/unit/indices/promote_data_stream_test.rb deleted file mode 100644 index c9e787fd1d..0000000000 --- a/elasticsearch-api/spec/platinum/unit/indices/promote_data_stream_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackIndicesPromoteDataStreamTest < Minitest::Test - subject { FakeClient.new } - - context 'XPack: Promote Data Stream' do - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_data_stream/_promote/foo', url) - assert_equal({}, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.indices.promote_data_stream(name: 'foo') - end - - should 'raise argument error without name' do - assert_raises ArgumentError do - subject.indices.promote_data_stream - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/info_test.rb b/elasticsearch-api/spec/platinum/unit/info_test.rb deleted file mode 100644 index 066b9b6fb2..0000000000 --- a/elasticsearch-api/spec/platinum/unit/info_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackInfoTest < Minitest::Test - context "XPack: Info" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_xpack', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.xpack.info - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/knn_search_test.rb b/elasticsearch-api/spec/platinum/unit/knn_search_test.rb deleted file mode 100644 index 341dd2e563..0000000000 --- a/elasticsearch-api/spec/platinum/unit/knn_search_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackInfoTest < Minitest::Test - context 'Knn Search' do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('foo/_knn_search', url) - assert_equal({}, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.knn_search(index: 'foo') - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/license/delete_test.rb b/elasticsearch-api/spec/platinum/unit/license/delete_test.rb deleted file mode 100644 index 2ddfc49771..0000000000 --- a/elasticsearch-api/spec/platinum/unit/license/delete_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackLicenseDeleteTest < Minitest::Test - - context "License: Delete" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal '_license', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.license.delete - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/license/get_test.rb b/elasticsearch-api/spec/platinum/unit/license/get_test.rb deleted file mode 100644 index 494de8d0ae..0000000000 --- a/elasticsearch-api/spec/platinum/unit/license/get_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackLicenseGetTest < Minitest::Test - - context "License: Get" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_license', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.license.get - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/license/post_test.rb b/elasticsearch-api/spec/platinum/unit/license/post_test.rb deleted file mode 100644 index f9a4163041..0000000000 --- a/elasticsearch-api/spec/platinum/unit/license/post_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackLicensePostTest < Minitest::Test - - context "License: Post" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_license', url - assert_equal Hash.new, params - assert_equal [], body - true - end.returns(FakeResponse.new) - - subject.license.post body: [] - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/logstash/delete_pipeline_test.rb b/elasticsearch-api/spec/platinum/unit/logstash/delete_pipeline_test.rb deleted file mode 100644 index 21e6d955d3..0000000000 --- a/elasticsearch-api/spec/platinum/unit/logstash/delete_pipeline_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackLogstashDeletePipelineTest < Minitest::Test - context 'Logstash: Delete Pipeline' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal '_logstash/pipeline/foo', url - assert_equal({}, params) - assert_nil body - true - end.returns(FakeResponse.new) - - subject.logstash.delete_pipeline(id: 'foo') - end - - should 'raise argument error without id' do - assert_raises ArgumentError do - subject.logstash.delete_pipeline - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/logstash/get_pipeline_test.rb b/elasticsearch-api/spec/platinum/unit/logstash/get_pipeline_test.rb deleted file mode 100644 index d0d6dc3161..0000000000 --- a/elasticsearch-api/spec/platinum/unit/logstash/get_pipeline_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackLogstashGetPipelineTest < Minitest::Test - context 'Logstash: Get Pipeline' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_logstash/pipeline/foo', url - assert_equal({}, params) - assert_nil body - true - end.returns(FakeResponse.new) - - subject.logstash.get_pipeline(id: 'foo') - end - - should 'raise argument error without id' do - assert_raises ArgumentError do - subject.logstash.get_pipeline - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/logstash/put_pipeline_test.rb b/elasticsearch-api/spec/platinum/unit/logstash/put_pipeline_test.rb deleted file mode 100644 index c42e269553..0000000000 --- a/elasticsearch-api/spec/platinum/unit/logstash/put_pipeline_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackLogstashPutPipelineTest < Minitest::Test - context 'Logstash: Put Pipeline' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_logstash/pipeline/foo', url - assert_equal({}, params) - assert_equal({}, body) - true - end.returns(FakeResponse.new) - - subject.logstash.put_pipeline(id: 'foo', body: {}) - end - - should 'raise argument error without body' do - assert_raises ArgumentError do - subject.logstash.put_pipeline(id: 'foo') - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/clear_trained_model_deployment_cache_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/clear_trained_model_deployment_cache_test.rb deleted file mode 100644 index 97d398aa19..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/clear_trained_model_deployment_cache_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class MachineLearningClearTrainedModelDeploymentCacheTest < Minitest::Test - context 'Machine Learning: Clear trained model deployment cache' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_ml/trained_models/model/deployment/cache/_clear', url) - assert_equal({}, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.ml.clear_trained_model_deployment_cache(model_id: 'model') - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/close_job_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/close_job_test.rb deleted file mode 100644 index 80a4adaeab..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/close_job_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlCloseJobTest < Minitest::Test - - context "XPack MachineLearning: Close job" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/anomaly_detectors/foo/_close", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.close_job :job_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_datafeed_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/delete_datafeed_test.rb deleted file mode 100644 index 2c6a905069..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_datafeed_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlDeleteDatafeedTest < Minitest::Test - - context "XPack MachineLearning: Delete datafeed" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal "_ml/datafeeds/foo", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.delete_datafeed :datafeed_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_expired_data_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/delete_expired_data_test.rb deleted file mode 100644 index 4e22eac168..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_expired_data_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlDeleteExpiredDataTest < Minitest::Test - - context "XPack MachineLearning: Delete expired data" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal "_ml/_delete_expired_data", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.delete_expired_data - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_filter_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/delete_filter_test.rb deleted file mode 100644 index a65ee8e9c7..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_filter_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlDeleteFilterTest < Minitest::Test - - context "XPack MachineLearning: Delete filter" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal "_ml/filters/foo", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.delete_filter :filter_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_forecast_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/delete_forecast_test.rb deleted file mode 100644 index 753852d1c5..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_forecast_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlDeleteForecastTest < Minitest::Test - - context "XPack MachineLearning: Delete forecast" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal "_ml/anomaly_detectors/foo/_forecast", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.delete_forecast :job_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_job_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/delete_job_test.rb deleted file mode 100644 index 2692743f86..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_job_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlDeleteJobTest < Minitest::Test - - context "XPack MachineLearning: Delete job" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal "_ml/anomaly_detectors/foo", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.delete_job :job_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_model_alias_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/delete_model_alias_test.rb deleted file mode 100644 index 0e8523256d..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_model_alias_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlDeleteTrainedModelAliasTest < Minitest::Test - context "XPack MachineLearning: Delete trained model alias" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('DELETE', method) - assert_equal("_ml/trained_models/foo/model_aliases/alias", url) - assert_equal(Hash.new, params) - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.delete_trained_model_alias(model_id: 'foo', model_alias: 'alias') - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_model_snapshot_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/delete_model_snapshot_test.rb deleted file mode 100644 index 6a1fe0d1f7..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/delete_model_snapshot_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlDeleteModelSnapshotTest < Minitest::Test - - context "XPack MachineLearning: Delete model snapshot" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal "_ml/anomaly_detectors/foo/model_snapshots/bar", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.delete_model_snapshot :job_id => 'foo', :snapshot_id => 'bar' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/flush_job_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/flush_job_test.rb deleted file mode 100644 index 2a315637cd..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/flush_job_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlFlushJobTest < Minitest::Test - - context "XPack MachineLearning: Flush job" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/anomaly_detectors/foo/_flush", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.flush_job :job_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/forecast_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/forecast_test.rb deleted file mode 100644 index b41eb52bbf..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/forecast_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlForecastTest < Minitest::Test - - context "XPack MachineLearning: Forecast" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal '_ml/anomaly_detectors/foo/_forecast', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.forecast :job_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/get_buckets_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/get_buckets_test.rb deleted file mode 100644 index 4394331b89..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/get_buckets_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlGetBucketsTest < Minitest::Test - - context "XPack MachineLearning: Get buckets" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_ml/anomaly_detectors/foo/results/buckets", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.get_buckets :job_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/get_categories_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/get_categories_test.rb deleted file mode 100644 index 2847f522a8..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/get_categories_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlGetCategoriesTest < Minitest::Test - - context "XPack MachineLearning: Get categories" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_ml/anomaly_detectors/foo/results/categories", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.get_categories :job_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/get_datafeed_stats_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/get_datafeed_stats_test.rb deleted file mode 100644 index c997e99efe..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/get_datafeed_stats_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlGetDatafeedStatsTest < Minitest::Test - - context "XPack MachineLearning: Get datafeed stats" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_ml/datafeeds/_stats", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.get_datafeed_stats - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/get_datafeeds_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/get_datafeeds_test.rb deleted file mode 100644 index 41769681c5..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/get_datafeeds_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlGetDatafeedsTest < Minitest::Test - - context "XPack MachineLearning: Get datafeeds" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_ml/datafeeds/foo", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.get_datafeeds :datafeed_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/get_filters_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/get_filters_test.rb deleted file mode 100644 index 41f85943bc..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/get_filters_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlGetFiltersTest < Minitest::Test - - context "XPack MachineLearning: Get filters" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_ml/filters/foo", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.get_filters :filter_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/get_influencers_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/get_influencers_test.rb deleted file mode 100644 index c409d38b04..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/get_influencers_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlGetInfluencersTest < Minitest::Test - - context "XPack MachineLearning: Get influencers" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_ml/anomaly_detectors/foo/results/influencers", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.get_influencers :job_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/get_job_stats_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/get_job_stats_test.rb deleted file mode 100644 index 08de0c35f0..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/get_job_stats_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlGetJobStatsTest < Minitest::Test - - context "XPack MachineLearning: Get job stats" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_ml/anomaly_detectors/foo/_stats", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.get_job_stats :job_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/get_jobs_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/get_jobs_test.rb deleted file mode 100644 index 80be74726c..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/get_jobs_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlGetJobsTest < Minitest::Test - - context "XPack MachineLearning: Get jobs" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_ml/anomaly_detectors/foo", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.get_jobs :job_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/get_model_snapshots_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/get_model_snapshots_test.rb deleted file mode 100644 index 840f38e8f4..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/get_model_snapshots_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlGetModelSnapshotsTest < Minitest::Test - - context "XPack MachineLearning: Get model snapshots" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_ml/anomaly_detectors/foo/model_snapshots/bar", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.get_model_snapshots :job_id => 'foo', :snapshot_id => 'bar' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/get_overall_buckets_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/get_overall_buckets_test.rb deleted file mode 100644 index e47463f601..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/get_overall_buckets_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlGetOverallBucketsTest < Minitest::Test - - context "XPack MachineLearning: Get overall buckets" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_ml/anomaly_detectors/foo/results/overall_buckets', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.get_overall_buckets :job_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/get_records_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/get_records_test.rb deleted file mode 100644 index 3ffab1e62d..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/get_records_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlGetRecordsTest < Minitest::Test - - context "XPack MachineLearning: Get records" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_ml/anomaly_detectors/foo/results/records", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.get_records :job_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/open_job_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/open_job_test.rb deleted file mode 100644 index 1e3338cb08..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/open_job_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlOpenJobTest < Minitest::Test - - context "XPack MachineLearning: Open job" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/anomaly_detectors/foo/_open", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.open_job :job_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/post_data_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/post_data_test.rb deleted file mode 100644 index e78a00a131..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/post_data_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlPostDataTest < Minitest::Test - - context "XPack MachineLearning: Post data" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/anomaly_detectors/foo/_data", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.ml.post_data :job_id => 'foo', :body => {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/preview_data_frame_analytics_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/preview_data_frame_analytics_test.rb deleted file mode 100644 index e45965ac90..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/preview_data_frame_analytics_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlPreviewDataFrameAnalyticsTest < Minitest::Test - context 'XPack MachineLearning: Preview data frame analytics' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('_ml/data_frame/analytics/_preview', url) - assert_equal(Hash.new, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.ml.preview_data_frame_analytics - end - - should 'perform correct request with body' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_ml/data_frame/analytics/_preview', url) - assert_equal(Hash.new, params) - assert_equal(body, {}) - true - end.returns(FakeResponse.new) - - subject.ml.preview_data_frame_analytics(body: {}) - end - - should 'perform correct request with id' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('_ml/data_frame/analytics/3/_preview', url) - assert_equal(Hash.new, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.ml.preview_data_frame_analytics(id: 3) - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/preview_datafeed_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/preview_datafeed_test.rb deleted file mode 100644 index ff2eba29c1..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/preview_datafeed_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlPreviewDatafeedTest < Minitest::Test - - context "XPack MachineLearning: Preview datafeed" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_ml/datafeeds/foo/_preview", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.preview_datafeed :datafeed_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/put_datafeed_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/put_datafeed_test.rb deleted file mode 100644 index 15eebb4a45..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/put_datafeed_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlPutDatafeedTest < Minitest::Test - - context "XPack MachineLearning: Put datafeed" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal "_ml/datafeeds/foo", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.ml.put_datafeed :datafeed_id => 'foo', body: {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/put_filter_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/put_filter_test.rb deleted file mode 100644 index d51748b7c5..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/put_filter_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlPutFilterTest < Minitest::Test - - context "XPack MachineLearning: Put filter" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal "_ml/filters/foo", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.ml.put_filter :filter_id => 'foo', :body => {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/put_job_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/put_job_test.rb deleted file mode 100644 index 4a105c12b3..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/put_job_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlPutJobTest < Minitest::Test - - context "XPack MachineLearning: Put job" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal "_ml/anomaly_detectors/foo", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.ml.put_job :job_id => 'foo', :body => {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/put_trained_model_alias_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/put_trained_model_alias_test.rb deleted file mode 100644 index c62f4fe424..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/put_trained_model_alias_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlPutTrainedModelAliasTest < Minitest::Test - context "XPack MachineLearning: Put trained model alias" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('PUT', method) - assert_equal("_ml/trained_models/foo/model_aliases/alias", url) - assert_equal(Hash.new, params) - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.put_trained_model_alias(model_id: 'foo', model_alias: 'alias') - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/revert_model_snapshot_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/revert_model_snapshot_test.rb deleted file mode 100644 index 2d4dd6de1f..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/revert_model_snapshot_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlRevertModelSnapshotTest < Minitest::Test - - context "XPack MachineLearning: Revert model snapshot" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/anomaly_detectors/foo/model_snapshots/bar/_revert", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.revert_model_snapshot :job_id => 'foo', :snapshot_id => 'bar' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/start_datafeed_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/start_datafeed_test.rb deleted file mode 100644 index b090ead16c..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/start_datafeed_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlStartDatafeedTest < Minitest::Test - - context "XPack MachineLearning: Start datafeed" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/datafeeds/foo/_start", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.start_datafeed :datafeed_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/stop_datafeed_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/stop_datafeed_test.rb deleted file mode 100644 index 0dcafd675e..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/stop_datafeed_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlStopDatafeedTest < Minitest::Test - - context "XPack MachineLearning: Stop datafeed" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/datafeeds/foo/_stop", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.stop_datafeed :datafeed_id => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/update_data_frame_analytics_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/update_data_frame_analytics_test.rb deleted file mode 100644 index e7afb9227c..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/update_data_frame_analytics_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlUpdateDataFrameAnalyticsTest < Minitest::Test - context "XPack MachineLearning: Update data frame analytics" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/data_frame/analytics/foo/_update", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.ml.update_data_frame_analytics id: 'foo', body: {} - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/update_datafeed_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/update_datafeed_test.rb deleted file mode 100644 index c509520f3b..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/update_datafeed_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlUpdateDatafeedTest < Minitest::Test - - context "XPack MachineLearning: Update datafeed" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/datafeeds/foo/_update", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.ml.update_datafeed :datafeed_id => 'foo', :body => {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/update_filter_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/update_filter_test.rb deleted file mode 100644 index 7b58b0eb21..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/update_filter_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlUpdateFilterTest < Minitest::Test - - context "XPack MachineLearning: Update filter" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/filters/foo/_update", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.ml.update_filter :filter_id => 'foo', :body => {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/update_job_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/update_job_test.rb deleted file mode 100644 index 15f55690ed..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/update_job_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlUpdateJobTest < Minitest::Test - - context "XPack MachineLearning: Update job" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/anomaly_detectors/foo/_update", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.ml.update_job :job_id => 'foo', :body => {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/update_model_snapshot_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/update_model_snapshot_test.rb deleted file mode 100644 index 9cf4081018..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/update_model_snapshot_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlUpdateModelSnapshotTest < Minitest::Test - - context "XPack MachineLearning: Update model snapshot" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/anomaly_detectors/foo/model_snapshots/bar/_update", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.ml.update_model_snapshot :job_id => 'foo', :snapshot_id => 'bar', :body => {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/machine_learning/upgrade_job_snapshot_test.rb b/elasticsearch-api/spec/platinum/unit/machine_learning/upgrade_job_snapshot_test.rb deleted file mode 100644 index 94b8f1c1d1..0000000000 --- a/elasticsearch-api/spec/platinum/unit/machine_learning/upgrade_job_snapshot_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMlUpdateJobSnapshotTest < Minitest::Test - - context "XPack MachineLearning: Upgrade job snapshot" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_ml/anomaly_detectors/foo/model_snapshots/bar/_upgrade", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ml.upgrade_job_snapshot(job_id: 'foo', snapshot_id: 'bar') - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/migration/deprecations_test.rb b/elasticsearch-api/spec/platinum/unit/migration/deprecations_test.rb deleted file mode 100644 index bfda05b72a..0000000000 --- a/elasticsearch-api/spec/platinum/unit/migration/deprecations_test.rb +++ /dev/null @@ -1,42 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackMigrationDeprecationsTest < Minitest::Test - context "XPack Migration: Deprecations" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_migration/deprecations', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.migration.deprecations - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/rollup/get_rollup_index_caps_test.rb b/elasticsearch-api/spec/platinum/unit/rollup/get_rollup_index_caps_test.rb deleted file mode 100644 index f0b9bc35e0..0000000000 --- a/elasticsearch-api/spec/platinum/unit/rollup/get_rollup_index_caps_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackGetRollupIndexCapsTest < Minitest::Test - context "XPack Rollup: Get index caps" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "foo/_rollup/data", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.rollup.get_rollup_index_caps :index => 'foo' - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/authenticate_test.rb b/elasticsearch-api/spec/platinum/unit/security/authenticate_test.rb deleted file mode 100644 index 8e40d4bee9..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/authenticate_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityAuthenticateTest < Minitest::Test - - context "XPack Security: Authenticate" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_security/_authenticate', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.authenticate - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/bulk_update_api_key_test.rb b/elasticsearch-api/spec/platinum/unit/security/bulk_update_api_key_test.rb deleted file mode 100644 index bb37d59589..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/bulk_update_api_key_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class SecurityBulkUpdateApiKeys < Minitest::Test - context 'Security: Bulk Update Api Keys' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_security/api_key/_bulk_update', url) - assert_equal({}, params) - assert_equal(body, {}) - true - end.returns(FakeResponse.new) - - subject.security.bulk_update_api_keys(body: {}) - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/change_password_test.rb b/elasticsearch-api/spec/platinum/unit/security/change_password_test.rb deleted file mode 100644 index 69aa130903..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/change_password_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityChangePasswordTest < Minitest::Test - - context "XPack Security: Change password" do - subject { FakeClient.new } - - should "perform correct request for a specific user" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_security/user/foo/_password', url - assert_equal Hash.new, params - assert_equal 'bar', body[:password] - true - end.returns(FakeResponse.new) - - subject.security.change_password username: 'foo', body: { password: 'bar' } - end - - should "perform correct request for current user" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_security/user/_password', url - assert_equal Hash.new, params - assert_equal 'bar', body[:password] - true - end.returns(FakeResponse.new) - - subject.security.change_password body: { password: 'bar' } - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/clear_api_key_cache_test.rb b/elasticsearch-api/spec/platinum/unit/security/clear_api_key_cache_test.rb deleted file mode 100644 index c0539a65ff..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/clear_api_key_cache_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityClearCachedRolesTest < Minitest::Test - context 'XPack Security: Clear api key cache' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal '_security/api_key/3/_clear_cache', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.clear_api_key_cache(ids: '3') - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/clear_cached_privileges_test.rb b/elasticsearch-api/spec/platinum/unit/security/clear_cached_privileges_test.rb deleted file mode 100644 index b03354dc08..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/clear_cached_privileges_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityClearCachedPrivilegesTest < Minitest::Test - context "XPack Security: Clear cached privileges" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_security/privilege/test/_clear_cache", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.clear_cached_privileges application: 'test' - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/clear_cached_realms_test.rb b/elasticsearch-api/spec/platinum/unit/security/clear_cached_realms_test.rb deleted file mode 100644 index d245a9edce..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/clear_cached_realms_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityClearCachedRealmsTest < Minitest::Test - - context "XPack Security: Clear cached realms" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_security/realm/foo,bar/_clear_cache", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.clear_cached_realms :realms => ['foo', 'bar'] - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/clear_cached_roles_test.rb b/elasticsearch-api/spec/platinum/unit/security/clear_cached_roles_test.rb deleted file mode 100644 index 3c797ce291..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/clear_cached_roles_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityClearCachedRolesTest < Minitest::Test - - context "XPack Security: Clear cached roles" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal '_security/role/foo/_clear_cache', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.clear_cached_roles :name => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/delete_privileges_test.rb b/elasticsearch-api/spec/platinum/unit/security/delete_privileges_test.rb deleted file mode 100644 index 4742c40a6b..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/delete_privileges_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityDeletePrivilegesTest < Minitest::Test - - context "XPack Security: Delete privileges" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal '_security/privilege/foo/bar', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.delete_privileges :application => 'foo', name: 'bar' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/delete_role_mapping_test.rb b/elasticsearch-api/spec/platinum/unit/security/delete_role_mapping_test.rb deleted file mode 100644 index 8cf05543b3..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/delete_role_mapping_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityDeleteRoleMappingTest < Minitest::Test - - context "XPack Security: Delete role mapping" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal '_security/role_mapping/foo', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.delete_role_mapping :name => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/delete_role_test.rb b/elasticsearch-api/spec/platinum/unit/security/delete_role_test.rb deleted file mode 100644 index a3e76c1c97..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/delete_role_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityDeleteRoleTest < Minitest::Test - - context "XPack Security: Delete role" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal '_security/role/foo', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.delete_role :name => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/delete_user_test.rb b/elasticsearch-api/spec/platinum/unit/security/delete_user_test.rb deleted file mode 100644 index 5ffeef5904..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/delete_user_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityDeleteUserTest < Minitest::Test - - context "XPack Security: Delete user" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal '_security/user/foo', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.delete_user :username => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/disable_user_test.rb b/elasticsearch-api/spec/platinum/unit/security/disable_user_test.rb deleted file mode 100644 index 37d235308a..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/disable_user_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityDisableUserTest < Minitest::Test - - context "XPack Security: Disable user" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal "_security/user/foo/_disable", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.disable_user :username => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/enable_user_test.rb b/elasticsearch-api/spec/platinum/unit/security/enable_user_test.rb deleted file mode 100644 index c738ac9086..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/enable_user_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityEnableUserTest < Minitest::Test - - context "XPack Security: Enable user" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal "_security/user/foo/_enable", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.enable_user :username => 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/get_privileges_test.rb b/elasticsearch-api/spec/platinum/unit/security/get_privileges_test.rb deleted file mode 100644 index 72ef116e56..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/get_privileges_test.rb +++ /dev/null @@ -1,78 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityGetPrivilegesTest < Minitest::Test - - context "XPack Security: Get privileges" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_security/privilege', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.get_privileges - end - - should "perform correct request for an application but no name" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_security/privilege/foo', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.get_privileges application: 'foo' - end - - should "perform correct request for an application and a single name" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_security/privilege/foo/bar', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.get_privileges application: 'foo', name: 'bar' - end - - should "perform correct request for an application and multiple names" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_security/privilege/foo/bar,baz', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.get_privileges application: 'foo', name: ['bar', 'baz'] - end - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/get_role_mapping_test.rb b/elasticsearch-api/spec/platinum/unit/security/get_role_mapping_test.rb deleted file mode 100644 index 75fdf41c93..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/get_role_mapping_test.rb +++ /dev/null @@ -1,54 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityGetRoleMappingTest < Minitest::Test - - context "XPack Security: Get role mapping" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_security/role_mapping/foo", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.get_role_mapping :name => 'foo' - end - - should "handle a list of roles" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_security/role_mapping/foo,bar", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.get_role_mapping :name => ['foo', 'bar'] - end - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/get_role_test.rb b/elasticsearch-api/spec/platinum/unit/security/get_role_test.rb deleted file mode 100644 index e76128dede..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/get_role_test.rb +++ /dev/null @@ -1,62 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityGetRoleTest < Minitest::Test - - context "XPack Security: Get role" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_security/role', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.get_role - end - - should "perform correct request for multiple roles" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_security/role/foo,bar', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.get_role name: ['foo', 'bar'] - end - - should "catch a NotFound exception with the ignore parameter" do - subject.expects(:perform_request).raises(NotFound) - - assert_nothing_raised do - subject.security.get_role name: 'foo', ignore: 404 - end - end - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/get_token_test.rb b/elasticsearch-api/spec/platinum/unit/security/get_token_test.rb deleted file mode 100644 index ebb7a77053..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/get_token_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityGetTokenTest < Minitest::Test - - context "XPack Security: Get token" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal "_security/oauth2/token", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.security.get_token :body => {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/get_user_privileges_test.rb b/elasticsearch-api/spec/platinum/unit/security/get_user_privileges_test.rb deleted file mode 100644 index 42b909a7f9..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/get_user_privileges_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityGetUserPrivilegesTest < Minitest::Test - - context "XPack Security: Get user privileges" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal "_security/user/_privileges", url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.get_user_privileges - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/get_user_test.rb b/elasticsearch-api/spec/platinum/unit/security/get_user_test.rb deleted file mode 100644 index 8a0e036429..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/get_user_test.rb +++ /dev/null @@ -1,61 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityGetUserTest < Minitest::Test - - context "XPack Security: Get user" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_security/user', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.get_user - end - - should "perform correct request for multiple roles" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_security/user/foo,bar', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.security.get_user username: ['foo', 'bar'] - end - - should "catch a NotFound exception with the ignore parameter" do - subject.expects(:perform_request).raises(NotFound) - - assert_nothing_raised do - subject.security.get_user username: 'foo', ignore: 404 - end - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/grant_api_key_test.rb b/elasticsearch-api/spec/platinum/unit/security/grant_api_key_test.rb deleted file mode 100644 index da372a01ed..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/grant_api_key_test.rb +++ /dev/null @@ -1,41 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityGrantApiKey < Minitest::Test - context "XPack Security: Grant API Key" do - subject { FakeClient.new } - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_security/api_key/grant', url) - assert_equal(Hash.new, params) - assert_equal(body, {access_token: 'access_token', api_key: 'api_key', grant_type: 'access_token'}) - true - end.returns(FakeResponse.new) - - subject.security.grant_api_key( - body: {access_token: 'access_token', api_key: 'api_key', grant_type: 'access_token'} - ) - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/has_privileges_test.rb b/elasticsearch-api/spec/platinum/unit/security/has_privileges_test.rb deleted file mode 100644 index 9c1a250550..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/has_privileges_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityHasPrivilegesTest < Minitest::Test - - context "XPack Security: Has Privileges" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal '_security/user/_has_privileges', url - assert_equal Hash.new, params - assert_equal({ cluster: [], index: [], application: [] }, body) - true - end.returns(FakeResponse.new) - - subject.security.has_privileges(body: { cluster: [], index: [], application: [] }) - end - - should "check privileges for a specific user" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal '_security/user/foo/_has_privileges', url - assert_equal Hash.new, params - assert_equal({ cluster: [], index: [], application: [] }, body) - true - end.returns(FakeResponse.new) - - subject.security.has_privileges(user: 'foo', body: { cluster: [], index: [], application: [] }) - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/invalidate_token_test.rb b/elasticsearch-api/spec/platinum/unit/security/invalidate_token_test.rb deleted file mode 100644 index 797650c4fe..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/invalidate_token_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityInvalidateTokenTest < Minitest::Test - - context "XPack Security: Invalidate token" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal "_security/oauth2/token", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.security.invalidate_token :body => {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/oidc_authenticate_test.rb b/elasticsearch-api/spec/platinum/unit/security/oidc_authenticate_test.rb deleted file mode 100644 index 1191c49add..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/oidc_authenticate_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class SecurityOidcAuthenticateTest < Minitest::Test - context 'Security: OIDC Authenticate' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_security/oidc/authenticate', url) - assert_equal({}, params) - assert_equal(body, {}) - true - end.returns(FakeResponse.new) - - subject.security.oidc_authenticate(body: {}) - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/oidc_logout_test.rb b/elasticsearch-api/spec/platinum/unit/security/oidc_logout_test.rb deleted file mode 100644 index 539bd23bfb..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/oidc_logout_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class SecurityOidcLogoutTest < Minitest::Test - context 'Security: OIDC Logout' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_security/oidc/logout', url) - assert_equal({}, params) - assert_equal(body, {}) - true - end.returns(FakeResponse.new) - - subject.security.oidc_logout(body: {}) - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/oidc_prepare_authentication_test.rb b/elasticsearch-api/spec/platinum/unit/security/oidc_prepare_authentication_test.rb deleted file mode 100644 index f3c90da71c..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/oidc_prepare_authentication_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class SecurityOidcPrepareAuthenticationTest < Minitest::Test - context 'Security: OIDC Prepare_Authentication' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_security/oidc/prepare', url) - assert_equal({}, params) - assert_equal(body, {}) - true - end.returns(FakeResponse.new) - - subject.security.oidc_prepare_authentication(body: {}) - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/put_privileges_test.rb b/elasticsearch-api/spec/platinum/unit/security/put_privileges_test.rb deleted file mode 100644 index 3ede21219f..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/put_privileges_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityPutPrivilegesTest < Minitest::Test - - context "XPack Security: Put role" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_security/privilege', url - assert_equal Hash.new, params - assert_equal({ "app-allow": { read: { actions: [ "data:read/*" ] } } }, body) - true - end.returns(FakeResponse.new) - - subject.security.put_privileges(body: { "app-allow": { read: { actions: [ "data:read/*" ] } } }) - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/put_role_mapping_test.rb b/elasticsearch-api/spec/platinum/unit/security/put_role_mapping_test.rb deleted file mode 100644 index 9cc883fb39..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/put_role_mapping_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityPutRoleMappingTest < Minitest::Test - - context "XPack Security: Put role mapping" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal "_security/role_mapping/foo", url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.security.put_role_mapping :name => 'foo', :body => {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/put_role_test.rb b/elasticsearch-api/spec/platinum/unit/security/put_role_test.rb deleted file mode 100644 index 388e64e944..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/put_role_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityPutRoleTest < Minitest::Test - - context "XPack Security: Put role" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_security/role/foo', url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.security.put_role :name => 'foo', body: {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/security/put_user_test.rb b/elasticsearch-api/spec/platinum/unit/security/put_user_test.rb deleted file mode 100644 index 3273fce310..0000000000 --- a/elasticsearch-api/spec/platinum/unit/security/put_user_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSecurityPutUserTest < Minitest::Test - - context "XPack Security: Put user" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_security/user/foo', url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.security.put_user username: 'foo', body: {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/ssl/certificates_test.rb b/elasticsearch-api/spec/platinum/unit/ssl/certificates_test.rb deleted file mode 100644 index e72774946c..0000000000 --- a/elasticsearch-api/spec/platinum/unit/ssl/certificates_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackSslCertificatesTest < Minitest::Test - - context "XPack Ssl: Certificates" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_ssl/certificates', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.ssl.certificates - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/usage_test.rb b/elasticsearch-api/spec/platinum/unit/usage_test.rb deleted file mode 100644 index cf999776fa..0000000000 --- a/elasticsearch-api/spec/platinum/unit/usage_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackUsageTest < Minitest::Test - context 'XPack: Usage' do - subject { FakeClient.new } - - should 'perform correct request' do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('_xpack/usage', url) - assert_equal({}, params) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.xpack.usage - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/watcher/ack_watch_test.rb b/elasticsearch-api/spec/platinum/unit/watcher/ack_watch_test.rb deleted file mode 100644 index 33f2d3bc2e..0000000000 --- a/elasticsearch-api/spec/platinum/unit/watcher/ack_watch_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackWatcherAckWatchTest < Minitest::Test - - context "XPack Watcher: Ack watch" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_watcher/watch/foo/_ack', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.watcher.ack_watch watch_id: 'foo' - end - - should "perform correct request when action id is provided" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_watcher/watch/foo/_ack/bar', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.watcher.ack_watch watch_id: 'foo', action_id: 'bar' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/watcher/activate_watch_test.rb b/elasticsearch-api/spec/platinum/unit/watcher/activate_watch_test.rb deleted file mode 100644 index 1cb1aa0621..0000000000 --- a/elasticsearch-api/spec/platinum/unit/watcher/activate_watch_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackWatcherActivateWatchTest < Minitest::Test - - context "XPack Watcher: Activate watch" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_watcher/watch/foo/_activate', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.watcher.activate_watch watch_id: 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/watcher/deactivate_watch_test.rb b/elasticsearch-api/spec/platinum/unit/watcher/deactivate_watch_test.rb deleted file mode 100644 index f51080579c..0000000000 --- a/elasticsearch-api/spec/platinum/unit/watcher/deactivate_watch_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackWatcherDeactivateWatchTest < Minitest::Test - - context "XPack Watcher: Deactivate watch" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_watcher/watch/foo/_deactivate', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.watcher.deactivate_watch watch_id: 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/watcher/delete_watch_test.rb b/elasticsearch-api/spec/platinum/unit/watcher/delete_watch_test.rb deleted file mode 100644 index 674299adec..0000000000 --- a/elasticsearch-api/spec/platinum/unit/watcher/delete_watch_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackWatcherDeleteWatchTest < Minitest::Test - - context "XPack Watcher: Delete watch" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'DELETE', method - assert_equal '_watcher/watch/foo', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.watcher.delete_watch id: 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/watcher/execute_watch_test.rb b/elasticsearch-api/spec/platinum/unit/watcher/execute_watch_test.rb deleted file mode 100644 index 6b387f04f6..0000000000 --- a/elasticsearch-api/spec/platinum/unit/watcher/execute_watch_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackWatcherExecuteWatchTest < Minitest::Test - - context "XPack Watcher: Execute watch" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_watcher/watch/foo/_execute', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.watcher.execute_watch id: 'foo' - end - - should "perform correct request with no id specified" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_watcher/watch/_execute', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.watcher.execute_watch - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/watcher/get_watch_test.rb b/elasticsearch-api/spec/platinum/unit/watcher/get_watch_test.rb deleted file mode 100644 index f3c866e0ef..0000000000 --- a/elasticsearch-api/spec/platinum/unit/watcher/get_watch_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackWatcherGetWatchTest < Minitest::Test - - context "XPack Watcher: Get watch" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_watcher/watch/foo', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.watcher.get_watch id: 'foo' - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/watcher/put_watch_test.rb b/elasticsearch-api/spec/platinum/unit/watcher/put_watch_test.rb deleted file mode 100644 index 782c8334a1..0000000000 --- a/elasticsearch-api/spec/platinum/unit/watcher/put_watch_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackWatcherPutWatchTest < Minitest::Test - - context "XPack Watcher: Put watch" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'PUT', method - assert_equal '_watcher/watch/foo', url - assert_equal Hash.new, params - assert_equal Hash.new, body - true - end.returns(FakeResponse.new) - - subject.watcher.put_watch id: 'foo', body: {} - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/watcher/query_watches_test.rb b/elasticsearch-api/spec/platinum/unit/watcher/query_watches_test.rb deleted file mode 100644 index c544bed6ca..0000000000 --- a/elasticsearch-api/spec/platinum/unit/watcher/query_watches_test.rb +++ /dev/null @@ -1,52 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackWatcherQueryWatchesTest < Minitest::Test - context "XPack Watcher: Query watches" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('GET', method) - assert_equal('_watcher/_query/watches', url) - assert_equal(params, {}) - assert_nil(body) - true - end.returns(FakeResponse.new) - - subject.watcher.query_watches - end - - should "perform correct request when sending body" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal('POST', method) - assert_equal('_watcher/_query/watches', url) - assert_equal(params, {}) - assert_equal(body, {}) - true - end.returns(FakeResponse.new) - - subject.watcher.query_watches(body: {}) - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/watcher/start_test.rb b/elasticsearch-api/spec/platinum/unit/watcher/start_test.rb deleted file mode 100644 index 0387758fc5..0000000000 --- a/elasticsearch-api/spec/platinum/unit/watcher/start_test.rb +++ /dev/null @@ -1,41 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackWatcherStartTest < Minitest::Test - - context "XPack Watcher: Start" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal '_watcher/_start', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.watcher.start - end - end - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/watcher/stats_test.rb b/elasticsearch-api/spec/platinum/unit/watcher/stats_test.rb deleted file mode 100644 index ca272d9eb2..0000000000 --- a/elasticsearch-api/spec/platinum/unit/watcher/stats_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackWatcherStatsTest < Minitest::Test - - context "XPack Watcher: Stats" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'GET', method - assert_equal '_watcher/stats', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.watcher.stats - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/platinum/unit/watcher/stop_test.rb b/elasticsearch-api/spec/platinum/unit/watcher/stop_test.rb deleted file mode 100644 index 2a1e8a8a54..0000000000 --- a/elasticsearch-api/spec/platinum/unit/watcher/stop_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -# 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. - -require 'test_helper' - -module Elasticsearch - module Test - class XPackWatcherStopTest < Minitest::Test - - context "XPack Watcher: Stop" do - subject { FakeClient.new } - - should "perform correct request" do - subject.expects(:perform_request).with do |method, url, params, body| - assert_equal 'POST', method - assert_equal '_watcher/_stop', url - assert_equal Hash.new, params - assert_nil body - true - end.returns(FakeResponse.new) - - subject.watcher.stop - end - - end - - end - end -end diff --git a/elasticsearch-api/spec/spec_helper.rb b/elasticsearch-api/spec/spec_helper.rb index a550a4867f..b7c649670b 100644 --- a/elasticsearch-api/spec/spec_helper.rb +++ b/elasticsearch-api/spec/spec_helper.rb @@ -25,7 +25,7 @@ require 'debug' end require 'yaml' -require 'active_support/isolated_execution_state' unless RUBY_VERSION < '2.7.0' +# require 'active_support/isolated_execution_state' unless RUBY_VERSION < '2.7.0' require 'jbuilder' require 'jsonify' require 'elasticsearch' diff --git a/elasticsearch-api/spec/free/integration/health_spec.rb b/elasticsearch-api/spec/unit/actions/async_search/delete_spec.rb similarity index 63% rename from elasticsearch-api/spec/free/integration/health_spec.rb rename to elasticsearch-api/spec/unit/actions/async_search/delete_spec.rb index 1f76467e68..ec320a4f73 100644 --- a/elasticsearch-api/spec/free/integration/health_spec.rb +++ b/elasticsearch-api/spec/unit/actions/async_search/delete_spec.rb @@ -14,15 +14,22 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -# TODO: These tests won't be necessary once we migrate to the new YAML tests -require_relative './spec_helper' -describe "Health basic test" do +require 'spec_helper' + +describe 'client#async_search.delete' do + let(:expected_args) do + [ + 'DELETE', + '_async_search/foo', + {}, + nil, + {}, + { defined_params: { id: 'foo' }, endpoint: 'async_search.delete' } + ] + end + it 'performs the request' do - response = CLIENT.health_report - expect(response.status).to eq 200 - expect(response['cluster_name']).not_to be_nil - expect(response.dig('indicators', 'master_is_stable', 'symptom')).to eq 'The cluster has a stable master node' - expect(response.dig('indicators', 'master_is_stable', 'status')).to eq 'green' + expect(client_double.async_search.delete(id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/platinum/unit/transform/upgrade_transforms_spec.rb b/elasticsearch-api/spec/unit/actions/async_search/get_spec.rb similarity index 78% rename from elasticsearch-api/spec/platinum/unit/transform/upgrade_transforms_spec.rb rename to elasticsearch-api/spec/unit/actions/async_search/get_spec.rb index 4180a3c25b..4eab487c50 100644 --- a/elasticsearch-api/spec/platinum/unit/transform/upgrade_transforms_spec.rb +++ b/elasticsearch-api/spec/unit/actions/async_search/get_spec.rb @@ -17,18 +17,19 @@ require 'spec_helper' -describe 'client.transform#upgrade_transforms' do +describe 'client#async_search.get' do let(:expected_args) do [ - 'POST', - '_transform/_upgrade', + 'GET', + '_async_search/foo', {}, nil, - {} + {}, + { defined_params: { id: 'foo' }, endpoint: 'async_search.get' } ] end it 'performs the request' do - expect(client_double.transform.upgrade_transforms).to be_a Elasticsearch::API::Response + expect(client_double.async_search.get(id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/free/integration/spec_helper.rb b/elasticsearch-api/spec/unit/actions/async_search/status_spec.rb similarity index 63% rename from elasticsearch-api/spec/free/integration/spec_helper.rb rename to elasticsearch-api/spec/unit/actions/async_search/status_spec.rb index 81c38c0ca4..d170e8d3a2 100644 --- a/elasticsearch-api/spec/free/integration/spec_helper.rb +++ b/elasticsearch-api/spec/unit/actions/async_search/status_spec.rb @@ -14,15 +14,22 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -require 'elasticsearch' -host = ENV['TEST_ES_SERVER'] || 'http://localhost:9200' -raise URI::InvalidURIError unless host =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/ +require 'spec_helper' -test_suite = ENV['TEST_SUITE'] || 'free' -password = ENV['ELASTIC_PASSWORD'] || 'changeme' -uri = URI.parse(host) -transport_options = {} -host = "http://elastic:#{password}@#{uri.host}:#{uri.port}".freeze +describe 'client#async_search.status' do + let(:expected_args) do + [ + 'GET', + '_async_search/status/foo', + {}, + nil, + {}, + { defined_params: { id: 'foo' }, endpoint: 'async_search.status' } + ] + end -CLIENT = Elasticsearch::Client.new(host: host, transport_options: transport_options) + it 'performs the request' do + expect(client_double.async_search.status(id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/platinum/unit/transform/reset_transform_spec.rb b/elasticsearch-api/spec/unit/actions/async_search/submit_spec.rb similarity index 78% rename from elasticsearch-api/spec/platinum/unit/transform/reset_transform_spec.rb rename to elasticsearch-api/spec/unit/actions/async_search/submit_spec.rb index 8a6bc91062..51c1b60dea 100644 --- a/elasticsearch-api/spec/platinum/unit/transform/reset_transform_spec.rb +++ b/elasticsearch-api/spec/unit/actions/async_search/submit_spec.rb @@ -17,18 +17,19 @@ require 'spec_helper' -describe 'client.transform#reset_transform' do +describe 'client#async_search.submit' do let(:expected_args) do [ 'POST', - '_transform/foo/_reset', + 'foo/_async_search', {}, nil, - {} + {}, + { defined_params: { index: 'foo' }, endpoint: 'async_search.submit' } ] end it 'performs the request' do - expect(client_double.transform.reset_transform(transform_id: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.async_search.submit(index: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/bulk_spec.rb b/elasticsearch-api/spec/unit/actions/bulk_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/bulk_spec.rb rename to elasticsearch-api/spec/unit/actions/bulk_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb b/elasticsearch-api/spec/unit/actions/cat/aliases_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/aliases_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb b/elasticsearch-api/spec/unit/actions/cat/allocation_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/allocation_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb b/elasticsearch-api/spec/unit/actions/cat/component_templates_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/component_templates_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb b/elasticsearch-api/spec/unit/actions/cat/count_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/count_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb b/elasticsearch-api/spec/unit/actions/cat/fielddata_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/fielddata_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb b/elasticsearch-api/spec/unit/actions/cat/health_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/health_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb b/elasticsearch-api/spec/unit/actions/cat/help_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/help_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb b/elasticsearch-api/spec/unit/actions/cat/indices_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/indices_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb b/elasticsearch-api/spec/unit/actions/cat/master_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/master_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb b/elasticsearch-api/spec/unit/actions/cat/nodeattrs_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/nodeattrs_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb b/elasticsearch-api/spec/unit/actions/cat/nodes_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/nodes_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb b/elasticsearch-api/spec/unit/actions/cat/pending_tasks_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/pending_tasks_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb b/elasticsearch-api/spec/unit/actions/cat/plugins_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/plugins_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb b/elasticsearch-api/spec/unit/actions/cat/recovery_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/recovery_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb b/elasticsearch-api/spec/unit/actions/cat/repositories_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/repositories_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb b/elasticsearch-api/spec/unit/actions/cat/segments_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/segments_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb b/elasticsearch-api/spec/unit/actions/cat/shards_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/shards_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb b/elasticsearch-api/spec/unit/actions/cat/snapshot_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/snapshot_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb b/elasticsearch-api/spec/unit/actions/cat/tasks_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/tasks_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb b/elasticsearch-api/spec/unit/actions/cat/templates_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/templates_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb b/elasticsearch-api/spec/unit/actions/cat/thread_pool_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb rename to elasticsearch-api/spec/unit/actions/cat/thread_pool_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/clear_scroll_spec.rb b/elasticsearch-api/spec/unit/actions/clear_scroll_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/clear_scroll_spec.rb rename to elasticsearch-api/spec/unit/actions/clear_scroll_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/close_point_in_time_spec.rb b/elasticsearch-api/spec/unit/actions/close_point_in_time_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/close_point_in_time_spec.rb rename to elasticsearch-api/spec/unit/actions/close_point_in_time_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb b/elasticsearch-api/spec/unit/actions/cluster/allocation_explain_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb rename to elasticsearch-api/spec/unit/actions/cluster/allocation_explain_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb b/elasticsearch-api/spec/unit/actions/cluster/get_settings_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb rename to elasticsearch-api/spec/unit/actions/cluster/get_settings_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/health_spec.rb b/elasticsearch-api/spec/unit/actions/cluster/health_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cluster/health_spec.rb rename to elasticsearch-api/spec/unit/actions/cluster/health_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/info_spec.rb b/elasticsearch-api/spec/unit/actions/cluster/info_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cluster/info_spec.rb rename to elasticsearch-api/spec/unit/actions/cluster/info_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb b/elasticsearch-api/spec/unit/actions/cluster/pending_tasks_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb rename to elasticsearch-api/spec/unit/actions/cluster/pending_tasks_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb b/elasticsearch-api/spec/unit/actions/cluster/put_settings_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb rename to elasticsearch-api/spec/unit/actions/cluster/put_settings_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb b/elasticsearch-api/spec/unit/actions/cluster/remote_info_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb rename to elasticsearch-api/spec/unit/actions/cluster/remote_info_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/reroute_spec.rb b/elasticsearch-api/spec/unit/actions/cluster/reroute_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cluster/reroute_spec.rb rename to elasticsearch-api/spec/unit/actions/cluster/reroute_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/state_spec.rb b/elasticsearch-api/spec/unit/actions/cluster/state_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cluster/state_spec.rb rename to elasticsearch-api/spec/unit/actions/cluster/state_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cluster/stats_spec.rb b/elasticsearch-api/spec/unit/actions/cluster/stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/cluster/stats_spec.rb rename to elasticsearch-api/spec/unit/actions/cluster/stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/check_in_spec.rb b/elasticsearch-api/spec/unit/actions/connector/check_in_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/check_in_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/check_in_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/delete_spec.rb b/elasticsearch-api/spec/unit/actions/connector/delete_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/delete_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/delete_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/get_spec.rb b/elasticsearch-api/spec/unit/actions/connector/get_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/get_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/get_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/last_sync_spec.rb b/elasticsearch-api/spec/unit/actions/connector/last_sync_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/last_sync_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/last_sync_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/list_spec.rb b/elasticsearch-api/spec/unit/actions/connector/list_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/list_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/list_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/post_spec.rb b/elasticsearch-api/spec/unit/actions/connector/post_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/post_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/post_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/put_spec.rb b/elasticsearch-api/spec/unit/actions/connector/put_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/put_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/put_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/sync_job_claim_spec.rb b/elasticsearch-api/spec/unit/actions/connector/sync_job_claim_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/sync_job_claim_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/sync_job_claim_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_active_filtering_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_active_filtering_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_active_filtering_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_active_filtering_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_api_key_id_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_api_key_id_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_api_key_id_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_api_key_id_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_configuration_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_configuration_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_configuration_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_configuration_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_error_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_error_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_error_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_error_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_features_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_features_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_features_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_features_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_filtering_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_filtering_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_filtering_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_filtering_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_filtering_validation_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_filtering_validation_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_filtering_validation_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_filtering_validation_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_index_name_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_index_name_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_index_name_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_index_name_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_name_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_name_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_name_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_name_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_native_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_native_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_native_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_native_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_pipeline_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_pipeline_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_pipeline_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_pipeline_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_scheduling_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_scheduling_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_scheduling_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_scheduling_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_service_type_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_service_type_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_service_type_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_service_type_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector/update_status_spec.rb b/elasticsearch-api/spec/unit/actions/connector/update_status_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector/update_status_spec.rb rename to elasticsearch-api/spec/unit/actions/connector/update_status_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/cancel_spec.rb b/elasticsearch-api/spec/unit/actions/connector_sync_job/cancel_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/cancel_spec.rb rename to elasticsearch-api/spec/unit/actions/connector_sync_job/cancel_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/check_in_spec.rb b/elasticsearch-api/spec/unit/actions/connector_sync_job/check_in_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/check_in_spec.rb rename to elasticsearch-api/spec/unit/actions/connector_sync_job/check_in_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/delete_spec.rb b/elasticsearch-api/spec/unit/actions/connector_sync_job/delete_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/delete_spec.rb rename to elasticsearch-api/spec/unit/actions/connector_sync_job/delete_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/error_spec.rb b/elasticsearch-api/spec/unit/actions/connector_sync_job/error_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/error_spec.rb rename to elasticsearch-api/spec/unit/actions/connector_sync_job/error_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/get_spec.rb b/elasticsearch-api/spec/unit/actions/connector_sync_job/get_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/get_spec.rb rename to elasticsearch-api/spec/unit/actions/connector_sync_job/get_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/list_spec.rb b/elasticsearch-api/spec/unit/actions/connector_sync_job/list_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/list_spec.rb rename to elasticsearch-api/spec/unit/actions/connector_sync_job/list_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/post_spec.rb b/elasticsearch-api/spec/unit/actions/connector_sync_job/post_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/post_spec.rb rename to elasticsearch-api/spec/unit/actions/connector_sync_job/post_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/update_stats_spec.rb b/elasticsearch-api/spec/unit/actions/connector_sync_job/update_stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/connector_sync_job/update_stats_spec.rb rename to elasticsearch-api/spec/unit/actions/connector_sync_job/update_stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/count_spec.rb b/elasticsearch-api/spec/unit/actions/count_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/count_spec.rb rename to elasticsearch-api/spec/unit/actions/count_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb b/elasticsearch-api/spec/unit/actions/create_document_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/create_document_spec.rb rename to elasticsearch-api/spec/unit/actions/create_document_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/delete_dangling_indices_spec.rb b/elasticsearch-api/spec/unit/actions/dangling_indices/delete_dangling_indices_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/delete_dangling_indices_spec.rb rename to elasticsearch-api/spec/unit/actions/dangling_indices/delete_dangling_indices_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/import_dangling_indices_spec.rb b/elasticsearch-api/spec/unit/actions/dangling_indices/import_dangling_indices_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/import_dangling_indices_spec.rb rename to elasticsearch-api/spec/unit/actions/dangling_indices/import_dangling_indices_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/list_dangling_indices_spec.rb b/elasticsearch-api/spec/unit/actions/dangling_indices/list_dangling_indices_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/dangling_indices/list_dangling_indices_spec.rb rename to elasticsearch-api/spec/unit/actions/dangling_indices/list_dangling_indices_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/data_frame/update_data_frame_transform_spec.rb b/elasticsearch-api/spec/unit/actions/data_frame/update_data_frame_transform_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/data_frame/update_data_frame_transform_spec.rb rename to elasticsearch-api/spec/unit/actions/data_frame/update_data_frame_transform_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/delete_by_query_spec.rb b/elasticsearch-api/spec/unit/actions/delete_by_query_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/delete_by_query_spec.rb rename to elasticsearch-api/spec/unit/actions/delete_by_query_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/delete_document_spec.rb b/elasticsearch-api/spec/unit/actions/delete_document_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/delete_document_spec.rb rename to elasticsearch-api/spec/unit/actions/delete_document_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/delete_script_spec.rb b/elasticsearch-api/spec/unit/actions/delete_script_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/delete_script_spec.rb rename to elasticsearch-api/spec/unit/actions/delete_script_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_delete_spec.rb b/elasticsearch-api/spec/unit/actions/esql/async_query_delete_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_delete_spec.rb rename to elasticsearch-api/spec/unit/actions/esql/async_query_delete_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_get._spec.rb b/elasticsearch-api/spec/unit/actions/esql/async_query_get._spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_get._spec.rb rename to elasticsearch-api/spec/unit/actions/esql/async_query_get._spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_spec.rb b/elasticsearch-api/spec/unit/actions/esql/async_query_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_spec.rb rename to elasticsearch-api/spec/unit/actions/esql/async_query_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_stop_spec.rb b/elasticsearch-api/spec/unit/actions/esql/async_query_stop_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/esql/async_query_stop_spec.rb rename to elasticsearch-api/spec/unit/actions/esql/async_query_stop_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/esql/query_spec.rb b/elasticsearch-api/spec/unit/actions/esql/query_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/esql/query_spec.rb rename to elasticsearch-api/spec/unit/actions/esql/query_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/exists_document_spec.rb b/elasticsearch-api/spec/unit/actions/exists_document_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/exists_document_spec.rb rename to elasticsearch-api/spec/unit/actions/exists_document_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/explain_document_spec.rb b/elasticsearch-api/spec/unit/actions/explain_document_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/explain_document_spec.rb rename to elasticsearch-api/spec/unit/actions/explain_document_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/features/get_features_spec.rb b/elasticsearch-api/spec/unit/actions/features/get_features_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/features/get_features_spec.rb rename to elasticsearch-api/spec/unit/actions/features/get_features_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/features/reset_features_spec.rb b/elasticsearch-api/spec/unit/actions/features/reset_features_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/features/reset_features_spec.rb rename to elasticsearch-api/spec/unit/actions/features/reset_features_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/field_caps_spec.rb b/elasticsearch-api/spec/unit/actions/field_caps_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/field_caps_spec.rb rename to elasticsearch-api/spec/unit/actions/field_caps_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/fleet/global_checkpoints_spec.rb b/elasticsearch-api/spec/unit/actions/fleet/global_checkpoints_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/fleet/global_checkpoints_spec.rb rename to elasticsearch-api/spec/unit/actions/fleet/global_checkpoints_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/fleet/msearch_spec.rb b/elasticsearch-api/spec/unit/actions/fleet/msearch_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/fleet/msearch_spec.rb rename to elasticsearch-api/spec/unit/actions/fleet/msearch_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/fleet/search_spec.rb b/elasticsearch-api/spec/unit/actions/fleet/search_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/fleet/search_spec.rb rename to elasticsearch-api/spec/unit/actions/fleet/search_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/get_document_source_spec.rb b/elasticsearch-api/spec/unit/actions/get_document_source_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/get_document_source_spec.rb rename to elasticsearch-api/spec/unit/actions/get_document_source_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/get_document_spec.rb b/elasticsearch-api/spec/unit/actions/get_document_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/get_document_spec.rb rename to elasticsearch-api/spec/unit/actions/get_document_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/get_script_spec.rb b/elasticsearch-api/spec/unit/actions/get_script_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/get_script_spec.rb rename to elasticsearch-api/spec/unit/actions/get_script_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/hashie_spec.rb b/elasticsearch-api/spec/unit/actions/hashie_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/hashie_spec.rb rename to elasticsearch-api/spec/unit/actions/hashie_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/health_report_spec.rb b/elasticsearch-api/spec/unit/actions/health_report_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/health_report_spec.rb rename to elasticsearch-api/spec/unit/actions/health_report_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/index_document_spec.rb b/elasticsearch-api/spec/unit/actions/index_document_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/index_document_spec.rb rename to elasticsearch-api/spec/unit/actions/index_document_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers_spec.rb b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/migrate_to_data_tiers_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers_spec.rb rename to elasticsearch-api/spec/unit/actions/index_lifecycle_management/migrate_to_data_tiers_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/add_block_spec.rb b/elasticsearch-api/spec/unit/actions/indices/add_block_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/add_block_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/add_block_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/analyze_spec.rb b/elasticsearch-api/spec/unit/actions/indices/analyze_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/analyze_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/analyze_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb b/elasticsearch-api/spec/unit/actions/indices/clear_cache_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/clear_cache_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/clone_spec.rb b/elasticsearch-api/spec/unit/actions/indices/clone_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/clone_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/clone_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/close_spec.rb b/elasticsearch-api/spec/unit/actions/indices/close_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/close_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/close_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/create_spec.rb b/elasticsearch-api/spec/unit/actions/indices/create_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/create_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/create_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/data_streams_stats_spec.rb b/elasticsearch-api/spec/unit/actions/indices/data_streams_stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/data_streams_stats_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/data_streams_stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb b/elasticsearch-api/spec/unit/actions/indices/delete_alias_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/delete_alias_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_data_lifecycle_spec.rb b/elasticsearch-api/spec/unit/actions/indices/delete_data_lifecycle_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_data_lifecycle_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/delete_data_lifecycle_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_spec.rb b/elasticsearch-api/spec/unit/actions/indices/delete_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/delete_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_template_spec.rb b/elasticsearch-api/spec/unit/actions/indices/delete_template_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/delete_template_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/delete_template_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/disk_usage_spec.rb b/elasticsearch-api/spec/unit/actions/indices/disk_usage_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/disk_usage_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/disk_usage_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb b/elasticsearch-api/spec/unit/actions/indices/exists_alias_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/exists_alias_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_spec.rb b/elasticsearch-api/spec/unit/actions/indices/exists_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/exists_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_template_spec.rb b/elasticsearch-api/spec/unit/actions/indices/exists_template_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/exists_template_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/exists_template_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/explain_data_lifecycle_spec.rb b/elasticsearch-api/spec/unit/actions/indices/explain_data_lifecycle_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/explain_data_lifecycle_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/explain_data_lifecycle_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb b/elasticsearch-api/spec/unit/actions/indices/field_usage_stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/field_usage_stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/flush_spec.rb b/elasticsearch-api/spec/unit/actions/indices/flush_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/flush_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/flush_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb b/elasticsearch-api/spec/unit/actions/indices/forcemerge_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/forcemerge_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_alias_spec.rb b/elasticsearch-api/spec/unit/actions/indices/get_alias_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/get_alias_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/get_alias_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_data_lifecycle_spec.rb b/elasticsearch-api/spec/unit/actions/indices/get_data_lifecycle_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/get_data_lifecycle_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/get_data_lifecycle_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_data_lifecycle_stats_spec.rb b/elasticsearch-api/spec/unit/actions/indices/get_data_lifecycle_stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/get_data_lifecycle_stats_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/get_data_lifecycle_stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb b/elasticsearch-api/spec/unit/actions/indices/get_field_mapping_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/get_field_mapping_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb b/elasticsearch-api/spec/unit/actions/indices/get_mapping_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/get_mapping_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_settings_spec.rb b/elasticsearch-api/spec/unit/actions/indices/get_settings_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/get_settings_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/get_settings_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/get_spec.rb b/elasticsearch-api/spec/unit/actions/indices/get_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/get_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/get_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/open_spec.rb b/elasticsearch-api/spec/unit/actions/indices/open_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/open_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/open_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_alias_spec.rb b/elasticsearch-api/spec/unit/actions/indices/put_alias_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/put_alias_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/put_alias_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_data_lifecycle_spec.rb b/elasticsearch-api/spec/unit/actions/indices/put_data_lifecycle_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/put_data_lifecycle_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/put_data_lifecycle_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb b/elasticsearch-api/spec/unit/actions/indices/put_mapping_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/put_mapping_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_settings_spec.rb b/elasticsearch-api/spec/unit/actions/indices/put_settings_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/put_settings_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/put_settings_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/put_template_spec.rb b/elasticsearch-api/spec/unit/actions/indices/put_template_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/put_template_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/put_template_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/recovery_spec.rb b/elasticsearch-api/spec/unit/actions/indices/recovery_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/recovery_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/recovery_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/refresh_spec.rb b/elasticsearch-api/spec/unit/actions/indices/refresh_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/refresh_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/refresh_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/resolve_cluster_spec.rb b/elasticsearch-api/spec/unit/actions/indices/resolve_cluster_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/resolve_cluster_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/resolve_cluster_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/rollover_spec.rb b/elasticsearch-api/spec/unit/actions/indices/rollover_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/rollover_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/rollover_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/segments_spec.rb b/elasticsearch-api/spec/unit/actions/indices/segments_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/segments_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/segments_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb b/elasticsearch-api/spec/unit/actions/indices/shard_stores_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/shard_stores_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/shrink_spec.rb b/elasticsearch-api/spec/unit/actions/indices/shrink_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/shrink_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/shrink_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/split_spec.rb b/elasticsearch-api/spec/unit/actions/indices/split_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/split_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/split_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/stats_spec.rb b/elasticsearch-api/spec/unit/actions/indices/stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/stats_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb b/elasticsearch-api/spec/unit/actions/indices/update_aliases_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/update_aliases_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/indices/validate_query_spec.rb b/elasticsearch-api/spec/unit/actions/indices/validate_query_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/indices/validate_query_spec.rb rename to elasticsearch-api/spec/unit/actions/indices/validate_query_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_spec.rb b/elasticsearch-api/spec/unit/actions/inference/delete_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/inference/delete_spec.rb rename to elasticsearch-api/spec/unit/actions/inference/delete_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/get_spec.rb b/elasticsearch-api/spec/unit/actions/inference/get_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/inference/get_spec.rb rename to elasticsearch-api/spec/unit/actions/inference/get_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb b/elasticsearch-api/spec/unit/actions/inference/inference_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb rename to elasticsearch-api/spec/unit/actions/inference/inference_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/put_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/inference/put_spec.rb rename to elasticsearch-api/spec/unit/actions/inference/put_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/stream_inference_spec.rb b/elasticsearch-api/spec/unit/actions/inference/stream_inference_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/inference/stream_inference_spec.rb rename to elasticsearch-api/spec/unit/actions/inference/stream_inference_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/unified_inference_spec.rb b/elasticsearch-api/spec/unit/actions/inference/unified_inference_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/inference/unified_inference_spec.rb rename to elasticsearch-api/spec/unit/actions/inference/unified_inference_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/update_spec.rb b/elasticsearch-api/spec/unit/actions/inference/update_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/inference/update_spec.rb rename to elasticsearch-api/spec/unit/actions/inference/update_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/info_spec.rb b/elasticsearch-api/spec/unit/actions/info_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/info_spec.rb rename to elasticsearch-api/spec/unit/actions/info_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_geoip_database_spec.rb b/elasticsearch-api/spec/unit/actions/ingest/delete_geoip_database_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_geoip_database_spec.rb rename to elasticsearch-api/spec/unit/actions/ingest/delete_geoip_database_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_ip_location_database_spec.rb b/elasticsearch-api/spec/unit/actions/ingest/delete_ip_location_database_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_ip_location_database_spec.rb rename to elasticsearch-api/spec/unit/actions/ingest/delete_ip_location_database_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb b/elasticsearch-api/spec/unit/actions/ingest/delete_pipeline_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb rename to elasticsearch-api/spec/unit/actions/ingest/delete_pipeline_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/geo_ip_stats_spec.rb b/elasticsearch-api/spec/unit/actions/ingest/geo_ip_stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/ingest/geo_ip_stats_spec.rb rename to elasticsearch-api/spec/unit/actions/ingest/geo_ip_stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_geoip_database_spec.rb b/elasticsearch-api/spec/unit/actions/ingest/get_geoip_database_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_geoip_database_spec.rb rename to elasticsearch-api/spec/unit/actions/ingest/get_geoip_database_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_ip_location_database_spec.rb b/elasticsearch-api/spec/unit/actions/ingest/get_ip_location_database_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_ip_location_database_spec.rb rename to elasticsearch-api/spec/unit/actions/ingest/get_ip_location_database_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb b/elasticsearch-api/spec/unit/actions/ingest/get_pipeline_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb rename to elasticsearch-api/spec/unit/actions/ingest/get_pipeline_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_geoip_database_spec.rb b/elasticsearch-api/spec/unit/actions/ingest/put_geoip_database_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_geoip_database_spec.rb rename to elasticsearch-api/spec/unit/actions/ingest/put_geoip_database_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_ip_location_database_spec.rb b/elasticsearch-api/spec/unit/actions/ingest/put_ip_location_database_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_ip_location_database_spec.rb rename to elasticsearch-api/spec/unit/actions/ingest/put_ip_location_database_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb b/elasticsearch-api/spec/unit/actions/ingest/put_pipeline_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb rename to elasticsearch-api/spec/unit/actions/ingest/put_pipeline_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ingest/simulate_spec.rb b/elasticsearch-api/spec/unit/actions/ingest/simulate_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/ingest/simulate_spec.rb rename to elasticsearch-api/spec/unit/actions/ingest/simulate_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/json_builders_spec.rb b/elasticsearch-api/spec/unit/actions/json_builders_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/json_builders_spec.rb rename to elasticsearch-api/spec/unit/actions/json_builders_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/get_memory_stats_spec.rb b/elasticsearch-api/spec/unit/actions/machine_learning/get_memory_stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/get_memory_stats_spec.rb rename to elasticsearch-api/spec/unit/actions/machine_learning/get_memory_stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats_spec.rb b/elasticsearch-api/spec/unit/actions/machine_learning/get_model_snapshot_upgrade_stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats_spec.rb rename to elasticsearch-api/spec/unit/actions/machine_learning/get_model_snapshot_upgrade_stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/infer_trained_model_deployment_spec.rb b/elasticsearch-api/spec/unit/actions/machine_learning/infer_trained_model_deployment_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/infer_trained_model_deployment_spec.rb rename to elasticsearch-api/spec/unit/actions/machine_learning/infer_trained_model_deployment_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part_spec.rb b/elasticsearch-api/spec/unit/actions/machine_learning/put_trained_model_definition_part_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part_spec.rb rename to elasticsearch-api/spec/unit/actions/machine_learning/put_trained_model_definition_part_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary_spec.rb b/elasticsearch-api/spec/unit/actions/machine_learning/put_trained_model_vocabulary_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary_spec.rb rename to elasticsearch-api/spec/unit/actions/machine_learning/put_trained_model_vocabulary_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/reset_job_spec.rb b/elasticsearch-api/spec/unit/actions/machine_learning/reset_job_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/reset_job_spec.rb rename to elasticsearch-api/spec/unit/actions/machine_learning/reset_job_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/set_upgrade_mode_spec.rb b/elasticsearch-api/spec/unit/actions/machine_learning/set_upgrade_mode_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/set_upgrade_mode_spec.rb rename to elasticsearch-api/spec/unit/actions/machine_learning/set_upgrade_mode_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/start_trained_model_deployment_spec.rb b/elasticsearch-api/spec/unit/actions/machine_learning/start_trained_model_deployment_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/start_trained_model_deployment_spec.rb rename to elasticsearch-api/spec/unit/actions/machine_learning/start_trained_model_deployment_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment_spec.rb b/elasticsearch-api/spec/unit/actions/machine_learning/stop_trained_model_deployment_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment_spec.rb rename to elasticsearch-api/spec/unit/actions/machine_learning/stop_trained_model_deployment_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/update_trained_model_deployment_spec.rb b/elasticsearch-api/spec/unit/actions/machine_learning/update_trained_model_deployment_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/machine_learning/update_trained_model_deployment_spec.rb rename to elasticsearch-api/spec/unit/actions/machine_learning/update_trained_model_deployment_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/mget_spec.rb b/elasticsearch-api/spec/unit/actions/mget_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/mget_spec.rb rename to elasticsearch-api/spec/unit/actions/mget_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/migration/get_feature_upgrade_status_spec.rb b/elasticsearch-api/spec/unit/actions/migration/get_feature_upgrade_status_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/migration/get_feature_upgrade_status_spec.rb rename to elasticsearch-api/spec/unit/actions/migration/get_feature_upgrade_status_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/migration/post_feature_upgrade_spec.rb b/elasticsearch-api/spec/unit/actions/migration/post_feature_upgrade_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/migration/post_feature_upgrade_spec.rb rename to elasticsearch-api/spec/unit/actions/migration/post_feature_upgrade_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/msearch_spec.rb b/elasticsearch-api/spec/unit/actions/msearch_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/msearch_spec.rb rename to elasticsearch-api/spec/unit/actions/msearch_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/msearch_template_spec.rb b/elasticsearch-api/spec/unit/actions/msearch_template_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/msearch_template_spec.rb rename to elasticsearch-api/spec/unit/actions/msearch_template_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/mtermvectors_spec.rb b/elasticsearch-api/spec/unit/actions/mtermvectors_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/mtermvectors_spec.rb rename to elasticsearch-api/spec/unit/actions/mtermvectors_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb b/elasticsearch-api/spec/unit/actions/nodes/clear_repositories_metering_archive_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb rename to elasticsearch-api/spec/unit/actions/nodes/clear_repositories_metering_archive_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb b/elasticsearch-api/spec/unit/actions/nodes/get_repositories_metering_info_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb rename to elasticsearch-api/spec/unit/actions/nodes/get_repositories_metering_info_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb b/elasticsearch-api/spec/unit/actions/nodes/hot_threads_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb rename to elasticsearch-api/spec/unit/actions/nodes/hot_threads_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/info_spec.rb b/elasticsearch-api/spec/unit/actions/nodes/info_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/nodes/info_spec.rb rename to elasticsearch-api/spec/unit/actions/nodes/info_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb b/elasticsearch-api/spec/unit/actions/nodes/reload_secure_settings_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb rename to elasticsearch-api/spec/unit/actions/nodes/reload_secure_settings_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/nodes/stats_spec.rb b/elasticsearch-api/spec/unit/actions/nodes/stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/nodes/stats_spec.rb rename to elasticsearch-api/spec/unit/actions/nodes/stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/open_point_in_time_spec.rb b/elasticsearch-api/spec/unit/actions/open_point_in_time_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/open_point_in_time_spec.rb rename to elasticsearch-api/spec/unit/actions/open_point_in_time_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/ping_spec.rb b/elasticsearch-api/spec/unit/actions/ping_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/ping_spec.rb rename to elasticsearch-api/spec/unit/actions/ping_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/put_script_spec.rb b/elasticsearch-api/spec/unit/actions/put_script_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/put_script_spec.rb rename to elasticsearch-api/spec/unit/actions/put_script_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/delete_ruleset_spec.rb b/elasticsearch-api/spec/unit/actions/query_rules/delete_ruleset_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/query_rules/delete_ruleset_spec.rb rename to elasticsearch-api/spec/unit/actions/query_rules/delete_ruleset_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/delete_spec.rb b/elasticsearch-api/spec/unit/actions/query_rules/delete_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/query_rules/delete_spec.rb rename to elasticsearch-api/spec/unit/actions/query_rules/delete_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/get_ruleset_spec.rb b/elasticsearch-api/spec/unit/actions/query_rules/get_ruleset_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/query_rules/get_ruleset_spec.rb rename to elasticsearch-api/spec/unit/actions/query_rules/get_ruleset_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/get_spec.rb b/elasticsearch-api/spec/unit/actions/query_rules/get_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/query_rules/get_spec.rb rename to elasticsearch-api/spec/unit/actions/query_rules/get_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/put_ruleset_spec.rb b/elasticsearch-api/spec/unit/actions/query_rules/put_ruleset_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/query_rules/put_ruleset_spec.rb rename to elasticsearch-api/spec/unit/actions/query_rules/put_ruleset_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/put_spec.rb b/elasticsearch-api/spec/unit/actions/query_rules/put_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/query_rules/put_spec.rb rename to elasticsearch-api/spec/unit/actions/query_rules/put_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/query_rules/test_spec.rb b/elasticsearch-api/spec/unit/actions/query_rules/test_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/query_rules/test_spec.rb rename to elasticsearch-api/spec/unit/actions/query_rules/test_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/rank_eval_spec.rb b/elasticsearch-api/spec/unit/actions/rank_eval_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/rank_eval_spec.rb rename to elasticsearch-api/spec/unit/actions/rank_eval_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/reindex_spec.rb b/elasticsearch-api/spec/unit/actions/reindex_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/reindex_spec.rb rename to elasticsearch-api/spec/unit/actions/reindex_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/render_search_template_spec.rb b/elasticsearch-api/spec/unit/actions/render_search_template_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/render_search_template_spec.rb rename to elasticsearch-api/spec/unit/actions/render_search_template_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/scroll_spec.rb b/elasticsearch-api/spec/unit/actions/scroll_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/scroll_spec.rb rename to elasticsearch-api/spec/unit/actions/scroll_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/delete_behavioral_analytics_spec.rb b/elasticsearch-api/spec/unit/actions/search_application/delete_behavioral_analytics_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_application/delete_behavioral_analytics_spec.rb rename to elasticsearch-api/spec/unit/actions/search_application/delete_behavioral_analytics_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/delete_spec.rb b/elasticsearch-api/spec/unit/actions/search_application/delete_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_application/delete_spec.rb rename to elasticsearch-api/spec/unit/actions/search_application/delete_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/get_behavioral_analytics_spec.rb b/elasticsearch-api/spec/unit/actions/search_application/get_behavioral_analytics_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_application/get_behavioral_analytics_spec.rb rename to elasticsearch-api/spec/unit/actions/search_application/get_behavioral_analytics_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/get_spec.rb b/elasticsearch-api/spec/unit/actions/search_application/get_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_application/get_spec.rb rename to elasticsearch-api/spec/unit/actions/search_application/get_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/list_spec.rb b/elasticsearch-api/spec/unit/actions/search_application/list_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_application/list_spec.rb rename to elasticsearch-api/spec/unit/actions/search_application/list_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/post_behavioral_analytics_event_spec.rb b/elasticsearch-api/spec/unit/actions/search_application/post_behavioral_analytics_event_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_application/post_behavioral_analytics_event_spec.rb rename to elasticsearch-api/spec/unit/actions/search_application/post_behavioral_analytics_event_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/put_behavioral_analytics_spec.rb b/elasticsearch-api/spec/unit/actions/search_application/put_behavioral_analytics_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_application/put_behavioral_analytics_spec.rb rename to elasticsearch-api/spec/unit/actions/search_application/put_behavioral_analytics_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/put_spec.rb b/elasticsearch-api/spec/unit/actions/search_application/put_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_application/put_spec.rb rename to elasticsearch-api/spec/unit/actions/search_application/put_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/render_query_spec.rb b/elasticsearch-api/spec/unit/actions/search_application/render_query_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_application/render_query_spec.rb rename to elasticsearch-api/spec/unit/actions/search_application/render_query_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_application/search_spec.rb b/elasticsearch-api/spec/unit/actions/search_application/search_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_application/search_spec.rb rename to elasticsearch-api/spec/unit/actions/search_application/search_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_mvt_spec.rb b/elasticsearch-api/spec/unit/actions/search_mvt_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_mvt_spec.rb rename to elasticsearch-api/spec/unit/actions/search_mvt_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_shards_spec.rb b/elasticsearch-api/spec/unit/actions/search_shards_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_shards_spec.rb rename to elasticsearch-api/spec/unit/actions/search_shards_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_spec.rb b/elasticsearch-api/spec/unit/actions/search_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_spec.rb rename to elasticsearch-api/spec/unit/actions/search_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/search_template_spec.rb b/elasticsearch-api/spec/unit/actions/search_template_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/search_template_spec.rb rename to elasticsearch-api/spec/unit/actions/search_template_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/cache_stats_spec.rb b/elasticsearch-api/spec/unit/actions/searchable_snapshots/cache_stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/cache_stats_spec.rb rename to elasticsearch-api/spec/unit/actions/searchable_snapshots/cache_stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/clear_cache_spec.rb b/elasticsearch-api/spec/unit/actions/searchable_snapshots/clear_cache_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/clear_cache_spec.rb rename to elasticsearch-api/spec/unit/actions/searchable_snapshots/clear_cache_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/mount_spec.rb b/elasticsearch-api/spec/unit/actions/searchable_snapshots/mount_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/mount_spec.rb rename to elasticsearch-api/spec/unit/actions/searchable_snapshots/mount_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/stats_spec.rb b/elasticsearch-api/spec/unit/actions/searchable_snapshots/stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/searchable_snapshots/stats_spec.rb rename to elasticsearch-api/spec/unit/actions/searchable_snapshots/stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/bulk_delete_role_spec.rb b/elasticsearch-api/spec/unit/actions/security/bulk_delete_role_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/bulk_delete_role_spec.rb rename to elasticsearch-api/spec/unit/actions/security/bulk_delete_role_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/bulk_put_role_spec.rb b/elasticsearch-api/spec/unit/actions/security/bulk_put_role_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/bulk_put_role_spec.rb rename to elasticsearch-api/spec/unit/actions/security/bulk_put_role_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/clear_cached_service_tokens_spec.rb b/elasticsearch-api/spec/unit/actions/security/clear_cached_service_tokens_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/clear_cached_service_tokens_spec.rb rename to elasticsearch-api/spec/unit/actions/security/clear_cached_service_tokens_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/create_api_key_spec.rb b/elasticsearch-api/spec/unit/actions/security/create_api_key_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/create_api_key_spec.rb rename to elasticsearch-api/spec/unit/actions/security/create_api_key_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/create_cross_cluster_api_key_spec.rb b/elasticsearch-api/spec/unit/actions/security/create_cross_cluster_api_key_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/create_cross_cluster_api_key_spec.rb rename to elasticsearch-api/spec/unit/actions/security/create_cross_cluster_api_key_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/create_service_token_spec.rb b/elasticsearch-api/spec/unit/actions/security/create_service_token_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/create_service_token_spec.rb rename to elasticsearch-api/spec/unit/actions/security/create_service_token_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/delegate_pki_spec.rb b/elasticsearch-api/spec/unit/actions/security/delegate_pki_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/delegate_pki_spec.rb rename to elasticsearch-api/spec/unit/actions/security/delegate_pki_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/delete_service_token_spec.rb b/elasticsearch-api/spec/unit/actions/security/delete_service_token_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/delete_service_token_spec.rb rename to elasticsearch-api/spec/unit/actions/security/delete_service_token_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/enroll_kibana_spec.rb b/elasticsearch-api/spec/unit/actions/security/enroll_kibana_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/enroll_kibana_spec.rb rename to elasticsearch-api/spec/unit/actions/security/enroll_kibana_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_api_key_spec.rb b/elasticsearch-api/spec/unit/actions/security/get_api_key_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/get_api_key_spec.rb rename to elasticsearch-api/spec/unit/actions/security/get_api_key_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_builtin_privileges_spec.rb b/elasticsearch-api/spec/unit/actions/security/get_builtin_privileges_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/get_builtin_privileges_spec.rb rename to elasticsearch-api/spec/unit/actions/security/get_builtin_privileges_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_service_accounts_spec.rb b/elasticsearch-api/spec/unit/actions/security/get_service_accounts_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/get_service_accounts_spec.rb rename to elasticsearch-api/spec/unit/actions/security/get_service_accounts_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/get_service_credentials_spec.rb b/elasticsearch-api/spec/unit/actions/security/get_service_credentials_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/get_service_credentials_spec.rb rename to elasticsearch-api/spec/unit/actions/security/get_service_credentials_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/invalidate_api_key_spec.rb b/elasticsearch-api/spec/unit/actions/security/invalidate_api_key_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/invalidate_api_key_spec.rb rename to elasticsearch-api/spec/unit/actions/security/invalidate_api_key_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/query_api_keys_spec.rb b/elasticsearch-api/spec/unit/actions/security/query_api_keys_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/query_api_keys_spec.rb rename to elasticsearch-api/spec/unit/actions/security/query_api_keys_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/query_role_spec.rb b/elasticsearch-api/spec/unit/actions/security/query_role_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/query_role_spec.rb rename to elasticsearch-api/spec/unit/actions/security/query_role_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/query_user_spec.rb b/elasticsearch-api/spec/unit/actions/security/query_user_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/query_user_spec.rb rename to elasticsearch-api/spec/unit/actions/security/query_user_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_authenticate_spec.rb b/elasticsearch-api/spec/unit/actions/security/saml_authenticate_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/saml_authenticate_spec.rb rename to elasticsearch-api/spec/unit/actions/security/saml_authenticate_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_complete_logout_spec.rb b/elasticsearch-api/spec/unit/actions/security/saml_complete_logout_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/saml_complete_logout_spec.rb rename to elasticsearch-api/spec/unit/actions/security/saml_complete_logout_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_invalidate_spec.rb b/elasticsearch-api/spec/unit/actions/security/saml_invalidate_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/saml_invalidate_spec.rb rename to elasticsearch-api/spec/unit/actions/security/saml_invalidate_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_logout_spec.rb b/elasticsearch-api/spec/unit/actions/security/saml_logout_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/saml_logout_spec.rb rename to elasticsearch-api/spec/unit/actions/security/saml_logout_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_prepare_authentication_spec.rb b/elasticsearch-api/spec/unit/actions/security/saml_prepare_authentication_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/saml_prepare_authentication_spec.rb rename to elasticsearch-api/spec/unit/actions/security/saml_prepare_authentication_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/saml_service_provider_metadata_spec.rb b/elasticsearch-api/spec/unit/actions/security/saml_service_provider_metadata_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/saml_service_provider_metadata_spec.rb rename to elasticsearch-api/spec/unit/actions/security/saml_service_provider_metadata_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/update_api_key_spec.rb b/elasticsearch-api/spec/unit/actions/security/update_api_key_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/update_api_key_spec.rb rename to elasticsearch-api/spec/unit/actions/security/update_api_key_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/security/update_cross_cluster_api_key_spec.rb b/elasticsearch-api/spec/unit/actions/security/update_cross_cluster_api_key_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/security/update_cross_cluster_api_key_spec.rb rename to elasticsearch-api/spec/unit/actions/security/update_cross_cluster_api_key_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/simulate/ingest_spec.rb b/elasticsearch-api/spec/unit/actions/simulate/ingest_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/simulate/ingest_spec.rb rename to elasticsearch-api/spec/unit/actions/simulate/ingest_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/clone_spec.rb b/elasticsearch-api/spec/unit/actions/snapshot/clone_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/snapshot/clone_spec.rb rename to elasticsearch-api/spec/unit/actions/snapshot/clone_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb b/elasticsearch-api/spec/unit/actions/snapshot/create_repository_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb rename to elasticsearch-api/spec/unit/actions/snapshot/create_repository_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/create_spec.rb b/elasticsearch-api/spec/unit/actions/snapshot/create_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/snapshot/create_spec.rb rename to elasticsearch-api/spec/unit/actions/snapshot/create_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb b/elasticsearch-api/spec/unit/actions/snapshot/delete_repository_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb rename to elasticsearch-api/spec/unit/actions/snapshot/delete_repository_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/delete_spec.rb b/elasticsearch-api/spec/unit/actions/snapshot/delete_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/snapshot/delete_spec.rb rename to elasticsearch-api/spec/unit/actions/snapshot/delete_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb b/elasticsearch-api/spec/unit/actions/snapshot/get_repository_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb rename to elasticsearch-api/spec/unit/actions/snapshot/get_repository_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/get_spec.rb b/elasticsearch-api/spec/unit/actions/snapshot/get_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/snapshot/get_spec.rb rename to elasticsearch-api/spec/unit/actions/snapshot/get_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb b/elasticsearch-api/spec/unit/actions/snapshot/repository_analize_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb rename to elasticsearch-api/spec/unit/actions/snapshot/repository_analize_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/restore_spec.rb b/elasticsearch-api/spec/unit/actions/snapshot/restore_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/snapshot/restore_spec.rb rename to elasticsearch-api/spec/unit/actions/snapshot/restore_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/status_spec.rb b/elasticsearch-api/spec/unit/actions/snapshot/status_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/snapshot/status_spec.rb rename to elasticsearch-api/spec/unit/actions/snapshot/status_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb b/elasticsearch-api/spec/unit/actions/snapshot/verify_repository_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb rename to elasticsearch-api/spec/unit/actions/snapshot/verify_repository_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/sql/delete_async_spec.rb b/elasticsearch-api/spec/unit/actions/sql/delete_async_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/sql/delete_async_spec.rb rename to elasticsearch-api/spec/unit/actions/sql/delete_async_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/sql/get_async_spec.rb b/elasticsearch-api/spec/unit/actions/sql/get_async_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/sql/get_async_spec.rb rename to elasticsearch-api/spec/unit/actions/sql/get_async_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/sql/get_async_stats_spec.rb b/elasticsearch-api/spec/unit/actions/sql/get_async_stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/sql/get_async_stats_spec.rb rename to elasticsearch-api/spec/unit/actions/sql/get_async_stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/tasks/cancel_spec.rb b/elasticsearch-api/spec/unit/actions/tasks/cancel_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/tasks/cancel_spec.rb rename to elasticsearch-api/spec/unit/actions/tasks/cancel_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/tasks/get_spec.rb b/elasticsearch-api/spec/unit/actions/tasks/get_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/tasks/get_spec.rb rename to elasticsearch-api/spec/unit/actions/tasks/get_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/tasks/list_spec.rb b/elasticsearch-api/spec/unit/actions/tasks/list_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/tasks/list_spec.rb rename to elasticsearch-api/spec/unit/actions/tasks/list_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/terms_enum_spec.rb b/elasticsearch-api/spec/unit/actions/terms_enum_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/terms_enum_spec.rb rename to elasticsearch-api/spec/unit/actions/terms_enum_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/termvectors_spec.rb b/elasticsearch-api/spec/unit/actions/termvectors_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/termvectors_spec.rb rename to elasticsearch-api/spec/unit/actions/termvectors_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_field_structure_spec.rb b/elasticsearch-api/spec/unit/actions/text_structure/find_field_structure_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_field_structure_spec.rb rename to elasticsearch-api/spec/unit/actions/text_structure/find_field_structure_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_message_structure_spec.rb b/elasticsearch-api/spec/unit/actions/text_structure/find_message_structure_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_message_structure_spec.rb rename to elasticsearch-api/spec/unit/actions/text_structure/find_message_structure_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_structure_spec.rb b/elasticsearch-api/spec/unit/actions/text_structure/find_structure_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/text_structure/find_structure_spec.rb rename to elasticsearch-api/spec/unit/actions/text_structure/find_structure_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/text_structure/test_grok_pattern_spec.rb b/elasticsearch-api/spec/unit/actions/text_structure/test_grok_pattern_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/text_structure/test_grok_pattern_spec.rb rename to elasticsearch-api/spec/unit/actions/text_structure/test_grok_pattern_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/transform/get_node_stats_spec.rb b/elasticsearch-api/spec/unit/actions/transform/get_node_stats_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/transform/get_node_stats_spec.rb rename to elasticsearch-api/spec/unit/actions/transform/get_node_stats_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/transform/schedule_now_transform_spec.rb b/elasticsearch-api/spec/unit/actions/transform/schedule_now_transform_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/transform/schedule_now_transform_spec.rb rename to elasticsearch-api/spec/unit/actions/transform/schedule_now_transform_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/update_by_query_spec.rb b/elasticsearch-api/spec/unit/actions/update_by_query_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/update_by_query_spec.rb rename to elasticsearch-api/spec/unit/actions/update_by_query_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/update_document_spec.rb b/elasticsearch-api/spec/unit/actions/update_document_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/update_document_spec.rb rename to elasticsearch-api/spec/unit/actions/update_document_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/watcher/get_settings_spec.rb b/elasticsearch-api/spec/unit/actions/watcher/get_settings_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/watcher/get_settings_spec.rb rename to elasticsearch-api/spec/unit/actions/watcher/get_settings_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/watcher/update_settings_spec.rb b/elasticsearch-api/spec/unit/actions/watcher/update_settings_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/actions/watcher/update_settings_spec.rb rename to elasticsearch-api/spec/unit/actions/watcher/update_settings_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/api_response_spec.rb b/elasticsearch-api/spec/unit/api_response_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/api_response_spec.rb rename to elasticsearch-api/spec/unit/api_response_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/api_spec.rb b/elasticsearch-api/spec/unit/api_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/api_spec.rb rename to elasticsearch-api/spec/unit/api_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/client_spec.rb b/elasticsearch-api/spec/unit/client_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/client_spec.rb rename to elasticsearch-api/spec/unit/client_spec.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb b/elasticsearch-api/spec/unit/perform_request_spec.rb similarity index 95% rename from elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb rename to elasticsearch-api/spec/unit/perform_request_spec.rb index 44b3fa288e..154e19bd90 100644 --- a/elasticsearch-api/spec/elasticsearch/api/perform_request_spec.rb +++ b/elasticsearch-api/spec/unit/perform_request_spec.rb @@ -17,8 +17,8 @@ require 'spec_helper' require 'elastic-transport' -require_relative '../../../utils/thor/endpoint_spec' -require_relative '../../../utils/thor/generator/files_helper' +require_relative File.expand_path('../../utils/thor/endpoint_spec', __dir__) +require_relative File.expand_path('../../utils/thor/generator/files_helper', __dir__) describe 'Perform request args' do Elasticsearch::API::FilesHelper.files.each do |filepath| diff --git a/elasticsearch-api/spec/platinum/unit/test_helper.rb b/elasticsearch-api/spec/unit/test_helper.rb similarity index 100% rename from elasticsearch-api/spec/platinum/unit/test_helper.rb rename to elasticsearch-api/spec/unit/test_helper.rb diff --git a/elasticsearch-api/spec/elasticsearch/api/utils_spec.rb b/elasticsearch-api/spec/unit/utils_spec.rb similarity index 100% rename from elasticsearch-api/spec/elasticsearch/api/utils_spec.rb rename to elasticsearch-api/spec/unit/utils_spec.rb From 86725decddcbe117e2c664d8e7f4043ff21cbf48 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 23 Jan 2025 16:08:38 +0000 Subject: [PATCH 452/540] [API] Updates Rakefile with new test structure --- elasticsearch-api/Rakefile | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/elasticsearch-api/Rakefile b/elasticsearch-api/Rakefile index 8903d68c92..9a99579083 100644 --- a/elasticsearch-api/Rakefile +++ b/elasticsearch-api/Rakefile @@ -32,10 +32,10 @@ namespace :test do end desc 'Run unit tests' - task unit: :spec - RSpec::Core::RakeTask.new(:spec) do |t| - t.pattern = 'spec/elasticsearch/api/**/*_spec.rb' - t.exclude_pattern = 'spec/platinum/**/*_spec.rb' + task :unit + RSpec::Core::RakeTask.new(:unit) do |t| + t.pattern = 'spec/unit/**/*_spec.rb' + t.ruby_opts = '-W0' end desc 'Run Elasticsearch test suite free tests.' @@ -55,30 +55,18 @@ namespace :test do ruby './spec/yaml-test-runner/run.rb' end + desc 'Run Integration tests' + RSpec::Core::RakeTask.new(:integration) do |t| + t.pattern = 'spec/integration/**/*_spec.rb' + t.ruby_opts = '-W0' + end + namespace :platinum do desc 'Run Platinum Rest API Spec tests' RSpec::Core::RakeTask.new(:api) do ENV['TEST_SUITE'] = 'platinum' Rake::Task['test:rest_api'].invoke end - - desc 'Run Platinum Unit tests - DEPRECATED: Will be migrated to RSpec' - Rake::TestTask.new(:unit) do |test| - test.libs << 'spec/platinum/unit' - test.test_files = FileList['spec/platinum/unit/**/*_test.rb'] - test.verbose = false - test.warning = false - end - - desc 'Run Platinum Integration Specs' - RSpec::Core::RakeTask.new(:integration) do |t| - t.pattern = if ENV['TEST_SUITE'] == 'platinum' - 'spec/platinum/integration/**/*_spec.rb' - else - 'spec/free/integration/**/*_spec.rb' - end - t.ruby_opts = '-W0' - end end end From f1c3257bd5168eba3eadbe29fcc8b807a2c3f42c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 23 Jan 2025 16:13:05 +0000 Subject: [PATCH 453/540] [CI] Updates GitHub Action for testing --- .github/workflows/main.yml | 3 +-- .github/workflows/otel.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e2c29dc2d2..c72072a437 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,6 @@ jobs: - uses: elastic/elastic-github-actions/elasticsearch@master with: stack-version: 9.0.0-SNAPSHOT - security-enabled: false - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} @@ -40,4 +39,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake es:download_artifacts[9.0.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake es:download_artifacts[9.0.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:all diff --git a/.github/workflows/otel.yml b/.github/workflows/otel.yml index c78dea09d9..394bfd0399 100644 --- a/.github/workflows/otel.yml +++ b/.github/workflows/otel.yml @@ -42,4 +42,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake es:download_artifacts[9.0.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit + run: rake es:download_artifacts[9.0.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:all From b4b0bb0d4c9d41051ecd73410c8b6438148e71c8 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 24 Jan 2025 14:23:42 +0000 Subject: [PATCH 454/540] Updates elasticsearch gem integration tests --- .../integration/characters_escaping_spec.rb | 32 ++++++++----------- .../integration/client_integration_spec.rb | 21 ++++-------- .../spec/integration/opentelemetry_spec.rb | 14 ++------ elasticsearch/spec/spec_helper.rb | 16 ++++++++++ 4 files changed, 38 insertions(+), 45 deletions(-) diff --git a/elasticsearch/spec/integration/characters_escaping_spec.rb b/elasticsearch/spec/integration/characters_escaping_spec.rb index 3919841c9b..4cd080f142 100644 --- a/elasticsearch/spec/integration/characters_escaping_spec.rb +++ b/elasticsearch/spec/integration/characters_escaping_spec.rb @@ -18,41 +18,35 @@ require 'spec_helper' require 'uri' -ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}" -raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/ - -context 'Elasticsearch client' do - let(:client) do - Elasticsearch::Client.new(host: ELASTICSEARCH_URL, user: 'elastic', password: 'changeme') - end +context 'Elasticsearch CLIENT' do let(:index) { 'tvs' } after do - client.indices.delete(index: index) + CLIENT.indices.delete(index: index) end context 'escaping spaces in ids' do it 'escapes spaces for id when using index' do - response = client.index(index: index, id: 'a test 1', body: { name: 'A test 1' }, refresh: true) + response = CLIENT.index(index: index, id: 'a test 1', body: { name: 'A test 1' }, refresh: true) expect(response.body['_id']).to eq 'a test 1' - response = client.search(index: index) + response = CLIENT.search(index: index) expect(response.body['hits']['hits'].first['_id']).to eq 'a test 1' # Raises exception, _id is unrecognized expect do - client.index(index: index, _id: 'a test 2', body: { name: 'A test 2' }) + CLIENT.index(index: index, _id: 'a test 2', body: { name: 'A test 2' }) end.to raise_exception Elastic::Transport::Transport::Errors::BadRequest # Raises exception, id is a query parameter expect do - client.index(index: index, body: { name: 'A test 3', _id: 'a test 3' }) + CLIENT.index(index: index, body: { name: 'A test 3', _id: 'a test 3' }) end.to raise_exception Elastic::Transport::Transport::Errors::BadRequest end it 'escapes spaces for id when using create' do # Works with create - response = client.create(index: index, id: 'a test 4', body: { name: 'A test 4' }) + response = CLIENT.create(index: index, id: 'a test 4', body: { name: 'A test 4' }) expect(response.body['_id']).to eq 'a test 4' end @@ -60,9 +54,9 @@ body = [ { create: { _index: index, _id: 'a test 5', data: { name: 'A test 5' } } } ] - expect(client.bulk(body: body, refresh: true).status).to eq 200 + expect(CLIENT.bulk(body: body, refresh: true).status).to eq 200 - response = client.search(index: index) + response = CLIENT.search(index: index) expect( response.body['hits']['hits'].select { |a| a['_id'] == 'a test 5' }.size ).to eq 1 @@ -71,13 +65,13 @@ context 'it doesnae escape plus signs in id' do it 'escapes spaces for id when using index' do - response = client.index(index: index, id: 'a+test+1', body: { name: 'A test 1' }) + response = CLIENT.index(index: index, id: 'a+test+1', body: { name: 'A test 1' }) expect(response.body['_id']).to eq 'a+test+1' end it 'escapes spaces for id when using create' do # Works with create - response = client.create(index: index, id: 'a+test+2', body: { name: 'A test 2' }) + response = CLIENT.create(index: index, id: 'a+test+2', body: { name: 'A test 2' }) expect(response.body['_id']).to eq 'a+test+2' end @@ -85,9 +79,9 @@ body = [ { create: { _index: index, _id: 'a+test+3', data: { name: 'A test 3' } } } ] - expect(client.bulk(body: body, refresh: true).status).to eq 200 + expect(CLIENT.bulk(body: body, refresh: true).status).to eq 200 - response = client.search(index: index) + response = CLIENT.search(index: index) expect( response.body['hits']['hits'].select { |a| a['_id'] == 'a+test+3' }.size ).to eq 1 diff --git a/elasticsearch/spec/integration/client_integration_spec.rb b/elasticsearch/spec/integration/client_integration_spec.rb index 79ef20850c..7f70377486 100644 --- a/elasticsearch/spec/integration/client_integration_spec.rb +++ b/elasticsearch/spec/integration/client_integration_spec.rb @@ -24,40 +24,31 @@ context 'Elasticsearch client' do let(:logger) { Logger.new($stderr) } - let(:client) do - Elasticsearch::Client.new( - host: ELASTICSEARCH_URL, - logger: logger, - user: 'elastic', - password: 'changeme' - ) - end - context 'Integrates with elasticsearch API' do it 'should perform the API methods' do expect do # Index a document - client.index(index: 'test-index', id: '1', body: { title: 'Test' }) + CLIENT.index(index: 'test-index', id: '1', body: { title: 'Test' }) # Refresh the index - client.indices.refresh(index: 'test-index') + CLIENT.indices.refresh(index: 'test-index') # Search - response = client.search(index: 'test-index', body: { query: { match: { title: 'test' } } }) + response = CLIENT.search(index: 'test-index', body: { query: { match: { title: 'test' } } }) expect(response['hits']['total']['value']).to eq 1 expect(response['hits']['hits'][0]['_source']['title']).to eq 'Test' # Delete the index - client.indices.delete(index: 'test-index') + CLIENT.indices.delete(index: 'test-index') end.not_to raise_error end end context 'Reports the right meta header' do it 'Reports es service name and gem version' do - headers = client.transport.connections.first.connection.headers - version = Class.new.extend(Elastic::Transport::MetaHeader).send(:client_meta_version, Elasticsearch::VERSION) + headers = CLIENT.transport.connections.first.connection.headers + version = Class.new.extend(Elastic::Transport::MetaHeader).send(:CLIENT_meta_version, Elasticsearch::VERSION) expect(headers['x-elastic-client-meta']).to match /^es=#{version}/ end end diff --git a/elasticsearch/spec/integration/opentelemetry_spec.rb b/elasticsearch/spec/integration/opentelemetry_spec.rb index 55c423b780..1c0611feea 100644 --- a/elasticsearch/spec/integration/opentelemetry_spec.rb +++ b/elasticsearch/spec/integration/opentelemetry_spec.rb @@ -27,26 +27,18 @@ after { exporter.reset } let(:span) { exporter.finished_spans[0] } - let(:client) do - Elasticsearch::Client.new( - host: ELASTICSEARCH_URL, - user: 'elastic', - password: 'changeme' - ) - end - after do - client.delete(index: 'myindex', id: 1); rescue + CLIENT.delete(index: 'myindex', id: 1); rescue end context 'when a request is instrumented' do it 'sets the span name to the endpoint id' do - client.search(body: { query: { match: { a: 1 } } }) + CLIENT.search(body: { query: { match: { a: 1 } } }) expect(span.name).to eq 'search' end it 'sets the path parts' do - client.index(index: 'myindex', id: 1, body: { title: 'Test' }) + CLIENT.index(index: 'myindex', id: 1, body: { title: 'Test' }) expect(span.attributes['db.elasticsearch.path_parts.index']).to eq 'myindex' expect(span.attributes['db.elasticsearch.path_parts.id']).to eq 1 end diff --git a/elasticsearch/spec/spec_helper.rb b/elasticsearch/spec/spec_helper.rb index 4a505c68ff..d7c4ecfbce 100644 --- a/elasticsearch/spec/spec_helper.rb +++ b/elasticsearch/spec/spec_helper.rb @@ -16,6 +16,7 @@ # under the License. require 'elasticsearch' +require 'openssl' require 'rspec' RSpec.configure do |config| @@ -41,3 +42,18 @@ def jruby? c.add_span_processor span_processor end end + +CERTS_PATH = File.expand_path('../../.buildkite/certs', __dir__) +host = ENV['TEST_ES_SERVER'] || 'http://localhost:9200' +raise URI::InvalidURIError unless host =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/ + +password = ENV['ELASTIC_PASSWORD'] || 'changeme' +HOST_URI = URI.parse(host) +raw_certificate = File.read("#{CERTS_PATH}/testnode.crt") +certificate = OpenSSL::X509::Certificate.new(raw_certificate) +raw_key = File.read("#{CERTS_PATH}/testnode.key") +key = OpenSSL::PKey::RSA.new(raw_key) +ca_file = File.expand_path("#{CERTS_PATH}/ca.crt") +TRANSPORT_OPTIONS = { ssl: { verify: false, client_cert: certificate, client_key: key, ca_file: ca_file } } +HOST = "https://elastic:#{password}@#{HOST_URI.host}:#{HOST_URI.port}" +CLIENT = Elasticsearch::Client.new(host: HOST, transport_options: TRANSPORT_OPTIONS) From a445ba4860efcda32aeb3c2266500e0834c87d05 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 24 Jan 2025 14:29:57 +0000 Subject: [PATCH 455/540] Updates elasticsearch helper integration tests --- .../integration/client_integration_spec.rb | 2 +- .../integration/helpers/bulk_helper_spec.rb | 40 +++++++------- .../integration/helpers/esql_helper_spec.rb | 55 +++++++++++-------- .../helpers/helpers_spec_helper.rb | 29 ---------- .../integration/helpers/scroll_helper_spec.rb | 10 ++-- 5 files changed, 57 insertions(+), 79 deletions(-) delete mode 100644 elasticsearch/spec/integration/helpers/helpers_spec_helper.rb diff --git a/elasticsearch/spec/integration/client_integration_spec.rb b/elasticsearch/spec/integration/client_integration_spec.rb index 7f70377486..967ae0616d 100644 --- a/elasticsearch/spec/integration/client_integration_spec.rb +++ b/elasticsearch/spec/integration/client_integration_spec.rb @@ -48,7 +48,7 @@ context 'Reports the right meta header' do it 'Reports es service name and gem version' do headers = CLIENT.transport.connections.first.connection.headers - version = Class.new.extend(Elastic::Transport::MetaHeader).send(:CLIENT_meta_version, Elasticsearch::VERSION) + version = Class.new.extend(Elastic::Transport::MetaHeader).send(:client_meta_version, Elasticsearch::VERSION) expect(headers['x-elastic-client-meta']).to match /^es=#{version}/ end end diff --git a/elasticsearch/spec/integration/helpers/bulk_helper_spec.rb b/elasticsearch/spec/integration/helpers/bulk_helper_spec.rb index 31da9a0b84..1633a12ce2 100644 --- a/elasticsearch/spec/integration/helpers/bulk_helper_spec.rb +++ b/elasticsearch/spec/integration/helpers/bulk_helper_spec.rb @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -require_relative 'helpers_spec_helper' +require_relative File.expand_path('../../spec_helper', __dir__) require 'elasticsearch/helpers/bulk_helper' require 'tempfile' @@ -23,25 +23,25 @@ let(:index) { 'bulk_animals' } let(:index_slice) { 'bulk_animals_slice' } let(:params) { { refresh: 'wait_for' } } - let(:bulk_helper) { Elasticsearch::Helpers::BulkHelper.new(client, index, params) } + let(:bulk_helper) { Elasticsearch::Helpers::BulkHelper.new(CLIENT, index, params) } let(:docs) do [ - { scientific_name: 'Lama guanicoe', name:'Guanaco' }, - { scientific_name: 'Tayassu pecari', name:'White-lipped peccary' }, - { scientific_name: 'Snycerus caffer', name:'Buffalo, african' }, - { scientific_name: 'Coluber constrictor', name:'Snake, racer' }, - { scientific_name: 'Thalasseus maximus', name:'Royal tern' }, - { scientific_name: 'Centrocercus urophasianus', name:'Hen, sage' }, - { scientific_name: 'Sitta canadensis', name:'Nuthatch, red-breasted' }, - { scientific_name: 'Aegypius tracheliotus', name:'Vulture, lappet-faced' }, - { scientific_name: 'Bucephala clangula', name:'Common goldeneye' }, - { scientific_name: 'Felis pardalis', name:'Ocelot' } + { scientific_name: 'Lama guanicoe', name: 'Guanaco' }, + { scientific_name: 'Tayassu pecari', name: 'White-lipped peccary' }, + { scientific_name: 'Snycerus caffer', name: 'Buffalo, african' }, + { scientific_name: 'Coluber constrictor', name: 'Snake, racer' }, + { scientific_name: 'Thalasseus maximus', name: 'Royal tern' }, + { scientific_name: 'Centrocercus urophasianus', name: 'Hen, sage' }, + { scientific_name: 'Sitta canadensis', name: 'Nuthatch, red-breasted' }, + { scientific_name: 'Aegypius tracheliotus', name: 'Vulture, lappet-faced' }, + { scientific_name: 'Bucephala clangula', name: 'Common goldeneye' }, + { scientific_name: 'Felis pardalis', name: 'Ocelot' } ] end after do - client.indices.delete(index: index, ignore: 404) - client.indices.delete(index: index_slice, ignore: 404) + CLIENT.indices.delete(index: index, ignore: 404) + CLIENT.indices.delete(index: index_slice, ignore: 404) end it 'Ingests documents' do @@ -58,9 +58,9 @@ ] bulk_helper.ingest(docs) # Get the ingested documents, add id and modify them to update them: - animals = client.search(index: index)['hits']['hits'] + animals = CLIENT.search(index: index)['hits']['hits'] # Add id to each doc - docs = animals.map { |animal| animal['_source'].merge({'id' => animal['_id'] }) } + docs = animals.map { |animal| animal['_source'].merge({ 'id' => animal['_id'] }) } docs.map { |doc| doc['scientific_name'].upcase! } response = bulk_helper.update(docs) expect(response.status).to eq(200) @@ -73,17 +73,17 @@ response = bulk_helper.delete(ids) expect(response.status).to eq 200 expect(response['items'].map { |item| item['delete']['result'] }.uniq.first).to eq('deleted') - expect(client.count(index: index)['count']).to eq(0) + expect(CLIENT.count(index: index)['count']).to eq(0) end it 'Ingests documents and yields response and docs' do slice = 2 - bulk_helper = Elasticsearch::Helpers::BulkHelper.new(client, index_slice, params) - response = bulk_helper.ingest(docs, {slice: slice}) do |response, docs| + bulk_helper = Elasticsearch::Helpers::BulkHelper.new(CLIENT, index_slice, params) + bulk_helper.ingest(docs, { slice: slice }) do |response, docs| expect(response).to be_an_instance_of Elasticsearch::API::Response expect(docs.count).to eq slice end - response = client.search(index: index_slice, size: 200) + response = CLIENT.search(index: index_slice, size: 200) expect(response['hits']['hits'].map { |a| a['_source'].transform_keys(&:to_sym) }).to eq docs end diff --git a/elasticsearch/spec/integration/helpers/esql_helper_spec.rb b/elasticsearch/spec/integration/helpers/esql_helper_spec.rb index 12122c7157..ed8dde04ba 100644 --- a/elasticsearch/spec/integration/helpers/esql_helper_spec.rb +++ b/elasticsearch/spec/integration/helpers/esql_helper_spec.rb @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -require_relative 'helpers_spec_helper' +require_relative File.expand_path('../../spec_helper', __dir__) require 'elasticsearch/helpers/esql_helper' require 'ipaddr' @@ -24,13 +24,13 @@ let(:esql_helper) { Elasticsearch::Helpers::ESQLHelper } let(:query) do <<~ESQL - FROM #{index} - | EVAL duration_ms = ROUND(event.duration / 1000000.0, 1) + FROM #{index} + | EVAL duration_ms = ROUND(event.duration / 1000000.0, 1) ESQL end before do - client.indices.create( + CLIENT.indices.create( index: index, body: { mappings: { @@ -38,34 +38,41 @@ } } ) - client.bulk( + CLIENT.bulk( index: index, body: [ - {'index': {}}, - {'@timestamp' => '2023-10-23T12:15:03.360Z', 'client.ip' => '172.21.2.162', message: 'Connected to 10.1.0.3', 'event.duration' => 3450233}, - {'index': {}}, - {'@timestamp' => '2023-10-23T12:27:28.948Z', 'client.ip' => '172.21.2.113', message: 'Connected to 10.1.0.2', 'event.duration' => 2764889}, - {'index': {}}, - {'@timestamp' => '2023-10-23T13:33:34.937Z', 'client.ip' => '172.21.0.5', message: 'Disconnected', 'event.duration' => 1232382}, - {'index': {}}, - {'@timestamp' => '2023-10-23T13:51:54.732Z', 'client.ip' => '172.21.3.15', message: 'Connection error', 'event.duration' => 725448}, - {'index': {}}, - {'@timestamp' => '2023-10-23T13:52:55.015Z', 'client.ip' => '172.21.3.15', message: 'Connection error', 'event.duration' => 8268153}, - {'index': {}}, - {'@timestamp' => '2023-10-23T13:53:55.832Z', 'client.ip' => '172.21.3.15', message: 'Connection error', 'event.duration' => 5033755}, - {'index': {}}, - {'@timestamp' => '2023-10-23T13:55:01.543Z', 'client.ip' => '172.21.3.15', message: 'Connected to 10.1.0.1', 'event.duration' => 1756467} + { 'index': {} }, + { '@timestamp' => '2023-10-23T12:15:03.360Z', 'client.ip' => '172.21.2.162', message: 'Connected to 10.1.0.3', + 'event.duration' => 3_450_233 }, + { 'index': {} }, + { '@timestamp' => '2023-10-23T12:27:28.948Z', 'client.ip' => '172.21.2.113', message: 'Connected to 10.1.0.2', + 'event.duration' => 2_764_889 }, + { 'index': {} }, + { '@timestamp' => '2023-10-23T13:33:34.937Z', 'client.ip' => '172.21.0.5', message: 'Disconnected', + 'event.duration' => 1_232_382 }, + { 'index': {} }, + { '@timestamp' => '2023-10-23T13:51:54.732Z', 'client.ip' => '172.21.3.15', message: 'Connection error', + 'event.duration' => 725_448 }, + { 'index': {} }, + { '@timestamp' => '2023-10-23T13:52:55.015Z', 'client.ip' => '172.21.3.15', message: 'Connection error', + 'event.duration' => 8_268_153 }, + { 'index': {} }, + { '@timestamp' => '2023-10-23T13:53:55.832Z', 'client.ip' => '172.21.3.15', message: 'Connection error', + 'event.duration' => 5_033_755 }, + { 'index': {} }, + { '@timestamp' => '2023-10-23T13:55:01.543Z', 'client.ip' => '172.21.3.15', message: 'Connected to 10.1.0.1', + 'event.duration' => 1_756_467 } ], refresh: true ) end after do - client.indices.delete(index: index) + CLIENT.indices.delete(index: index) end it 'returns an ESQL response as a relational key/value object' do - response = esql_helper.query(client, query) + response = esql_helper.query(CLIENT, query) expect(response.count).to eq 7 expect(response.first.keys).to eq ['duration_ms', 'message', 'event.duration', 'client.ip', '@timestamp'] response.each do |r| @@ -82,7 +89,7 @@ 'client.ip' => Proc.new { |i| IPAddr.new(i) }, 'event.duration' => Proc.new { |d| d.to_s } } - response = esql_helper.query(client, query, parser: parser) + response = esql_helper.query(CLIENT, query, parser: parser) response.each do |r| expect(r['@timestamp']).to be_a DateTime expect(r['client.ip']).to be_a IPAddr @@ -92,7 +99,7 @@ end it 'parser does not error when value is nil, leaves nil' do - client.index( + CLIENT.index( index: index, body: { '@timestamp' => nil, @@ -107,7 +114,7 @@ 'client.ip' => Proc.new { |i| IPAddr.new(i) }, 'event.duration' => Proc.new { |d| d.to_s } } - response = esql_helper.query(client, query, parser: parser) + response = esql_helper.query(CLIENT, query, parser: parser) response.each do |r| expect [DateTime, NilClass].include?(r['@timestamp'].class) expect [IPAddr, NilClass].include?(r['client.ip'].class) diff --git a/elasticsearch/spec/integration/helpers/helpers_spec_helper.rb b/elasticsearch/spec/integration/helpers/helpers_spec_helper.rb deleted file mode 100644 index 1c9b5de18c..0000000000 --- a/elasticsearch/spec/integration/helpers/helpers_spec_helper.rb +++ /dev/null @@ -1,29 +0,0 @@ -# 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. - -require 'spec_helper' - -ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}" -raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/ - -def client - @client ||= Elasticsearch::Client.new( - host: ELASTICSEARCH_URL, - user: 'elastic', - password: 'changeme' - ) -end diff --git a/elasticsearch/spec/integration/helpers/scroll_helper_spec.rb b/elasticsearch/spec/integration/helpers/scroll_helper_spec.rb index ec59731b54..7407480f06 100644 --- a/elasticsearch/spec/integration/helpers/scroll_helper_spec.rb +++ b/elasticsearch/spec/integration/helpers/scroll_helper_spec.rb @@ -14,14 +14,14 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -require_relative 'helpers_spec_helper' +require_relative File.expand_path('../../spec_helper', __dir__) require 'elasticsearch/helpers/scroll_helper' context 'Elasticsearch client helpers' do context 'ScrollHelper' do let(:index) { 'books' } let(:body) { { size: 12, query: { match_all: {} } } } - let(:scroll_helper) { Elasticsearch::Helpers::ScrollHelper.new(client, index, body) } + let(:scroll_helper) { Elasticsearch::Helpers::ScrollHelper.new(CLIENT, index, body) } before do documents = [ @@ -50,11 +50,11 @@ { index: { _index: index, data: {name: "The Left Hand of Darkness", "author": "Ursula K. Le Guin", "release_date": "1969-06-01", "page_count": 304} } }, { index: { _index: index, data: {name: "The Moon is a Harsh Mistress", "author": "Robert A. Heinlein", "release_date": "1966-04-01", "page_count": 288 } } } ] - client.bulk(body: documents, refresh: 'wait_for') + CLIENT.bulk(body: documents, refresh: 'wait_for') end after do - client.indices.delete(index: index) + CLIENT.indices.delete(index: index) end it 'instantiates a scroll helper' do @@ -63,7 +63,7 @@ it 'searches an index' do my_documents = [] - while !(documents = scroll_helper.results).empty? + until (documents = scroll_helper.results).empty? my_documents << documents end From b116e616ff8d578f3d500332a451713a47332695 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 24 Jan 2025 14:57:21 +0000 Subject: [PATCH 456/540] [CI] Updates otel testing --- .github/workflows/otel.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/otel.yml b/.github/workflows/otel.yml index 394bfd0399..fd17c34acb 100644 --- a/.github/workflows/otel.yml +++ b/.github/workflows/otel.yml @@ -29,7 +29,6 @@ jobs: - uses: elastic/elastic-github-actions/elasticsearch@master with: stack-version: 9.0.0-SNAPSHOT - security-enabled: false - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} From 85e17d2dee0ba1ac3a9717449d8a53f693efcd59 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 17 Feb 2025 15:32:16 +0000 Subject: [PATCH 457/540] Migrates enrich tests to RSpec Migrates eql tests to rspec Migrates graph tests to RSpec Migrates more ilm tests to RSpec Migrates more indices tests to RSpec Migrates knn_search test to RSpec Migrates license tests to RSpec Migrates logstash tests to RSpec Migrates ML test to RSpec Migrates migration deprecations test to RSpec Migrates info tests to RSpec Migrates rollup tests to RSpec Migrates ssl tests to RSpec Migrates transform tests to RSpec Migrates usage tests to RSpec --- .../unit/actions/enrich/delete_policy_spec.rb | 35 ++++++++++++++++++ .../actions/enrich/execute_policy_spec.rb | 35 ++++++++++++++++++ .../unit/actions/enrich/get_policy_spec.rb | 35 ++++++++++++++++++ .../unit/actions/enrich/put_policy_spec.rb | 35 ++++++++++++++++++ .../spec/unit/actions/enrich/stats_spec.rb | 35 ++++++++++++++++++ .../spec/unit/actions/eql/delete_spec.rb | 35 ++++++++++++++++++ .../spec/unit/actions/eql/get_spec.rb | 35 ++++++++++++++++++ .../spec/unit/actions/eql/get_status_spec.rb | 35 ++++++++++++++++++ .../spec/unit/actions/eql/search_spec.rb | 35 ++++++++++++++++++ .../spec/unit/actions/graph/explore_spec.rb | 35 ++++++++++++++++++ .../explain_spec.rb | 37 +++++++++++++++++++ .../get_status_spec.rb | 37 +++++++++++++++++++ .../move_to_step_spec.rb | 37 +++++++++++++++++++ .../remove_policy_spec.rb | 37 +++++++++++++++++++ .../retry_policy_spec.rb | 37 +++++++++++++++++++ .../index_lifecycle_management/start_spec.rb | 37 +++++++++++++++++++ .../index_lifecycle_management/stop_spec.rb | 37 +++++++++++++++++++ .../indices/create_data_stream_spec.rb | 37 +++++++++++++++++++ .../indices/delete_data_stream_spec.rb | 37 +++++++++++++++++++ .../unit/actions/indices/downsample_spec.rb | 37 +++++++++++++++++++ .../actions/indices/get_data_stream_spec.rb | 37 +++++++++++++++++++ .../indices/migrate_to_data_stream_spec.rb | 37 +++++++++++++++++++ .../indices/modify_data_stream_spec.rb | 37 +++++++++++++++++++ .../indices/promote_data_stream_spec.rb | 37 +++++++++++++++++++ .../spec/unit/actions/info_spec.rb | 13 +++---- .../spec/unit/actions/knn_search_spec.rb | 35 ++++++++++++++++++ .../spec/unit/actions/license/delete_spec.rb | 35 ++++++++++++++++++ .../spec/unit/actions/license/get_spec.rb | 35 ++++++++++++++++++ .../spec/unit/actions/license/post_spec.rb | 35 ++++++++++++++++++ .../actions/logstash/delete_pipeline_spec.rb | 35 ++++++++++++++++++ .../actions/logstash/get_pipeline_spec.rb | 35 ++++++++++++++++++ .../actions/logstash/put_pipeline_spec.rb | 35 ++++++++++++++++++ ...ear_trained_model_deployment_cache_spec.rb | 35 ++++++++++++++++++ .../actions/migration/deprecation_spec.rb | 35 ++++++++++++++++++ .../rollup/get_rollup_index_caps_spec.rb | 35 ++++++++++++++++++ .../unit/actions/ssl/certificates_spec.rb | 35 ++++++++++++++++++ .../actions/transform/reset_transform_spec.rb | 36 ++++++++++++++++++ .../transform/upgrade_transforms_spec.rb | 35 ++++++++++++++++++ .../spec/unit/actions/xpack/usage_spec.rb | 35 ++++++++++++++++++ 39 files changed, 1365 insertions(+), 7 deletions(-) create mode 100644 elasticsearch-api/spec/unit/actions/enrich/delete_policy_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/enrich/execute_policy_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/enrich/get_policy_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/enrich/put_policy_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/enrich/stats_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/eql/delete_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/eql/get_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/eql/get_status_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/eql/search_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/graph/explore_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/index_lifecycle_management/explain_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/index_lifecycle_management/get_status_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/index_lifecycle_management/move_to_step_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/index_lifecycle_management/remove_policy_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/index_lifecycle_management/retry_policy_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/index_lifecycle_management/start_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/index_lifecycle_management/stop_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/indices/create_data_stream_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/indices/delete_data_stream_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/indices/downsample_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/indices/get_data_stream_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/indices/migrate_to_data_stream_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/indices/modify_data_stream_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/indices/promote_data_stream_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/knn_search_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/license/delete_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/license/get_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/license/post_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/logstash/delete_pipeline_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/logstash/get_pipeline_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/logstash/put_pipeline_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/machine_learning/clear_trained_model_deployment_cache_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/migration/deprecation_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/rollup/get_rollup_index_caps_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/ssl/certificates_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/transform/reset_transform_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/transform/upgrade_transforms_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/xpack/usage_spec.rb diff --git a/elasticsearch-api/spec/unit/actions/enrich/delete_policy_spec.rb b/elasticsearch-api/spec/unit/actions/enrich/delete_policy_spec.rb new file mode 100644 index 0000000000..e240b3217c --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/enrich/delete_policy_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#enrich.delete_policy' do + let(:expected_args) do + [ + 'DELETE', + '_enrich/policy/foo', + {}, + nil, + {}, + { defined_params: { name: 'foo' }, endpoint: 'enrich.delete_policy' } + ] + end + + it 'performs the request' do + expect(client_double.enrich.delete_policy(name: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/enrich/execute_policy_spec.rb b/elasticsearch-api/spec/unit/actions/enrich/execute_policy_spec.rb new file mode 100644 index 0000000000..1798a486f7 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/enrich/execute_policy_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#enrich.delete_policy' do + let(:expected_args) do + [ + 'PUT', + '_enrich/policy/foo/_execute', + {}, + nil, + {}, + { defined_params: { name: 'foo' }, endpoint: 'enrich.execute_policy' } + ] + end + + it 'performs the request' do + expect(client_double.enrich.execute_policy(name: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/enrich/get_policy_spec.rb b/elasticsearch-api/spec/unit/actions/enrich/get_policy_spec.rb new file mode 100644 index 0000000000..7a84856c2e --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/enrich/get_policy_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#enrich.delete_policy' do + let(:expected_args) do + [ + 'GET', + '_enrich/policy/foo', + {}, + nil, + {}, + { defined_params: { name: 'foo' }, endpoint: 'enrich.get_policy' } + ] + end + + it 'performs the request' do + expect(client_double.enrich.get_policy(name: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/enrich/put_policy_spec.rb b/elasticsearch-api/spec/unit/actions/enrich/put_policy_spec.rb new file mode 100644 index 0000000000..6291cf4392 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/enrich/put_policy_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#enrich.delete_policy' do + let(:expected_args) do + [ + 'PUT', + '_enrich/policy/foo', + {}, + {}, + {}, + { defined_params: { name: 'foo' }, endpoint: 'enrich.put_policy' } + ] + end + + it 'performs the request' do + expect(client_double.enrich.put_policy(body: {}, name: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/enrich/stats_spec.rb b/elasticsearch-api/spec/unit/actions/enrich/stats_spec.rb new file mode 100644 index 0000000000..2963d4790c --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/enrich/stats_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#enrich.delete_policy' do + let(:expected_args) do + [ + 'GET', + '_enrich/_stats', + {}, + nil, + {}, + { endpoint: 'enrich.stats' } + ] + end + + it 'performs the request' do + expect(client_double.enrich.stats).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/eql/delete_spec.rb b/elasticsearch-api/spec/unit/actions/eql/delete_spec.rb new file mode 100644 index 0000000000..8b070d8221 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/eql/delete_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#eql.search' do + let(:expected_args) do + [ + 'DELETE', + '_eql/search/foo', + {}, + nil, + {}, + { defined_params: { id: 'foo' }, endpoint: 'eql.delete' } + ] + end + + it 'performs the request' do + expect(client_double.eql.delete(id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/eql/get_spec.rb b/elasticsearch-api/spec/unit/actions/eql/get_spec.rb new file mode 100644 index 0000000000..4c8cc6dac0 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/eql/get_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#eql.search' do + let(:expected_args) do + [ + 'GET', + '_eql/search/foo', + {}, + nil, + {}, + { defined_params: { id: 'foo' }, endpoint: 'eql.get' } + ] + end + + it 'performs the request' do + expect(client_double.eql.get(id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/eql/get_status_spec.rb b/elasticsearch-api/spec/unit/actions/eql/get_status_spec.rb new file mode 100644 index 0000000000..6a7f53533b --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/eql/get_status_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#eql.search' do + let(:expected_args) do + [ + 'GET', + '_eql/search/status/foo', + {}, + nil, + {}, + { defined_params: { id: 'foo' }, endpoint: 'eql.get_status' } + ] + end + + it 'performs the request' do + expect(client_double.eql.get_status(id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/eql/search_spec.rb b/elasticsearch-api/spec/unit/actions/eql/search_spec.rb new file mode 100644 index 0000000000..6364838f38 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/eql/search_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#eql.search' do + let(:expected_args) do + [ + 'POST', + 'foo/_eql/search', + {}, + {}, + {}, + { defined_params: { index: 'foo' }, endpoint: 'eql.search' } + ] + end + + it 'performs the request' do + expect(client_double.eql.search(index: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/graph/explore_spec.rb b/elasticsearch-api/spec/unit/actions/graph/explore_spec.rb new file mode 100644 index 0000000000..7415a7b4ab --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/graph/explore_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#eql.search' do + let(:expected_args) do + [ + 'GET', + 'foo/_graph/explore', + {}, + nil, + {}, + { defined_params: { index: 'foo' }, endpoint: 'graph.explore' } + ] + end + + it 'performs the request' do + expect(client_double.graph.explore(index: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/index_lifecycle_management/explain_spec.rb b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/explain_spec.rb new file mode 100644 index 0000000000..9f6bc2218f --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/explain_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.index_lifecycle_management#explain' do + let(:expected_args) do + [ + 'GET', + 'foo/_ilm/explain', + {}, + nil, + {}, + { defined_params: { index: 'foo' }, endpoint: 'ilm.explain_lifecycle' } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.index_lifecycle_management.explain_lifecycle(index: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/index_lifecycle_management/get_status_spec.rb b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/get_status_spec.rb new file mode 100644 index 0000000000..fd72263150 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/get_status_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.index_lifecycle_management#get_status' do + let(:expected_args) do + [ + 'GET', + '_ilm/status', + {}, + nil, + {}, + { endpoint: 'ilm.get_status' } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.index_lifecycle_management.get_status(index: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/index_lifecycle_management/move_to_step_spec.rb b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/move_to_step_spec.rb new file mode 100644 index 0000000000..35de205b91 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/move_to_step_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.index_lifecycle_management#move_to_step' do + let(:expected_args) do + [ + 'POST', + '_ilm/move/foo', + {}, + nil, + {}, + { defined_params: { index: 'foo' }, endpoint: 'ilm.move_to_step' } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.index_lifecycle_management.move_to_step(index: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/index_lifecycle_management/remove_policy_spec.rb b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/remove_policy_spec.rb new file mode 100644 index 0000000000..900db9b56d --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/remove_policy_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.index_lifecycle_management#remove_policy' do + let(:expected_args) do + [ + 'POST', + 'foo/_ilm/remove', + {}, + nil, + {}, + { defined_params: { index: 'foo' }, endpoint: 'ilm.remove_policy' } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.index_lifecycle_management.remove_policy(index: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/index_lifecycle_management/retry_policy_spec.rb b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/retry_policy_spec.rb new file mode 100644 index 0000000000..979cadb1ef --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/retry_policy_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.index_lifecycle_management#retry' do + let(:expected_args) do + [ + 'POST', + 'foo/_ilm/retry', + {}, + nil, + {}, + { defined_params: { index: 'foo' }, endpoint: 'ilm.retry' } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.index_lifecycle_management.retry(index: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/index_lifecycle_management/start_spec.rb b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/start_spec.rb new file mode 100644 index 0000000000..7c98f25335 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/start_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.index_lifecycle_management#start' do + let(:expected_args) do + [ + 'POST', + '_ilm/start', + {}, + nil, + {}, + { endpoint: 'ilm.start' } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.index_lifecycle_management.start).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/index_lifecycle_management/stop_spec.rb b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/stop_spec.rb new file mode 100644 index 0000000000..f64441ea00 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/index_lifecycle_management/stop_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.index_lifecycle_management#stop' do + let(:expected_args) do + [ + 'POST', + '_ilm/stop', + {}, + nil, + {}, + { endpoint: 'ilm.stop' } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.index_lifecycle_management.stop).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/indices/create_data_stream_spec.rb b/elasticsearch-api/spec/unit/actions/indices/create_data_stream_spec.rb new file mode 100644 index 0000000000..0297c8f4e5 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/indices/create_data_stream_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.indices.create_data_stream' do + let(:expected_args) do + [ + 'PUT', + '_data_stream/foo', + {}, + nil, + {}, + { endpoint: 'indices.create_data_stream', defined_params: { name: 'foo' } } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.indices.create_data_stream(name: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/indices/delete_data_stream_spec.rb b/elasticsearch-api/spec/unit/actions/indices/delete_data_stream_spec.rb new file mode 100644 index 0000000000..f354681fa3 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/indices/delete_data_stream_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.indices.delete_data_stream' do + let(:expected_args) do + [ + 'DELETE', + '_data_stream/foo', + {}, + nil, + {}, + { endpoint: 'indices.delete_data_stream', defined_params: { name: 'foo' } } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.indices.delete_data_stream(name: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/indices/downsample_spec.rb b/elasticsearch-api/spec/unit/actions/indices/downsample_spec.rb new file mode 100644 index 0000000000..a6a71e4aaa --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/indices/downsample_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.indices.downsample' do + let(:expected_args) do + [ + 'POST', + 'foo/_downsample/bar', + {}, + {}, + {}, + { endpoint: 'indices.downsample', defined_params: { index: 'foo', target_index: 'bar' } } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.indices.downsample(body: {}, index: 'foo', target_index: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/indices/get_data_stream_spec.rb b/elasticsearch-api/spec/unit/actions/indices/get_data_stream_spec.rb new file mode 100644 index 0000000000..487fe693ee --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/indices/get_data_stream_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.indices.get_data_stream' do + let(:expected_args) do + [ + 'GET', + '_data_stream', + {}, + nil, + {}, + { endpoint: 'indices.get_data_stream' } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.indices.get_data_stream).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/indices/migrate_to_data_stream_spec.rb b/elasticsearch-api/spec/unit/actions/indices/migrate_to_data_stream_spec.rb new file mode 100644 index 0000000000..a009ec4545 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/indices/migrate_to_data_stream_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.indices.migrate_to_data_stream' do + let(:expected_args) do + [ + 'POST', + '_data_stream/_migrate/foo', + {}, + nil, + {}, + { endpoint: 'indices.migrate_to_data_stream', defined_params: { name: 'foo' } } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.indices.migrate_to_data_stream(name: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/indices/modify_data_stream_spec.rb b/elasticsearch-api/spec/unit/actions/indices/modify_data_stream_spec.rb new file mode 100644 index 0000000000..107e01eb01 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/indices/modify_data_stream_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.indices.modify_data_stream' do + let(:expected_args) do + [ + 'POST', + '_data_stream/_modify', + {}, + {}, + {}, + { endpoint: 'indices.modify_data_stream' } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.indices.modify_data_stream(body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/indices/promote_data_stream_spec.rb b/elasticsearch-api/spec/unit/actions/indices/promote_data_stream_spec.rb new file mode 100644 index 0000000000..ec2b2ca08b --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/indices/promote_data_stream_spec.rb @@ -0,0 +1,37 @@ +# 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. + +require 'spec_helper' + +describe 'client.indices.promote_data_stream' do + let(:expected_args) do + [ + 'POST', + '_data_stream/_promote/foo', + {}, + nil, + {}, + { endpoint: 'indices.promote_data_stream', defined_params: { name: 'foo' } } + ] + end + + let(:index) { 'foo' } + + it 'performs the request' do + expect(client_double.indices.promote_data_stream(name: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/info_spec.rb b/elasticsearch-api/spec/unit/actions/info_spec.rb index 881496a083..8a26056683 100644 --- a/elasticsearch-api/spec/unit/actions/info_spec.rb +++ b/elasticsearch-api/spec/unit/actions/info_spec.rb @@ -18,15 +18,14 @@ require 'spec_helper' describe 'client#info' do - let(:expected_args) do [ - 'GET', - '', - { }, - nil, - {}, - { endpoint: 'info' } + 'GET', + '', + { }, + nil, + {}, + { endpoint: 'info' } ] end diff --git a/elasticsearch-api/spec/unit/actions/knn_search_spec.rb b/elasticsearch-api/spec/unit/actions/knn_search_spec.rb new file mode 100644 index 0000000000..2400b84238 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/knn_search_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#knn_search' do + let(:expected_args) do + [ + 'GET', + 'foo/_knn_search', + { }, + nil, + {}, + { endpoint: 'knn_search', defined_params: { index: 'foo' } } + ] + end + + it 'performs the request' do + expect(client_double.knn_search(index: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/license/delete_spec.rb b/elasticsearch-api/spec/unit/actions/license/delete_spec.rb new file mode 100644 index 0000000000..01d90496b4 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/license/delete_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#license.delete' do + let(:expected_args) do + [ + 'DELETE', + '_license', + { }, + nil, + {}, + { endpoint: 'license.delete' } + ] + end + + it 'performs the request' do + expect(client_double.license.delete).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/license/get_spec.rb b/elasticsearch-api/spec/unit/actions/license/get_spec.rb new file mode 100644 index 0000000000..00727f86d3 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/license/get_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#license.get' do + let(:expected_args) do + [ + 'GET', + '_license', + { }, + nil, + {}, + { endpoint: 'license.get' } + ] + end + + it 'performs the request' do + expect(client_double.license.get).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/license/post_spec.rb b/elasticsearch-api/spec/unit/actions/license/post_spec.rb new file mode 100644 index 0000000000..7805b8824b --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/license/post_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#license.post' do + let(:expected_args) do + [ + 'PUT', + '_license', + { }, + nil, + {}, + { endpoint: 'license.post' } + ] + end + + it 'performs the request' do + expect(client_double.license.post).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/logstash/delete_pipeline_spec.rb b/elasticsearch-api/spec/unit/actions/logstash/delete_pipeline_spec.rb new file mode 100644 index 0000000000..00e18b7740 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/logstash/delete_pipeline_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#logstash.delete_pipeline' do + let(:expected_args) do + [ + 'DELETE', + '_logstash/pipeline/foo', + {}, + nil, + {}, + { endpoint: 'logstash.delete_pipeline', defined_params: { id: 'foo' } } + ] + end + + it 'performs the request' do + expect(client_double.logstash.delete_pipeline(id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/logstash/get_pipeline_spec.rb b/elasticsearch-api/spec/unit/actions/logstash/get_pipeline_spec.rb new file mode 100644 index 0000000000..85f7e7fdf7 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/logstash/get_pipeline_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#logstash.get_pipeline' do + let(:expected_args) do + [ + 'GET', + '_logstash/pipeline/foo', + {}, + nil, + {}, + { endpoint: 'logstash.get_pipeline', defined_params: { id: 'foo' } } + ] + end + + it 'performs the request' do + expect(client_double.logstash.get_pipeline(id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/logstash/put_pipeline_spec.rb b/elasticsearch-api/spec/unit/actions/logstash/put_pipeline_spec.rb new file mode 100644 index 0000000000..5f6aaf50f9 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/logstash/put_pipeline_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#logstash.put_pipeline' do + let(:expected_args) do + [ + 'PUT', + '_logstash/pipeline/foo', + {}, + {}, + {}, + { endpoint: 'logstash.put_pipeline', defined_params: { id: 'foo' } } + ] + end + + it 'performs the request' do + expect(client_double.logstash.put_pipeline(body: {}, id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/machine_learning/clear_trained_model_deployment_cache_spec.rb b/elasticsearch-api/spec/unit/actions/machine_learning/clear_trained_model_deployment_cache_spec.rb new file mode 100644 index 0000000000..48031ad8a4 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/machine_learning/clear_trained_model_deployment_cache_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#ml.clear_trained_model_deployment_cache' do + let(:expected_args) do + [ + 'POST', + '_ml/trained_models/foo/deployment/cache/_clear', + {}, + nil, + {}, + { endpoint: 'ml.clear_trained_model_deployment_cache', defined_params: { model_id: 'foo' } } + ] + end + + it 'performs the request' do + expect(client_double.ml.clear_trained_model_deployment_cache(model_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/migration/deprecation_spec.rb b/elasticsearch-api/spec/unit/actions/migration/deprecation_spec.rb new file mode 100644 index 0000000000..e636f904c2 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/migration/deprecation_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#migration.deprecations' do + let(:expected_args) do + [ + 'GET', + '_migration/deprecations', + {}, + nil, + {}, + { endpoint: 'migration.deprecations' } + ] + end + + it 'performs the request' do + expect(client_double.migration.deprecations).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/rollup/get_rollup_index_caps_spec.rb b/elasticsearch-api/spec/unit/actions/rollup/get_rollup_index_caps_spec.rb new file mode 100644 index 0000000000..240a98be4b --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/rollup/get_rollup_index_caps_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#rollup.get_rollup_index_caps' do + let(:expected_args) do + [ + 'GET', + 'foo/_rollup/data', + {}, + nil, + {}, + { endpoint: 'rollup.get_rollup_index_caps', defined_params: { index: 'foo' } } + ] + end + + it 'performs the request' do + expect(client_double.rollup.get_rollup_index_caps(index: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/ssl/certificates_spec.rb b/elasticsearch-api/spec/unit/actions/ssl/certificates_spec.rb new file mode 100644 index 0000000000..7ff7f7a7af --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/ssl/certificates_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#ssl.certificates' do + let(:expected_args) do + [ + 'GET', + '_ssl/certificates', + {}, + nil, + {}, + { endpoint: 'ssl.certificates' } + ] + end + + it 'performs the request' do + expect(client_double.ssl.certificates(index: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/transform/reset_transform_spec.rb b/elasticsearch-api/spec/unit/actions/transform/reset_transform_spec.rb new file mode 100644 index 0000000000..11a5542f05 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/transform/reset_transform_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client.transform#reset_transform' do + let(:expected_args) do + [ + 'POST', + '_transform/foo/_reset', + {}, + nil, + {}, + { defined_params: { transform_id: 'foo' }, + endpoint: 'transform.reset_transform' } + ] + end + + it 'performs the request' do + expect(client_double.transform.reset_transform(transform_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/transform/upgrade_transforms_spec.rb b/elasticsearch-api/spec/unit/actions/transform/upgrade_transforms_spec.rb new file mode 100644 index 0000000000..cf792f2a2b --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/transform/upgrade_transforms_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.transform#upgrade_transforms' do + let(:expected_args) do + [ + 'POST', + '_transform/_upgrade', + {}, + nil, + {}, + { endpoint: 'transform.upgrade_transforms' } + ] + end + + it 'performs the request' do + expect(client_double.transform.upgrade_transforms).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/xpack/usage_spec.rb b/elasticsearch-api/spec/unit/actions/xpack/usage_spec.rb new file mode 100644 index 0000000000..c0f73e87b0 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/xpack/usage_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#usage' do + let(:expected_args) do + [ + 'GET', + '_xpack/usage', + {}, + nil, + {}, + { endpoint: 'xpack.usage' } + ] + end + + it 'performs the request' do + expect(client_double.xpack.usage).to be_a Elasticsearch::API::Response + end +end From 909404997120aa7deb725650d017c215021912f6 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 18 Feb 2025 10:44:45 +0000 Subject: [PATCH 458/540] Updates Rakefiles for testing API --- elasticsearch-api/Rakefile | 22 +++++++++++----------- elasticsearch-api/spec/rest_api/README.md | 1 + rake_tasks/test_tasks.rake | 22 ---------------------- 3 files changed, 12 insertions(+), 33 deletions(-) create mode 100644 elasticsearch-api/spec/rest_api/README.md diff --git a/elasticsearch-api/Rakefile b/elasticsearch-api/Rakefile index 9a99579083..1583729010 100644 --- a/elasticsearch-api/Rakefile +++ b/elasticsearch-api/Rakefile @@ -38,12 +38,6 @@ namespace :test do t.ruby_opts = '-W0' end - desc 'Run Elasticsearch test suite free tests.' - RSpec::Core::RakeTask.new(:rest_api) do |t| - test_dir = Rake.application.original_dir - t.pattern = "#{test_dir}/spec/rest_api/rest_api_yaml_spec.rb" - end - desc 'Run unit and integration tests' task :all do Rake::Task['test:unit'].invoke @@ -61,11 +55,17 @@ namespace :test do t.ruby_opts = '-W0' end - namespace :platinum do - desc 'Run Platinum Rest API Spec tests' - RSpec::Core::RakeTask.new(:api) do - ENV['TEST_SUITE'] = 'platinum' - Rake::Task['test:rest_api'].invoke + # This is the task to run the Elasticsearch REST tests which we stopped using for 9.x. + # Use the environment variable TEST_SUITE to choose between 'free' and 'platinum' tests. For + # platinum, the test cluster needs to have the license activated and run with security enabled. + # For 'free', security must be disabled in the test cluster. + # + namespace :deprecated do + # TODO: TEST_SUITE + desc 'Run Elasticsearch test suite free tests.' + RSpec::Core::RakeTask.new(:rest_api) do |t| + test_dir = Rake.application.original_dir + t.pattern = "#{test_dir}/spec/rest_api/rest_api_yaml_spec.rb" end end end diff --git a/elasticsearch-api/spec/rest_api/README.md b/elasticsearch-api/spec/rest_api/README.md new file mode 100644 index 0000000000..776a0e9f9b --- /dev/null +++ b/elasticsearch-api/spec/rest_api/README.md @@ -0,0 +1 @@ +This directory contains the files to run the Elasticsearch REST API Spec tests. See [../../api-spec-testing/README.md'](api-spec-testing). diff --git a/rake_tasks/test_tasks.rake b/rake_tasks/test_tasks.rake index f29b14909f..d0d5e3dba9 100644 --- a/rake_tasks/test_tasks.rake +++ b/rake_tasks/test_tasks.rake @@ -47,33 +47,11 @@ namespace :test do end end - desc 'Run Elasticsearch test suite free tests.' - task es_free: ['es:wait_for_green'] do - puts '-' * 80 - sh "cd #{CURRENT_PATH.join('elasticsearch-api')} && unset BUNDLE_GEMFILE && bundle exec rake test:rest_api" - puts "\n" - end - - desc 'Run Elasticsearch test suite platinum tests.' - task es_platinum: 'es:wait_for_green' do - puts '-' * 80 - sh "cd #{CURRENT_PATH.join('elasticsearch-api')} && unset BUNDLE_GEMFILE && TEST_SUITE=platinum bundle exec rake test:rest_api" - puts "\n" - end - desc 'Run YAML test runner tests' task :yaml do sh "cd #{CURRENT_PATH.join('elasticsearch-api')} && unset BUNDLE_GEMFILE && bundle exec rake test:yaml" end - namespace :platinum do - desc 'Run platinum integration tests' - task :integration do - sh "cd #{CURRENT_PATH.join('elasticsearch-api')} && unset BUNDLE_GEMFILE && bundle exec rake test:platinum:integration" - puts "\n" - end - end - # Returns: version_number, build_hash def cluster_info require 'elasticsearch' From 311ea0d28c08d11a72edcac118b6abf9f80b54a7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 18 Feb 2025 15:02:24 +0000 Subject: [PATCH 459/540] [DOCS] Updates CHANGELOG 9.x --- CHANGELOG-9.x.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-9.x.md b/CHANGELOG-9.x.md index c94e5aa0d6..ef1d09842f 100644 --- a/CHANGELOG-9.x.md +++ b/CHANGELOG-9.x.md @@ -21,4 +21,4 @@ The gem migrated away from the Elasticsearch REST API tests and test runner in C #### Rake tasks * Some old rake tasks that were not being used have been removed. The rest were streamlined, the `es` namespace has been streamlined to make it easier to run Elasticsearch with Docker during development. The `docker` namespace was merged into `es`. -* Elasticsearch's REST API Spec tests can still be ran with `rake test:es_free` and `rake test:es_platinum`. +* Elasticsearch's REST API Spec tests can still be ran with `rake test:deprecated:rest_api` and setting the corresponding value for the environment variable `TEST_SUITE` ('platinum' or 'free'). From 8b8e2a7dc8aaebb9ffb248f658c8cfdbc185bb70 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 18 Feb 2025 15:14:39 +0000 Subject: [PATCH 460/540] Removes Minitest dependencies in elasticsearch-api --- elasticsearch-api/elasticsearch-api.gemspec | 5 ----- elasticsearch-api/spec/unit/test_helper.rb | 16 ---------------- 2 files changed, 21 deletions(-) diff --git a/elasticsearch-api/elasticsearch-api.gemspec b/elasticsearch-api/elasticsearch-api.gemspec index f576910773..b0376cb87d 100644 --- a/elasticsearch-api/elasticsearch-api.gemspec +++ b/elasticsearch-api/elasticsearch-api.gemspec @@ -48,12 +48,8 @@ Gem::Specification.new do |s| s.add_development_dependency 'bundler' s.add_development_dependency 'elasticsearch' s.add_development_dependency 'elasticsearch-test-runner' unless defined?(JRUBY_VERSION) && JRUBY_VERSION <= '9.4' - s.add_development_dependency 'minitest' - s.add_development_dependency 'minitest-reporters', '>= 1.6' - s.add_development_dependency 'mocha' s.add_development_dependency 'pry' s.add_development_dependency 'rake' - s.add_development_dependency 'shoulda-context' s.add_development_dependency 'yard' # Gems for testing integrations @@ -68,7 +64,6 @@ Gem::Specification.new do |s| s.add_development_dependency 'require-prof' unless defined?(JRUBY_VERSION) || defined?(Rubinius) s.add_development_dependency 'ruby-prof' unless defined?(JRUBY_VERSION) || defined?(Rubinius) s.add_development_dependency 'simplecov' - s.add_development_dependency 'test-unit', '~> 2' s.description = <<-DESC.gsub(/^ /, '') Ruby API for Elasticsearch. See the `elasticsearch` gem for full integration. DESC diff --git a/elasticsearch-api/spec/unit/test_helper.rb b/elasticsearch-api/spec/unit/test_helper.rb index 6a914a20f6..16e1cc0374 100644 --- a/elasticsearch-api/spec/unit/test_helper.rb +++ b/elasticsearch-api/spec/unit/test_helper.rb @@ -26,22 +26,6 @@ require 'elasticsearch' require 'elasticsearch/api' -Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new(print_failure_summary: true) - -module Minitest - class Test - def assert_nothing_raised(*args) - begin - line = __LINE__ - yield - rescue Exception => e - raise MiniTest::Assertion, "Exception raised:\n<#{e.class}>", e.backtrace - end - true - end - end -end - module Elasticsearch module Test class FakeClient From 62898a5d189001ff71b606df2d8c298b1bb34d57 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 19 Feb 2025 16:03:27 +0000 Subject: [PATCH 461/540] Updates Simplecov usage --- elasticsearch-api/spec/spec_helper.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/spec/spec_helper.rb b/elasticsearch-api/spec/spec_helper.rb index b7c649670b..420a4aecd3 100644 --- a/elasticsearch-api/spec/spec_helper.rb +++ b/elasticsearch-api/spec/spec_helper.rb @@ -14,9 +14,12 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -if ENV['COVERAGE'] && ENV['CI'].nil? +if ENV['COVERAGE'] require 'simplecov' - SimpleCov.start { add_filter %r{^/test|spec/} } + SimpleCov.start do + add_filter %r{^/test|spec/} + add_filter 'utils/thor' + end end if defined?(JRUBY_VERSION) From b0bb1208333e0243deb090383fae6e0bf31632fe Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 19 Feb 2025 16:01:27 +0000 Subject: [PATCH 462/540] [DOCS] Updates elasticsearch-api README about coverage and tests --- elasticsearch-api/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/README.md b/elasticsearch-api/README.md index 30d4489ed6..7c175ebcac 100644 --- a/elasticsearch-api/README.md +++ b/elasticsearch-api/README.md @@ -15,7 +15,9 @@ Language clients are forward compatible; meaning that clients support communicat Refer to [CONTRIBUTING](https://github.com/elastic/elasticsearch-ruby/blob/main/CONTRIBUTING.md). -The integration tests on this project run the [Elasticsearch Client tests](https://github.com/elastic/elasticsearch-clients-tests/) with the [Elasticsearch Tests Runner](https://github.com/elastic/es-test-runner-ruby/) library. This runs in CI against an Elasticsearch cluster in Docker. You can run a docker container with Elasticsearch with a Rake task from the root directory of this project: +Use `bundle exec rake test:unit` to run Unit tests. Add the environment variable `COVERAGE` to see Simplecov test coverage. + +The integration tests on this project run the [Elasticsearch Client tests](https://github.com/elastic/elasticsearch-clients-tests/) with the [Elasticsearch Tests Runner](https://github.com/elastic/es-test-runner-ruby/) library. You can run a docker container with Elasticsearch with a Rake task from the root directory of this project: ```bash $ rake es:up @@ -27,6 +29,8 @@ This will start whatever version of Elasticsearch is set in the Buildkite pipeli $ rake es:start[version,suite] # e.g. rake es:start[9.0.0-SNAPSHOT, free] ``` +You can run the integration tests with `bundle exec rake test:integration`. + ### Code generation The code for most of this library is automatically generated. See [./utils/README.md](utils/README.md) for more information. From 7189655ee6369d2640604f8762726a5588a145de Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 19 Feb 2025 16:02:12 +0000 Subject: [PATCH 463/540] Tests: Removes Hashie warning, muting Ruby warnings --- elasticsearch-api/Rakefile | 2 -- elasticsearch-api/spec/unit/actions/hashie_spec.rb | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/elasticsearch-api/Rakefile b/elasticsearch-api/Rakefile index 1583729010..6c6fa4fcf7 100644 --- a/elasticsearch-api/Rakefile +++ b/elasticsearch-api/Rakefile @@ -35,7 +35,6 @@ namespace :test do task :unit RSpec::Core::RakeTask.new(:unit) do |t| t.pattern = 'spec/unit/**/*_spec.rb' - t.ruby_opts = '-W0' end desc 'Run unit and integration tests' @@ -52,7 +51,6 @@ namespace :test do desc 'Run Integration tests' RSpec::Core::RakeTask.new(:integration) do |t| t.pattern = 'spec/integration/**/*_spec.rb' - t.ruby_opts = '-W0' end # This is the task to run the Elasticsearch REST tests which we stopped using for 9.x. diff --git a/elasticsearch-api/spec/unit/actions/hashie_spec.rb b/elasticsearch-api/spec/unit/actions/hashie_spec.rb index 6081a21dd9..afba03698f 100644 --- a/elasticsearch-api/spec/unit/actions/hashie_spec.rb +++ b/elasticsearch-api/spec/unit/actions/hashie_spec.rb @@ -17,9 +17,10 @@ require 'spec_helper' require 'hashie' +require 'hashie/logger' +Hashie.logger = Logger.new(nil) describe 'Hashie' do - let(:json) do <<-JSON { @@ -79,7 +80,7 @@ end let(:response) do - Hashie::Mash.new MultiJson.load(json) + Hashie::Mash.new(MultiJson.load(json)) end it 'wraps the response' do From d560de85e817d96a691e8965a48dab25acf513e0 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 19 Feb 2025 16:02:48 +0000 Subject: [PATCH 464/540] [API] Tests: Renames integration tests helper, updates some unit tests --- .../spec/integration/api_key_spec.rb | 2 +- .../spec/integration/health_spec.rb | 2 +- .../{spec_helper.rb => integration_helper.rb} | 0 .../spec/unit/actions/nodes/info_spec.rb | 18 +-- .../spec/unit/actions/nodes/usage_spec.rb | 106 ++++++++++++++++++ .../spec/unit/actions/termvectors_spec.rb | 6 +- .../spec/unit/api_response_spec.rb | 4 + 7 files changed, 123 insertions(+), 15 deletions(-) rename elasticsearch-api/spec/integration/{spec_helper.rb => integration_helper.rb} (100%) create mode 100644 elasticsearch-api/spec/unit/actions/nodes/usage_spec.rb diff --git a/elasticsearch-api/spec/integration/api_key_spec.rb b/elasticsearch-api/spec/integration/api_key_spec.rb index 55c9d977af..f2453dc76a 100644 --- a/elasticsearch-api/spec/integration/api_key_spec.rb +++ b/elasticsearch-api/spec/integration/api_key_spec.rb @@ -18,7 +18,7 @@ # under the License. require 'base64' -require_relative './spec_helper' +require_relative './integration_helper' describe 'API keys' do before do diff --git a/elasticsearch-api/spec/integration/health_spec.rb b/elasticsearch-api/spec/integration/health_spec.rb index 8abad8dcc7..3f7207094d 100644 --- a/elasticsearch-api/spec/integration/health_spec.rb +++ b/elasticsearch-api/spec/integration/health_spec.rb @@ -17,7 +17,7 @@ # specific language governing permissions and limitations # under the License. -require_relative './spec_helper' +require_relative './integration_helper' describe 'Health basic test' do it 'performs the request' do diff --git a/elasticsearch-api/spec/integration/spec_helper.rb b/elasticsearch-api/spec/integration/integration_helper.rb similarity index 100% rename from elasticsearch-api/spec/integration/spec_helper.rb rename to elasticsearch-api/spec/integration/integration_helper.rb diff --git a/elasticsearch-api/spec/unit/actions/nodes/info_spec.rb b/elasticsearch-api/spec/unit/actions/nodes/info_spec.rb index ad677be08d..8f69b9f5ca 100644 --- a/elasticsearch-api/spec/unit/actions/nodes/info_spec.rb +++ b/elasticsearch-api/spec/unit/actions/nodes/info_spec.rb @@ -18,15 +18,14 @@ require 'spec_helper' describe 'client.nodes#info' do - let(:expected_args) do [ - 'GET', - url, - params, - nil, - {}, - { endpoint: 'nodes.info' } + 'GET', + url, + params, + nil, + {}, + { endpoint: 'nodes.info' } ] end @@ -43,7 +42,6 @@ end context 'when the node id is specified' do - let(:url) do '_nodes/foo' end @@ -65,7 +63,6 @@ end context 'when multiple node ids are specified as a list' do - let(:url) do '_nodes/A,B,C' end @@ -87,7 +84,6 @@ end context 'when multiple node ids are specified as a String' do - let(:url) do '_nodes/A,B,C' end @@ -109,7 +105,6 @@ end context 'when URL params are specified' do - let(:url) do '_nodes' end @@ -124,7 +119,6 @@ end context 'when metrics are specified' do - let(:url) do '_nodes/http,network' end diff --git a/elasticsearch-api/spec/unit/actions/nodes/usage_spec.rb b/elasticsearch-api/spec/unit/actions/nodes/usage_spec.rb new file mode 100644 index 0000000000..25824cd7c5 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/nodes/usage_spec.rb @@ -0,0 +1,106 @@ +# 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. + +require 'spec_helper' + +describe 'client.nodes#usage' do + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { endpoint: 'nodes.usage' } + ] + end + + let(:url) do + '_nodes/usage' + end + + it 'performs the request' do + expect(client_double.nodes.usage).to be_a Elasticsearch::API::Response + end + + let(:params) do + {} + end + + context 'when the node id is specified' do + let(:url) do + '_nodes/foo/usage' + end + + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { defined_params: { node_id: 'foo' }, endpoint: 'nodes.usage' } + ] + end + + it 'performs the request' do + expect(client_double.nodes.usage(node_id: 'foo')).to be_a Elasticsearch::API::Response + end + end + + context 'when the metric is specified' do + let(:url) do + '_nodes/usage/metric' + end + + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { defined_params: { metric: 'metric' }, endpoint: 'nodes.usage' } + ] + end + + it 'performs the request' do + expect(client_double.nodes.usage(metric: 'metric')).to be_a Elasticsearch::API::Response + end + end + + context 'when both are specified' do + let(:url) do + '_nodes/foo/usage/metric' + end + + let(:expected_args) do + [ + 'GET', + url, + params, + nil, + {}, + { defined_params: { node_id: 'foo', metric: 'metric' }, endpoint: 'nodes.usage' } + ] + end + + it 'performs the request' do + expect(client_double.nodes.usage(metric: 'metric', node_id: 'foo')).to be_a Elasticsearch::API::Response + end + end +end diff --git a/elasticsearch-api/spec/unit/actions/termvectors_spec.rb b/elasticsearch-api/spec/unit/actions/termvectors_spec.rb index 86e2ad33ba..d7d607832f 100644 --- a/elasticsearch-api/spec/unit/actions/termvectors_spec.rb +++ b/elasticsearch-api/spec/unit/actions/termvectors_spec.rb @@ -72,7 +72,11 @@ end it 'performs the request' do - expect(client_double.termvector(index: 'foo', id: '123', body: {})).to be_a Elasticsearch::API::Response + message = '[DEPRECATION] `termvector` is deprecated. Please use the plural version, `termvectors` instead. +' + expect do + client_double.termvector(index: 'foo', id: '123', body: {}) + end.to output(message).to_stderr end end end diff --git a/elasticsearch-api/spec/unit/api_response_spec.rb b/elasticsearch-api/spec/unit/api_response_spec.rb index c976602bb8..06fdb602ad 100644 --- a/elasticsearch-api/spec/unit/api_response_spec.rb +++ b/elasticsearch-api/spec/unit/api_response_spec.rb @@ -62,4 +62,8 @@ it 'returns the body which' do expect(response.body).to eq response_body end + + it 'returns the body with to_s' do + expect(response.to_s).to eq response.body.to_s + end end From 785516ac98ca5e833e3af19efbe4d8ddc4a96b85 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 20 Feb 2025 13:21:13 +0000 Subject: [PATCH 465/540] Bumps stack to version 9.1.0-SNAPSHOT --- .github/workflows/main.yml | 4 ++-- .github/workflows/otel.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c72072a437..f695527199 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 9.0.0-SNAPSHOT + stack-version: 9.1.0-SNAPSHOT - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} @@ -39,4 +39,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake es:download_artifacts[9.0.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:all + run: rake es:download_artifacts[9.1.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:all diff --git a/.github/workflows/otel.yml b/.github/workflows/otel.yml index fd17c34acb..b7bca6a485 100644 --- a/.github/workflows/otel.yml +++ b/.github/workflows/otel.yml @@ -28,7 +28,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 9.0.0-SNAPSHOT + stack-version: 9.1.0-SNAPSHOT - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} @@ -41,4 +41,4 @@ jobs: - name: elasticsearch run: cd elasticsearch && bundle exec rake test:all - name: elasticsearch-api - run: rake es:download_artifacts[9.0.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:all + run: rake es:download_artifacts[9.1.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:all From 06128e73646de610625318b2b9ead9146b631094 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 20 Feb 2025 14:58:29 +0000 Subject: [PATCH 466/540] [CI] Updates buildkite pipeline stack version --- .buildkite/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 5696edca12..747be2b7ce 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -29,7 +29,7 @@ steps: transport: "8.2" env: RUBY_VERSION: "{{ matrix.ruby }}" - STACK_VERSION: 9.0.0-SNAPSHOT + STACK_VERSION: 9.1.0-SNAPSHOT ES_YAML_TESTS_BRANCH: main TRANSPORT_VERSION: "{{ matrix.transport }}" RUBY_SOURCE: "{{ matrix.ruby_source }}" From 0bfdbc119413bfc0b2494b9d9472411ef872b5e6 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 20 Feb 2025 15:07:14 +0000 Subject: [PATCH 467/540] [CI] Updates bumpmatrix automation for main --- rake_tasks/automation.rake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/rake_tasks/automation.rake b/rake_tasks/automation.rake index 1f7dfe77f9..7ccca18e40 100644 --- a/rake_tasks/automation.rake +++ b/rake_tasks/automation.rake @@ -107,11 +107,16 @@ namespace :automation do if file == '.buildkite/pipeline.yml' require 'yaml' yaml = YAML.safe_load(content) - branch = version.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1] yaml_tests_branch = yaml['steps'][0]['env']['ES_YAML_TESTS_BRANCH'] - next if yaml_tests_branch == 'main' - content.gsub!(yaml_tests_branch, branch) + if yaml_tests_branch == 'main' + old = content.match(/STACK_VERSION: (.*)/)[1] + new = "STACK_VERSION: #{version}" + content.gsub!(new, old) + else + branch = version.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1] + content.gsub!(yaml_tests_branch, branch) + end puts "[#{yaml_tests_branch}] -> [#{branch}] in #{file.gsub('./', '')}" end match = content.match(regexp) From f49bb6deb9471639a5806173f00492097b29f4e7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 21 Feb 2025 09:41:28 +0000 Subject: [PATCH 468/540] [API] Adds migrate endpoints from elasticsearch-specification --- .../actions/indices/cancel_migrate_reindex.rb | 66 ++++++++++++++ .../api/actions/indices/create_from.rb | 72 +++++++++++++++ .../indices/get_migrate_reindex_status.rb | 66 ++++++++++++++ .../api/actions/indices/migrate_reindex.rb | 60 +++++++++++++ .../actions/indices/indices_migrate_spec.rb | 88 +++++++++++++++++++ 5 files changed, 352 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb create mode 100644 elasticsearch-api/spec/unit/actions/indices/indices_migrate_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb new file mode 100644 index 0000000000..45cdae60ff --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from commit dcb1c1df18a84a0182caa631b4577d89a4602cfe +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Indices + module Actions + # Cancel a migration reindex operation. + # Cancel a migration reindex attempt for a data stream or index. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String, Array] :index The index or data stream name (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html + # + def cancel_migrate_reindex(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'indices.cancel_migrate_reindex' } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _index = arguments.delete(:index) + + method = Elasticsearch::API::HTTP_POST + path = "_migration/reindex/#{Utils.__listify(_index)}/_cancel" + params = {} + + 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/indices/create_from.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb new file mode 100644 index 0000000000..e3292b439e --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb @@ -0,0 +1,72 @@ +# 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. +# +# Auto generated from commit dcb1c1df18a84a0182caa631b4577d89a4602cfe +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Indices + module Actions + # Create an index from a source index. + # Copy the mappings and settings from the source index to a destination index while allowing request settings and mappings to override the source values. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :source The source index or data stream name (*Required*) + # @option arguments [String] :dest The destination index or data stream name (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body create_from + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html + # + def create_from(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'indices.create_from' } + + defined_params = [:source, :dest].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'source' missing" unless arguments[:source] + raise ArgumentError, "Required argument 'dest' missing" unless arguments[:dest] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _source = arguments.delete(:source) + + _dest = arguments.delete(:dest) + + method = Elasticsearch::API::HTTP_PUT + path = "_create_from/#{Utils.__listify(_source)}/#{Utils.__listify(_dest)}" + params = {} + + 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/indices/get_migrate_reindex_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb new file mode 100644 index 0000000000..de308edebc --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from commit dcb1c1df18a84a0182caa631b4577d89a4602cfe +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Indices + module Actions + # Get the migration reindexing status. + # Get the status of a migration reindex attempt for a data stream or index. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String, Array] :index The index or data stream name. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html + # + def get_migrate_reindex_status(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'indices.get_migrate_reindex_status' } + + defined_params = [:index].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _index = arguments.delete(:index) + + method = Elasticsearch::API::HTTP_GET + path = "_migration/reindex/#{Utils.__listify(_index)}/_status" + params = {} + + 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/indices/migrate_reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb new file mode 100644 index 0000000000..de5cc44e6a --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb @@ -0,0 +1,60 @@ +# 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. +# +# Auto generated from commit dcb1c1df18a84a0182caa631b4577d89a4602cfe +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Indices + module Actions + # Reindex legacy backing indices. + # Reindex all legacy backing indices for a data stream. + # This operation occurs in a persistent task. + # The persistent task ID is returned immediately and the reindexing work is completed in that task. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body reindex + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html + # + def migrate_reindex(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'indices.migrate_reindex' } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = "_migration/reindex" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/unit/actions/indices/indices_migrate_spec.rb b/elasticsearch-api/spec/unit/actions/indices/indices_migrate_spec.rb new file mode 100644 index 0000000000..7a53de9155 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/indices/indices_migrate_spec.rb @@ -0,0 +1,88 @@ +# 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. + +require 'spec_helper' + +describe 'client.indices' do + context 'migrate_reindex' do + let(:expected_args) do + [ + 'POST', + '_migration/reindex', + {}, + {}, + {}, + { endpoint: 'indices.migrate_reindex' } + ] + end + + it 'performs the request' do + expect(client_double.indices.migrate_reindex(body: {})).to be_a Elasticsearch::API::Response + end + end + + context 'get_migrate_reindex_status' do + let(:expected_args) do + [ + 'GET', + '_migration/reindex/foo/_status', + {}, + nil, + {}, + { endpoint: 'indices.get_migrate_reindex_status', defined_params: { index: 'foo' } } + ] + end + + it 'performs the request' do + expect(client_double.indices.get_migrate_reindex_status(index: 'foo')).to be_a Elasticsearch::API::Response + end + end + + context 'cancel_migrate_reindex' do + let(:expected_args) do + [ + 'POST', + '_migration/reindex/foo/_cancel', + {}, + nil, + {}, + { endpoint: 'indices.cancel_migrate_reindex', defined_params: { index: 'foo' } } + ] + end + + it 'performs the request' do + expect(client_double.indices.cancel_migrate_reindex(index: 'foo')).to be_a Elasticsearch::API::Response + end + end + + context 'create_from' do + let(:expected_args) do + [ + 'PUT', + '_create_from/foo/bar', + {}, + {}, + {}, + { endpoint: 'indices.create_from', defined_params: { source: 'foo', dest: 'bar' } } + ] + end + + it 'performs the request' do + expect(client_double.indices.create_from(body: {}, source: 'foo', dest: 'bar')).to be_a Elasticsearch::API::Response + end + end +end From cf9d5d10e972b73e6f347fd345f7fa0f08057506 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 24 Feb 2025 10:33:05 +0000 Subject: [PATCH 469/540] [API] Updates cat and indices endpoints cat.segments - Adds :master_timeout and :local Boolean parameter: return local information, do not retrieve the state from master node (default: false) cat.tasks - Adds :timeout and :wait_for_completion parameters indices.get_field_mapping - Removes :local parameter indices.resolve_cluster - Adds :timeout parameter, :name no longer a required parameter --- .../elasticsearch/api/actions/cat/segments.rb | 2 ++ .../elasticsearch/api/actions/cat/tasks.rb | 2 ++ .../elasticsearch/api/actions/enrich/stats.rb | 2 +- .../api/actions/indices/get_field_mapping.rb | 1 - .../api/actions/indices/resolve_cluster.rb | 19 +++++++++++-------- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb index 8898f52e26..e9146b30c8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb @@ -26,6 +26,8 @@ module Actions # # @option arguments [List] :index A comma-separated list of index names to limit the returned information # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml + # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) # @option arguments [List] :h Comma-separated list of column names to display # @option arguments [Boolean] :help Return help information diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb index 4a60aea199..bbbb3bb6c7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb @@ -38,6 +38,8 @@ module Actions # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + # @option arguments [Boolean] :wait_for_completion If `true`, the request blocks until the task has completed. # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb index 8a71c336d4..d511f5f326 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb @@ -24,7 +24,7 @@ module Enrich module Actions # Gets enrich coordinator statistics and information about enrich policies that are currently executing. # - # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb index f4aad0249d..a28f41d72d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb @@ -30,7 +30,6 @@ module Actions # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb index 9f399ef567..8055280684 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb @@ -22,13 +22,14 @@ module Elasticsearch module API module Indices module Actions - # Resolves the specified index expressions to return information about each cluster, including the local cluster, if included. + # Resolves the specified index expressions to return information about each cluster. If no index expression is provided, this endpoint will return information about all the remote clusters that are configured on the local cluster. # # @option arguments [List] :name A comma-separated list of cluster:index names or wildcard expressions - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) + # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed). Only allowed when providing an index expression. + # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled. Only allowed when providing an index expression. + # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). Only allowed when providing an index expression. + # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open). Only allowed when providing an index expression. (options: open, closed, hidden, none, all) + # @option arguments [Time] :timeout The maximum time to wait for remote clusters to respond # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-cluster-api.html @@ -41,8 +42,6 @@ def resolve_cluster(arguments = {}) 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) || {} @@ -51,7 +50,11 @@ def resolve_cluster(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET - path = "_resolve/cluster/#{Utils.__listify(_name)}" + path = if _name + "_resolve/cluster/#{Utils.__listify(_name)}" + else + '_resolve/cluster' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( From 5c47edd51bdc247bd39ab51a554c4795f7e13f59 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 24 Feb 2025 10:39:05 +0000 Subject: [PATCH 470/540] [API] Updates resolve_cluster spec --- .../actions/indices/resolve_cluster_spec.rb | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/elasticsearch-api/spec/unit/actions/indices/resolve_cluster_spec.rb b/elasticsearch-api/spec/unit/actions/indices/resolve_cluster_spec.rb index 3da0771413..46c477a9c7 100644 --- a/elasticsearch-api/spec/unit/actions/indices/resolve_cluster_spec.rb +++ b/elasticsearch-api/spec/unit/actions/indices/resolve_cluster_spec.rb @@ -18,32 +18,35 @@ require 'spec_helper' describe 'client.indices#delete_alias' do - - let(:expected_args) do - [ - 'GET', - '_resolve/cluster/foo', - {}, - nil, - {}, - { defined_params: { name: 'foo'}, endpoint: 'indices.resolve_cluster' } - ] - end - context 'when there is no name specified' do - let(:client) do - Class.new { include Elasticsearch::API }.new + let(:expected_args) do + [ + 'GET', + '_resolve/cluster', + {}, + nil, + {}, + { endpoint: 'indices.resolve_cluster' } + ] end - it 'raises an exception' do - expect { - client.indices.resolve_cluster - }.to raise_exception(ArgumentError) + it 'performs the request' do + expect(client_double.indices.resolve_cluster).to be_a Elasticsearch::API::Response end end - context 'when name is specified' do + let(:expected_args) do + [ + 'GET', + '_resolve/cluster/foo', + {}, + nil, + {}, + { defined_params: { name: 'foo' }, endpoint: 'indices.resolve_cluster' } + ] + end + it 'performs the request' do expect(client_double.indices.resolve_cluster(name: 'foo')).to be_a Elasticsearch::API::Response end From b604e6574adb5dbd9b6d68a5b7457dc5a8d6afd6 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 26 Feb 2025 15:20:16 +0000 Subject: [PATCH 471/540] [API] Adds user profile APIs --- .../actions/security/activate_user_profile.rb | 62 ++++++++++++++ .../actions/security/disable_user_profile.rb | 70 ++++++++++++++++ .../actions/security/enable_user_profile.rb | 71 ++++++++++++++++ .../api/actions/security/get_user_profile.rb | 69 ++++++++++++++++ .../security/has_privileges_user_profile.rb | 56 +++++++++++++ .../actions/security/suggest_user_profiles.rb | 65 +++++++++++++++ .../security/update_user_profile_data.rb | 80 +++++++++++++++++++ 7 files changed, 473 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb new file mode 100644 index 0000000000..113f36a786 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb @@ -0,0 +1,62 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Security + module Actions + # Activate a user profile. + # Create or update a user profile on behalf of another user. + # NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + # Individual users and external applications should not call this API directly. + # The calling application must have either an +access_token+ or a combination of +username+ and +password+ for the user that the profile document is intended for. + # Elastic reserves the right to change or remove this feature in future releases without prior notice. + # This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including +username+, +full_name,+ +roles+, and the authentication realm. + # For example, in the JWT +access_token+ case, the profile user's +username+ is extracted from the JWT token claim pointed to by the +claims.principal+ setting of the JWT realm that authenticated the token. + # When updating a profile document, the API enables the document if it was disabled. + # Any updates do not change existing content for either the +labels+ or +data+ fields. + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-activate-user-profile + # + def activate_user_profile(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.activate_user_profile' } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = "_security/profile/_activate" + params = {} + + 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/security/disable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb new file mode 100644 index 0000000000..2ec39dbc7a --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb @@ -0,0 +1,70 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Security + module Actions + # Disable a user profile. + # Disable user profiles so that they are not visible in user profile searches. + # NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + # Individual users and external applications should not call this API directly. + # Elastic reserves the right to change or remove this feature in future releases without prior notice. + # When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches. + # To re-enable a disabled user profile, use the enable user profile API . + # + # @option arguments [String] :uid Unique identifier for the user profile. (*Required*) + # @option arguments [String] :refresh If 'true', Elasticsearch refreshes the affected shards to make this operation visible to search. + # If 'wait_for', it waits for a refresh to make this operation visible to search. + # If 'false', it does nothing with refreshes. Server default: false. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-disable-user-profile + # + def disable_user_profile(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.disable_user_profile' } + + defined_params = [:uid].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _uid = arguments.delete(:uid) + + method = Elasticsearch::API::HTTP_PUT + path = "_security/profile/#{Utils.__listify(_uid)}/_disable" + 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/security/enable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb new file mode 100644 index 0000000000..7b2e01cb08 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb @@ -0,0 +1,71 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Security + module Actions + # Enable a user profile. + # Enable user profiles to make them visible in user profile searches. + # NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + # Individual users and external applications should not call this API directly. + # Elastic reserves the right to change or remove this feature in future releases without prior notice. + # When you activate a user profile, it's automatically enabled and visible in user profile searches. + # If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again. + # + # @option arguments [String] :uid A unique identifier for the user profile. (*Required*) + # @option arguments [String] :refresh If 'true', Elasticsearch refreshes the affected shards to make this operation + # visible to search. + # If 'wait_for', it waits for a refresh to make this operation visible to search. + # If 'false', nothing is done with refreshes. Server default: false. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enable-user-profile + # + def enable_user_profile(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.enable_user_profile' } + + defined_params = [:uid].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _uid = arguments.delete(:uid) + + method = Elasticsearch::API::HTTP_PUT + path = "_security/profile/#{Utils.__listify(_uid)}/_enable" + 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/security/get_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb new file mode 100644 index 0000000000..6f2a93df94 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb @@ -0,0 +1,69 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Security + module Actions + # Get a user profile. + # Get a user's profile using the unique profile ID. + # NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + # Individual users and external applications should not call this API directly. + # Elastic reserves the right to change or remove this feature in future releases without prior notice. + # + # @option arguments [Userprofileid] :uid A unique identifier for the user profile. (*Required*) + # @option arguments [String] :data A comma-separated list of filters for the +data+ field of the profile document. + # To return all content use +data=*+. + # To return a subset of content use +data=+ to retrieve content nested under the specified ++. + # By default returns no +data+ content. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user-profile + # + def get_user_profile(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.get_user_profile' } + + defined_params = [:uid].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _uid = arguments.delete(:uid) + + method = Elasticsearch::API::HTTP_GET + path = "_security/profile/#{Utils.__listify(_uid)}" + 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/security/has_privileges_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb new file mode 100644 index 0000000000..d7b2b4e7b2 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb @@ -0,0 +1,56 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Security + module Actions + # Check user profile privileges. + # Determine whether the users associated with the specified user profile IDs have all the requested privileges. + # NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. + # Elastic reserves the right to change or remove this feature in future releases without prior notice. + # + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-has-privileges-user-profile + # + def has_privileges_user_profile(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.has_privileges_user_profile' } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = "_security/profile/_has_privileges" + params = {} + + 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/security/suggest_user_profiles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb new file mode 100644 index 0000000000..3586f601f0 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb @@ -0,0 +1,65 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Security + module Actions + # Suggest a user profile. + # Get suggestions for user profiles that match specified search criteria. + # NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + # Individual users and external applications should not call this API directly. + # Elastic reserves the right to change or remove this feature in future releases without prior notice. + # + # @option arguments [String] :data A comma-separated list of filters for the +data+ field of the profile document. + # To return all content use +data=*+. + # To return a subset of content, use +data=+ to retrieve content nested under the specified ++. + # By default, the API returns no +data+ content. + # It is an error to specify +data+ as both the query parameter and the request body field. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-suggest-user-profiles + # + def suggest_user_profiles(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.suggest_user_profiles' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = if body + Elasticsearch::API::HTTP_POST + else + Elasticsearch::API::HTTP_GET + end + + path = "_security/profile/_suggest" + 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/security/update_user_profile_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb new file mode 100644 index 0000000000..a8e24acf6f --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Security + module Actions + # Update user profile data. + # Update specific data for the user profile that is associated with a unique ID. + # NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. + # Individual users and external applications should not call this API directly. + # Elastic reserves the right to change or remove this feature in future releases without prior notice. + # To use this API, you must have one of the following privileges: + # * The +manage_user_profile+ cluster privilege. + # * The +update_profile_data+ global privilege for the namespaces that are referenced in the request. + # This API updates the +labels+ and +data+ fields of an existing user profile document with JSON objects. + # New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request. + # For both labels and data, content is namespaced by the top-level fields. + # The +update_profile_data+ global privilege grants privileges for updating only the allowed namespaces. + # + # @option arguments [String] :uid A unique identifier for the user profile. (*Required*) + # @option arguments [Integer] :if_seq_no Only perform the operation if the document has this sequence number. + # @option arguments [Integer] :if_primary_term Only perform the operation if the document has this primary term. + # @option arguments [String] :refresh If 'true', Elasticsearch refreshes the affected shards to make this operation + # visible to search. + # If 'wait_for', it waits for a refresh to make this operation visible to search. + # If 'false', nothing is done with refreshes. Server default: false. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-user-profile-data + # + def update_user_profile_data(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.update_user_profile_data' } + + defined_params = [:uid].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _uid = arguments.delete(:uid) + + method = Elasticsearch::API::HTTP_PUT + path = "_security/profile/#{Utils.__listify(_uid)}/_data" + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end From c05d6637e19a00febc69deed0a0764a906345770 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 26 Feb 2025 15:41:06 +0000 Subject: [PATCH 472/540] [API] Adds unit tests for user profile endpoints --- .../security/activate_user_profile_spec.rb | 35 +++++++++++++++++++ .../security/disable_user_profile_spec.rb | 35 +++++++++++++++++++ .../security/enable_user_profile_spec.rb | 35 +++++++++++++++++++ .../unit/actions/security/get_api_key_spec.rb | 20 +++++------ .../actions/security/get_user_profile_spec.rb | 35 +++++++++++++++++++ .../has_privilege_user_profile_spec.rb | 35 +++++++++++++++++++ .../security/suggest_user_profile_spec.rb | 35 +++++++++++++++++++ .../security/update_user_profile_spec.rb | 35 +++++++++++++++++++ 8 files changed, 254 insertions(+), 11 deletions(-) create mode 100644 elasticsearch-api/spec/unit/actions/security/activate_user_profile_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/security/disable_user_profile_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/security/enable_user_profile_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/security/get_user_profile_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/security/has_privilege_user_profile_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/security/suggest_user_profile_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/security/update_user_profile_spec.rb diff --git a/elasticsearch-api/spec/unit/actions/security/activate_user_profile_spec.rb b/elasticsearch-api/spec/unit/actions/security/activate_user_profile_spec.rb new file mode 100644 index 0000000000..030bbeef79 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/security/activate_user_profile_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#security#activate_user_profile' do + let(:expected_args) do + [ + 'POST', + '_security/profile/_activate', + {}, + {}, + {}, + { endpoint: 'security.activate_user_profile' } + ] + end + + it 'performs the request' do + expect(client_double.security.activate_user_profile(body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/security/disable_user_profile_spec.rb b/elasticsearch-api/spec/unit/actions/security/disable_user_profile_spec.rb new file mode 100644 index 0000000000..67aa731cbf --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/security/disable_user_profile_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#security#disable_user_profile' do + let(:expected_args) do + [ + 'PUT', + '_security/profile/foo/_disable', + {}, + nil, + {}, + { endpoint: 'security.disable_user_profile', defined_params: { uid: 'foo' } } + ] + end + + it 'performs the request' do + expect(client_double.security.disable_user_profile(uid: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/security/enable_user_profile_spec.rb b/elasticsearch-api/spec/unit/actions/security/enable_user_profile_spec.rb new file mode 100644 index 0000000000..e5bf0dafab --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/security/enable_user_profile_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#security#enable_user_profile' do + let(:expected_args) do + [ + 'PUT', + '_security/profile/foo/_enable', + {}, + nil, + {}, + { endpoint: 'security.enable_user_profile', defined_params: { uid: 'foo' } } + ] + end + + it 'performs the request' do + expect(client_double.security.enable_user_profile(uid: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/security/get_api_key_spec.rb b/elasticsearch-api/spec/unit/actions/security/get_api_key_spec.rb index 082d249109..508cd23dde 100644 --- a/elasticsearch-api/spec/unit/actions/security/get_api_key_spec.rb +++ b/elasticsearch-api/spec/unit/actions/security/get_api_key_spec.rb @@ -18,15 +18,14 @@ require 'spec_helper' describe 'client#security#get_api_key' do - let(:expected_args) do [ - 'GET', - '_security/api_key', - params, - nil, - {}, - { endpoint: 'security.get_api_key' } + 'GET', + '_security/api_key', + params, + nil, + {}, + { endpoint: 'security.get_api_key' } ] end @@ -39,7 +38,6 @@ end context 'when params are specified' do - let(:params) do { id: '1', username: 'user', @@ -49,9 +47,9 @@ it 'performs the request' do expect(client_double.security.get_api_key(id: '1', - username: 'user', - name: 'my-api-key', - realm_name: '_es_api_key')).to be_a Elasticsearch::API::Response + username: 'user', + name: 'my-api-key', + realm_name: '_es_api_key')).to be_a Elasticsearch::API::Response end end end diff --git a/elasticsearch-api/spec/unit/actions/security/get_user_profile_spec.rb b/elasticsearch-api/spec/unit/actions/security/get_user_profile_spec.rb new file mode 100644 index 0000000000..4d528ae1fa --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/security/get_user_profile_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#security#get_user_profile' do + let(:expected_args) do + [ + 'GET', + '_security/profile/foo', + {}, + nil, + {}, + { endpoint: 'security.get_user_profile', defined_params: { uid: 'foo' } } + ] + end + + it 'performs the request' do + expect(client_double.security.get_user_profile(uid: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/security/has_privilege_user_profile_spec.rb b/elasticsearch-api/spec/unit/actions/security/has_privilege_user_profile_spec.rb new file mode 100644 index 0000000000..a124ca0142 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/security/has_privilege_user_profile_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#security#has_privileges_user_profile' do + let(:expected_args) do + [ + 'POST', + '_security/profile/_has_privileges', + {}, + {}, + {}, + { endpoint: 'security.has_privileges_user_profile' } + ] + end + + it 'performs the request' do + expect(client_double.security.has_privileges_user_profile(body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/security/suggest_user_profile_spec.rb b/elasticsearch-api/spec/unit/actions/security/suggest_user_profile_spec.rb new file mode 100644 index 0000000000..dcf0ba20b1 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/security/suggest_user_profile_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#security#suggest_user_profiles' do + let(:expected_args) do + [ + 'POST', + '_security/profile/_suggest', + {}, + {}, + {}, + { endpoint: 'security.suggest_user_profiles' } + ] + end + + it 'performs the request' do + expect(client_double.security.suggest_user_profiles(body: {})).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/security/update_user_profile_spec.rb b/elasticsearch-api/spec/unit/actions/security/update_user_profile_spec.rb new file mode 100644 index 0000000000..1682a97fb5 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/security/update_user_profile_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#security#update_user_profile_data' do + let(:expected_args) do + [ + 'PUT', + '_security/profile/foo/_data', + {}, + {}, + {}, + { endpoint: 'security.update_user_profile_data', defined_params: { uid: 'foo' } } + ] + end + + it 'performs the request' do + expect(client_double.security.update_user_profile_data(uid: 'foo', body: {})).to be_a Elasticsearch::API::Response + end +end From 7a40a370dc01c2b2d2f6e5aac6b9e87797a2db97 Mon Sep 17 00:00:00 2001 From: Colleen McGinnis Date: Wed, 26 Feb 2025 11:43:51 -0600 Subject: [PATCH 473/540] add the new ci checks (#2581) Co-authored-by: Marci W <333176+marciw@users.noreply.github.com> --- .../workflows/comment-on-asciidoc-changes.yml | 21 ------------------- .github/workflows/docs-build.yml | 19 +++++++++++++++++ .github/workflows/docs-cleanup.yml | 14 +++++++++++++ 3 files changed, 33 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/comment-on-asciidoc-changes.yml create mode 100644 .github/workflows/docs-build.yml create mode 100644 .github/workflows/docs-cleanup.yml diff --git a/.github/workflows/comment-on-asciidoc-changes.yml b/.github/workflows/comment-on-asciidoc-changes.yml deleted file mode 100644 index 8e5f836b14..0000000000 --- a/.github/workflows/comment-on-asciidoc-changes.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: Comment on PR for .asciidoc changes - -on: - # We need to use pull_request_target to be able to comment on PRs from forks - pull_request_target: - types: - - synchronize - - opened - - reopened - branches: - - main - - master - - "9.0" - -jobs: - comment-on-asciidoc-change: - permissions: - contents: read - pull-requests: write - uses: elastic/docs-builder/.github/workflows/comment-on-asciidoc-changes.yml@main diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml new file mode 100644 index 0000000000..bb466166d0 --- /dev/null +++ b/.github/workflows/docs-build.yml @@ -0,0 +1,19 @@ +name: docs-build + +on: + push: + branches: + - main + pull_request_target: ~ + merge_group: ~ + +jobs: + docs-preview: + uses: elastic/docs-builder/.github/workflows/preview-build.yml@main + with: + path-pattern: docs/** + permissions: + deployments: write + id-token: write + contents: read + pull-requests: read diff --git a/.github/workflows/docs-cleanup.yml b/.github/workflows/docs-cleanup.yml new file mode 100644 index 0000000000..f83e017b5f --- /dev/null +++ b/.github/workflows/docs-cleanup.yml @@ -0,0 +1,14 @@ +name: docs-cleanup + +on: + pull_request_target: + types: + - closed + +jobs: + docs-preview: + uses: elastic/docs-builder/.github/workflows/preview-cleanup.yml@main + permissions: + contents: none + id-token: write + deployments: write From 7aedc17771e71315d50ad808160f3a7a82200bcf Mon Sep 17 00:00:00 2001 From: Colleen McGinnis Date: Wed, 26 Feb 2025 17:19:25 -0600 Subject: [PATCH 474/540] [docs] Migrate docs from AsciiDoc to Markdown (#2582) * delete asciidoc files * add migrated files --------- Co-authored-by: Marci W <333176+marciw@users.noreply.github.com> --- docs/basic-config.asciidoc | 37 -- docs/config.asciidoc | 9 - docs/docset.yml | 490 ++++++++++++++++++ docs/dsl.asciidoc | 6 - docs/ecs.asciidoc | 34 -- docs/examples/apm/screenshot.jpg | Bin 324480 -> 0 bytes docs/getting-started.asciidoc | 141 ----- docs/helpers/index.asciidoc | 10 - docs/index.asciidoc | 32 -- docs/installation.asciidoc | 61 --- docs/integrations.asciidoc | 30 -- docs/open-telemetry.asciidoc | 94 ---- docs/overview.asciidoc | 38 -- docs/rails.asciidoc | 24 - .../Helpers.md} | 131 +++-- .../activemodel_activerecord.md} | 51 +- .../advanced-config.md} | 199 +++---- docs/{api.asciidoc => reference/api.md} | 104 ++-- docs/reference/basic-config.md | 37 ++ docs/reference/client-helpers.md | 14 + docs/reference/configuration.md | 14 + .../connecting.md} | 209 ++++---- docs/reference/dsl.md | 11 + docs/reference/ecs.md | 37 ++ .../esql.asciidoc => reference/esql.md} | 78 ++- .../examples.md} | 96 ++-- docs/reference/getting-started.md | 125 +++++ docs/reference/index.md | 40 ++ docs/reference/installation.md | 44 ++ docs/reference/integrations.md | 26 + docs/reference/opentelemetry.md | 97 ++++ .../persistence.md} | 78 ++- docs/reference/ruby_on_rails.md | 23 + docs/reference/toc.yml | 24 + .../transport.md} | 169 +++--- docs/release-notes/breaking-changes.md | 28 + docs/release-notes/deprecations.md | 28 + docs/release-notes/index.md | 27 + docs/release-notes/known-issues.md | 20 + docs/release-notes/toc.yml | 5 + docs/release_notes/70.asciidoc | 195 ------- docs/release_notes/710.asciidoc | 62 --- docs/release_notes/711.asciidoc | 49 -- docs/release_notes/712.asciidoc | 28 - docs/release_notes/713.asciidoc | 53 -- docs/release_notes/714.asciidoc | 93 ---- docs/release_notes/715.asciidoc | 20 - docs/release_notes/716.asciidoc | 96 ---- docs/release_notes/717.asciidoc | 29 -- docs/release_notes/75.asciidoc | 59 --- docs/release_notes/76.asciidoc | 86 --- docs/release_notes/77.asciidoc | 77 --- docs/release_notes/78.asciidoc | 103 ---- docs/release_notes/79.asciidoc | 60 --- docs/release_notes/80.asciidoc | 74 --- docs/release_notes/81.asciidoc | 55 -- docs/release_notes/810.asciidoc | 51 -- docs/release_notes/811.asciidoc | 24 - docs/release_notes/812.asciidoc | 65 --- docs/release_notes/813.asciidoc | 76 --- docs/release_notes/814.asciidoc | 52 -- docs/release_notes/815.asciidoc | 99 ---- docs/release_notes/816.asciidoc | 57 -- docs/release_notes/817.asciidoc | 20 - docs/release_notes/82.asciidoc | 49 -- docs/release_notes/83.asciidoc | 33 -- docs/release_notes/84.asciidoc | 31 -- docs/release_notes/85.asciidoc | 105 ---- docs/release_notes/86.asciidoc | 23 - docs/release_notes/87.asciidoc | 35 -- docs/release_notes/88.asciidoc | 47 -- docs/release_notes/89.asciidoc | 54 -- docs/release_notes/index.asciidoc | 74 --- docs/troubleshooting.asciidoc | 97 ---- 74 files changed, 1552 insertions(+), 3300 deletions(-) delete mode 100644 docs/basic-config.asciidoc delete mode 100644 docs/config.asciidoc create mode 100644 docs/docset.yml delete mode 100644 docs/dsl.asciidoc delete mode 100644 docs/ecs.asciidoc delete mode 100644 docs/examples/apm/screenshot.jpg delete mode 100644 docs/getting-started.asciidoc delete mode 100644 docs/helpers/index.asciidoc delete mode 100644 docs/index.asciidoc delete mode 100644 docs/installation.asciidoc delete mode 100644 docs/integrations.asciidoc delete mode 100644 docs/open-telemetry.asciidoc delete mode 100644 docs/overview.asciidoc delete mode 100644 docs/rails.asciidoc rename docs/{helpers/bulk-scroll.asciidoc => reference/Helpers.md} (78%) rename docs/{model.asciidoc => reference/activemodel_activerecord.md} (55%) rename docs/{advanced-config.asciidoc => reference/advanced-config.md} (55%) rename docs/{api.asciidoc => reference/api.md} (68%) create mode 100644 docs/reference/basic-config.md create mode 100644 docs/reference/client-helpers.md create mode 100644 docs/reference/configuration.md rename docs/{connecting.asciidoc => reference/connecting.md} (57%) create mode 100644 docs/reference/dsl.md create mode 100644 docs/reference/ecs.md rename docs/{helpers/esql.asciidoc => reference/esql.md} (72%) rename docs/{examples.asciidoc => reference/examples.md} (82%) create mode 100644 docs/reference/getting-started.md create mode 100644 docs/reference/index.md create mode 100644 docs/reference/installation.md create mode 100644 docs/reference/integrations.md create mode 100644 docs/reference/opentelemetry.md rename docs/{persistence.asciidoc => reference/persistence.md} (56%) create mode 100644 docs/reference/ruby_on_rails.md create mode 100644 docs/reference/toc.yml rename docs/{transport.asciidoc => reference/transport.md} (57%) create mode 100644 docs/release-notes/breaking-changes.md create mode 100644 docs/release-notes/deprecations.md create mode 100644 docs/release-notes/index.md create mode 100644 docs/release-notes/known-issues.md create mode 100644 docs/release-notes/toc.yml delete mode 100644 docs/release_notes/70.asciidoc delete mode 100644 docs/release_notes/710.asciidoc delete mode 100644 docs/release_notes/711.asciidoc delete mode 100644 docs/release_notes/712.asciidoc delete mode 100644 docs/release_notes/713.asciidoc delete mode 100644 docs/release_notes/714.asciidoc delete mode 100644 docs/release_notes/715.asciidoc delete mode 100644 docs/release_notes/716.asciidoc delete mode 100644 docs/release_notes/717.asciidoc delete mode 100644 docs/release_notes/75.asciidoc delete mode 100644 docs/release_notes/76.asciidoc delete mode 100644 docs/release_notes/77.asciidoc delete mode 100644 docs/release_notes/78.asciidoc delete mode 100644 docs/release_notes/79.asciidoc delete mode 100644 docs/release_notes/80.asciidoc delete mode 100644 docs/release_notes/81.asciidoc delete mode 100644 docs/release_notes/810.asciidoc delete mode 100644 docs/release_notes/811.asciidoc delete mode 100644 docs/release_notes/812.asciidoc delete mode 100644 docs/release_notes/813.asciidoc delete mode 100644 docs/release_notes/814.asciidoc delete mode 100644 docs/release_notes/815.asciidoc delete mode 100644 docs/release_notes/816.asciidoc delete mode 100644 docs/release_notes/817.asciidoc delete mode 100644 docs/release_notes/82.asciidoc delete mode 100644 docs/release_notes/83.asciidoc delete mode 100644 docs/release_notes/84.asciidoc delete mode 100644 docs/release_notes/85.asciidoc delete mode 100644 docs/release_notes/86.asciidoc delete mode 100644 docs/release_notes/87.asciidoc delete mode 100644 docs/release_notes/88.asciidoc delete mode 100644 docs/release_notes/89.asciidoc delete mode 100644 docs/release_notes/index.asciidoc delete mode 100644 docs/troubleshooting.asciidoc diff --git a/docs/basic-config.asciidoc b/docs/basic-config.asciidoc deleted file mode 100644 index d0edd7ec76..0000000000 --- a/docs/basic-config.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[[basic-config]] -=== Basic configuration - -The table below contains the most important initialization parameters that you -can use. - - -[cols="<,<,<"] -|=== - -| **Parameter** | **Data type** | **Description** -| `adapter` | Symbol | A specific adapter for Faraday (for example, `:patron`). -| `api_key` | String, Hash | For API key Authentication. Either the base64 encoding of `id` and `api_key` joined by a colon as a string, or a hash with the `id` and `api_key` values. -| `compression` | Boolean | Whether to compress requests. Gzip compression is used. Defaults to `false`. Responses are automatically inflated if they are compressed. If a custom transport object is used, it must handle the request compression and response inflation. -| `enable_meta_header` | Boolean | Whether to enable sending the meta data header to Cloud. Defaults to `true`. -| `hosts` | String, Array | Single host passed as a string or hash, or multiple hosts passed as an array; `host` or `url` keys are also valid. -| `log` | Boolean | Whether to use the default logger. Disabled by default. -| `logger` | Object | An instance of a Logger-compatible object. -| `opaque_id_prefix` | String | Sets a prefix for X-Opaque-Id when initializing the client. This is prepended to the id you set before each request if you're using X-Opaque-Id. -| `opentelemetry_tracer_provider` | `OpenTelemetry::Trace::TracerProvider` | An explicit TracerProvider to use instead of the global one with OpenTelemetry. This enables better dependency injection and simplifies testing. -| `randomize_hosts` | Boolean | Whether to shuffle connections on initialization and reload. Defaults to `false`. -| `reload_connections` | Boolean, Number | Whether to reload connections after X requests. Defaults to `false`. -| `reload_on_failure` | Boolean | Whether to reload connections after failure. Defaults to `false`. -| `request_timeout` | Integer | The request timeout to be passed to transport in options. -| `resurrect_after` | Integer | Specifies after how many seconds a dead connection should be tried again. -| `retry_on_failure` | Boolean, Number | Whether to retry X times when request fails before raising and exception. Defaults to `false`. -| `retry_on_status` | Array, Number | Specifies which status code needs to be returned to retry. -| `selector` | Constant | An instance of selector strategy implemented with {Elastic::Transport::Transport::Connections::Selector::Base}. -| `send_get_body_as` | String | Specifies the HTTP method to use for GET requests with a body. Defaults to `GET`. -| `serializer_class` | Constant | Specifies a serializer class to use. It is initialized by the transport and passed the transport instance. -| `sniffer_timeout` | Integer | Specifies the timeout for reloading connections in seconds. Defaults to `1`. -| `trace` | Boolean | Whether to use the default tracer. Disabled by default. -| `tracer` | Object | Specifies an instance of a Logger-compatible object. -| `transport` | Object | Specifies a transport instance. -| `transport_class` | Constant | Specifies a transport class to use. It is initialized by the client and passed hosts and all arguments. -| `transport_options` | Hash | Specifies the options to be passed to the `Faraday::Connection` constructor. -|=== diff --git a/docs/config.asciidoc b/docs/config.asciidoc deleted file mode 100644 index c9897f8313..0000000000 --- a/docs/config.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[[ruby-config]] -== Configuration - -This page contains information about how to configure the Ruby client tailored -to your needs. Almost every aspect of the client is configurable. However, in -most cases you only need to set a couple of parameters. - -* <> -* <> \ No newline at end of file diff --git a/docs/docset.yml b/docs/docset.yml new file mode 100644 index 0000000000..fb1b1471b7 --- /dev/null +++ b/docs/docset.yml @@ -0,0 +1,490 @@ +project: 'Ruby client' +exclude: + - examples/** +cross_links: + - docs-content + - ecs + - ecs-logging-ruby +toc: + - toc: reference + - toc: release-notes +subs: + ref: "https://www.elastic.co/guide/en/elasticsearch/reference/current" + ref-bare: "https://www.elastic.co/guide/en/elasticsearch/reference" + ref-8x: "https://www.elastic.co/guide/en/elasticsearch/reference/8.1" + ref-80: "https://www.elastic.co/guide/en/elasticsearch/reference/8.0" + ref-7x: "https://www.elastic.co/guide/en/elasticsearch/reference/7.17" + ref-70: "https://www.elastic.co/guide/en/elasticsearch/reference/7.0" + ref-60: "https://www.elastic.co/guide/en/elasticsearch/reference/6.0" + ref-64: "https://www.elastic.co/guide/en/elasticsearch/reference/6.4" + xpack-ref: "https://www.elastic.co/guide/en/x-pack/6.2" + logstash-ref: "https://www.elastic.co/guide/en/logstash/current" + kibana-ref: "https://www.elastic.co/guide/en/kibana/current" + kibana-ref-all: "https://www.elastic.co/guide/en/kibana" + beats-ref-root: "https://www.elastic.co/guide/en/beats" + beats-ref: "https://www.elastic.co/guide/en/beats/libbeat/current" + beats-ref-60: "https://www.elastic.co/guide/en/beats/libbeat/6.0" + beats-ref-63: "https://www.elastic.co/guide/en/beats/libbeat/6.3" + beats-devguide: "https://www.elastic.co/guide/en/beats/devguide/current" + auditbeat-ref: "https://www.elastic.co/guide/en/beats/auditbeat/current" + packetbeat-ref: "https://www.elastic.co/guide/en/beats/packetbeat/current" + metricbeat-ref: "https://www.elastic.co/guide/en/beats/metricbeat/current" + filebeat-ref: "https://www.elastic.co/guide/en/beats/filebeat/current" + functionbeat-ref: "https://www.elastic.co/guide/en/beats/functionbeat/current" + winlogbeat-ref: "https://www.elastic.co/guide/en/beats/winlogbeat/current" + heartbeat-ref: "https://www.elastic.co/guide/en/beats/heartbeat/current" + journalbeat-ref: "https://www.elastic.co/guide/en/beats/journalbeat/current" + ingest-guide: "https://www.elastic.co/guide/en/ingest/current" + fleet-guide: "https://www.elastic.co/guide/en/fleet/current" + apm-guide-ref: "https://www.elastic.co/guide/en/apm/guide/current" + apm-guide-7x: "https://www.elastic.co/guide/en/apm/guide/7.17" + apm-app-ref: "https://www.elastic.co/guide/en/kibana/current" + apm-agents-ref: "https://www.elastic.co/guide/en/apm/agent" + apm-android-ref: "https://www.elastic.co/guide/en/apm/agent/android/current" + apm-py-ref: "https://www.elastic.co/guide/en/apm/agent/python/current" + apm-py-ref-3x: "https://www.elastic.co/guide/en/apm/agent/python/3.x" + apm-node-ref-index: "https://www.elastic.co/guide/en/apm/agent/nodejs" + apm-node-ref: "https://www.elastic.co/guide/en/apm/agent/nodejs/current" + apm-node-ref-1x: "https://www.elastic.co/guide/en/apm/agent/nodejs/1.x" + apm-rum-ref: "https://www.elastic.co/guide/en/apm/agent/rum-js/current" + apm-ruby-ref: "https://www.elastic.co/guide/en/apm/agent/ruby/current" + apm-java-ref: "https://www.elastic.co/guide/en/apm/agent/java/current" + apm-go-ref: "https://www.elastic.co/guide/en/apm/agent/go/current" + apm-dotnet-ref: "https://www.elastic.co/guide/en/apm/agent/dotnet/current" + apm-php-ref: "https://www.elastic.co/guide/en/apm/agent/php/current" + apm-ios-ref: "https://www.elastic.co/guide/en/apm/agent/swift/current" + apm-lambda-ref: "https://www.elastic.co/guide/en/apm/lambda/current" + apm-attacher-ref: "https://www.elastic.co/guide/en/apm/attacher/current" + docker-logging-ref: "https://www.elastic.co/guide/en/beats/loggingplugin/current" + esf-ref: "https://www.elastic.co/guide/en/esf/current" + kinesis-firehose-ref: "https://www.elastic.co/guide/en/kinesis/{{kinesis_version}}" + estc-welcome-current: "https://www.elastic.co/guide/en/starting-with-the-elasticsearch-platform-and-its-solutions/current" + estc-welcome: "https://www.elastic.co/guide/en/starting-with-the-elasticsearch-platform-and-its-solutions/current" + estc-welcome-all: "https://www.elastic.co/guide/en/starting-with-the-elasticsearch-platform-and-its-solutions" + hadoop-ref: "https://www.elastic.co/guide/en/elasticsearch/hadoop/current" + stack-ref: "https://www.elastic.co/guide/en/elastic-stack/current" + stack-ref-67: "https://www.elastic.co/guide/en/elastic-stack/6.7" + stack-ref-68: "https://www.elastic.co/guide/en/elastic-stack/6.8" + stack-ref-70: "https://www.elastic.co/guide/en/elastic-stack/7.0" + stack-ref-80: "https://www.elastic.co/guide/en/elastic-stack/8.0" + stack-ov: "https://www.elastic.co/guide/en/elastic-stack-overview/current" + stack-gs: "https://www.elastic.co/guide/en/elastic-stack-get-started/current" + stack-gs-current: "https://www.elastic.co/guide/en/elastic-stack-get-started/current" + javaclient: "https://www.elastic.co/guide/en/elasticsearch/client/java-api/current" + java-api-client: "https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current" + java-rest: "https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current" + jsclient: "https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current" + jsclient-current: "https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current" + es-ruby-client: "https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current" + es-dotnet-client: "https://www.elastic.co/guide/en/elasticsearch/client/net-api/current" + es-php-client: "https://www.elastic.co/guide/en/elasticsearch/client/php-api/current" + es-python-client: "https://www.elastic.co/guide/en/elasticsearch/client/python-api/current" + defguide: "https://www.elastic.co/guide/en/elasticsearch/guide/2.x" + painless: "https://www.elastic.co/guide/en/elasticsearch/painless/current" + plugins: "https://www.elastic.co/guide/en/elasticsearch/plugins/current" + plugins-8x: "https://www.elastic.co/guide/en/elasticsearch/plugins/8.1" + plugins-7x: "https://www.elastic.co/guide/en/elasticsearch/plugins/7.17" + plugins-6x: "https://www.elastic.co/guide/en/elasticsearch/plugins/6.8" + glossary: "https://www.elastic.co/guide/en/elastic-stack-glossary/current" + upgrade_guide: "https://www.elastic.co/products/upgrade_guide" + blog-ref: "https://www.elastic.co/blog/" + curator-ref: "https://www.elastic.co/guide/en/elasticsearch/client/curator/current" + curator-ref-current: "https://www.elastic.co/guide/en/elasticsearch/client/curator/current" + metrics-ref: "https://www.elastic.co/guide/en/metrics/current" + metrics-guide: "https://www.elastic.co/guide/en/metrics/guide/current" + logs-ref: "https://www.elastic.co/guide/en/logs/current" + logs-guide: "https://www.elastic.co/guide/en/logs/guide/current" + uptime-guide: "https://www.elastic.co/guide/en/uptime/current" + observability-guide: "https://www.elastic.co/guide/en/observability/current" + observability-guide-all: "https://www.elastic.co/guide/en/observability" + siem-guide: "https://www.elastic.co/guide/en/siem/guide/current" + security-guide: "https://www.elastic.co/guide/en/security/current" + security-guide-all: "https://www.elastic.co/guide/en/security" + endpoint-guide: "https://www.elastic.co/guide/en/endpoint/current" + sql-odbc: "https://www.elastic.co/guide/en/elasticsearch/sql-odbc/current" + ecs-ref: "https://www.elastic.co/guide/en/ecs/current" + ecs-logging-ref: "https://www.elastic.co/guide/en/ecs-logging/overview/current" + ecs-logging-go-logrus-ref: "https://www.elastic.co/guide/en/ecs-logging/go-logrus/current" + ecs-logging-go-zap-ref: "https://www.elastic.co/guide/en/ecs-logging/go-zap/current" + ecs-logging-go-zerolog-ref: "https://www.elastic.co/guide/en/ecs-logging/go-zap/current" + ecs-logging-java-ref: "https://www.elastic.co/guide/en/ecs-logging/java/current" + ecs-logging-dotnet-ref: "https://www.elastic.co/guide/en/ecs-logging/dotnet/current" + ecs-logging-nodejs-ref: "https://www.elastic.co/guide/en/ecs-logging/nodejs/current" + ecs-logging-php-ref: "https://www.elastic.co/guide/en/ecs-logging/php/current" + ecs-logging-python-ref: "https://www.elastic.co/guide/en/ecs-logging/python/current" + ecs-logging-ruby-ref: "https://www.elastic.co/guide/en/ecs-logging/ruby/current" + ml-docs: "https://www.elastic.co/guide/en/machine-learning/current" + eland-docs: "https://www.elastic.co/guide/en/elasticsearch/client/eland/current" + eql-ref: "https://eql.readthedocs.io/en/latest/query-guide" + extendtrial: "https://www.elastic.co/trialextension" + wikipedia: "https://en.wikipedia.org/wiki" + forum: "https://discuss.elastic.co/" + xpack-forum: "https://discuss.elastic.co/c/50-x-pack" + security-forum: "https://discuss.elastic.co/c/x-pack/shield" + watcher-forum: "https://discuss.elastic.co/c/x-pack/watcher" + monitoring-forum: "https://discuss.elastic.co/c/x-pack/marvel" + graph-forum: "https://discuss.elastic.co/c/x-pack/graph" + apm-forum: "https://discuss.elastic.co/c/apm" + enterprise-search-ref: "https://www.elastic.co/guide/en/enterprise-search/current" + app-search-ref: "https://www.elastic.co/guide/en/app-search/current" + workplace-search-ref: "https://www.elastic.co/guide/en/workplace-search/current" + enterprise-search-node-ref: "https://www.elastic.co/guide/en/enterprise-search-clients/enterprise-search-node/current" + enterprise-search-php-ref: "https://www.elastic.co/guide/en/enterprise-search-clients/php/current" + enterprise-search-python-ref: "https://www.elastic.co/guide/en/enterprise-search-clients/python/current" + enterprise-search-ruby-ref: "https://www.elastic.co/guide/en/enterprise-search-clients/ruby/current" + elastic-maps-service: "https://maps.elastic.co" + integrations-docs: "https://docs.elastic.co/en/integrations" + integrations-devguide: "https://www.elastic.co/guide/en/integrations-developer/current" + time-units: "https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#time-units" + byte-units: "https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#byte-units" + apm-py-ref-v: "https://www.elastic.co/guide/en/apm/agent/python/current" + apm-node-ref-v: "https://www.elastic.co/guide/en/apm/agent/nodejs/current" + apm-rum-ref-v: "https://www.elastic.co/guide/en/apm/agent/rum-js/current" + apm-ruby-ref-v: "https://www.elastic.co/guide/en/apm/agent/ruby/current" + apm-java-ref-v: "https://www.elastic.co/guide/en/apm/agent/java/current" + apm-go-ref-v: "https://www.elastic.co/guide/en/apm/agent/go/current" + apm-ios-ref-v: "https://www.elastic.co/guide/en/apm/agent/swift/current" + apm-dotnet-ref-v: "https://www.elastic.co/guide/en/apm/agent/dotnet/current" + apm-php-ref-v: "https://www.elastic.co/guide/en/apm/agent/php/current" + ecloud: "Elastic Cloud" + esf: "Elastic Serverless Forwarder" + ess: "Elasticsearch Service" + ece: "Elastic Cloud Enterprise" + eck: "Elastic Cloud on Kubernetes" + serverless-full: "Elastic Cloud Serverless" + serverless-short: "Serverless" + es-serverless: "Elasticsearch Serverless" + es3: "Elasticsearch Serverless" + obs-serverless: "Elastic Observability Serverless" + sec-serverless: "Elastic Security Serverless" + serverless-docs: "https://docs.elastic.co/serverless" + cloud: "https://www.elastic.co/guide/en/cloud/current" + ess-utm-params: "?page=docs&placement=docs-body" + ess-baymax: "?page=docs&placement=docs-body" + ess-trial: "https://cloud.elastic.co/registration?page=docs&placement=docs-body" + ess-product: "https://www.elastic.co/cloud/elasticsearch-service?page=docs&placement=docs-body" + ess-console: "https://cloud.elastic.co?page=docs&placement=docs-body" + ess-console-name: "Elasticsearch Service Console" + ess-deployments: "https://cloud.elastic.co/deployments?page=docs&placement=docs-body" + ece-ref: "https://www.elastic.co/guide/en/cloud-enterprise/current" + eck-ref: "https://www.elastic.co/guide/en/cloud-on-k8s/current" + ess-leadin: "You can run Elasticsearch on your own hardware or use our hosted Elasticsearch Service that is available on AWS, GCP, and Azure. https://cloud.elastic.co/registration{ess-utm-params}[Try the Elasticsearch Service for free]." + ess-leadin-short: "Our hosted Elasticsearch Service is available on AWS, GCP, and Azure, and you can https://cloud.elastic.co/registration{ess-utm-params}[try it for free]." + ess-icon: "image:https://doc-icons.s3.us-east-2.amazonaws.com/logo_cloud.svg[link=\"https://cloud.elastic.co/registration{ess-utm-params}\", title=\"Supported on Elasticsearch Service\"]" + ece-icon: "image:https://doc-icons.s3.us-east-2.amazonaws.com/logo_cloud_ece.svg[link=\"https://cloud.elastic.co/registration{ess-utm-params}\", title=\"Supported on Elastic Cloud Enterprise\"]" + cloud-only: "This feature is designed for indirect use by https://cloud.elastic.co/registration{ess-utm-params}[Elasticsearch Service], https://www.elastic.co/guide/en/cloud-enterprise/{ece-version-link}[Elastic Cloud Enterprise], and https://www.elastic.co/guide/en/cloud-on-k8s/current[Elastic Cloud on Kubernetes]. Direct use is not supported." + ess-setting-change: "image:https://doc-icons.s3.us-east-2.amazonaws.com/logo_cloud.svg[link=\"{ess-trial}\", title=\"Supported on {ess}\"] indicates a change to a supported https://www.elastic.co/guide/en/cloud/current/ec-add-user-settings.html[user setting] for Elasticsearch Service." + ess-skip-section: "If you use Elasticsearch Service, skip this section. Elasticsearch Service handles these changes for you." + api-cloud: "https://www.elastic.co/docs/api/doc/cloud" + api-ece: "https://www.elastic.co/docs/api/doc/cloud-enterprise" + api-kibana-serverless: "https://www.elastic.co/docs/api/doc/serverless" + es-feature-flag: "This feature is in development and not yet available for use. This documentation is provided for informational purposes only." + es-ref-dir: "'{{elasticsearch-root}}/docs/reference'" + apm-app: "APM app" + uptime-app: "Uptime app" + synthetics-app: "Synthetics app" + logs-app: "Logs app" + metrics-app: "Metrics app" + infrastructure-app: "Infrastructure app" + siem-app: "SIEM app" + security-app: "Elastic Security app" + ml-app: "Machine Learning" + dev-tools-app: "Dev Tools" + ingest-manager-app: "Ingest Manager" + stack-manage-app: "Stack Management" + stack-monitor-app: "Stack Monitoring" + alerts-ui: "Alerts and Actions" + rules-ui: "Rules" + rac-ui: "Rules and Connectors" + connectors-ui: "Connectors" + connectors-feature: "Actions and Connectors" + stack-rules-feature: "Stack Rules" + user-experience: "User Experience" + ems: "Elastic Maps Service" + ems-init: "EMS" + hosted-ems: "Elastic Maps Server" + ipm-app: "Index Pattern Management" + ingest-pipelines: "ingest pipelines" + ingest-pipelines-app: "Ingest Pipelines" + ingest-pipelines-cap: "Ingest pipelines" + ls-pipelines: "Logstash pipelines" + ls-pipelines-app: "Logstash Pipelines" + maint-windows: "maintenance windows" + maint-windows-app: "Maintenance Windows" + maint-windows-cap: "Maintenance windows" + custom-roles-app: "Custom Roles" + data-source: "data view" + data-sources: "data views" + data-source-caps: "Data View" + data-sources-caps: "Data Views" + data-source-cap: "Data view" + data-sources-cap: "Data views" + project-settings: "Project settings" + manage-app: "Management" + index-manage-app: "Index Management" + data-views-app: "Data Views" + rules-app: "Rules" + saved-objects-app: "Saved Objects" + tags-app: "Tags" + api-keys-app: "API keys" + transforms-app: "Transforms" + connectors-app: "Connectors" + files-app: "Files" + reports-app: "Reports" + maps-app: "Maps" + alerts-app: "Alerts" + crawler: "Enterprise Search web crawler" + ents: "Enterprise Search" + app-search-crawler: "App Search web crawler" + agent: "Elastic Agent" + agents: "Elastic Agents" + fleet: "Fleet" + fleet-server: "Fleet Server" + integrations-server: "Integrations Server" + ingest-manager: "Ingest Manager" + ingest-management: "ingest management" + package-manager: "Elastic Package Manager" + integrations: "Integrations" + package-registry: "Elastic Package Registry" + artifact-registry: "Elastic Artifact Registry" + aws: "AWS" + stack: "Elastic Stack" + xpack: "X-Pack" + es: "Elasticsearch" + kib: "Kibana" + esms: "Elastic Stack Monitoring Service" + esms-init: "ESMS" + ls: "Logstash" + beats: "Beats" + auditbeat: "Auditbeat" + filebeat: "Filebeat" + heartbeat: "Heartbeat" + metricbeat: "Metricbeat" + packetbeat: "Packetbeat" + winlogbeat: "Winlogbeat" + functionbeat: "Functionbeat" + journalbeat: "Journalbeat" + es-sql: "Elasticsearch SQL" + esql: "ES|QL" + elastic-agent: "Elastic Agent" + k8s: "Kubernetes" + log-driver-long: "Elastic Logging Plugin for Docker" + security: "X-Pack security" + security-features: "security features" + operator-feature: "operator privileges feature" + es-security-features: "Elasticsearch security features" + stack-security-features: "Elastic Stack security features" + endpoint-sec: "Endpoint Security" + endpoint-cloud-sec: "Endpoint and Cloud Security" + elastic-defend: "Elastic Defend" + elastic-sec: "Elastic Security" + elastic-endpoint: "Elastic Endpoint" + swimlane: "Swimlane" + sn: "ServiceNow" + sn-itsm: "ServiceNow ITSM" + sn-itom: "ServiceNow ITOM" + sn-sir: "ServiceNow SecOps" + jira: "Jira" + ibm-r: "IBM Resilient" + webhook: "Webhook" + webhook-cm: "Webhook - Case Management" + opsgenie: "Opsgenie" + bedrock: "Amazon Bedrock" + gemini: "Google Gemini" + hive: "TheHive" + monitoring: "X-Pack monitoring" + monitor-features: "monitoring features" + stack-monitor-features: "Elastic Stack monitoring features" + watcher: "Watcher" + alert-features: "alerting features" + reporting: "X-Pack reporting" + report-features: "reporting features" + graph: "X-Pack graph" + graph-features: "graph analytics features" + searchprofiler: "Search Profiler" + xpackml: "X-Pack machine learning" + ml: "machine learning" + ml-cap: "Machine learning" + ml-init: "ML" + ml-features: "machine learning features" + stack-ml-features: "Elastic Stack machine learning features" + ccr: "cross-cluster replication" + ccr-cap: "Cross-cluster replication" + ccr-init: "CCR" + ccs: "cross-cluster search" + ccs-cap: "Cross-cluster search" + ccs-init: "CCS" + ilm: "index lifecycle management" + ilm-cap: "Index lifecycle management" + ilm-init: "ILM" + dlm: "data lifecycle management" + dlm-cap: "Data lifecycle management" + dlm-init: "DLM" + search-snap: "searchable snapshot" + search-snaps: "searchable snapshots" + search-snaps-cap: "Searchable snapshots" + slm: "snapshot lifecycle management" + slm-cap: "Snapshot lifecycle management" + slm-init: "SLM" + rollup-features: "data rollup features" + ipm: "index pattern management" + ipm-cap: "Index pattern" + rollup: "rollup" + rollup-cap: "Rollup" + rollups: "rollups" + rollups-cap: "Rollups" + rollup-job: "rollup job" + rollup-jobs: "rollup jobs" + rollup-jobs-cap: "Rollup jobs" + dfeed: "datafeed" + dfeeds: "datafeeds" + dfeed-cap: "Datafeed" + dfeeds-cap: "Datafeeds" + ml-jobs: "machine learning jobs" + ml-jobs-cap: "Machine learning jobs" + anomaly-detect: "anomaly detection" + anomaly-detect-cap: "Anomaly detection" + anomaly-job: "anomaly detection job" + anomaly-jobs: "anomaly detection jobs" + anomaly-jobs-cap: "Anomaly detection jobs" + dataframe: "data frame" + dataframes: "data frames" + dataframe-cap: "Data frame" + dataframes-cap: "Data frames" + watcher-transform: "payload transform" + watcher-transforms: "payload transforms" + watcher-transform-cap: "Payload transform" + watcher-transforms-cap: "Payload transforms" + transform: "transform" + transforms: "transforms" + transform-cap: "Transform" + transforms-cap: "Transforms" + dataframe-transform: "transform" + dataframe-transform-cap: "Transform" + dataframe-transforms: "transforms" + dataframe-transforms-cap: "Transforms" + dfanalytics-cap: "Data frame analytics" + dfanalytics: "data frame analytics" + dataframe-analytics-config: "'{dataframe} analytics config'" + dfanalytics-job: "'{dataframe} analytics job'" + dfanalytics-jobs: "'{dataframe} analytics jobs'" + dfanalytics-jobs-cap: "'{dataframe-cap} analytics jobs'" + cdataframe: "continuous data frame" + cdataframes: "continuous data frames" + cdataframe-cap: "Continuous data frame" + cdataframes-cap: "Continuous data frames" + cdataframe-transform: "continuous transform" + cdataframe-transforms: "continuous transforms" + cdataframe-transforms-cap: "Continuous transforms" + ctransform: "continuous transform" + ctransform-cap: "Continuous transform" + ctransforms: "continuous transforms" + ctransforms-cap: "Continuous transforms" + oldetection: "outlier detection" + oldetection-cap: "Outlier detection" + olscore: "outlier score" + olscores: "outlier scores" + fiscore: "feature influence score" + evaluatedf-api: "evaluate {dataframe} analytics API" + evaluatedf-api-cap: "Evaluate {dataframe} analytics API" + binarysc: "binary soft classification" + binarysc-cap: "Binary soft classification" + regression: "regression" + regression-cap: "Regression" + reganalysis: "regression analysis" + reganalysis-cap: "Regression analysis" + depvar: "dependent variable" + feature-var: "feature variable" + feature-vars: "feature variables" + feature-vars-cap: "Feature variables" + classification: "classification" + classification-cap: "Classification" + classanalysis: "classification analysis" + classanalysis-cap: "Classification analysis" + infer-cap: "Inference" + infer: "inference" + lang-ident-cap: "Language identification" + lang-ident: "language identification" + data-viz: "Data Visualizer" + file-data-viz: "File Data Visualizer" + feat-imp: "feature importance" + feat-imp-cap: "Feature importance" + nlp: "natural language processing" + nlp-cap: "Natural language processing" + apm-agent: "APM agent" + apm-go-agent: "Elastic APM Go agent" + apm-go-agents: "Elastic APM Go agents" + apm-ios-agent: "Elastic APM iOS agent" + apm-ios-agents: "Elastic APM iOS agents" + apm-java-agent: "Elastic APM Java agent" + apm-java-agents: "Elastic APM Java agents" + apm-dotnet-agent: "Elastic APM .NET agent" + apm-dotnet-agents: "Elastic APM .NET agents" + apm-node-agent: "Elastic APM Node.js agent" + apm-node-agents: "Elastic APM Node.js agents" + apm-php-agent: "Elastic APM PHP agent" + apm-php-agents: "Elastic APM PHP agents" + apm-py-agent: "Elastic APM Python agent" + apm-py-agents: "Elastic APM Python agents" + apm-ruby-agent: "Elastic APM Ruby agent" + apm-ruby-agents: "Elastic APM Ruby agents" + apm-rum-agent: "Elastic APM Real User Monitoring (RUM) JavaScript agent" + apm-rum-agents: "Elastic APM RUM JavaScript agents" + apm-lambda-ext: "Elastic APM AWS Lambda extension" + project-monitors: "project monitors" + project-monitors-cap: "Project monitors" + private-location: "Private Location" + private-locations: "Private Locations" + pwd: "YOUR_PASSWORD" + esh: "ES-Hadoop" + default-dist: "default distribution" + oss-dist: "OSS-only distribution" + observability: "Observability" + api-request-title: "Request" + api-prereq-title: "Prerequisites" + api-description-title: "Description" + api-path-parms-title: "Path parameters" + api-query-parms-title: "Query parameters" + api-request-body-title: "Request body" + api-response-codes-title: "Response codes" + api-response-body-title: "Response body" + api-example-title: "Example" + api-examples-title: "Examples" + api-definitions-title: "Properties" + multi-arg: "†footnoteref:[multi-arg,This parameter accepts multiple arguments.]" + multi-arg-ref: "†footnoteref:[multi-arg]" + yes-icon: "image:https://doc-icons.s3.us-east-2.amazonaws.com/icon-yes.png[Yes,20,15]" + no-icon: "image:https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png[No,20,15]" + es-repo: "https://github.com/elastic/elasticsearch/" + es-issue: "https://github.com/elastic/elasticsearch/issues/" + es-pull: "https://github.com/elastic/elasticsearch/pull/" + es-commit: "https://github.com/elastic/elasticsearch/commit/" + kib-repo: "https://github.com/elastic/kibana/" + kib-issue: "https://github.com/elastic/kibana/issues/" + kibana-issue: "'{kib-repo}issues/'" + kib-pull: "https://github.com/elastic/kibana/pull/" + kibana-pull: "'{kib-repo}pull/'" + kib-commit: "https://github.com/elastic/kibana/commit/" + ml-repo: "https://github.com/elastic/ml-cpp/" + ml-issue: "https://github.com/elastic/ml-cpp/issues/" + ml-pull: "https://github.com/elastic/ml-cpp/pull/" + ml-commit: "https://github.com/elastic/ml-cpp/commit/" + apm-repo: "https://github.com/elastic/apm-server/" + apm-issue: "https://github.com/elastic/apm-server/issues/" + apm-pull: "https://github.com/elastic/apm-server/pull/" + kibana-blob: "https://github.com/elastic/kibana/blob/current/" + apm-get-started-ref: "https://www.elastic.co/guide/en/apm/get-started/current" + apm-server-ref: "https://www.elastic.co/guide/en/apm/server/current" + apm-server-ref-v: "https://www.elastic.co/guide/en/apm/server/current" + apm-server-ref-m: "https://www.elastic.co/guide/en/apm/server/master" + apm-server-ref-62: "https://www.elastic.co/guide/en/apm/server/6.2" + apm-server-ref-64: "https://www.elastic.co/guide/en/apm/server/6.4" + apm-server-ref-70: "https://www.elastic.co/guide/en/apm/server/7.0" + apm-overview-ref-v: "https://www.elastic.co/guide/en/apm/get-started/current" + apm-overview-ref-70: "https://www.elastic.co/guide/en/apm/get-started/7.0" + apm-overview-ref-m: "https://www.elastic.co/guide/en/apm/get-started/master" + infra-guide: "https://www.elastic.co/guide/en/infrastructure/guide/current" + a-data-source: "a data view" + icon-bug: "pass:[]" + icon-checkInCircleFilled: "pass:[]" + icon-warningFilled: "pass:[]" diff --git a/docs/dsl.asciidoc b/docs/dsl.asciidoc deleted file mode 100644 index 922624a4fa..0000000000 --- a/docs/dsl.asciidoc +++ /dev/null @@ -1,6 +0,0 @@ -[[dsl]] -=== Elasticsearch DSL - -The https://github.com/elastic/elasticsearch-dsl-ruby[elasticsearch-dsl] gem provides a Ruby API for the https://www.elasticsearch.com/guide/en/elasticsearch/reference/current/query-dsl.html[Elasticsearch Query DSL]. The library allows to programmatically build complex search definitions for {es} in Ruby, which are translated to Hashes, and ultimately, JSON, the language of {es}. - -See https://github.com/elastic/elasticsearch-dsl-ruby#elasticsearchdsl[the README] for more information. diff --git a/docs/ecs.asciidoc b/docs/ecs.asciidoc deleted file mode 100644 index 218708038b..0000000000 --- a/docs/ecs.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[[ecs]] -=== Elastic Common Schema (ECS) - -The https://www.elastic.co/guide/en/ecs/current/ecs-reference.html[Elastic Common Schema (ECS)] is an open source format that defines a common set of fields to be used when storing event data like logs in Elasticsearch. - -You can use the library https://github.com/elastic/ecs-logging-ruby[ecs-logging] which is a set of libraries that enables you to transform your application logs to structured logs that comply with the ECS format. - -Add this line to your application's Gemfile: - -[source,ruby] ------------------------------------- -gem 'ecs-logging' ------------------------------------- - -Then execute `bundle install`. Or install from the command line yourself: - -[source,ruby] ------------------------------------- -$ gem install ecs-logging ------------------------------------- - -Then configure the client to use the logger: -[source,ruby] ------------------------------------- -require 'ecs_logging/logger' -require 'elasticsearch' - -logger = EcsLogging::Logger.new($stdout) -client = Elasticsearch::Client.new(logger: logger) -> client.info -{"@timestamp":"2022-07-12T05:31:18.590Z","log.level":"INFO","message":"GET http://localhost:9200/ [status:200, request:0.009s, query:n/a]","ecs.version":"1.4.0"}... ------------------------------------- - -See https://www.elastic.co/guide/en/ecs-logging/ruby/current/index.html[ECS Logging Ruby Reference] for more information on how to configure the logger. diff --git a/docs/examples/apm/screenshot.jpg b/docs/examples/apm/screenshot.jpg deleted file mode 100644 index 6ba778dfb5d651ce72fafa085953dab3087bad71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 324480 zcmeEv1wd3;_xJ!Rq0*tGqJoHkNHn09I``gl<`oPMCw5bh5j(Pk)o)}Ug ziZmZp822a8jU7zLD&Jc-PS)lJJ8>6228pdU(~QVZAgBr)v{GlnhX|Ua#4no@uh|e4 zM+B;uTw_nbzaK6!OWGiMEu&CXxL;`yVKG3_HzHh);oDWuEA4wRa?U(Pl^dKB9(T)v zS)W=pL-Wq7X*_Pgc>Y#65fRWXaJ}#be~?NcYqOaTd?>Lq#baKa99BOyoO@xKPm5@s zi5}LTqU$ver+SE>iu=Hh$mOV9H>Zc~u#hD<}f~zs2m$2)1YUwo82xCD~kbnZ|~=TSd4jbUK!@q)F<$)Eq>bBRBu0Qby=g!#82m z){yw*SAVNCAW$cBIqjs9H*NbIyC+aI-lSJ~j0u805BNsTqHb$RtnSV^o2KYg?YbQ? z1wiKF-%R#fab&fgLrKxK76&M3Qg5f9AanLFrgEA91fpNkczW*JocuHKUfE=KkZ_Tm z;6J18TPEK zoc9iG^B!?WdRf3`$e}8nOy?DdTJ>c-KQr-6LDlfEIHzfA$A(f?dya)wb?1A2MPfgi z2vzwNdZQUXQmvqwsiNdG7U;aAfz7S>qi6KbG)*h5Nnp#I5nvGf&)oe1M*A}NSi{Bx$z+5Xf4cy~gOKx# z1!{)SYgzAnx((mzh?p9)h2VdYLlcHv7@0Ju8Ebz=J64IVMHI@1YtyJ?S6c5<*f~li zwkm*!kPWAhC9!sr_bc$5-lc7`+}YI&1i0St%{^l%lS%N7?h9Hlgs?wZpz;@QEonO;`T z8-XAqr{} z8U^A#QN#S@jKh@GkJ_R_*P^s7Ab(&zUrKujpVE32I)tCid>FG{DT->A<^ zTbxiPNzSqTnC26p@26aylz>Pqg#a!> zAYwD9!}--r>DE2t5Cbu$_HEht8W~rs#FJOlE?4z>zZ%)u6Z@SV{6uW_fXI=;Q*0w7!@q+vZ$| zscw!25kq6ocFPR^g~?Ud)~;zVUox%la8<`pmLLel2S+_sFYQaNe+;2KE*1oxz;FEn zF5|FT{-8}j27Mh0d;?%;zaKY5JqUu^dFG^36!ZH2!zah=hat#Po0jvU% zc!W&O>_y}pq|InQtu4m*kT95ApN~T^;Mpi!PdhB9H0H&}H@Zg7p4S_RFK0-;)>rtEM^1_~+mgw2x1|0$9%y6F&J$qILj?0=*xE z3iNw4O#355$|LZf1Ba{FC+av^h-lER-OYhDFkP05z!x1im$I$H53Dp7Kk7^8A}`ebG5E} zF`WeGj`NvM%n-L1hdyOnrxASK`_~Hh18(-ZeHRy{X?^)#AW7#6f|5y;X4{G0P<6`K zO9uC;qPZxg@QzsB28fCx$|ehrFurc(S2!r*R56cE$3DRz(XV9_b8+mJw5dX9nafFf z_a7womq?#;_LqeIG&9iN^5-;?{+4t6!^DsVl`113n=#dk^h!D1B=`Fvy55xIy&p>c zWul3vATU2Z3#Tyozkhx_Qg~iANmlnG@xKG&oF9MN3yf8lX^wC2RTA7^wNv6oy-c-9 zQU^kx&*RWT)4rNuC;U$(i-Oht6gdyJz{c09#8U4fJ%CMN>Ee(Hu5udN6%`BERHw)3 zIRx$L&xJd6>A4KBZvKbDdDZ-Lz`Qk?TQln@Ve1XJH&}^X(^;5T&d+0bgFnvHOEJNn49mGp@`g)HF81tb;lv-KR}uyd z5Q9*@StRc@(sF*|g`oUS3VOtY%BhjbEnOGM3G66myRo7Zc4O<1C9LgK9?K|*^kdk| zG4t4HH~wv?CFkkHnTBNA4oy(w zAVJ)072Gc?;X@&m$N4@(N0xbqgkJ&<>VFKR-S$Zt11g?~qCCNi=BIiUi zw49ZrXKM;4r`xPp?sCLcNMB_^I*6cu#lYUfMm@M(Xqm*3yLh**X9y+??+>`HXMrR;;szjC(fU)~LyKq$b= zIb)+~$FeBE`~@MVDXFZ=xAXoR72!o6kg%|}Uh;j=F|Hu(Q5VtceW$^#y7xIQf{y9-`JaEN)2vq0 z<^GF_BgJkO-5314_$0mmMG@e={|gqg*OO2(R1VWYBQQCE-$-jM{t(PwV^Rz3dQ5Ao zUZ|bB_zYk{ktSg54mzFwO#G1lR{&I^Olpv+A67nLy%0WfGQ1Yr00Q}cUcUgVh5hlz zNz$r+N{(caUX#|yWq@Y_AAKrAYwo4)t0{Y8yK;j;y?7w?%@$LuWKLt{qN(AM%&>X; z`CrM=q0B*VwJd&J7 z4;zsyVzn^iknqdE@!*76?pGd04ep<}Vvnf$_Y>o{BF+gfth}gOL|oRdq%Uoh=@6R4 zL)|fSk?WR9OB*3t}>{-${(d`iAv!wHd4Wug%YpYd*D;)OH?A%@s3HL*{0G_yqv+W_Z6M67yBy zG8ZD-Ww<2&>MQKm5fuEj5tY9G@Gj6W{V$d0A8nSJz)sIos~d2~H-FdzfaP{X9FIi2 z(n3riw<8MWTGD)W+|^#a2OuBEw;jddhM+T21_#L;b5cr82_4+X=?}43BZI+Pqx?aX zL_8DVz=&G+quD#I35PUp?M?eADeciLK1d=;hE74rR_idQOBEy##5J z6`Rs(Q{iSz%sLo}(5aYvg^^C|>FY?D{b1(4-+O_)KQD=btm!&5rCgunDc3isYqOZ8 z2CL@O4(^=cSaqa4>3-R9rADSjt};v@3LND4%R~|cucB8Gj=UGw?RgQrdd!^3C&8q&a-!~T2`W)xk|y*Nm^+!1D#&- z@EhM9vq))|?TibJij_oIy2N^JJ# zBD5lM0tH7xc|q%Bjwy=|s#hjw>5lE1u8qB2MFoLXDRS%9i)|=2YE8{@rT;^GkWoXn zC(Bvk-_(jN%!#)V;6lNk&`of(Oqn+{>vX0^n0mQ!c;;|eMfr4*;mf&~XI@Tpaz3Hs zw#v-yTJm{X(r8WY=y$}v|KmXHuroPBs)Lj$hsm6WXX`7f4U{`42GyqOG%C5aU3WZa zf-)c4j&LnxWj}aqQWXe^sy3o~>3kNtYSWScty1Pl%jxH?;8J@3*7R(W?^p;OrHjg$ z4Y)}jG`LA`f!nga1T#m261&cs$QR)hMjl%ftt)A2OK++wuco2t)o7L@$57?n;p)sL z2jk0ugW;?<`Q>QS?XWiFld?A?q2Pf@y(0DD^k+xDaegb zqfCa7w26*Df=fcQQsm2A;!Zibnz^wVZB#i|t5K!a=H-Tz`VU8%Tytc z(U@oT^*&(h8l6l=YRAqB4dSP$sXL0-yGhi^D+#{WHXsj_V&& ztwiNmhbSKpx=@)0k~xr3mp01sIV|w;*ZU2&sJ`oodif@=B>Y;GfvTSJv$yNZ=El+3 zZt0~pDN(u2QMq1ucUzkiA1Ym`3ha9dDKGRf&1>ojk*2nGaDCfhF`qdQ#04>;O}y%4 zqnwHzgd^g3*GVCFC66gZy;>u5*mW`JWJ8LILal;W$2xCJWU$b{_&fV&D{9cx%=(J2 zX8M@q>B5v1YR8%6?87a}&%Wq`0*+1z!)h=Qe5W#fEtRR$lVoDHbmwxgJ*nU7l;~5M&EOEgaeEgDBl8JBLi-1)e*3K$RF@+VsW)5^wqj#}woeb&Ep-V09rFKzN z(=IV**P_iMZi5E9QWUp)dqQ>c314%E)^RI`HW?N6^au-YrqcIKO=y(oXhsvr@_cZ% z9BJ;wj`pGdxn8e%52P|k3n>3Qw zKzPvJ0AKe#9LlIQ)A<8czi~825Q2==I@ttCdpauTJlASJFGfT18rfz?h4)T?4|D+o z{pVE-GE-TH=wAkoM@4=~ajK@W#2R}Jfhz4xUBiAzkf;_XU&B7|Fosu)w{B3W4;R-lY zy^OO&BxcRr!&X%eHqrJGCbl^B6jEYfv~wkXKQjleEC@8AnG)i@kNZ2%0xQi@_kD-5 zW+F7Fg%^@KHj8usjwn4`C15Mgg6|$7{33XggKf_H^R56mFy$ihP!Pk`{ZQSp#)d5%Zt0BTE%z7^ljs@xq5{Bi{P=h?2Il`Nk_KV zP-M(yp7rZ~IaxUH*ikT6k2L`O7?bnDS$_pEGQDda8i}0IlUH>Ffym9!ch`FEHk%;b zI@EkxGUeWgRWc+6mFRl^&G6{E!tQ`HhQAYYJ~15#Kwp$HR=8YzDIS1NTuTpq=a?Oh zY_?O{3Jj~H)F%2IweEnx9aHLNm8elc5D1jb7Y>2=~UR2G2OJ~1tw#GXL zM6vbQ^=wvW=pFztIvasD+i!XmG_~%4YDt3p?p*2Tb-?}+2!vG{!;vHbz7ALKc@IQy zh?umBzvesjc?(GUT{D>HGV{Zzdh)97xA%_zjfD1{#XlaL4@>xWfbWgU zKBQlExc-iQr0jijU_DzC9$q`EgPhyYrzB=F%^W4bF2t|Zdl1qE@XAzKny#4e<{D%E zK%*=eLNRkKdVVielmtzr8T~8>UAS=f$GhU%0yH~(btmesYZ^a!h z0)D2!$FPpT_}X@~pa zK?;|Tuzw4pUP>gC&MvBbQ}n>IAHtECkcD$8r#Q@L<;hHfRiOd?V--DS57XjqD1qU( zqDSKg8H8uUeGrP=$gPwk)I)Fb2<{I-j8K0$_ToPzeSg z^;~LZ@o!|miBiTsMVglh2rVkK_7-p<4w<)tACJq*Jyg-<$?>Ljf$BuyWU81PCKfy%~kZ6rYaKTupr!40*k_ zm@Bm>1jk{DKt`}Krt~;kf!Pvnz!3w}*vh-g@L-SO=yhS4G0I9AiZ zy+zMGyl|n8Ptgk`XbE5KSCfs?t{YzHOD8IVq;w{f7s9K^1$1U%uL!%ExYX2cUon2( zSIrTNmJLlZ_D;*Ovx5dTg%%e!1hW?uhuA=zo6lrPbWS_1uX26pnd>-yiFt%QE60^W zGzM_q>EGzqcg?grxp&e z)6}~6*%#Qqi@2BH{l}r3e+2gp$nUVayV17$==C1{z!(4@L_-~(^>LzLYH@u&HAiD| zC|Zd(wz*s3GP72uHG)67%6TFRGIgb4j*fxlyF&zm#3I%$=wgj z;|-+kL#BNv3g0h}6%~hW^dPpdIT%%EI~EbEWglSDTcuL=yN{|3$@SGMZDV*f)hpi) zxe3(xC3QL)=|w}7Q^jcG`0>s}>D#8Jb-F6>JIfTv1d>q7WXgEsNl568EcDe)G-(hP zL~XJ38+X@^y&Ev?0ex?7|Gc35ruavqII+$fl`w(dKMDfKPRTo#Hp3ehUq*xnrOO*? zw$4sr&09FiDd=az7)$*!=kj=E)We8-I{GafEO*dd`x~dOn@UT)VBx(U@kmuuOEYk5 z+bybj4mL9d4#+M<5bq>LL$LM3?@CX$l(#sFam7+lMlCy7&Uw$<%#2%3F4)fD=~Q2v zT1B*Qn`AqzSG=nx2%}4pq2i;&M@8Ir=*jcr}l1c zbJ-?;RQt#)-8w5%M;C5>pq~sbK#8f#%T~^=x)`T+z_mDH`WK)o>IlgtD;MD-PW+Kd z0R7ydLz{{dSaQLc<^=|+(|2Cv);R9EAhaYQdz0keGzv8RBKw>lQ3yL~aoKy-fg4zb zQO4dDw}LHd#@-bh5MrJb^6i2$rI?RIH;d;|g)s@aO!co!*3?W4?z**aEQYazP*l|6 zr^>PzT$?oG&-Dany9KSlV>~O_6kFez1BD=^ms3ZaoaY=Yv#GTmuzBm-5M{|_rEl4{ zx}%)hjy66xY~JJOa+xh@PF*mYwtvjK{@EMosKo@rK+LWgzUlh1d&c6-itUz-_x?fd z-f7j*YWOn)1i#ZTf~sxv9N_V*^HmA;86}r9iMbz+6qFbI>cff#vi8)Xk}HHkusb#5 zk0t`j&Ayx-q?Y@6f^hx>!e)v$AE?uP*T2wnFs1#%`4&0)qeVN{DZl(~U}YgNwPF8+ zn@Z?Q#t5zJFAizl{wgQmMzHBAWuRtx`==A%nP$F~IfxStZuP?MAtPvyKUU^I`c^K2 z1%XqODm%A)wBKQzhl4%}vYe*SX(a1+1Im8C{wtM%f&by)3Dt* zQsaQLhoTgQ`gmoJT)h7R1uA z;F3!Y)S)6nt$h{5VR6$PnFUS=8FYGwN+57~$IP$&{Ttc@7$*oVc6I9&1V9fg5+zLTm@Q9Vb&oY*cP)3nzQAv2Nnr8>%lK|xT-nY`W#^t+q_FL zBLdFX{Ipfd7RJfLf@h@$nB>|V$*F_=3eH3gFP@jJ?^bE)>_$}GcV3dL>uY!91%b|e zC}EjI@TC@vJ7Cx^a5xJBt9oYM)R39MbxSLL^F#sXOU7|PGk{nP99zu-2-~o|+TMQ| zV32wHen9i74=x_aI(kLo2=l?5cr$r+qoyBBO*&zRr`FP`+X-oP81|g&*mwzeK)5dk zB34}}0n-JR>GXB$JWRR`jqMQl&KO|7T%SM!6+wFAvNxt5U^_vUrd_ZPUMK)ZO+1WK zOyKoUfI$Mx{_>`i0Zcn3tYBsmgcU23k)s)#+r4^)i#xNdoI6ON1;`fB_EyiTwFH#g zmA``8q}%}k^i+)SxrDIRcD0uF@e3bZb9+}^K09gTp1r!v5vBxRduc~Xw-0h=mGQVZ z*8XsaKatVTA2FL^rs3N_TjqBc&Q2ze&Q~pc7;^NspQDw6YcX}kRB@-9 z1$V5zB2tgxVN#>?=MtdrES{ajbD*UtoUX*iwu3CeD20GBv&naD$JkX4s&B*%nRd4@ znUpOFR9N$S9Vfvt^It*_l4%-VfkQZ|ku|xCy_GY}MS2?r^3hIP&Du364&tx_Z!vr6 zz^+=c5jWyAR5KG3Z&4+X-RDFpEkLEkHswg6oIWYibk}|kFe;mY`Zl|dP%CR4#T8f+ zl)h@1o04*NkwSkYE_r>kc5gWZ0%bmdo=Rb_?REc;dio0S=ejXk^y*6l_AaH?JD7>1 z!z`C0Vnn$qVQeuh=kA-#;1oO2+sjZ>tCgOa9W73*U6(od22{;DHVj#?T_Fv<`p~L? z@?5RfDd)vcp!=e+%F^>6U)MOwG9|c{-X5ElnQn?-`j9a(v#z)uIqn#;FYuAFH5EJIjc+1ttwl) z-|*XgX?k9LRXu+g;f!|RF)jbGp#jcht9|7IQ|P_%M%}Pg7sl%DmDF`TS;&9~Eu)FU zqPb+jhI0ml=Wg%tTu+V7j6zd)^Y$l@vgDE_6mHeK!-TY)^8S)Xn)QP#aC4lO85^aB zoII7GbDh`{irP?v5r1E8^BL`0=Z#GB8Qo_4p&^p&`hfFI(J?cP_QOGv^A;M23RtYN zs7=z<;`P;&6y={lPA#e9bNSO#S>waB3+c^HyQiiKig$35>)rtqu`Awn_N?7m zB{;%bGna(w1HyJ^a0n;8J|;2l{bHkT)M_Q=)WEX+ClFP4X-S;!P>8;UMP5Y~d}qFg zi6C>s9`tATEXZYeV~U4#_AfhqZyy%~@@sJ=nW}Wn?ODAZKFJG_%v;~iwk`oCcf-b^ z>UIZpEeIlpB=L2%(PB>pRg2>)!ZLp(vZmk)6GvwJ8W&ftK>Lt-#X}0aHixxA)rB6e zID!(_=TEb*ZZUg790$1_a}6MUNpki(xN}v}Cf?;s6GgDR6+%r}c^y6k+p2Qvy1j!N z*-H&my=vAfU%3bCb4l}&BM4_}O>@;wy%IKB4(psqHRC$d=`l1v30JeXY%@Epc<4bA zz$FCh4ll2l&Bi!<2see+#&+XrU5I_9+*}Htan7!Uzmv7)ORD%)!9QJJO1v>SKd&!J zLE~1#?btxCfk|?62ts}hlDfX>FoKiO+4j~>U$?>O94K{VBX6naoNTy;pPH)fl_Kdvg4zD1Zrj^*Zwd_J`{mUy%w5ifeZI0WK*9uJ-{AJkG5cXqA z(b*;9X{#jx5Hqj-iN;#4IP~0vb+|1Ugl+t4u58U=0@m3FI)=^1M{8@)Y_AcC~*G-@g8$CDYdZ$7-4*xb99qy4i5=&ea-nE{AwsGa6L5GZ|>{bLDi8Q{xY zE&f;pvq0VFcIS#i%Z*n#NGx1*yhm2^CI?N2<1(QD*UXgT=BXvpl|m|k)O5rr5D9&) ztA-J;<`#}@u$!nQwP(-S53sV)}brdN!pX1Om*HBb+eFHV}m z8MsI}<@J&?Qu9y%bt3KK1UHD=6k!%)Mo2uxB6beUSn73zKvdiM5n#W%1h?p?f?O=X{{aFunVbIsxOpa$*>kH z=Y~XQlXAhLMj(1~7Rw{2mj<1piDG5%5AVAA&20a!GQO?^*RUOioC=ICflXeiFdNV^ z@C}-(BsVr3EN@=|3h8yU zagMQA&~!_TouVk|87$Gd>f5i#a6N4FWoa(g#vB(nT&7AUE-W)_c4FnGA_F)yKi$kO zH5S5P#9seqfWf+1CV4Y(k^X8Clo@KVwh|K^<3(aX3w?(sp`w>$+@ryu7g`iKp&J|G zIKjh5tr>P^q1Ad-YZV4A6sqLTk%>QCu3=D`%McbaVn;5qWUNl}_Nr4*;B-1zy9rEB zFcSpXS47!-0-1imf?OzYlTmaPGcO<+5t~$YaB-NqTcHLg@IS#?ObGO+7p;9W>c$*# zH>R+tqG2nQE^KgEp^r^oZq!)ENebY_hr)})Qe(e4MLs*W^)%29R{#Z$~iA3 zgXfmtyr1@}tE?`nNsJPwbW^?ot5RfoG+jRdb(2wJ&8{zdEwmaNv(XNJ4h$SnJ>odY zagC9?KiPEwt{{#ICXSqJ<{%F;I5$^{fK#^0qz0#&+(l`&v4lV*{cS%^IKr<>m1_=A z+*j&P;WyB9-7>xIlLrw55vfi{S8-4BFfzUZ1sSbWIv1DDIeEgOK74TSTwYLJU`d>Q zGj%%m+91knM{<(Et&vrj@=WynQjOiR9WO;0%}c4NDd%9)?qD^H^(>x_P6lB$d9Ot5 z#IQ6gKJ^|huyJVo;b=(+G|{lru8nyZls1>re8R=mYo;QtB1%_M)p1)6UNq?{+dE%1 z_X;FDIzlQnA{32L;bcDDn%gihG1C8mQc1_coTWN8>dlf*eRayN|Aejf$w!H9q7OD5 z+4Rh!X19Hpm~uLMN6*xDAp2L$Ty-Lop5E-rDILpj(!5ILpaBn4yCry^l+`B?+pIyd zxvN*pl&ef7XtsIIjk&Lt)r}7t;!VbJaYzdB!p@Wt=i*<}3lm1%DX@w8;?x zm|e*G{EcnnpLITT0XkeLeM11|$Gxco`N)O>#(x;AJA3gE2A!zUK3GKHPR$3O(r4kD zoQqG@z6h?D9xzawSeJ#BSrs|UWaYk8#k~c3hIyeD;ZJ9-7ZQ&Ld@hl-6q4B30Fjt$ z9I(l9b)nl;?wICpdUwvyugw6;9bwvYHP5HKyDOVCD2(j>rkX>#yYhT z+re!K%Su5kN4dtD6F{b*6Z*>U7WCGf3Gc2!X5Vydf-si(zpxlHNBqjVQI-l zE2O;Y#g9M1QI!0AprU=sloI&V0d&v)p*8+1w#SAt_uWt5Ys0)p`g=g4unat4`J6G^ zBh|`oV=i$|9|^H^%A1!GUG!N~61)7*C$z^HoD@!b za*Z{yYc@Oz^{1P_$4geddhMDJgw4_dh8W9vho~TtcTsx7paw<_T(o&UNc^ z*30Lt+Ih?+vWl~3CJ~g}zsV@x6`cmKcO-Hy8OCN$m>lQ6k}@z#(_g~&f*dAONr%qI zz}mPQh8E+q0?W-_%$AJo#n!k^Q@F0xZH141HG)93PcyXp>6djVo%aMq3~7nt3&L8R zg!Xpo;bPS14-1W_Y*b2oP@m_>5ND5G&D4I(*%##}pTR)WJqy0)Ma!~~nL|=QtoVXF zUr#lps9MPJuKX*@#{(iFrqKSVeRehZQ_|yEnHMzF&4SH|GG*1+hSV_5&fMs1F$nB> zHpkkkWJeTIDOxH8Q8lF>P~!9Z^)sdY-f_79`K7ab2l~0w{~f^t^x^#SV>ZCy|JmyE zCkjx$w9`*Ge|9{B{<`YX>&5NeU0}&*$sFRT3?Hu>niC6+HI_}iBimHXx3(3Oy*lc| z`*PHV`b~+Sk&a|`yvls1o@q?N98cGZjkCd6RmlP{T`m{8IFCzaXI;rH;M8Mwe=Nyp z%#wNU+w2{B@LbIww@apgeTO+&p_%wKg9|)xm4G4|0~3f0aad-g9hb3kXJD0!v0Z(B zHUcA7c8sq|d2FXTVfWoK-sCkOzhnkFqbA|BD6A@F;wmO;Lz+C6YOD5;V!Q3tQJ3zX zia6zUe(tLF>omMHjdYRJ2KMW|n|D8yFhL*tLT8HFj^^v&^Uv?^x?5@R_VgJu@v$~5 zOR30r;TIG+Cub&i#z&gdJIRVsaCbR65JOGYg@b)U+6Y$r4*hp^fmFyPxmPl5mvQH7gEzuEzs%k zu5bbtGD^c6(Y!J&WTQ5u3@SuLM5Y2#<4S|&O!O>F_z4byZla3$WdnZd#exJ0#-lD- zJ^kg>J@&>e>sDG5PWRo9CcnR0%RBZE^P6ARadof@!7q5Unmb>@Mf{zr{&PYPR{F*S$Q zHyN~Rv!+BWEq8c1)6wjBF~BwbtJ)o5;j_P*@DaH^`;=SMtwc6 zzGnGO44q3&QHyh}GryCOw79Iby)cV2K*8b4hIi{#qy+p}ZCW&5e_aNHI$kBuQ~aD-ZC ze-|+|Kpk4rF8LwFA_W&AT)bC>D9SN#>_ErpqUQ$oGkBd!eS{O*-R?*y1*!c=_~%ET zBgz4Ae4e3-!XNXI8%bN+Gc z#KX&1@n!}0iKH065#Kns51$t@EYGeivhe8#@pHhaxX`5B_X%k8)dDc9g0An?XiywN z)5NsQ9L~cX%ZOkMw0E3%uH=^*OI%o7V?w_x+K2>PASWh?7S#kVO&Hzk<$=O zLt~J3$oT^RO-@yhng0@ot>5MS20%&k1k)y74nKl`o?iDAkLV;zxPPH*+kBee@cx9KT^wEta0678LO_a7AQFOX1*X*-bq`qyE9+`D5A$uWMMoj2gZ>XV|0Q8j^Q zx>ou%<9A{x3a7G(AFQ3*C!ap6F%^91RL+#KSE<+UE?f_t2lh6k4pRE@i_=lV`C~f{ zk%0(*cJ%zgpvVdLzSCjW+tQ?IM)#G~I*2uJ| z`#zb-kaV=iHU;=4e0u@aQ(<nnox$O~wjEerTT|70y{kE}? zLS-kF-sHeexxhg(I$^~fSMsybmE6FM0|$evgIGOB_O9*AB3IW4_MArJHJ=(&n=f|C zKeF-(qyZD48bGG|Gebosj*y1j{z(qMPd6aP*k`vd+T3H?Rf_pDw7M~s~$)dMOZ+6Y!@Z((6@ z4sWDYujRY`qREsvD+5dlZ%l?Y8yDWnE;;zE9zRU@IIDDa`o7}_@DUld6PFfQ`Rt3J z`s&s~k{UZAGp`@o>2HG$t|jIZi1&LeB;g}Eds}n+0-vAzH>&jO1*V)lqv<%5rb2v;o#(!4w{Wp4ZLB-CD zmj7)VgZ1d_{DTfjUQy?&x>aR!rtYZGqTobH$%Cnc$ETx)>Q?-VgN^1>s_#a#L$%(H z#Jk#vbvB~+xVp`_7OZ{(?GJ@NGh85FsBAMdVW^Z5Qh&yP|LFG%GNsAev%z%j=k}!0qQYZT`V1f56%x)K6`PEEu~{DTaVxiR z$0Lx(eUAgBZOrBSqw9m%pcu9GcOA>?HsqQfII@@Y`))!{=9pDuJLURKyDI1Iea*M0 z=!Xw<9_HW5BkzcCxkm369l8MMm;|$BntgiY)iQ3Xt+q<<_jIfTJz3K9qVEUCT~ISG zluW6bdAX-z{oxXCyROcM|8oZC;&rUJ3(^F7z~fM=icuRc)-pMy9@gj(B; zthf0+fln>=0%k}_{P$+aZszxYHIeV|oBF`Mm&kV{{xbTzD_E--^>Ec#lIkIu>m1eUz)~lFU;#P2i_=`gCBQmlQ8NV(o5#}Tnh!==MFSa zTU7Nv{oX>36Sxz>UyvG{GPW?ixs~q7Wmbl8KM?%c3vH@w&Y<1XpP>mhwU+gHxddFh zpf`4*50ueL705nZDqVqNch6f?29|xaDc%w;H-?c}E#y?hiK@~Zq=J?`1+^CcS6T%l zDIU2CdXNyRp6T@e+r!?^+U?KMziYyOR>6<>&~8+a2f4*TA2Kl<$m%dH$8-_n0_%Ya*q1??eiBd3f_Bw&UT5F{U!~EJMcGaFn~X0gK`{oclr5xp}FZJ zXPwk&lP<#vg|re$zlGBELAlI@?(Ury)d!J@c`E*hQd^JsKq&;T!EU~DvXK7Oy7G+^ zZiS~1)Omcl1%`i!~N+TxbI{SK=)k>@|4@%M4e(BNZ-A1spXweG|+?k9Z zE??_#y(`bg78{beQ|{i3(#uU6OPfWPdCp@}0G4|0yE0>;lq4EyF_e%!*?vof<4SZH zR-4g{oIu1lGpSUuO!Oqph4gfh&2l0k=b0i^-UtKn4}FAdTs0jwL^TB;6*e7R&ZmM4 zLe57X>y`AYS<2t)!o)K2LYcLunk{q@@;(!VZz`I5-9Dw3^Y%mj_>fzvE&39PSVGuh z9xZP>R;@}^8XpJgpkc5_oIe7pz`0xBE{+H7E@08}}sr>ILuOgZT6`7XohFTDPf>MGOO;y}t zRl3R3cH?nq=MJmBi>vl3PPlW;B-ORq-#m*ukhif!y$&cc(sqM&L}4 zx9{V&ArGOQjn#~4&c@gecPOe(Je#i~8l^KYsNFWcG#!1r3O_BIobS$4_0*4SA~Vl@ z=SwCn#IE?m*Jj6OFKK!8j@hk)$;BAfIYX-z!q;xK5~hoo#c667c-WhrR`5x)?jypc z9F<}I-DVU^nx#mTsGhb&MixWXq6#llB2DarVs~jI(G4O-OmaK zLt<%@B^b-|O5v&NWe;R`4dTSm4}Z|KWNANvc0&YqgEl`lYzp{1*Mu&!H0TDP<4~Hh zF>Uhmz8~MO2o?`}J>^@x+7Jk(Q z4#RU>;H=r1kU_Wdm?uTYRn+{@Z)9(leX+WJK7qG-IVw$qAc#VU_fjoGdZY^6EkIyp zjp-98!I>aEU(=#DhcT}|nM*>0Sq#UbujuUuDPu1>7&KVU2U{ucb>y9%^W}pc3d6z@ zmQ+S31Cl34<@-ISfGVF8=eWFd>*4$?SD|IJDH8{FXcq^n^Q?s)7rPC&^%~7@=gZX{ z@27QKc}l|0Cr>(AA0uk39zp0}Lme!hCabkHBoW$vBZ@}hP6-~7uX=(|H2*Hk!$+w! z$2KS*2|uarZi}%zD^D(UMO|6D_7iAnJ8bIRj!|N85^Kr;kGh+8iGH54cF#pwAz15T z6YmXfClP$->72KUqFg-=$SQwrJTpE)w6<&)Zs19OhotijL5SKYKQaHgjGUOd`+-!y zv($VPc;|nq{}N?%qzF@pxo1r9?WZ+sv&$A#IAwP{R1&J?vMq41X^Kf?N8d@;eOOPg z5U8<+UWRdJ6Tt^>)OH7VAOBriC+=Sa^oYgKn7u7N5(x zN`#y@eRog;7=5?46_+FMeRibahypnm$5XS z`H0gStF?4lv7kk@F3UMNG{>lD0h~SETM#LCc3wg zr5L7o2;;-J%%{y(;Og~}sx-DsC8X-US?;+4_-u^o)Y9y#ct8($#_y#fv{3i3i}j{Q zVnd%vPs)>Iy3n44Tevi8w^TKxG3BDf8EvDyR6?c4~E6nEXFsu!XYwn(0O1VO4XrrKr zjTLp}j(nPEqLAmRI)}72)DV}-boMG2%AGSOBfCk-j-$pn z7r^-Hk>Mf4;AID!Qj~bleYYCX7SY2Rxi}y(=g-4JnK9y znJx5qz;flC&V2{bp_}wMS4^y{KT_xNOL=r%cwv|(V$r)gCdoc4M}e2Z%tk)DhTSb~ zme%wkBzkYnP?@B$;!-Ph za7Z<4fkMv!vpyH@`>uELnnLX~cgFJjIc+6dgd;v)n_wWq$OgWh!%sM$>oMR;K3gH4 zSLyR%Mvq2|pY9V#uvkfvC|OUOy%CgWeFS8?{F2tR;+w87`sE% z(h57HjcV=NGL~rt18)1V6&tnPXUNE+9d{klltKvfnmQ{g2Q%8xjn_s2W59C^BFqZK zS`%@9`ADJXn&)(3Pt&jezKnB1UYq1NGX=Q-$@=VyLHllv@o3mhy%irJy@!DB)W~+7 zl}iEqGy}^h0P}g#o33JTVe8oxx!NoDjjYd9kcoQH?}?E+q4YjA5D_^J+_yN#mjO95 zY8g`}Q_Wsdn~`!y&*HxK;?@JtgiQZv|1LA8C*xIESzQ?m1)6EKxeBGPBmHNO8_rpm zGm-GAS_JYtG@2UwUX*{nL{dI+(@%Zrxue*bu88=q%@WZ&noKtGvVm1vGwV8^#+0*P!zX*FWw<>s{Yq+|fF+d`MuZ*|o94L^Z~Qs&JMbhuZ@B}Kv%EgG-(Gf3|q50(!cIU#X}WYbmX znZ0Geb>FS$Sc67!_#I>^9lyVk!Z`K7dNuRo0&%+f2kz8kQo)P?HP67^X2gk=!l@|{ z^J`egxi+iEGHkF?6=>Y*mqb-aZth0wN0IXWMosCUFvF7>CTcTk`D|7_7$f5i$|SLTQ{BaVQ#7B*{kRjMc8N<nQ?6cfypy>MT`9XL$9v2@2*y zY-2`qu0+VjZqEjo6=^t@;h$Ejy#1liOg8KGgo1sCwYT%V2?^Y+JG11Mudw+hvvrOd zHG3$u7@)sZ4(1P9C(|O?=?gA@GYRc%Dq$;X} z%N%p6LOOa*J~H&=LHSb+U*lHhq!_{kbEzez2^toFejE5;(jw80%K4EBCqTq-wst4>dr@bY+xPCnvv zXmb@Ub^a_KMaskTFFJi5oy~WR>>qP*lVkh923vVi=XsS`+was}of_gZKZ~sHSED9@ zmMnE?Q-YTWwl4)C_hswb)4#V1{WSW&*n11OsJ`xB7!@T1loDxa7(%*3x`vvdLz=V_WXf2Y}vY(+Keo*em|YGKJVO9L^`QkX@0>NmSNm6BPkqggrLI40eUlbcu%nDoL}SFEg*=)G%bB z(bD!^7p2R^I1(UKCOolvO9&LvBP6&`JcT4COHjO+N0OztYWD{g4wy0uY{K!L%nW~^ z1VtYPc?l_U<0e4w5#DPiL<&hWF9oh|LeqJm9i@gRCX?YSyvqR&EAp&)T$ z@j_JE@{m1&ft4CmCG+vidh&Lb%NI?~)vU}Sc}X3GKRc?Z6|zYll`ZoYwsZ;^z##)$ zPb?0XJ}P$|LeNLi6ez5>`=WplCG?zb@%rKa7|C%!4DK}=+=CQCpk%_ zb?2i)WEp6oObWaNOIiyC)$a*tzfnDE zS-h0sFR=6I2x+DN$h=!?a>r1ay#b%J9y2I&Di!1 z7+UQ)hUYvp6RTH~q40r`iY6hbs?h&*RWxvtOGX>weTtEc$g!LZBh)ScMT(*!Wvn^f z^~~rAU;t?_NRk5NKb#m=s4L8JE9G|znbMnRI?(Vz-I_a=zpsKsBf?3$NH1fM!oyk- z_5y`MokI3Ti6Dw=Ub)*Kup`!StQRse_#IQLgRt^~H5{TXf35 z$jPy*CNYgKyZ;v%Ox*zl-LCPa9)X8ScF|TfVVtnMaD|3~WO7z3vE8Jx!pp3E>KAd_ z6MPKK+!G7BWRj-^>1W>3q|%|#C($6?l(ZSE38UzS9QD3EV_$-#dug|Oyxv(i@r@na zF0P-VDbC8JqLI(D_<>~$kdyG}3RH*FgR{)2Hncb@F`~Am+)IC}deRcr3ymwI)fN9c z)qu&LeI0P)Dtld608v-3B;{647$kgST037fprABk-mi%YuqstX=$z1{u0*IJ>lT;y zP*Km=S48?Z9eX+RN^v-x^6wV!FfApEH4S_Xmv2>m5FKiJYYv+RrRZ2Qlqzicw18j7 zBTa-PmOw$z*Xpr4g5x3cv^C$17aP9ey)jzY10+bv=W`8$wF7BDCr%Tq*K8Ja9V$(S-VB zJGC`6pja4(WUeoP$b7aZ065j320C|c0yf^Wxvo|pTe|m&QHOImnWHK4YeP7T5OZi0 zZuGbli=|>Q;S6!7muO|uR{4>5%upyYH5X)EfA@8bvX7kHy)@GIm1UXMjkXAyjip|Z zXy&3phh-)f_k^$KMH4=8%!hqzrGyN|u?l(5&R#rOeqEz9hxB@=Zo{i#!5Dj6J(RGk z2xGWNQXuiKN^O;HEYlARxQ{x_idmW0nCNItPVpkNKSeeQ^jR zBns~ucfVDfRU;li;igM_;=&9=Zsy4ktQRVu5U)gvB#C?*h;QV3kMq6UwwR3yO{r8u z2v8@(w~b?oVNW1g{H%*TPwI+r3KXq`Bi+g8>8+C9ee!jkcEh1P!TK<%(KzxOz)nxBhnzdNwiygIyugHVTlp9W-vW0QA!pqDkT_=J+!Hf_ai+8V&K&XmzqQa*Q%9cj%{ zY^S$d$%qPz0m}#Q7JYA22pe_u+eV^^A6R`z>37;dwYX7Qg}$g3#{^BVc_zvUSy{rN zJN|;9MMVy_LIH`J7LOSYRc46*rC0XNI%PVn$rYR#`!+q4j;*!xZi*wMFu+4u2u;N9 zPBBj_We@DkxpCap+7{PMc?X5YQlF2UT5q+1D^~n z574|X(;XQeVH`Q4n%$sv-dFIFmy2n{{NuHN2jb;?MEv{iUZM3IC*dyc#;i27D0U5L z{u>ihbX)>6w9PJIV}>_*AZ~P=ajkSEJpt!jd~`R6p~GhmcS<9czbFJM7v(;k)sfNeG*U8HI42u@yF^CU+Z2rtuGB%@V|Eu?^ZI zEX;7;1|k6^B5X@sC+@r6naRd>D$(|wQR&^uCYB z)K%@Xe}XD)F59AX2;twL3S05$XXGA>Fnq@CrkL`>=uKC-C+$fse%rir@&U@4eq=#B z#cC;<=q(LHg|93KFjTElwu0^09%IMsemd$XU-ZkKJwXhP+jGnE)BLoFCp+XSW*8&% zweb5hTetv;Al5fXtq^=dMdJM3RV6~1@EJemO6tN1CKa?k|NBxUHk7gYxex}jow)dY zp87=!5P&}q7!W7_2blZo6P=BSdoCCg$HleMg|S8_5Q0Biqu!~ZpUblK!s>y=X^{Djvl zEkn0fF?MzMN@gprX5!Jq1x^eAe`6z|Gltv|HO1~%4Wn5X2GQqEc%{hR`W{}d4~NXT z7EKt$kb7_^qG_Q8aThE6GNwFjzJ*=fsK@m34X>8YW~W+aPR7 zd1?hDI!MjP23i<_5qi$X?=iTwScmyzS<<qBG_6eIhoLH z%DotrdQcj=Cx#ZeX=fA2-5(1?a37t-$r>&LUo?(QP!dNAh>x~P;?F6FkX{pno7*8kWS+9oOz`sRCz}mD~bnlOQQp zp*x|Q*-jjVao%h*kdyG>zTJPdBPBaP+I z|H&$Nf=GIWl>e-E_mfyFxMvqC-qylQurvT0=2>WsGxP@z(28y1Xhb??vu~voQs;vn z!1X<+;b!QG)jQZ#sDyVAz-cRtLA8El58P0hBZx=sVmDq6k9#RWrpEH>k4oO{7`dWl;p5P=H zxAuTKr3em&Z_9L=9BECGtdx-HXZsV$UU2F#2%dg{GF)g483{D|urCarIQ(?&PLr>U z6v*^-oL;dY1fa`2tmD3CCStjaRj-nfu4sE#D;?_83q#3S>ubC(g(y>!3jHN_=!7)E zwI%c?3&_LBBV~KytVLY1>6()oi5;?W#GA-L?l(xtW(7~(H|z%O)!^GclQIy!A6TRH z^UR=is^Wp|doIKu%$zyN#iO&0S&!a_b}UtN%jyOm3KZB3uD%G643_y96yoW9?VR_Vg5$_VFhL`^q1Q*GLbwZ z7RAXKcn0BkC~#fShbZx;PMUh?if-wsK6~B9EA2_v+cz$q;f?et4vpOlIs3GC)i0wwH|npC#Ro)|54z}NZxqWpzIFuO0hz0KK{hJs z9U>Yp_^P5)s^?I1w68Ia-JcJk@Z#BL$fel|W&!|-XEbVuCqMuD><)c6f@8x@?7d61 z*lMMsD&GRs0B`j_2Ybs`u?2#Uf_T=7HKK%ii`qcy_)rZF(Mhs?{r?<7h{x$q7k4Ks zv8vD;^*A9dc`dP=Csu}Lj$n>HY7XD%zDctAgK6b zm%!$^(l4#}6EK~GHnT>5jQh#F@gyFk%_`^?h~Bg>iNOk3Uo4mUTY&&qOWN#-wVFMd zH@&kuf3Xl=WKCw~+dR1_?$W)XGh89jNkK6d&8YxicQTLD5ma|^5=4`2xq@VCj8P4U z)V3$y0tR(g;r%}KbHxC{a8CZ-0*06O>?e<5YB{`x<91H8toiy`bETf5eq_1#%~bfU z7@7SvbXr6WKF{t3{{Ws8vKD3zvOjPe3v_ggb}Ua>%Lk<>{kaQW zD|OPVjQY;%fJm~%FQXCvwgwgT*hw5cPezUFP%GN>yN#*Fq13nO*BC&6;0rmYL!ju5xZOKmO2(I)J<@b zeB`NsXjnu58Kb)R%LXi3*z{89s&@bM=gD-j1<&t(@*owog&*>0o*}kQQj)$x6C5*i zn_oLhv!xeJa2^>7`Zen^ejUrmJ$llX?O!1rxgfR)CYK9J!7i=aIue_S9Rut@mw#Z* zqBmh5&{26=-EK0<-JlMM7=h#2j|9C_`J&Ig?z;GX3}%W+4@I@zddBn`D&|IJGQhO& zpSkVAnx(sxUS^XuKzK_K?^%G*=|uBa@M;5Q?cdLN-L1v1Kn1<1)*U(xO5}x@LUOYT zu!qb7aaPGlPJc4+{qBTzCh&got^4SQ1IaQ+G$7G1LxCrz;^_r_mu&ZB=v#P3Swu^6(mQMA7(;Jvl6ZARR#HLSawtoX^1arXfr1^8vdYF2 zwF(HBj7`+fQUe5_eV^C=59}qf_weRN(4doOS{4d5>%_F;pWI%0*3NRj!Qmyk&fRwy zp@b|U2e62qDq_^szBl!qwt*_bJ^@jmBWE`Y4YKJDB)a90LYKXUR2Q`e(W4N&ZxKm!>a9BbP8BgMO_CBJZuP_jNGD5sC)em z(s)0jYZz=)P$~pSNTw`x?0pF?Xd8^dgc{w(Ig-?7?yluZ3cdDs8aqBJ)p&LW5I%y+L-9&RBtA5R-J6 zY-V%y1%T>oXfOT3PWuPe=9CReawguPt56z&iSs6;UnA>yd-f6WaJSqYgFEy(y~00V zvFTrM{=-jJ55VVz%?E)!A#p540S|L(OAz+O>ZWQwYzwTEQB3wC90N5Jci2eVZ= zGAtu0^;?K?z{iKnK}K#1t3R;3tI75z!yFE%OC&P$peFD$^)!Xmo6j@urI1gsJ`dgt zC}SJTQIY9i)q~dcvBV*nC3Vuj4yay$kz3a1Q*yik6Q3=**yRwrNubvH)9s zdGrTHfToRQ{=iyAp~-!!!MUnn#J^fD_^IR7FNw*C5~@zRgDgiX&tN$z+du6a0-(JP zB)cK+M!|z#2?y|m$v`1TGr`fyPYvC5*qELf z*^L<+)lYhsK$62oo)?_IsJ*VcVs6tlpq>G%x2@m&P(*q?e;;z~;%G~2U{!f7J2=IZ z2-ULzYk+eEb4BiFrVJns)MNLj6x9$#UiBo41*YA`&y+u&jqy&6=% zeAVzYqmuE=(xGoU3uFw#H8hc};Lu~QrG>oJ4Oo7gKB_ao&sFl_2iBy5recjxcg8++ zsGsH5%lX4eW`{>5^~J(XWiS7-&H`po#kLQe+QqVQm(yd4&=YN}@Ev`V%i^D={flT)t0 z3!3-#x`JXag24*SLbsr+V6$4sPQO)39}W8)HPyjQjvypE<>I+L2%Z!v!n`t}@j#i* zSXPHCCFMcd@K0l4dEVrz>K}+wQLY3UYI5VYG#rfvL35h&5*hdn4NE_#iB}egB=wKT zI}EGjkgZm$S?f(P=}!vFsy;vLVTy35CJEO!;`>lwVxwB2q80@!xZ*1e%B&JHux)tZ zG+DZm9tqtj2^gEO8g{!GXw408COfOF0aO)xqST)(`9>bDs`~k?PN44CCetpoq}WaL z0R>{N6#znpnI{0nj>T%$cO(rslZ-{(A@AYKsw!11N7eTvm6nx?#GZ4BhmeL@zmr4N z9E{IFH_X=btnc}-<8N!}%tFG2IlfgnOJKV#jb;mtqk=2)SjA*$OG!6}#~=fE4(c#6 znRnzASFxOXsQ$-AuOi^vD4va`ht#7efa+^VaQXBpljQe7W4*OK9FboV*e(9-A5>HX ztGHF2Dwv-USu|Lhru3j!2Wq8YuiAVqtRNTtI_n44zEBmz_1ub0FkU`!&XccoS|VpC z5E@LU%F#RL0<0?l)AMm;Co*URks11#8vE{9-$f{c2gtEM<5M0*0H1>r8N#TY6uh&w zjfAJ|qDsA}tdu^?@-D2H!cUs0D%7An3mb{uc8rKiqzt5ThdJHb%(*$Pb55=py zkP%C@CK3~llRa7Y;cz>qR@c-t5wk&#ZV^5Lc(SNO++g-g?P`DVMum|%IaYG6s*_nX zQnw%3;1J6%N6H$l=BM>Lo${_6{u)+j-{(BfruOSKx0dH)(`rCyG8jW|9CKtMn6lkO z{KBN;r8T_QCA+GJi_H(TsW^rsMm)~ICEv5omd~<2C!KOnhARFY8gD{`TZb4gjQ^RQ zU5-r}wZSTLYAR#n{n!5fgjeMEuI$qVlcI=coz!`d&ul`p`IXgF@m4~mVjITBq;XP_ zRRZLM0;_xK=30!*0eE-#o-Vy|n_2rQ#`nH*|G;`*y%GK=k~r20#(O1g9T)bo$G|wU zY*YTZZs#uf36wF2zm+N@DDDor(iT&@5|F+HwWds}&$~4y@XLg{lIo^EJuy4%{8P@H zGY8a*n_X&6H?+g;RvqYW{J;v6%R9+?e&A~u-d|0R86`jKWs7=epBH|@n+yNQ!3zBJ zKv@2tDDo0s*v*6Q7;#QP;pom2wg|kSFA3s$GA@I&nRnEF<8lszC_CB??z8{})P1{) zytdEHWN@m?qSc$2#uf}`F3ZInjNh7SOsMf!7XCvgp~CRGM9+uQt%DIFNp$kjYb_V7 zpVgwQ05Y7AnoXP@WDr4*FETOc`omL~IVcP4kp;nq`Y**72{IDt@w8cIHPRua@*owf zW@%>W@8_;t=Wu{DlYQ%VuR2h6St*;KGt+lsr5UIhF$Xk1C=zyo#)!!V+fYAje9-KR z?;q|VEwWmFACfCv02(CmZR9{0-+@}ZTK5m7L$bQbsw%)~y|{$uqI_vk>u0RNJmqx0 z#B&GaOwDBV3;5ZaC?A1@8EIPhIFCE91pWgHP-+7-@Bu$IAz%L(6(h8XuF2XYlR5m0 zjC=MTG*)Dr33)5SasuD>gIbe>v(<;ApgoKOyYK=zg9^EXU6099Em0Nwml35Cbttl2 zXa%eqfcYe`GOKMI(XPk#ZhQ=5Skv zxW(OA35ginK<&@7(c7Wpo()6kG6UtJ{z7_JYPIw^P@k1D7HR>Qv(?jL5|UosckO=f zOhpqOH|_h3)AUn7Yp%y__V6}rP5FdU zr%Z2!?2v?R7i?R&~LsCk2YxU1&_qOL?!k7b3Sve6BxVj{U=C^!Hh1B~3WMhXknr>rZH4RJ`P%W^Eu5Pvx^99^ z_L0Mn>HuJSWF$I0P0!m)s$1F%@0D?$6fbp_E~J6JMEFQNo*QIwG>4{h{%MYT%y;8U zx{C);vJT=~jmxHSXw)^XcJbX_&(VE2mMK!)^0k{9J{^7%MXxIf9?Ot?Z&YN0-M9Tj zAzDXAo71G2LYM8L2G${vIW}#SxGue*k$1AemTOsek(_tYQU!=#S1G$9o;H?OCH}t$GRN$`HZ{Szdu%ez?2LRTlXkg@SB2a{8e_c;DTaZ0lJ~&6ux2S#W ze(r#|iWs5PX^LN#J(zEWQCS#H;b@)53Xe^+f_-;B0rW&2F^&|}qSP|aCNe4*m$!cq#9mA9Si?l3Y9wyex$exeqO3t+~qEQV{|qt zcNkk$&W<1Xg2vDGjWs}ENc-ih#CzCJ)Ih2VlK`VA3?)cmUm$nkNhB1M2-=l%+@v8Y z2eQNc6iSli@l6*YCU_GlD?{_SHsvo(6rq1%9_31%PVd0w=eyIF+B0OwKenP~7_3=G z8W}^*M`cZ4al+iAP=fAKfE*;#@@HUzd7z|c_J)4)E7lVQiVDJtDiyf>V1q1pZ~j$@ zwPN`PSVYc1p-t2KeiK=D7Mf@Psf7tb@JpN?g<*8GMBT;@td~*On#{GSAeDN=d2Bi< zEtVa76VF@3kdbe>c~QK$E0WA2bDzSkE@lLeSH%@!GPDR<@zUcvn-uwOZkDLR9DA zvJOc!vx2-GheFb77eB4H)w&KKLjDJq8r7d>c5KuLw>v;JZVT0?#T1C`k4yc(xZ%eV zdI;bB*G-_|Ut9jUPPjH<^uKtaf4ng~H_l%Qub0Z>J@-FYd0Sw{HLHRK&U`^t5w%3mG`kTbxK`3LQh`28iqDd!q(F%a7zAmeYa|3x9sAbKX{i^|iyU zzI<^v$)X!6B=xeU@b{}F_V5xWKi#41`14LAI{D{>li%$N8dsKx+?P|o;|3*qblejs zkGavjF2_kKP)xYZZ@1Hvv3FOzC>l+ZfD#kxuCvLMCvJ*^5HZ*%{A*wSsh3Nq6>bVh zFWn}$5l1BYIV=DTwE#WPks137ge=?VhUdED(}E|uBtuKO_CZm212L&+D(>*8uMUPr zN(!cpccI4`{Iera` zo?$5h37%UvU`>r3S$VZJXXexhk|k@!FYWW82YpF~H0q^dgv>urUr!V%p5Um{h})ue zyTg>L@JUP9iR@$mhR{9}!}Lmiq>&aEJ{XoraR5oxer^bfon9N%%s=#igeSp8)3i%p zFkq6r4dk@zn!?_{7{fhF69Ss!x^?k~shbm0ERXa7EOFK2^5J6Q0xC>f#uzjMWr1_7 z&&8z-Sl1mGj?I#@z(o&sl+4LPpjVii+OFJaXaBIQeKCBfpR z>{zXJsI8P3MnF`UD%mQ^)p($4GnuM841Fo{aF{^8?E};qKwa%FiWEE@dePRE8f9_5 z64i=&tB}M}$u)t1a1DNDjqu`1`n92T?yTZhu%wmrP{ig}@!GX>c4w=HBe#qq?i^Sj z_!bEODAp25Sn>Vi%1`%mh_1E-m-m9PULY-B^ zej4hbHWI8tvPTU55&j@k!=j>(bhll|KG8I*#Os%-c^RwnF7GEYxV%>Nb?Hh#&v_Kg zC8aS_ff@W_GMDia6PZzR+Zzc(XX_-dP{Z!xdDcP(1g zXgnVNVOI4Q!+53JNajXc?m5S*>WR>~#4>{JY=(H&mUt%2K&A?`DoH#sqIM9*I9c3fb0OfdGI z63W_|*PYP@slt?r9H(S!*i_C9^>|1yy0)$eHg&yc2B^y5WknGvm#pK9yfV5tiLkm-mI~v;EG#aOK2C21^H2xk1B&Q znptH>acRS~xDBtqGV9$dG&r|dG4WXUPx_tS_-TLk8J_Up?UQF92*nh#RfS(}iMLGm z?f%!^R5{cPfj!FM|E0IEZ`iD3yOw9c=1hhWf39)#*J?-qKKj2*fi-Ltde_n~_>aUm zvP@|MA_=ff{(uPLS60-o*gG+~l2-KH)Wkm;<2cLp*cFTwJmpfl4$lr>VWeHAVC?#l*c77WI~aI`ae1fSd)L1&uqDksc0$W$2a7M}gOXykHV z6)=BdspT8h9+ka2^KP5CywJ2~W8nwY*)3R@JaRDl{QVv&pFs+rA8CBJ<#-;OV3Ax@ zXO^|XRlUQaMDKeU-hkzGdQml}hriU*Ibl_O8AeV0YniwQnn5dxzNWpWOxYQC_N0M7 zqh!JmrEsNXRw|}mGA^3IfB$%lG2W< zXT_pWcal3R8J$hUmcsh#BW0gAnfNv-EU~GFwBPK0w~a)r?jWZ}G-IPs9B(YcMyu%s zlJBIu29Xc*qN5;(00h$s_2^_yn^rGSRbq%3GjC zSo$4#A-+RNu4X*bs>Sq_snl~;6c^aNc_o<5*Wj)F0In{*C>(EfiRUOTSLqIhR5w$Uk55;Qh zip_+&@)xZuwR!`4$t?|$OBf3;EP275J$*2-)7Hb{_0_>~-NVCx%yYw^N#Zj2l7)%t z5!@JOy`80!Dld};!P|Hm1UMNW2>`pHHmOP?J7u`)D zoxzQ9(VI9K;TNmsT5j7TW#^+#a%w=Yv;G-6~MH49xYDuvUs-YsmG z$Ya(fMJOsDII8K)OA)On z>rQ7Q(fq#_a*oQZ?NdL4l~b?H8@Cc%{FZcj{{WyhC5w6ARGL6jUX(A6?`|XrBky z0aoOb`8~9Wi5vuGE!5p(7E9eOxd)0-w#6rS*9@!_1|tDYLgYGcNh{Aei~`%fMr6iQ(WETZpg zZ9RgkOTG!(bqxpC#!esiV~KH|(3+H3BOzsn(Juq`Pa&I+~@-E3)LmAGy6k$wvfO++J}+_C+q&MR(#vd%$w= z49tg~k*aYuG;9!Ewfl`7uCwoT=ydMkbMxfT1`eKFT6dLHJs3J+@U$}-1Haf7_7OP; zERj!cj(*9u37~2b)^65vnN_)i~lnu82McaV^-1nWw&s6c`EvPB~54Oiz;-M z9B6WLGoWJplv$GG*p$5LCKxM12hAO;IWiP4G6M}z{^MIbZ;99PH`w%_ss;tv4P0i= z4p>OAHiTyb8}!Jw@8UfiiKR5Fajw&BlYXfkN3f!0LGDLzJcm^DdS3RHe^qxGztz5~ z;V54d*%y@8v@!4LEG|Mz9T(fHv|Q*m`afu(lF0fU?F^X95IGBxZ6#?c5QClEKN^@1 zuZ~ASW>-wo>%CuuM#iLEV`pYN6>=(W88)eZZxUE6ArF;&UHd|^OX+O+GQ}D8n$5EQ zz4whFSNGD@g>3URMv;&7UtouqkSX$(b{d%DyUb*Jf@2C0IleD)_ORRMaI7%0oCt-(v*b1MOFsM$8nAWKe#cGlNNWao zIEYf^-^KqC643o_a0b7c{mt-HMM-9;mG-+^%N6qD>w{7D@*6L@SX#fBt)>_jLY^4m zeiZMzu70qrq_@K|>Gc^{@}6(%0f|{26@Q1-aA0Fjjto#XJL-#Em2B>u7jES%=o41s z9Qc;;-y5*M4QY90k3Z~S%`g^{*G5q((h^Deczg5d-}gT~2-6M(XC{2ZN9CH#^w3!_ z1-f0mFT4qd7V~i!GopNbZ14L<#vb*a-`CMiLwQ9|Mk%SQgb1-tP=4Vl0+1c()Ne+# zxy;sX{9(El2MJ)XnrH?4;olgFe+<@_im>19n!mqp!rxq8;r}P6t^H<)Vb*K=Wsm(? zx+DA^!oM=w(;B6k#{J>8Yt~v38))yW(pvexPA~k+hN9o@J#moufkpb8K>j6|lj!B` zX6>8=g)^x&2us4p!xQNo&IY#5c&pIzToE+{D4Y@$*GfSl5YfV3RQLk;>}i-z8(@ zH+OqhP5wXt1WtTAy0m+fiT9D5wx!@>3s-k$`GkU+cYC+)Jx@}2I`$I%>s3{l-;lX> z^<)%Lf|~UQK0Nn1@(BQ6J#`XJ6K}Xth|b1xYjIs_oHKY_Sc2^MTD=iGyleK|3=@cv zwb=gR%pz}0p-y-^;vjcK8&p0J*LN36U&56VJ2yJjo^q!C;pl;Fju&DL@sx!0W-XB<6bx-2fmhxV&U~91yIcO%(+w_~=dP8)V2D>oqYbcPy(?9W@-(Aw@R$`0x zK>n%Z8pw{3U-1nF8sc|;m_M>*nrkLJNPQt?&ys|tCp>M{vkmVHY0E&9Y>wWcKtYKT ziP5(sIZ7hj3OP#mz@o~H%y;&`ZORlG99mQNQe;0rW7}*guW}#Tbcjcuw`!f`9Si@! z(*6qQHq4<4olJl5LRBLH%?v_f?EuNk3!zK#YG*nS^5cGkamzce3uK#KcI}=xbN!S zt+h31`5<%J4mLx*O8g)$)J-a(KtW8>G#BnW5}&K0@c1hIE8U9k_~^IqyLH{5t9UEc z+jW`4mVS(?GTjo9%Gn2X=M45cdC%ka1MT{4fg{0fl4c(9dn!kAo~@Kasd>7%=yeH4 zXIxyiQy+&PScokn2dYVjjck+j0dNo zJ9f0DeqcT94x~Jkk||Vm^;)OD+LjB$Cu7&n|Nl(!1B>9cb#;T%bA_Z!h+nr{J zj>Z4|L*%5BpGBd&j9Y1637v4S&-CkL)o;_JudEtnDCaZ%G!vwPhwhYgyxutu>=^B+ zscr1ovA;X@>M-|PQmOEfjpn3EpFka|Nhfh#2>R?1h3}^oG2_er2u0oHz1SsLgwEmn zN;GOoh0s}|{^HQJbz`Y8+ieSf=h9V2q`Y4B0BX!WvL__EF-ugN)`ms<9`K$hPwC=q zn8viS*@%tW%Vw`-rst@jqSwWR>&4ed-%OLJk@#-i22k13#G6A2XD9D3wCC5h-6I)W zvk@tU)wUq?>P5B*WQZzMM4!WQ3@(n?V$x{%y=mJy%Qm(kJZp6~K4lq;eZQ?aIzG7< zru5M-F7;)+3&<(IXk#sfAQZ@c!lVDxc={97C`Bn4I3zhAz!?Vl5 z7j*=(*@dPY@$IZkA)8fS&jYiW!38^%Bwj=3(tuYbR5yh4Y(9{_5QJ|*G|FP|pExCN zL%yu;5HaHoc%dNrvru|HzEH}|nJNO2LK|1YUJ3=mC#Y2Sp0wu#wp1zp63FVVCY8ww zLoPR+cNzCBsnF6|cYYs74jwSC+*SF3#&UpJOgZWkCQO#~J0@wYw(+cOp1ig8R?qj9 zGRwlUA6QYx{wbPJ3n7s^eyrxiyr?C+Z3k`AB;PD4{b|(cor|nbW%Mi)N~eo2W$JKf zRsfQp#y>$_9>^g5$+c!ijs#|(#bMnPxBl8g2H(3EK@@%t)tUvwr6}|J-EnvMLbOFU zLA-y|Q8rC(#-@H2e->bPXnH9$`rht_pND2{R*zg@q`?*y6(b)k`(R}9nbLcE{^BJc z+$3AXM64d9LdocUj>n1S$^g{J#)CSf`rCH^S@xW~y~#5i0XDv|(oqyUxJX&3bApWw zHsvJp!NJCsek=Q|Sf>Q`k!O-{fdg(jE0}o<^n6P%W&a)^oIviOfP)Ljxiv13_f4@# z1LxT*gmhG?-?;}>PvwY`g{-8Y#-SW=U_o!f8X z?X6Q^`qONzWFKYYei>oj7RY|rNweMA;3{3mwZi+fXSqyo#G-cGOE}@%$;RTD!+HB> z+uL?IF~rhS#PvC9(m86_;aN^>yeZw0X|c%I6P{L;P6B@|JyospP6w|?t|3=R z5+^~imnk`I7|n5|{g^81s{z{r&qK--kUc-qXtU_x4RIeHTM@dtYf0-i+Fr9RZhe-s zdEFale8*DbmvYh7abrfB)2zS_>13Lhs!HjXl z;-l|u3xmwkW&*;b^B0aYM{ZSiR}i+{bTpFoW`Gxl9=lq#ZLH45b>yfl9eilmrSJZ@ zv*?3f6iYrx!9!Y)J$(GaFwoVP@+teujB)?Yj>=FV3~ou!I)aCZ$(Q`dft-;y!zlYs=45S9Ce! zy%c-L-{v#(1-KgiS|{fnB&nZj&VK^sE*qt*S?VB67E7JG6bvonHOO8~Rn zLT6Ku=>W8}j<52rxHMp=@IC!m-VZFZAkmXc8d^Fwt$jMzP%%DgrrH(c-O*a+uR6&M z{?O$B8PhZ*Q%zHsZQ`^~rp};zP&f{obEw5;|F^Iyx_eTZz2BR@0s``Ny=> zFY{_0yqU>y9q;Hr$DiC9bEV*Ay(L2w3J8y{2+ysv=M`V_=9q-l;)r6Oy+Fhau|X_v zuHVOP%Wv#|D?P53byLpu^pqXax{GS|kFr~OeWA2>}vZrNJ^rZ6bN594> z13Y)p`<%wyZsd0Dzbf69I z(Geg#xm4^hoFY@p+%XSSB}C^bzPYr`E}o)1MkatW@nGnyo-!%VNB_&M4{PIra(t{} z%(kg!Y~7`+ceKCaeeiUH(;Zq(l~FF!mEWT<9Lf#-^7VvHLa&6y>!a}8H+RZesh6?&M3n5k3j5#uz!IIa zb3jp9DVw$zZS6S80xc)Ys(Q+(oZrr)v?v00?CI-8gRw9P(~u$k^)uV`Hr_xd`mIy^ z_r5;0&$Ahm=lPs%KVB@CT3a?Z`S_(sa8kbSeLcBMWAbDzj=RYn%gq!pY=+6Cs>bny#*FhOS%sB+!@mJ{jLu<1%f9PAYD!&Jn7WA81a z;tINSVcaDNA;AfOKxhI1f_s2q!J#3zOGEJB!8O4H1Z^CeZfGRkjT7A6o#5{7x&6-E zJ9p;ZcipvSeQVA4Xa1b7KIg1+c2(`Fvup2XKSgi-oIeFz^_;Kn;SpOU-;*V>3eOkI z?&V@*v||N8Uk^rIc_m-##>rjM7HmQ0<0qohPMqs8bA(+~j?=2mjqr99*{A0`nP}o) zi-xsDZ;Of$T#@se9J0^LJ8g5X2|2Nkv3#)_yD9NLIjOCs;H`S{k*r82CNq3`i^)Eb zJ{dt`!gvyRI`#yx?KVv-xS}R3vd%G-=i$BcINPjkJiuL6?2Zk>U%T zGLx-YE@a|K$pq~6?^DO+>dmJdBF7eU(P~3#{rR8k=)KHwmaKqKquh8rHmCPn*ZX%p z)1$>hLec>M@L;^35`-gK{xZ$+lH<>(uFp6=Bi5KOXI0y$mFRVX=8u)#IcBo6c}6y~ z#YdoLE+0+UT>beCkFP5CKm0K$qzRnQIOqEa&g_0D{{a=0!vGXCk!7AkgsR~7X+6?3 z2Gkh%9Y%tnI04W682z}@=%R<=oqXnR^WsVaQS-}5k3<65Ghw6_uFW?nKxW>ipz#_G z!Gmg5jDX0koERnhA5Kw{1LoNh_0hyw2e*I=)tv2Du~9QO`DE>H22CAfrUUT|9v9Gm zl-+X<-Jt~V^!uJZ{!wBx_C#@99!|@gEeKAHPPVhod1M+QzB+ezLq^u~9B*?~r`xFY z?1Dp{S&`<~Ht-soR9(%f=H>A0$d##2pQTT)6CjaXPTWr+*fy$Rg>b8F5xCLDd`u{x zsCXb5>T~?Q=2t+JbF$h`YF!P^$M;IdPv`wiZr`7?#j^`P*n+nN6MbBT&c8llsVt9m z5fA3R-Zlw*y!lvEDs;XnLmP(7h?(`BfR)I6B$tmq04|0e7+v3ex;T63Bs}OL7|$Yd zDaBAA%!y(5n7!c#!2}k++39yD7EHt|&-fjG*9I$y<)O-2ZGl}UKS#bC$S&<7KZ*|B zn?jZSvrM8%G-UarxfGnFBJqzeIo$8bnfz$|RR{5x$fc6@7DgC`d_;znJ+FS2T;5P} zOyTa0$=2YqRDg3Ax;N*DoW(zgChpK5XcWJ6ZZkDm#2lmF4y}cY`V;Iwp!b_KW*gBL zXKKnSJS&S+;Myz?n%`t7Hy0K0i#jH&IlO#f$=_uW=h~^TBYt`)HOTySUCP!`0Vyik z8!KGe4|iMLK z`^6{Rk4||{ic)!f>GFZLNoWvCHFnJFGf0!xxl)0DDrhH8{yKQgn+0;BdP>s ziDD zmtCw`Mfi)Z9?B+CK#f49blx>zwQ5xx0+#t|-d+86xn%0DG03p-DVmEWomnxiyJwbM z##^wLaZ8jG2i?J{Z!peZY?b(`_s#nBl19ahkI*k3BEC?u7a4DkPeoW4ysrTvH$(IL z>lXa}Fsy4OkuEsY-&NU{)d;axZPiJ(b+6UA_gpO3aDv%eU8hb@kE90KC)43BSXt+t zup9B+7~q-j6ivz2Wf{Nj$f2QKdH!O}go%8k3+#8C&nnQ5;lFSD?*{pA4f+2v7GV6@ z>TPNCO;$!7NyZx+nA(fme1B5^Tszht(+^7aDGA>v>wrMD8PZQ-Cgi^1^o$hOQMFyy zAbH85|9QP*c*IwScAUEI-M0^I(i~*J`^C4a=#{+}uVkJ@II#F6V!9F6i)tzG&8hFI zfWE|7EU+hPeRcfUWsdWX!uG`)tBM>g847TRLeV3Di0~S zYerF^gw(#c{L>kWPa`lj$KoBLUGsw+Mf!T6pplDPoo}vY`j_bi2Tq9s0}^*u%Y(hK zYwPmkC-SzTgbv&z$k!M~PMK=uPJ``jU&!ONWcd-P*&6Q%Td#0u7P-zNRa5vw%-Fv8 zp{2PFBrAT4Gv=js;Nm7{g+*qP(*NRpUweM`j6UYiO?pP${NGZh&f6@ve=&GGg|5Pu zf3q{?DUtYArmDCvuRh1y2x)2S%&tQh$}^Yo@y#jjM&KG1nhxBvwcy^uchU%`XxAvh zZs^4P=+V2#TXU%a<@JlT=46$IG!LY0HBT_;#e(N7`n?H!AbOGD;<@mvt?hEBr7;+iackf=ED?>8x_=DAjGLoXC{qDXak z?f7}df`&qC1o^OGUvO-zgoU0?sd`^^ESZ*P^TA(CmRH;TUMNvmD8_Hfr5(SX@hbBW zG)T|2fNJ;2qK$It5*s)A3UtcUtWup)8qVhPx?>ZivEQBg23a4_{`UT(#|7@qU`tqM zUs^Dq+~*d4^vlp`pm_H3T7$Zoi_TIZk;`r&Zu%;@HY?qIL4$Q+$x}{sJ`+=jLZT3T z77`^=eivajzR`Bepe!tlr`Ypvai-Kv2w#{3H$~IOzl2apb;o}T0(6-{^|KP$fyKWE zPb199K~ooG&W?81)S-0rDcG4bEHG^&tt8o`Tk)|9sIPYmh!zFHU+yq=b8*%?s%@z) zxyJ=Da|dNM$VUygzy-npq$F;ZyQ&C1SOD4i=gQx)5_##nZF?aqHb&HdNx{+1J=WjO z!bgkPCb7oD$Pj%Tx&&uOd!>nYElehk69rke$#1EC=DcrzxiqizTh4+E%ki6ZMkY%p zaAlqWaZIPUCdgZQp`-VSxV^qs-&SC_^&(b%G2+F%7@ynS2{`$Dr@0-SKx@7oz~Smk zZ&M7aHR3mBC$+s-c$#+QJ2ficz~R*)b`A|l|BV>X`G^g>w~`6}lJdHDLg!C!DK!R*!eTaW8+(2dZL+f7GvFr$lu&AIoyd*|Cggr; zZyi2MMsE$0+?xUX-a1+RQJ3p%r|jicv$OC3jBAo&F|5~NWUMa`Q={nH)FMo;OoSj9 zDL<&aXANBoUN_jfN&2udt((P-wkd5!-bG7_n}`zty?BYBO3C@)9uM>)T{yPxj_7-c zW_p%g#dOfk%{9k&y=kA33JvGFuGO(0 zCDwk=je7hXJG@r~;2i3Wx_E01lsaqkmk_NIh1QBsXAx=!FOY{>G3m*^R3&|go5WI- zBn8DAF0R1#K5XiB@HFK|Vq?~zJ@)Yhg%dvoZ95CnqMV}k*Xjj)RtV&6a#dUYO|K1k z=ETXOm%dI3XTk-frZ(>}EHe zt;2hO0dseooDYv(W9db8lIn>v%aFJ9fZqxWqLlh%MO(!aN&}i@PiM2w{H&{-#TAfa zVwpb^ipQ~ESypPp-!3-L?W+-95X;CeB<Ks;ysr=?6-QQ;rR-#cC5#V z%~J$5clyARt(7*vnwVT$AEn_K%QCM1W!rh-LZg!5GVR$g47U!E!4cTAZ!^X^N?1Lr zmn)+2Fjo&IbeA|71L@=jK$EU*Po#$jtpwUvShPMArD%?-l60t7jF++qocLvqadYe1 zodG=LC%IXQ{GMHGlK!Kn&#_?B3~jyU`DcFeZd7q2DAghTfDvHCk}+w?2IbOa^)0F+ z@{TrHl+-S@oh*52dqeCAYzC|{lA!aExJ2Z50xr@aU7{l5eVO}4M9@xqJ43}x5w=fb zAxA?1+~a*a-2Qno22YjAHgY4`|4@u$eVXS}sRKe#MJv-)_J?JWP{ktgHt}n`Tkk?e zNXTSD1`r=L*ml5#P}iIaKO6JTo%4${Clr#SFSZaT5V>5l0gL-j6Wb^`XQJ-z?jF7S zZV>`nD0=C(R6X+SyN{8Dq|c2&phb*DNuzc8ZsW(O8IPyzdKrm=5V5APvNybxeM0S8 zi(zOYfuLz{en67xfwBXQ+_`|o*msshwlEa2tew753_~HLIP+38)5}1kznSx0xW*2# zn%2g%bVz2Vo}p2xsC%xd>6h9&@b+P2U^Cfcjn$V(l-NqtxBer`n2+-p!M{sJLiKEf z#}>nA-=Wd)YTn+7tJ~njN)z3!R(?ZS5-cm}_T5)mxecU?ajw1)%=l$zE9?^YSYMPCfqk8o~)}lWLO63MzB{dzHih0Y-ipabjN3( zxtk3qA&BMv>kcu@kymvuTJV z%AZ3Ww0><#u3Jm?2TLx57tgdiqw0wm<#iizOA-~+0p6ZRbH!0A^sJTXH@x97gJtfX zN8eF+A3!?}`gU2al-UVgaFHQve{OkA>+k=VIpyGY07AkGJh1^bpD`KRck*h;{UypQ z?&MCu*FZ4v@X^=zz-DQ8-Fhr_7f^hOUIu6#f$s_XNi(p?qh3*a7*&xeg_R+kANYia zSji}){k$A{W=5l9v!q9_G-m4NvdOQv?c(#?y}rKPetr=2q2E(HFb7nf+KfD>$dD^f zvVppY^4!V0u6P6p75&sWQHeb-^4>K6UF2lj4iT#9SxVK{++$#aJqxk#nR1X~oy{#EMw!JlLT?UuRt515cqNEIFmy zDmZf|s;Fd>O?YsV0qf|P5_fI0yAB73#QgUU#PU6mme!7UcagdwG*F7HhKHYLgC4t+J^E*+s8_WYmmv?ns})s z9*5;02_6rn$!Mm4CYD9*ASjuZ6G;U_L(yiz&&JO^u<+IFA*Y?toyRKVN&#UrpO>@ko@;n%OFE>m|CL!59jdJiPP_e z-8p!_d@H+hifcI^1Q>b}ccv;uY4{0-9#687gCm!1-B898GpFO3tXb5??H;KTC_@vg zk&VX>mYc?$w3vUciT_pTUqTx&O}?RtXgub;cl7m=JpWp!OKMH@-Z=nm=>PenHcvgk z*r#;u@BC~qX<69*`uggH&C}TdtY_d7)d`5*7z#9t+}HPji|YLMiT|?pfU1j`T~hQ6 z(BUMTtA*42&`Sy!1B$S%sA|aB%;OgTFXss)(HBLB`Fi;xpJ8oLN68s~|K?$enb`2_zKKLRsynEKs>>XlZRjJzQ*L0?ucijfTCi$UMkhNp;nVV(T`Z7tz$PqgDXtBw+ zXU*S*Sh#>3f62a7!*R9PR~4+2zqJT~Y%*TSK=%2o^ZX*s8XazpEbrE^Y*=yww`D(H zU-u#Q$<*USbLryL?mXEnE}{huiLj_>VrAVuL-%YT555mmAX+6z&x_(Uqpdj9th6Js z*v;gq|Cr&KuUaEna+yx;tuo=~oot(03%IfneZ<;}7kGQOGD*zoLRAtzW0ep7zmMrc zPHTCO=n$t(cbNZN>;LIc`2YE2c2)6P+D2-+MmuN|nhMWt=Q71g(uL`NzL#!F@$LkKk=))9K+ekmyHWggSvo>IH>WfQtcRzZ!c{a z%HpV2UO-%H`-H*XXZf-AM*FsAKVocG(}mJFwAt5# z(-^lpBJ$wlTX2rgox=LOaQkhd%Cck~r^6*)s3Eq~&T%?%%y1A{UzZT!vREoOpegP? ztNQF#x>&(V=rqo?4m*rf%EMw`#pNa||Do_XA95~`?3%deJJ^CN>mWG_9moI=%bPT6 z))&~QJ|MgKyp4TrrViBBL0_ij_7hI$)7~QSBn|W=3N5G-OzK3!%)7k}1Q{N!vr>8&2QM~HW~StRCrZCPPTTU0Ekxq2-PgeHArCF^gRxAVb@bWGAD3-B1Z91QTU?oF@D^ zE0VFk>#2)@Pkz&4tkBoZ*Q>kP*(Rr&$-)S2&oxe8lN3y(CMZ~)sa2kI+2^1M$-<{7 z)t#^^+>)n+Bc!0}Z2Kd9X_+~wjQoiZ)y4Qmk`X^2nCB9oL8GLiEAl1=GRPrWQNmB0 ze{@+?cPf*}F!jypL}E~~vcdiSq0meX=Te3^nJM2bAQDhk)4Hx$O@);^z&WiIY5M~@ zPD#techaE(>42(hQNhqanyX~Se22ABIu^j)^la%}_e`sEhgLB_;AjaRGr7-^EE_+< zBvT?}{0IxuUA*A|+t}v?lBsNb)(PpUZ$3$ zpDy4$x%P8hC)So$iAqQ36(@D?Vy`}ls%h-UZ^lls~s1QApQ*GifWQ%s@#?m?OEQSx3;1`mm0 z8yLY_ODkR2>$Wgm?D`S92edbICK@(RladO3eQ$NIG%Wl)yzu2KY`v9JGcEsw+}=Xz zX?r*JLAbK<7wG|sl0%~+ULXL(9=HI?OfUNv>22_v%WUx;tn$Wy_paW!d`DJke^wi-lK$VA!`&v8McRgp(H2bCVHR(dz6;F<-c1|4~)cr`>rP5^pXhEpH2? z)9XjBDxI~W_{3pL(v*Zn?A4iI1)>i@n(iA|<$_MQsz9CU>Y%&tLATDpEUriMW3=wM z4U|W3JeB_bqG3r3%Af@swsVXa3@CJzI(d`1{Ajz0|H!!^t{ zn|L$d5~#ooRF^g_p<^RekMf3Zx2JVMvyY!c8}G$?kD_`Bb2fK{V977ROEJ%bLVAnt znVkY&yhhIwBIGmtg&VtC>7Q0cOIz*V!SyTc>8Ji&(ip$ugX+Hz>3yIf;DQq(s!$}20?OUu`zNqZmjr3ry zY8Ie_OYd`Qy^{204zkEz&NiAV6N_`Fee73?Q zP-DYdW|zXbk+b9`6Z-V^7${!IK|noQ(tMrfGv}I7>K5sQ9s!Bs)#>`he5hZ0Lkmz% z&SJ$rT|AxGp*8HUjgRlxXYM1{W)x?Eh%9m`9Y!v46W76>zZfZq14@-yOEj?<#{H;g z3cbm1{@3Xa_OVUXXsQa$9U_R>eT<_@R))_+`4QtXQO7!4PSHc}K~s(X*Gz}|v4Ed8 zP6r#`X2n?xE%P`eQ+~W8@wzT?e>UP(kJ#JK-&r+_Y1{vE3zX>4?G=UVz5bpAdjb`> zmqY1KQ)@5ub)uH@osPml8(QK-J!sbE0+k`~m0^0Gzue~1l zo905E@FsCFN~o<7h1fG=850B3Lmfk710-W*-rNL@2vDZL!7=3MmY4;P@J>$f<%=#{ z1paq_TbX1lX0xTju&mr2ogofiTcW;$OOi4K_`1ldDVkSn0*tDmHi+ z{ve*tcOiuUo3|RfI!#<_q?0o@_t0PtogK7#jvv~5(@ca)`5?ZPE}{$vbQzMhF09>? zWx9cThdS0jYnQGedkcZ_;Lxvk=gbi>-}}DJugnn#g#m4olKh}LD@+VQbD{h=nCShE zOEx%?I1kHnawceU@c`fT4V=Lx*__9yn7j58&;C1^!!i578$qMi8#Tz#qrgN={cR+l zaC(If6MrirqqTVJ`179q!rN}Z8B(pjMMUI_n)0De(E_@^OPlm^b)NSW7hA}cc=7&n zub+m0`tG=;^OYUwDZQ!Z6NfDuPgybG>8$T!^=>#@@oeR4D0nCg-CNq718UX5LpEcI ztoW!;?Lcvil9bPf^oGwgdWwBSCzU38NuWqiR-U1axMv-=GQbpiwzDi^1~RuQtWs-^ z*reqzUAVNOcD#zguCmWk0fZE7nu)mYl*zPAZ?E2zlEc_uDb72IwPbZ@jD5;V{(N!( zR2h+niW&L24MQz#ibding5mGS$=UVN3Sg5ZGRW~T)gPtO_9zNgttKlceT4V(3jmM~ zGy0)_C6>cU+w*p$i#&6k&d=?1_kJ8{De@OXv~uNC;o%jYnSSW_(}-oF&|md7c6rlC zZP8bc-Uo-lj<8CcJWD?CsN7}70($$-(~0s8$BXr}p4Dm;K8tTF&e`Vx#7i!VGX zHT^zCR`FGZxI_GnDb)4zIsG`rL)GBat|Q&EOlp-zqM4|+i@?%`pTCP*7NhbC?0WR{ zW&WtyicxYSxE+!WXvN=6riG>5vjC{ZdGG@5#l`IA9g@@?&yZ(PezMchm=*d%_$WrE{)_f`jVia)EAS zvze^DY#N6;5;DX$(q#km^8CErml%fT9(lyd48)8{Y^H#&b%I%PT#|ouJA%yU{`)xB zq$hUQL}mKwN{OEzkD*P1c3!F##ntJ>ORiKv|J;Nu%w1+zh~74;hzN47O|LcB>q2^!+-R0sDU`0JG*7+Y0&FIseddpR~!s+A&84~~SH-$`ke zZxVQ|^mZSsE4?J)kbAl%XcgQA!?xf#aDiYqlodDI#r1SqU6r-jV5yoHi{p<aE zYlF*7j{eY>e9$DoR@dG!5|K-t1*_|{OasDI34Z9K%@dvUE-Yu+o-C}l3tiDQ}-?!2P zHe4l?QUI{YoRVr|9-45d=0>Zu|4KEtXtzZqwQRSa2T;w${w{sokht9r2+~I4{UjVu zvw3Pv4{ReTR}4zQ#eXIujnp2MiRaEdxtok%2>qHW-xK>}ldhK< zmiQIPtVxga=1TGNHW90GHf7!w&d!ImwBzYr$kR*XJ}$h5Oqm==-SPbz^7>`CNzL00 zK3I0BU%PddL<1o6^g?pM19EC`pBW|8ztrb2P zSNr&UVCNEIzIwrV;s}%^*PY>ONxC%tauxHBzXV&y0S);1mj_LWu8@Alnl~MlqcCdk z+eF#6Itky0p3Es+UGT+TPYZBUK5A^_dV!TDj)Z0c6%De7MvHe!vgQqN$|3Bkc;H@c zypkSBb$iZ6ID>+%}+iwL&11x4O`F`l*ie|26?RRq^+Kzf$@EH9~+crI><3!Kd zjro{u@AJYWxbOaAkT>c-RF;+_orv1PWV8lwAg-kjqJ%m+g30Gm#E~hKBd{T`)wVXitikeQ73@kol!sk~3QG$(7K$7PAKjzwEQ zz34CP48MKH3Ez*laJA0|OC|lTg==#Y*X!~Lq>ff5z66v)ALMEl@I$8g9MEM6+>6DmO=O5!YvPHuYu_TUG{4w^9Mz7O&zmYys zcXp01uX615Gi{?TY29B}ElbqJF5(fd``&~4UUf_Bi(2YNA_K$aqH2UVxY*%KEkx*84( z_eM!qZhKnR;@J5~rNarAfaR?DJB4~nFr-%F`QAD0FCxSY*fygs8Jw;(;H1Q#X4|9$ zjkcuh0Qsnw=ph}*?aOgyGqp9W=hd8A^x19gYQM$2McdQxavBv{S4ZM(i-*L;jB_1% zp$#;p1ElwtHZ1{AqO7~~x;<$Sn6PSw``orzL!70=-f@;Lkc*pA!Q;oEB*B49q6M3M zLJ`MQ!D+%1U&_K+pO@8&42!h1e95yEj75|;F6WfeL1n7kSWuO5u*>z)#4m{q><4-L zr?y!4QbZ+&nxutN>*XLI$4JfQ*rue;z;BdpvQ?3X!gA37bDID}*AaXMb0eeIfQ$5R zOb#c1_HsAJlOfk7B{Ry(7qDotUeki==84+|d@f{+sqZ39!~+J%`xN&68h7j#d!{O5 z2b>n2K;@!(sOkJb4N=q*E(bt^!eRP6@eks&TDFWrUNPadKeZAZPa^9~VafDX4y*{V zd%Fq60;028^d{A2#Y-)4iBa}hVo5xu5qYVr38+Z-h306srVVT7Dl#w~duO!l>*Bf< z4A;?EwHciuMxi=Mb*~g=UlpXjuaoWr7&M3W15y&5bT{AMP`F=natv}h5(YNjNK;z> zF(X#S#_ko-PnE^ld3ngp4Q*1G0fOCASu6Offh4qFcJy^6dvIo@c(szvE#UZ$+4a{AX*`QRF$znyAaVn#}rWQ1gVr<~*7 zqr7mC3i*-$&8-e72g2c)2!C#6>tvzcJ5sf6t8L_y%06W823XBp;6iS0o5f6KD`-8R zOMTxQ)tzX9IiL}WHYHTv{Vc%V@v|M$v>f-lBvA3nGo&lm5n9krbGAqWO2AhjaEW5G z=-#>;$j=vSWAFUZ;IHHuOQ`_K*jRoBD@%`*+`08!G+f+FH=c`B>&|~3XwnNQ1j4*p ziUmqkm^Ab4w0iEhwDJDX{F*P;Aag^e3G&T)_?*mY`38^lm!;?W!0+=SOW#p3`XETLNedUi_WU-mS6BWs)lt47AS{P7fow<&~>T7z0Xve(d?3<}L zVetIZw1VPE2UVmYO5%c3h_d75=&Z%FtaT8y5Vm;~3yhA5)!vKog=lw^88wExzw2qk?| ztUL12_!We2c2b}9ULb9PgI{j6d4S%!oBHdXj!!2lXIqkisA*zmM)@q;+zPgjt;BOd zcZFL@FTs zKElV|7OH7!-U!5yI=16)nVN?FTH0P7Mzc)~BQdAPd67>qUJQ?52Y!2`Wxutz@v}0x zs4s?8F5_cJgQuoNbUcidBJBN7BwpGSI3;=`g5Wg`^7=6V%sX$Cwp83VUCj;UuKI`& z!_A$6lS=Xn+0uJi7FX@_teniM2<)ols?^ocbRyD)aM`j;#3oX(x2qtcp-2k0umQ41 zTI^L>hFrE@bwCkSywgELE{nEutx2?ew=p3^Qx{lXul2KK@L*20>f-w0!5Ljyo&ZWd zp#J^$vG@J3rIFyO>{7IQm$2-Ovoo+nr2ep0{Ew#nzAb$n8s7u{FqK}S>+Tl!O%9rO zbO8}+NTIZl)bq4uGEkmmwx)a0$)sDlD|1*M+--d?o&zzgL~p3S_68mi`q_7=)&RxOP4s0v0G>F@An zMF(_|*z3G6v{GU=^eh3Il&1$oU{06JX4?j?aRPCf<#kEy(RQkkkeyCvfUThWEwHBJ zy|U#9kq}qLhqP)JPM%$z;)2eZ&eEGJcFCA`@3p{JYL&WpV45$nUdeLfH=K2Uu4D&a zX_el5b~8xOVKYQ>L&i9ZL1%dvQPz>C<~xW{_w;j{=wG|H7z(_UJ_ksV+Zv2aeDaYg zkQN#A3XHv29HKgW1LW`4ZpiRy67ZlHwwPIrrQdZLQv1W_z|~ZK`RLZ7Y5w0rEJQ;} zC>z84^dl8S|DyPAi@?x3ugh|rIkAD&MevzJGaF9->+)2H!=^~DaD>KA*l8P%u1=<)5?T0Yl_1vw~jIILd9xvxaU7S|Xd+CP$#mL)DQNi?1 zj}B8q(_0j7a5>`}PzfVz^{tuPenx#GSLqGEL z#z*v7c=C4#E#{-IX8;GQnz7PF=K;yBKKn%zH;IHpAjd=nxA8mei{>j>6`THGRyVhB zOxS-^ga2d~Pcr6H*=e6daK$ET2HnUKUAXk#$v~X!{v#iq~6u+vR(G`T+3fW z9ew1C`Fs4WTgRxbsF9X3G2^hTkA{BGu11HQ*uNM)Ld&O_`Eh0be*S{;aU-iX!9$$` zHW&GH4US>iaoKqOT=rsLjkH=u5z7Or6fLlSlwko9kijR=YXLQR7x^@LTu~EcU-6o& z=uJZ9jY@w4)wy!=M@)&Lev#|b;PQf@A!`PvjhZhEYi>?Xm5i<)e!rR8tE;CGycz30 zZ++Dnfwb}nuCcgCS9<@}SeHp~d69V5ycS~rn4IszGt_%ztdS&RZYGH{#3s_a_%xTi zWo}Q;R7~a@`e`=xO`ElrM4%(j122E)n-PRRFuA@PxZvH%)b9k{0R-uxr$(#+T$Qzcv8t$ z0rzJb4<~N}9lj=089~e)=+%9d$xt(?By))=JCre<+1DTXHt?zq6sM0tWQm4Yd|0Mc zIFOi@Pty0f&t`nIu{tsTC{a}Trgw-e&TjJSzr0+l95RhsM&3#Is2}tH(9Rque3z7U zHWU3-6~slW>@y}6IYBJu;}-?m7Jpz9P?)utOvm{mO?6sT)Nj$ImibDMNQyrGw!5QIcM+TUl%y~dj>XvNX)R%NKs#6c{AN5bVSV65eiE+e)63goZmak9 zvv|DZpf+9EGv%O%PJpZb}ia*fx9-pje}9O^=X`&%>-`fH%dff_l&ebQnBn0lr_Y2yd# ztRbH)<g|C+3EoPgBD!6T^_Y;%Ppo z?@!QTxA}UvdDt$UEW%g3B%%s>&!5}Lr~A8y!TBua_GQx525oJESrnud zLrGw@b-ecZev6A)nH6d$HscaLIN9p*c*fh5f8;O4+N(x1=WBWRqcDnAM zh;kivJTk5t}Y8llei$v=dSvebi7M%S~DO;;>T$C*Fr zF06ZY$ym&JqCA)R-?E7Kv)@lmm&}#u)4I<%ujLag#}dApN|M4h@0TAMWWTF^;@alS zFdQpUyWh3w^||V1QjC2KE>KrhZ47OxZjZ$~an;CH@_f^yJx{9<=ec~P=2}E7W5aWL zqHRY1cqR^wxLG3|rrL~aeI#~QK`>N}4 z)7~WdptLR7Hk+cS)UiMC&Gdq3+HVpK>E4o~O3po- zA_6p_J?`_B*tL?xe=%C6&a=*%?Ih*P%mkA?_@R$|wUs7z=QAC@ZDq9|e2h}fCm?iT zY^Oyh;*1fxy`Qup%S%VM1EO_Xl;tM0R0?Oe&$H2J9d94pQ*`#_+qrd6GBs(F#5f7^ zaryMOCm2)sli+Sv_xF1M!nNH7{8A;S*O61A$-Dpzk6=HIL*-X!e78Gm{4(=CwCXme zNCXs7Z~FSg+FkB0ev&`VjwPGGLh_00(Pc(1D zw^^BbY1_Kifg;arpXk3BFm-Mxk`@+^H08Bt;J`S&WR+?vTExCdUp)WjDNO5H6R&0- z=6d)S<1zktaY85d;7A>Qr3MQ>m?FZM;Ftc!J`Ng;7E($8#EX}gWjjINNDM48Pu8jYX2JL%>N&?eQUuQ0S<6D~dSZ-R2=3*?q4$GH`cSkEuT6i`Z z*L{*R510)M$1L@AIn?#m6u{h3TmSR$0v~F;zPJtgi!m+@=_a8ilt8vPSDWJaEMt<` zdzhwkAqDqScVinuUS`Ezab2!90@wKmAA)v-^Avx$cP>8)44PGgKNe&YxD9AFI;U34 zGLt}wSTig=Mru5MOLbNxj>4%J!YCdcJ&p(WNj`nF%zT-`^m>T}u8FuUlh%Rim)qS| zu5AQn#=rPRoZnG$_B%E|&5bKN_-JbT@aiq8f7V}&|N1gOZB)zt;=%H8)`(kWgksW4 zlQn<4E=h2w(`#2;Y2ubAdl}8KwN!S=Q!(h$?0bs`KneWn-KZvp^Gp-LRA!~qU}J9bJ)Ft*dX%303YtAB4;E zTi7~0ODH7`XejSYL(iD%x@9uwJJ&NPZrcIY=&qqkz0Um6;*&G2D+HR=s!=PYGQYgK zNQ-nMSYquClr?mYgEL`DWwtNLR;lSXSyj|%B1(ye*XASsJ?`xX$tcN_+X-P`8j)Kc zEAB;G<^#3y!Lhx|n`A}+?I>k-&%0ta8@)N^`zFy}s%ydW>8m^4cYC@{V()A(685wQ zHn6-njg29ChqtJdZmk{qKWP#f0MldkGm!Qs@+o_Tz!H_S6sy+uFNm0u1I_0aIJQ1i zLA)^E1nuRL(jvn*k)y^;QJ2o3nG336}Ce_2sGEx%~;^Ir^1K=Srz%eu&jN&#WNDn_O#1)Ogh8!VB3pzKx5;# z%c@Pu%Kt=Mu|4R8QlUDqXf~#MC3C4WrJm__WE5pQ{x1XJqxx&=z5@u!_zRm?BP$a( zCh{8nwJB;XUiN2~chAF{)B^rrMamyjooW6|#=6Pt-v91!H*hdK<(6qK73|uab|?+u z%E;PheDQhKqeLd8^w*f!e836avk2O}3^xz@^r69Dlm$HLto3PeI-h)XFXave75qMJ zj_~a3*l6XAt{i*#L|BVM%Nxy#s9fuPOCYmIvq_)j(8u^pq3G2v?_?Ip#pc*{BE@oj zxD;;d8%0OZ#)RFlT8+3&-}0Rvi@1Zm&4?A=(Qzq(YpicUj%^-Hd?0Tv-I0Cmx0BfzL+{tfo9e{(_>yg1 z`|Rf0gl8H&5K??gMsTgmPVVi6=O#d9}&}!}T_5DHpd*t$eT5s%;V1>2efLX05LzeYI z$%AWgg84d&otY;=HvU9FWlG1es~vlWOwB2 z7$v4i|3c*+ym4kG2_-v?T^w38OU2%NkZ{$$P8yQ8L314B4zfAypA@^sP)}v62`&P~ zKmtBK^;#rI##+gqdc^&E(SIBrY?kAI4Q)l){7y0tbV?MTn4mofKH!#Gf>mN!*(Wg_mLq z6i7f{zU}RYX^!MMTyh`m%%-j^v&ds}pvKS2n!k3zLDU|1OUUSYf9KgSIpOM{7NXKG zKkHd;_MgV+xaR*ML{V#{S`j6xSJ)lS>>R#tnPHtQdaw`DowcAlkv%~=W4w+xRk z2VN{R3i%&Nqv<0Kx_-Q+B%ppGvE?nC-!p)rWFHdftlxb-w=#L7(0#Ur&wnR1?q4M!4)u!J4F4cxrCKqPZ)Gf_U3;v|j4bgx}yOyCNfrkXm_Zs>6dpFa$-gZJ?4BF%%oH|Cv6{NDLF zEM`;#*6R@LM24uYw!_gzlY&~r`|yV;ogzswqH->%7}l){^{}&_s8DvBoAl8r=H`wuiYhURkz(cP_74RSFFD08*3!S?RF%q)~W@Q6A zQxviWr-7U_tbg3d4&cyOt|zk2y!A$EN_+SSUAPGdb1aw=RHNW54Hv}PsF6Y|)ZEfi zhDKcc7|-pXH)liO4-93&_E=I~l;0>BhIK|SX?;1%n3uxRgs<-WLg*Q%rp~YDE1WZ@ z`?0^VEF@_DVkqeA>FwKB;Or2$dNfHoUjoS8w)qG91OLy=i|qa#Y*j>dv=E6@YOvo9 zy?1Q+J7+85o>QQsQ92d*@|@W6T#GI4k|tx61l+%&-iHzz4yvuia@}bo@mF$Z&yl6z zqDEU)**+-V`zOu()%Wl9_4qnQ67bQB@eW{FaqoexSZ+j#Bsh|fPwIZtGtqhHkZ@X% z)XVpN0hWnXY-+0t{fpt$}M0Oj|gX642k*V90a#fU(hb8D<;8 zsAwo)0dvQT(524BR<;d_|3Teb0L9gPd!i8BA!u+y5-bp$#$7^ix^W2(O>p;M!3l&w zaJOz~+$}f+cWE2~O>l=`na=mWGjrd}oq6->y{b1;MV&f**!!HV%l2Bo^=db#8F=rO zxv_t39WP(tH1ei*llO0KBflxEJDEVnf%M~#zu{qaG!GK<{^VR1HX*aydmh=3ctQy_ z8jtQf*r&!90cl5EZZ6_4y?KA^I7wX03B(aNO8>VwrVQ&WTD74U?n|#&0Kb1wA9E2{ z@R3HvwPWbObduhzP}d*wRC71Q>xD!i@up1nVmmfSSIQc%>u^+r;Ise%li6#%K?l`s zXK;Jjk>k&C1^Tgj3WzMPKxHq|X0b%)kKXUk``^w?GJ6moM0K>(1U&*ZF*NLw6Rpb( zI(#xAV8a52cHfEjH}LjAdKSBkS`muhoy;d`9Ao|DZ_BTK%lAtzGyJ2Y1(n zlZ7=7v9?-jmZRRK(K(T&{kRr?sg5alMIy=r*9@hTW)t{JfD{G3MV<-G9S?Ex31bpy*#*9ddcu>-6Yt zn2u=3niOmJgCa&}(YATW(H`{h;y;Rf`}a)q|4IS>|NIryql-jjR{s|wGa4=)))R~; zm`~9DDZyUK>-*POoi@={Jap?eC` z4fwJ4A4ujW|3EUkP{BqW{ac4V2+*N=m+YCa+$I~m`gRT&RrV_(U=gs~Drss!nM>cF z5(u~7B)}5K?_1bD{eizCQm~qi7GtA#-Kp|)OHu*n+Lo;;mWKmhtx%d&B#~<1#e+xX z$3xBN*ueUNPk36kZ5sW@Z@RVRcN&vXg?u!5qSP^9qB7nQ#DWP0taAkvXQ_(llRo?= z@j&ze_E;9xb+-CmWJD31G~K{4nJPgLZ36gV0B2Y6Nn|LUxX-Hwqn#|7z-IAZP4$U2 zKy#EimOO>$Jc;7^`OG&>KA~;Tin(XF%QP@*R{r(@8u#j#V_|>diycs9BtPwiFL&iz zt~rY}jyS$@McW&Wn-CwH%t%?eCye>OxVCvqB!Zl!dbl2>hTGLh21TC?nUTKO%#?l+ zrqO-<+Ecwx5My!ngo(fJ$3?)8)F-|z&f+Vjr|)DSSHT1NYVIv3S5f=KB_x+n;?AIS zzYbi-G_YAKgF%va-H+K*S-i}oB}p>A^Zo0_pKH%`6cr5-^G0X@452- zm)eP3BDX&*Js`bkC~ue_5jLYf4A-I(_DGGrdGXvt@nLK{{Y>)6(|)#LCXifEB_aYmuY!WraR8wQ2PtDmuO_K@u^1`e~p*tqf9s`X!IYWQyovpuKY=a zh6JviJU)LUd4#Oct$Iej5s)4x@-*6Ot(XW{iEcve79`x3r9Q%1yn*uC1MNNPyuNyi zsm*FQ)_E!GsheRZYQ{oW%ryH8GF@#CB?(^B4;u4~Uo~Hw+usQ+3$mUp>t7FKHIoys=V=Z;#4b<%RplUwg5%x=^OYI;g#;6>ko3 zE2f*Q#1g!AGL&^k+7|d?T1iVO8Xh*Dxv@7G*2l412Q2R{u5h--9;nr(RF4y)3rLLY zh-^I9E;XjC#0IenW+}%~b&69Bn3_}Qw(valuve}9#xK@{qEXu#?%it^KXbM0Vy9AU zLa?Ho#i#vdl+1t~Xir#E9IJ@+0B$PYp^lBcRBK*3`lra-ucIn;wUhu?zy3Iv>G^L4 zXq2H)aU@K(h?USWim-q51zhkRcZT_cd+sY{TRK~dlnIeZlAF_P_KE&!`z9)|Xu!~< z4ZhnEEoOz>zGyljAlAY_(5vD1RbZ96S@C{}z~(iLM$;yiX5zU*FhLrX&E*N`^}579 z9aJ}_#f^kiEb6ey+(t1N2~)Xy{R^{5=jdbSEXgr2PG-}z%I~-Gv*MZZ*P9cj!e$`> zdF3ypc{0Hu4zW3lXDPnTqN1Kmc6LcrI0I?CO>PwliXufuAm@+o_jUY?rp-zTMK0BH zu>YU{kKzw^@GwHU-dC;aBNJ)vUUR4~e@}(pn~jJj=iEjh#gsn%$H&|UNjfsgVzCN| zOSvAfwn&rg+9|Nh3NtjLNpWT7W0dp+Ht>6q6O&i-Q%rEe^F<|w^1ro%?2gz!rpzMf z;G9^GnY9|YlLNa>&N@LIkcaQ&inlpu-H*6^RTE=OEk1U0Tg zw>%1X75z)nPQpIVAAtf7myuy9Ug{aEAbN49L#MmOI(wdsubD9=MOXw~2Xji-1t!@? zdmq;~YTv{w=@R&%2vyH8i;2wrgu8P{XEqCz%oOf}&SL^i$qmX>@xB#~4bDJ;#bA)P z*n7WzY)~P%VM0waf)zwhCm%P*(oQ`p02Z!{66p;oOA*QAKa)yH!!5D_l6>2V5sn^V zu~oIw7;ZF9obkB0Yr(BEY1v$tOU&VctNWtY4T3mCa%1Znu}JF_Z6&s!sL$A3PGm*x zqLq3=D6^^tEU$-XJzH%$!?^v7Yu9C*u;}#O|66BRvrvs zUG<2cAz*KYM`miS<0Mm#exxO_0p!W7C+4!*Zm*eMu5ss;qsmLZ8X5C33eEr>8 znk@e?JwpDoy|=?5JV*Y}ZxDS9AR;o&Mgg?MN3&>lB=pF-h(}L){Dqs$;uzdls4%ab zr&ho&NaJolK!{wV*qYw8yqV@)S0p9flCz=(tz%Q`j!D1#6Hy}BisohMAllC}emqkI zzi+vgOi%>yHr;;^PRe2w$Vbt2nzK-7rbD+l0vQMVjIC?XQ(cZXL;2BmV4-FIIaaW? zp4|wy2w~}!$LVop9ch0vG%1j3ASeSpxmH>bP3FQ-6x%0RZBq3vU4CR;38v;DB&SK$ zm_KbL@meqvgVezJ3!bm}^zl+1PS`A`b(OP!z^WHBvBMclsro>F205YA$WcO_u^DM8 zSnGHHgF@lWaIf|`DCgw!rP}V%Jx%cQCwBN>`0h!bGO44+UdaUpA-9X(YYJ*^Ei-)mHy~oRdOEIu_^~cam5w}PSbog zqQ@1V|GYmEyV+0y%hERc;d|Y-|IPsjpp&}M?rYr6)n9}+?t=jWYlhlQ6SeWlnXl)& z@NXrsErk;X=+%7}G-Y{^MnG{ov`Gg2{4dws_Awxq@#>PH1=RG1`ks6|wp6bp5Iifj3g5 z6~25o?$6Z_!>-p}ePXDzJ*_^9cpo?XB+uo%gzB{~f{<~R$P5oW5U5K7^h$X3Sa?KfJ=nreyck ziR*1L-Q;9M7Z}a@3(J#uq%gz%8JR8Oq~P~=j9-f9{$&dzKGE)W;zjdkR2%0Ci7W?Q z%xR8Jt%2M!$%^LG+H4&q#L5mrZ9Q_i1ElWw+OIF!0af@iuUi&{M_9D|(3@oVp{Os5 zaGf~YFli=ZWaFC;c#iZ_9XWWI!0iyrm(nx?R0p7rA&MkEk<+(?vwa1;+9CWnGTI~<{PQG3<&^Z5;JOrli z#aga2#}XRd%>^u3e0%8QHDC|&YI@aKB6Cd{%645b<1%!t-z~mZL1YPTU2ex2W+-TL zTIIXTcwC2AkUla@`~5+gO0{rfS)g-Xb1&$$XW{6)irW31iw6eoIQal0pQL$eJ+_$< z%ewTC%r|C$FN|CVDj$(-_D;LEH17JVgUS4R6U}-*<6s|!*+Wl^Z5rMB1eT5B`F$ocko_xDg9cG-=*57KJ}6%=Nsx1dTQ^i=JNdw0z`< zrD@)J5nnzXiT{Q=603-U7*RXrSU5pIA!)lmPOoOAI%(5(sOBjyan!rv=H9;BwJS2K zUi04V>aCpdhgQo6GR)V6-B-$vrzicwns%7ESNJTEwr)J=N-8ae3hFebCaf*g2s$~T z%Jmqtqhht^>QcbI{on(0G0C2CRM zU#ttd#v5;3nvKf>1Ryh4D#gy=qliW4eH9^plc1ic!(o{5olv8`GjlHE{Yt&UD{UiV z&?zLeQqwiAk(#d^T;H8YanG>#2)RXa(dS zy5ekDSu&fRLO*iMxSekhw#^F3FWolS-vkkflr1k6Zsa9%3G~=rhaLg#k2F82VL^CX z<(Eb?nmvYA;Ld)QDu{Z)Jmic(>Qe`>c+y;BF7@F3rxg{Q*M4wsgW!q-RA}svYCGgLLjJTEe)P z(*7v7szTMR;>wx))MkIII%N(botyp&O~^n*B~31%;8W*n)TjhnB*RA}lX*^eic{df zO0dx&N(!LK^nD^CtnG~&oN9dSAootz^QrHoQ0BY(v^cG-ZabQ{e3cC4q;Z>@9*Cis zs8V=_1aU=7h2w(w+hxJ#lBv!t@b48Qq$pj&CnEbRrqCtrMc#}~F6Jqc87oxxF9P|N zy<+Rjmi#X;W6k@#2Y ziyo#fIq)-+>m(>L{uX%q712&**-lfMbq~|1mjUb)j{XIBnZh!rrbm*5G#CeL2?{;rN!itNpcOo+fqVLuG7NQ9&2~(89Etu#vO86%Cc(#9=9KGdB`08VwDMcVP3mz3yXX}T6zRL3#`0`K zU7bbF-5P44dd-(KTUJmjtkdS@8G9_++^Mf zicp$GzUiCL?2lX{_PW`uE3_X1-&V~TF`Q*mncn&#)pPl~jo*OK8K|VYPv8m*IZXi? zyQjVU^)f>A3n_qKUfgwSE_1QS+1f>Hi|b>|&hNP`35Oa~yWb`6=LB;KmKwC*$x8!c ztI@O^i8>DT-41tWhe|WT8`~)9n2`G? zDEY`KBv?qmY*n;3x%B)Yz_mCaAixXRe7ch@);V!yw{z+O1=9gVe|&Ogox6Xu&Htgm zY}WR712E{&{y|A3%ChWG7>~BIql}mD^`KI<^RQ4lci)OIZ@==O7iS3Jj3B8ZoD^n} z1slyamTkruv5Vx?rh5{5P#yAoap!JhkW)v-daf=bk=W)9O0MDxH-2^Qe0|Y8y6}>a zWPRIRv^??1BoU2?t}SM=bYnL`q_;R`dT_24roAx;kRzRr$oZ!&B4c=&o{@(@>qxt2 z5l?-hW8&6r_)ZQ$W?k2OT-k%+x`(vtj01YXI1}fZ15?2hf@fpwcTq{@I0)))Z*+bk zpnKQX6Z+c{ILQ*L1Q>UG#On|kIPCJkh&BOQB^{eYgPFYS`)NHPqA(7Fbe{qa2K3a0 zV){!I#e(UO@y3&h_J%VV_yID!jD!Ue{)qj~er{uDb%z0C$)r%)4aVo#^3UY^}{~9kj{$m@6hjASO0S*sK?vw{3GRi%9vJ1)<`K6Zqh+J0_tSz!4=FD?zT=n zZA!zu?gt6Yb}L2U+#$@Gr zw_Y-1vH7*OS?hEVatc^dq#q5l1W$~h+Wcb)NYp7ul781^J!cF6MJg)} zHx$6Xyb!BH?52>hlzNVDk!@DiHk!$$`sd7OZME^_hf(8vA>@KkM=Z2Nbu+Wj9Y~`azn3S;AkhGRy!u6mO!l#NHF@(kS%pZsTEXYvorh1e~Uv{k}HSz@$7)C)!{;c0eWudao!f*9PYTKD>VMrrP%3F z{mO;+T+NOIS1Ft0cETGW`wz6Vc}`Dsm%dw>X;Iv#iVNi)=An0V6UXr*(Hjd zHVp$CCi5j4h6WUAZshNSHp5j*fkeayI*506x_0P$35@TFOQRgrM3y0U@0_VK<8VW@ z9GKK85!H@6Zt`_&gP9wujRr*m=jnvZFI$?aqv}aR!KYPhGbSs_8D2~Qiv=1(7Cqtf zmT{TcOvz2a)Ns!H1w41d{8AwWQ|e^Yrw@^7ys5jLx!3s7D@KjF92?8;8`*7`u?3Sn zl-s5=WLlN-Z-}{ZZ)Eax)7@<4HwsX3#=hcU1L2{AgZZAhCz%+I?zS_Ig>W^OuvVv0KX zW;4<-Pk6IqToekE*$fUF>g5;}u79VXYFO4#!VMbchZ9~@;kh@5a?6hf(QG1>vUzZe&0DrZ-sDH3;J2kS5Hy;XnzjbP)vXj0L0_OrQj%jQa2 zKGVDpOP;Tk!*Gfw$xUreD%Hp7TbnBK|H>+MU%6}fvsZTW<5TSF?CSUpZ=0}+<)3+_ zarC`i{h{TKMcgPAmBZs*wr$GcE@7^uJCruT{@muBv4<)4%tGxd@+oWD1g*>p?h3KD zdSG5IAWY@BXHXSV1^t|b(oK$8AA~<0cgUaP0Sv;#ynEU5{7mBolZL&T$04s*Ew#Zz zsi>J+sm0T%EMA!o&{>+cIdp%(5Ba&b(my#T9V45PUz&<`D(S|5lGIcSoKY!mq1Ywi zL!d>lk1M9v5MucYp>9BnhA84Eklm5yuD64LY8>!y{C@9J@>m&M`MxBHp4~Z z;^~Mn53FaV{6&|@iugMgv(&t+mQgvwmg7G^nvqHdOO*dR{`ZggGZyOIsfcAHTvmK) z-8RAa(dUj&ZM}D2eH~D}7$vS>RtOLRqfai>{XS;urEkSP=i_^37OEY$Gr~dnM-tA)sqGkEg`yE z6)_j}0|pxxX!HgxMeZMJ3UYU4jRqc<&&16fB6E}BFc|MeHSIL*LBuJwG5RF}o)c-@ zv;7sN5l#>_q=XP4dRJu3{!3T61vFKW>|XYN^F!?faUc1Y^iX$h<7pypZ?{!$Z*Pwu zMI=1hxY(&uvCZGV{!Zm~uJ4oeo>T7N_L_CWSe8K)dEl29g$AbjJ@M-JO+SS_x*U~+ ztG7@hvEzjY?7h!QX6fGcb!k8GQ>8@&CU1R!y_E7Z^{iMke3gKJ_n#!(H=+=7#@s$% zZ4heD&hxRkJK9%vBhS-5Y7PN?mU~MV>XjpR&qJTdGQdhLLY}GJ|AwO-7^u+-S!D+q zLwaZOccy815uV!<*|Lq!JiKdH7I3H<>SAZM_r2NpiSK~SRkOv~sj85%NcBBTmG8JAdN$_#*E`2qy6|bR&1iGZS2I4ws{=H|o-0!k``ks!V*eyLIyx@^ z?x9t&mq0Z(`_9C$D2Ceu(-Zvlo3Wn2vE(_|3QiFL5lVa+V!Mq zOXoMgyMnXTL#WV~@r&1m5VH|~b#iQ^pnf0efAG%{-v9LC^|$=qVDf)|H2%M9mQ?2N zahIfC46~_6%;vdVMCYPh9+sOL48=js8h5HcD*m7l+N7GVHUrHLi`lJwD@_XD2wwyb zJ$6_`@Rq)rYVrY5QWqtU=Pn1eMpIJsNC(Jk=N1zX?uAgdjGwT>-4w~`66evBI zW7UdYG2wG#V^b<9tE|oygnDTKG6nZSnvyv{uw8r#dP1ZH^V7Q43i)Evv@ zkdYh?NI8d_ipnBSo42uXO3yap`p3l{=-sDGZS1o$n>+$l@N{AnSCaprq*FF^D(wLa zwJb71z#QUnVos05i(;}6On_KAc0088kCk$$RXmx;+! zAQ+ik0o+uZO(dKndv91;5Ifc;LYCGJlS%S@tOE!Ks)`=GG?OS2el)|=-C^!XM&2H0 z^rIASMzr{Kuv%RHV8t2U*WGrmcY?oAm$bQmwYexu--J}}7cav~?<RN){dKG3!#Q=W2g2B%!lP=9qwm&@UPMg(By0IMMJ)_`x|c= zd#gq4;Zay}>$PotaU|qa=bnOWFaZHFoSc1-(P)?4HZ+<6kzL&|W&2}}O$&b&9I1eG zvy?dIu(PzTmo0A&a4L{E?cj8wEhMBSMwN8w(u_Sk8 zd*>vW`eKQo0`C528d>jN_B5G{c-F{b{^rS#qx`E+GrENmx=tHqqo~m5P1Hv))LGR> z&_@Qf5SDSL(LP9DxX?)XlU>Dl{_js{p;p-M&zi<}CgdV@^FsJ^0o>jx$ zE;z*}Ul9su{O^{cCXB49GxtY(3>*oWC{GHc{Y8WZkfeV|;PEVP+bPqpqOMtQ)%0C> z>J&w#$PsC%yRWW~SDHAj5otPIx^p7#yLAk=WP$4FS3koh-DSKpW$Y_ouf`K$&;w+# zzItz{&I@Z3Pv(Lh`+nuV;V-7?zxozsC%4*?)#dD3%soYgnnfu{HjTMoM<_fc7b)Gp zYdcEO!xc8oiK`G{e!@?WSILr1h>cB>_d6v14K+hBA+T3~mOlUTr|SC33#D*L>rYRJ zg>b%h{UVcF56!EF2{g(yp(4L)J+%!`jz?u1`!v+#K{oBJmh^YkP_J##Ywl#OcN+bi z$EpKxXhsw5=%~1H`{vB=r45)<0;3vn`{rlexM3!~}cd*%xHnin(OUzP4e zGn6}!qk@yHP59Kdg$ebU6BR(SnwZeuUw1GBJur=`qYKgfN-c})g z<7QdUx}}RVNd7@dfsKJA7|;2=b)qYFa0eb4ALI=?b_q4I!eMQ2nOOvKiJfIMZM{WW zeP&zBgj9zO8gxAhrcreQ z5vpT4Lf1m$}v*FFpjhcs?!oC&SMN*=TN^u4)C$BZu{j%+@ZNv?rtq4QZh zw;^?A28jsd=nfx`{2j>Oh&F9Iw;C0gUUOw2fk@kI+|L;oi4^hb9R^U{@?4g0;O+F_ z*yX!W+tO8w{Kam2yF>Po{R;z7X&+^Pb$NWcms+_<-9$;NHk7ail#@4ji*{ z86YBMqp3Q_k+N7X|+NrU&;(vc^V^CYIup$)Sxl2|3!oJ+Z>FH!*MhX z{ydxTa&+qQitJba`@WiYBfii50+ndG6=En}3y2r6o;X;1wS~pyCm?j*w6svL8XO12S zHsF~7iMY$J#(sh^YkvRm-q>=qCZ(r;BgFX{rdCNjghVv5C_USp-|sVw)j%SSeoEYq zJIp&m<~p{)kf}HrhI1Vy+Y?HOk|)oXa+hgei*T`r=kjchQ(1{YC&R&NhzXYlH=)(? zRO+|~<;ge$)omj~Q^3R)!Ard`{iXcT(7ncFZRk*~^LGApoU&}PcK57y3cmrTXe`Q$ zyX3l1IoE_zxR;+S4oOb0Z3BRRy1l{oZy+Ux<$C(p2KoymL^Wmn)yjitav8zMV_yDJ zjKNAFhiy9HPgS9hA{++Bswe2d>Gq*v;fz!wb~-+#?4(`ppFhQDkBTVp0oX@R#cH05 zfCN`^X$H$pr|Y#S;~d?4_z$*{b-JgO&hssvmKx9)y#o~&Bjm?)td9g#xujtIua8uT znS^c|-QM5;LKYVMoI$${S=OX|0QcCs@UlQ|S&Z6jq+_DR{ug2-%sD%7@SklqY(uQ$ zln;zdmMJZgoA)XNDK<=6yQNhduoID69Xh98&Di?6vMzFcu@h@-)`yA|Nl;i|*ar-8 zF&VJ&hVy7P0X(6X)m55b)X72) z;I&*9$!OmNG|SzYEoRY_>zLXJ8MN&KuESG3L&zH`1X`6Q|Da_4jV&~6 z(t)bnjtb{3n-y}Je%rJ9%Wx1}M?@Z(r>5T|dfES=OsX|~c6Bp{QPc3qISPiVPeN9q zbdwFf;L$4qu!h)HYVmyGwXuCznItAm$93GG0iY_FS?rr+M`K}Zk~GlENXfvz$EOvi>{qnVH5aq37Ot%A%)GLtf#RBkJvUa*jGOh zvlNirWL6kb@ z1Q;!qYb~_On*9=)QrbMi(BW?vNcFeK?bWZ!$SbzFhZbDRj1_KbGpE{UhZ~$dH*0ka zg(1$F8Ns^%_Iv7!oC%mm|L*yOF!K(i)uUqmG1V&3VJ5a6Ct6beQGFAaVFzU4!b5C zueg*cNRwMsq_^0COgRWTTD-LM7_$0&0iux?Id?AeP?%mGZW!09GiWqWE52IEY}QtZ zQVh38d#@AR($U(Uh=gg`5_FD=1x2SE%aq^BQ{TZ}Rq-Fi9k3p?szhSJfP%0y49x&(o?8Ye|$eijK>kzD`(_n6sPZB(O6piq9vm zC89VDlvn;?d{2EN)InaHd`nm?$ibOkB*NMDgGMH=6-3DRh(cn;>Xb+6k`S#Lr1I&7`^&gaHh2#oh z^UHgFfb%b<3x}Mq(%gj{n^aE%FcZw(QJ*oH$Cw2|K+2p-m5uisakwSvqrZdcRjTGvPdhrrpi2+ObEWtCb?K&IS2jDOE4 zEF%Yd`Z}LKqwmw1ZJB4@Ue3i;;IY_9SUBuJBYu@sUM8M32ldJda|vW02VLxor98cC zH9+Q%@B?wscwgSAv7(@3Xk}T8UqJ8~Vh`Y1QkqcKT9geqNr7)w9v^I=iNg(Vci7EQ zT)D{ln^t8R{r3CxhUnz@f2}vdzZyi=DC#rzSaK>ok22)CLHIsDO8*dmpw^F|pS37* zop@9_9FX115HN^ybd1!o7qt}>*cW+EcO69%3MLk02WH3z$F3TnPkR4kAG)cozk71x z9K#_|f6OuA;1X}~9HQ?i>R!4(Hmx%Vua}qc6)dKzZ*xG^>Yqo#nw>AO^H;;CIk{?u zTuP^mc(-*7xC*Bbr&&>x8<-ISNrxEbCCzhCK^ZsMzIk>*Ur!gZ?o)QZieJ;zC17ic z#<<*9&ag^RlnE(M48ibM&+Mgk)t^q0$2RsEoR_leh+c%k&+tBpv%v@`6;c}N$H{Et zP2~CoGh}HJR%iXnFWGt0I+#}>`ip9*C3u{d#YxaQ3YSkz`lZy2-^{nNBdQjotcFJc z@iOIgs?^R0V=Ot|NMZUC5b;-CIPvu7B+nRKF86LJ`-7tE8A&P;uxTKZdwdT#C$}WA zvEe>v!L!|VYS*u>)I0ku;KXq8^B~-^cgAy`ZlfD6YP=_E^yskeeE`D~BA;r5VZUb++G)Ytol1Apb=atUO zC|*Gx6h}eUyWOMEQKiX3s)Os~s`@Fhy}l^u@r+l=tw`*H=F&}7eV}O&S@Cu*l3(43 zN-yuPJ+Rc0TRIGjVzI1e?>B&BAC$03b{zCT`A4Ajdpk-8mT`C$z+9y?M}`)@gJpssGV5^h_p@ceM>{9ZJdLy za!Ow|V5~>aGRRGrTaEA>(~PuT8N71WbEr497aD(3wEumZ2hKC`$fmj(_fLm!WHPd8 zyfR>@Pb4uktSb=j24bq~w8VhY@0b98OK9zDNWW{bFcL2h2SVPlJ?b3t^w zIi`PbFaFBZ8|?P0!%|T&q26Z_oWIvUM%P1K=iSG-)Q1QsrOg-yHH1gy%|*yPfOXWd z^~ z<~QcHD0#~hed3@8bTc@>jQ4P`Wh3=NT{^^JlVs%Bg z;IgV!KLOL6v1>6}?vH+?s#=6ngTUs(L|r~XUEgop<8L?=!_qcTH#>;jn-^2XNXj?c z=)278W~v%vPwddCIl@`lgElsUoVvNzG6M4b z=~`_8aH_4;7?U?>eo<{mve%jJS@L>x_?2M&Vq@rR$cdHtzCAP(y7~v@ZSZ27VEXf_ z+HcNdJo)uC<2I#mkTJ%hokPvoZU5N(Nk2@23bWO2VW8L#B`2hM>5VtQz_iq2GRO7A zail+CxKF9n}~#>uPn_U~TMN7$_8Eo-IqQ4^IB2KpwU6^#vYj%9T5 zpHr&})tNBA`+%6{jts?;wG|$1-#J$ZSBPSky*aWu!cfk-Kf#`6x+XWFF~TY+j!}5y zDJ^{DR%vfK^LchHfAXDI;hrBz(D4I4bpl5J6SsFN;1Du0uFOR?ah!=~2OagG)7@voR7CA1DkCs#A^kf!+ z6RZ58VQ>wXP~dFqp|FciiC8Y&|7QMk;Ne(g-1gyg_csrotit;z^;!LEHf4~h=~Yos zYd6^erBhV)p-rB*Ov8pH1PI2~=g{-wP))AwLLFWDiYJ+gC3E{!Cmt)DRTOR?p~F6Y^+*cST|jO3PBuKa=a65WHWH~;E!ol; zHYBQ{nWGG0r*5FO+#{I{@#_=(*2-9Z4e@So|2^ZAZDX}e+A-ZdO5cOC&z)wpP_C2C zxh2p`bZ*&3_pTS_SQGduy8>r=!(b^qy6iV|C5FMbXpx><)zxa;B?k(@x)m-Kjqzmt zL$X6)pMiq(wDn05hrERh;}!#ynZk+Y_OoPcB9NJv+Ep{B)Pm^@{;QN?o6^90CS_PGykE)- zY=T{Aw@8iTTixO!4&N=DYUh?X#f3e0Pl8t*DEzply^;Axc0NCnfOAg340pySBK~YW zW!6Qv2#7)8aJQ##_Jmu&tr#l?`0MMEDK87TN;IIrYX|#UCoG8MVcYBeKPbQIvXdfQ zYeA=G4o)@iT6&@U_xc?~UVuL+O-}5q5Vgjzj11F=t45+|`%pOTa&(@JP1v3RSf{UW zg?4mts*T3Bbe@KwW+Y=5(^q0=NSe_7k}0XbplB_Fr(W?vRCX z&d&E_f;?ABWgLV=87u26$O6db9C@$7D&=62tuxlT2xBQc39cYa0rI!wxB-H1$H+#I+z|E-MG^HcA2@*PcDw3phY&$rGDvxGj^ z0-)}rGHD7M9V#C)fDvn;RO(-j@-D1y$4D9@_EOumdNznj$DU6$IK}IyAr{12V#Zb@ zAbWD404_jwOK9`)*w@H$@knRM0-|lbF;FVSKp%D|-_dKRGh?97ZSI`q`(Q{2F^@=4}x1NWU|6!T9;?{#)oWCq>Iu;x}|c$ThSBf5jnx z(l0ca`BLbm-JK-PL{J^A_^m(7)#a{Uf35eq&}N%JI40=IWE!67<%C<`lDhZ{;Pr}# z>xKew#c-0UBjvjo*6;KprVN&!v%Q>tq0jN=EUo;+>u(#}(u)?EfPfH%RWNRLxtR%vakF2Sd}@+zA=f84A>-1`llmS1T@ zJyUnFlZQ2V`n1}-l1`x|x%Q#h>;5}@mh$eZMC&>ONGl4#QT3S#4q-WXDeIA`=S~6D zTgy(T0!g}}=Pp-Uk4-4w7uXbT>~W zS`!m9a+rqhwLmH@0tQ5}T+hzKovLH#!iytrfQMD!}V?zi3QAL=pJPw-r|HkBAk5|I&~$_{)MKIpzZcQQ!f=K zI{hPu>7r`=Z*N0LTHl7Dz1X#~uFqFse(}~Nsl9lIV!0GLvqJdHZYBM=?L#FMXLoA& z7I{D+g7TRNYABOLU(3>x-Gvz_aCh@3JAl8+X$f>dX#nDDshbwwQxgq!6pE|#pQlK} zjs^kTaA8t6_O8@yz~;~z_OhN_A*NhFBXJ`*d&=(g)3Px1s9odOoA61&C5vw9p)Z~0 z_!b>z85W$7=RkkgN>O{W`~r)Zk&Y9YDj5p$P!mjPs#?V@(n<6PVR=X2y_77#o-8EW zhCDnu*%4G7^tCEzlyB^+bC@t?JfsnH z5-z#nEdd{D(4mfxu=MH2>moqLCJCq)BSg!gUzb3iGS1isEKAIbnzfNh8x_(h`WMy90Cls)^6AQK+(R+iP;)peiD)hu_sQd;>qzp7IH1PKZzp*>45p>%oxKn{c} z_Bc8ZW0*|>*u-t#qITm}FZ^1tbL2mp+>rKisXP$#pv5g|_0~Uv4uya1Cy4V??;-`|vhs^D#eroX71RJv4bEo3o^47-p9oxWT|rCDr= z&xT@*fB{9L<7W_GZH>?(;fyj<5wlAepO(fH=iAJNdYft!){2}s$Z5JbK{v9D^7 zP3)=G^&KuD!U=3kGaRrbMBV!QsN8F4+n`%lH|)*m@%C7!5>vAQNX|}L_0bI>g&B!E zX;EZbrdD=t{jP`X+7LtMOkIaP&iPK%J~Q8s)VBQ*haz}@a78o_cgfZ!>_~6-8DYqg z!oBhn?zQH;_4-9}^XloUsb$D^`$=3}%0SeG0?fkvqyQ_bp@^xMlZh{yAL-0|-+8U> z)rTM0{1R0-0DNz~d$N=iQPDlSgEHe5b##;W*~rTu_~Eu2$lm=G4QT178>a$ zN}J+|x%DRyopDfjG7pA!nN4BmkT*)3b^NSyQFn2x9qUDbp*ZfK@}jKB2&!Cvh{0xx?Zu{7INyZtWyq* z&QHkkUgFDB^oS1qTg(3A(ewP*&~ldMJQFhPQw@sA_<IY%hq!*Te%EFM+kVmd%!_ z`PXW&gZb}0A&!|`UtcdrTBO`qd_e{x+EV?jC2iZ*Kq9y0jyQQJk6N?%LA`EE|c_!%~Lb`JC9oC3zgu{zq;8-|EcdJfDB%5kF`)}(syE}nxtA;>*s0v=Wz2>g*~+; zA1i_d>{ReW;txvXDp`O85(JxG{S7d{^VK%(;{&3Qi1k=@YWKSM0HHd_Fip2cu--K) zR?sel^Ut&E;!|JD6Dq8N)yQC+HLqb$QLHX?`09ex;dt3v8V*#r z(hqL)f?&(pmGM#@l#3sgJ^_3<3$iZk#ad<5u2XA-r`)JeF1f9{nu<8Sac<= zn>Dr!`p1}Rw5yk;LCGJ)9@ftO6MJ6)6<4>V2??4&0>Og^3+`?qK;aM^3Q5qy-8~Qp z5Zs;MP9ase1a}Cog7F+|@AX>UGyT@O>)d;8-Kx5E>g;p3eEZu` z6+17H=NQWNQ(q{_iL~~h8*o=qOfW2eMlEPTSm`m##*#APp1QbI274GrGu}DmdL1zs zp&jOP3o}>7*;(hrh!mLD2is~USZl2V;~uaf&)xtx%)Og!W%?_Y@~X|7eHpm{GJ~mz zF*arv(keFw=?!;Q_VpB*m-&&cW%2vsxmoP!JfO$TOQkqFaXbl}o;!!Sp@y-$GV#CN zY3CTgcFsStBshZ0&T;>zGk05=k+vLf5k+_$Xn=N38UU}N{YHZ@jIfSJqvcHQg#LK?)eLN10ypF3@dq+QIE-;A+)8e*5; zOwrxM^HL{R_ZZEe$f!O!;=o4@c=5&PP0E&z)cF;P-U}XJsZb)3U}KKzq3emGqN6Xz zk(3E}3U!3?_fKwjIK-Wg9Ho%x-lUfj;;6iee6RaTRG$zmaE=|5Kb-6FB9v%M9z8I_ z1Et7Z-T94dBC&kFU2|~7(k;z1pJ@t$cg`EnFPagS5%M|a1a0)st(z<}^_P*@7hn9R z0HQT`S;T$Qg8Zw`XNO*NE+jvPY{N0LldW)cW)HJEWtwFW#8wNX-*X3Dh7D794bh-8 zIW{Ib4vv9%9xHl;N(twWJVpCYH!_7;G$&qq;UY;aWU!U$YXzlRhz49Zn~{}f5ukO1 zT|JARXKa{iF2y{wxGHq0R4EX}74>8uS3bRb-1M!hUaUv8UjNOwwfC2!JuUu*xG64C ziVJT0w`lq}aag|Q5r#5q&7IBg!CW|?R`u$Uw=tg5_6t{msNQU^g4lV=y{?^p4i!%` zCa7rkM@>?vvJ$Lr{|26`ow;_JcgJ5yS_W+ezlC?u?eioK-tu0EKJ;x|5r*>G zb~J{>j#PXavC)8g-tz#-Knb$UR9D+c?G6aD*mZ|`;ery@hmOZjjFbb-e>_=Gj-+xszqZe>t|goKb8c@mp%O(X}cn zk3c!xbrOPyWu{YJKY0}J^*^Dp{7?B-#1HKn$yQzc%}MarGjaaJTk!whHJ-J5G>BZY zbD1fb-;m_YH8}2=B;A-TcX|Y)f(zpnf15=z5$q)zw({C3L;DJ6N^dd}C0^NQ1OMz7joRBJFUZ;AN^o z*zR0*WE7fv<}$UWh)^TWgm&l8H-d{~-GT5ZYgGDPS`0T0Z7a( z6!zF(+uVbqKqXjFoEs0bp)tr>?tna{^pm>zk5W1T{Z_$fKV*p*m@~QHSK2;~A42h{ z=cML>Mvpz~Lxx~aijZqW1CNe|HQ&s%j!bc6xky+BZFeU_n`Ox@Bnw5!#yJ+3V2!UP zIA;01RB?hn3GCTf9SA`7I49EBd74@JR6i{f<5qg(Qdh7G8nEqA`KbTI6Uu{pWBdl~ zX(oH=<<~U+rCa&&dm$=F$N4n5gY4$9vON~GSwTiXlC<7+?8aFt;4u_e{5^{FERHKc z?Y z7$xi&wzwvvy95WXyOODAdL&bdT(01NPZsW@+4iT3hbU$a2sj^hJKo@+sggCMX1N&9 z9`O55yn4s!|BN%sK4%*dLHJW%?u$P$d;Qh4fd8K^`3)PJSg`lUkvDsph*F)O^R}$U zXiwQB#jZhOys<%mW9M|m>^hkn!`SWQ5S2PZ(nhnBVyTE zN%uVhoM9=8pO|vWjcnya_{~B_UCqUy8C{#%iWzgzrtrDW?f8~pDgUCss zdU%pV;4pWz#cv_lN2W|}c#x=N=>209FYIRa7ZOw1mlbd8&z73xZkgK8W!RQmphaCw z?YC{8eDT*@V*F7?T!qkEZkwiU7?ZKX$0N1R6P9tlPF8wn!p{}gl0JK@&PQvvK1LFT z%gCUwXHa)r)cSS_eqO5(_j_>ujZrE{q*Mtt;)4P{%;JC>nl3hS72lf4Os*3vmtGm~ zFu5v_k-0jRLWh>fIHKAhRw7N;0!5-@TpNsVO7$qvIXe@vDI%ZUT0~wT@EMdIe&`>x zB^hXs8b_~~;D|zQrL@2B3kkiymdN!L=tT&MO& z|M!adbm_qQSfiI_kE6ae!C#t@-)t31e0C5Wq!fCSWLnD;3={hkSbega$C&O9?We4+>{!P#hLvFw zn?OsVN6#7iL_PgGi<&&Te2hV4Hzs15R&1;m-m)S^6l>RMm)m^;CeaNa%BuKoeM$QE zQ?=vOGomI4WDJTlyT*s=!K{`igW!kb97<^c16s-swa!XX@+Gjo5vRay2qnrk_Eaqg z_sy1QT$Vxx=8TNT|4wcn{b(}6X!$0ZRr&loV~Rj;^)aHZfN96rvft-d_89LhXGKSE zt_vN8BwLFQ`pT9+29V$6U^YuqeG zDDdNAYu;)TFC%m_LuRI6Gn`aq_U)N8cF}&0=c|xO`1h7rNz0pEL)je2y$d_-y9K`{ zf||i0(Kj;(+K(CtzEz?+Fn`p4vig?}IbwMe<(Y39|M2KTYLtF#(KqVI_Aa+&rSJgO zN(tPc-_JfIJdMre`}Y*V060MN@e7ky$)F6GzdyVwGk+ zCXZe=3lV(ae}fKLJ}GUeOH|`E8~8X>%y44eb_^{O|9M@6LFOn;z{(a2$p{YhG;HgD zPqcvFf4KQ!s12_2bpbQa&WSZ?C+;6m8ZZySFP~Q?8cy9xf(73*U26{_Qmny=K4n|~ z+(8(0Mq^S0s1olq{`)k);j6z%P7v0h<#%@5^*3b2y2FOv0lh+vfkl!owCGVV14OAX z4y;|*7fg0G-DOd&PMmt_$NCYfCLfysuP41_QOwh&dkeP@xDQZ@IEObd0GTuBNq1`NYEl&a&7>IEH-;Q$`y z2rFHI6}sJJbl~n(;cT2EB``VewXL|p(*bAmc8C&$MyoffLuxdu&@??iC)*^!r2eki`& zp)&WZ$`A`|A^XW0Wb!z~6Hg58n+xR+FX$lvRC|5fv}|HYm0{9nn9EkbTmK3TRFVgM4~NGdo2(mR>}jKj_Xo#Nc} zpZ44JdzrodY6`mb$?Nxb zhNDP|8L)X+2tgCp8B4OH+VSOWeU_RfP$=0r)Zodk_S+_c@0GzW%sKzMBZNrs^Rk5b z($_!36u=`XvF%*oB#LrO!cEKjR&H+rm@j0vu)5Y%kgjm2J2C4HfZQ{q(;0GK$Ri6o^X53Z8u) zn)#CzkUr-&xt+socfFz=#&LRav^mH4vihx+;S92Eq3i+%2)6GNh~PR`(j`urT#=q- z)Q(U5*rM1`y~?P1uA(1m=eews>-sEK9tAjhivAQ#p5pV++JCAicz1H3DDFHUI;zn# z%jf&mTl8U5AbaN*(*F6O$_6>1eFKPN+~RiUJiGJH8d+EkH@wzs(YGKH+q#NuXpj$V zU&Wx|9OkGU-lDk~+JbfzWOH&Qe)d=`W-d_h6us z(4wNd@Mf0Z{FQ5ypHt=wlaoL@0q#h#wUZvL&msUd;qKB2%b5j}#ueK0%dzH)$@7HW zc*>95#7qusy{ePRedag~-?_3YA%}W+&zH_roD(@+N3ty_#{3(fFxWg#TrVkpEU3u5l1goIlt@{_JO^7_Sk6@@u9%{!M1|AX?p6 z0b{3>IvzuKt@A@5^vS5`kg>hcKN z9iH$yZ-|TFxIB5fZ_JDXq9&JV26Quxj|ZuzQL4fd3Z{1VR-> z>G7s5&q6C2A{PxGr^n(oQZ9`<8c}84p*=7FTpg-xM9mFC+y8}>8Qz1!KJp5bc&`%V zKRSl$ZCI)kJ~P9l{+5>2P00X!MUNi3ofvWoVbyDX*N5+<^p1r6F)v%YSFJ#`Pn*`k zVQEMtYpFWO3j?~RP0>yCDoKsH)j>v&zp|J|bx1hoeZFl)`k~@|YstNm6b_G?0(In( z8HW<%7sa0tUQtCyOO77+iflb48siwv*AM+|;q(q!{Wy zteQ{=lHKqwXAN_6&+~kh#Enkq0ZY3Q+#Q@SLPh{j4FwtN$?))kdXIOLSW=#le9}L% z)c1t`%)4fE`QXKs6zQ4;Ig~!*7Klh=;3L;gh;&#NSpJ0mh05MQ6-8Y%V+9j66;@ZN z3SATgSW6L-C{oae^R*4b`e{i~A&}@{w8+xK#i+t#Etx1%sVys$2HcRQD3+V)jExXa z)09xO(O0v3f@Ru;1t>u#&_T7?%@8(+$+`w+K?(fJybS%`*OD2-b2ANWO5smg;v}qI zFfhCnR&Tv&n&kd*7(c-C759@(&xo(DOP*VqV1#9%J2!CRC^K4kK-gbTBWid2R0<>`Rb; zNj%gVl8W@uapBi(s}_q^r}vhC#G}MX0Y(&Nm3kq!B2fsuRzdQ8Wl-W_hnMlJX+Zn( z-d3rMKmp79asRGPilNu-qxL~xEh<+?P_B;wQ*aqeh<@9K!&_0C;d}%g<^${MbF&u0 zFk3XA8zhJt&bg?|t!83{3BgyYh`b%^eJinEEpuGt5aHpqkRmIp30W@LNle50k5=3a zg^a06#JhBXiag7ou`OhcYZuyNO&%uZ)GKh$*>(e7V=FRGUzQZS0(~(I^{a4ACcx}I zB@28`g4tXv*0do_wnLsa%@(y5F(Pqnqd|qMYq+acp>rf|F^&}b12Z^v2&!EVB!TN& zWQcmySfs9f=gm{{0(&KcRh2+apCwrG?KHiIM>TV|@$f$kJALtW8#-Oh7e&G<937*1 zE)4X*%4ryH;EuEcLfvUzc&wxokielb^;6+7^EO9k0FB_LPi2t=b)Q%!yQxGE-}lI{ z7LH*8(I*Nlmwtp@Fvu+^apE;jK#NL%UqO-OXTWEtqW0W|vn9k+t_wi>nsXtj>_vX% z=;G_lTV4-A^D!^s%K_Tg%V0p6YZ>_neswn+14{2()R0!4O2xK!6GKIo zEmcFJS?5Yxjv(XS%t2-;bYvh+9H_zWN*1dul2`0WALjsxEMF=s_eA+LHGT6kEpOi?7 zQ~qh0oK0ax?ZH$1@4WBp^EDFeNEBG=t%EmS6;V>Kn=_xS zxZb@(COE@2cRD;luNhd2U2>fcYs&P~J8BQVtB3jHgYrF1=?nJMwF5+x?)L`{eMh$B z5Y2hcL45+nkRN;#aU*B>zndG*xu$=){T*@W=V<>Wg3}&-RN0pO7ivnQ@?J%5$H{Cz78Qnr`4Qah zTZVR52ux553{f~Z(X$y*w2tZAz5PLR``G`kYy<&>y4Fr_{e^V)f4sPqS%Y`HALgHO zrWAn2A2OTYwz;(31bfeIEP%%4Ss{UJNm{a3j%-pRBN{VwEA>gk!CpIYAj$Vxa-Z3_ zVXHz``}-r@=9Ze{8`axn2LB`f)9YJ?n_ozXTM#y{cJj?xpVYZ$D3%%Z%3Q9Ws?Z7( zG+eah|CDwx;jDYB+mslhyCqma&y*3Y?dJ^MJy0E?l3^V3K`HJlsXo*XaI?6m3zz5o zvgWxE`CbcJ=>LPDv7+JJFlKg6YahG%f~>&YJy0#|$C6Fdm^GKMZIoJ|Hh)>G&@Anl zL7F8sZbj+DDPA;h73gGWKqTGblvy-2^-wFvD)Id|{^h9BmICN?g4gJPwJ%$2t3s@q z#~_2S3#!8cB1Gdv71W>1pCEDOE+fQz;s3nmc zi!Cw5mM)9%sjCQ*dwRM7t~pcTKIhFVS?DzOmO}Ze|6yD=RrctHP5d}HXDk%D+61vGW)-NTyJ`{uyB?nPMATDGl6A3 zqHeDR#V#Gk{5Sx>A*@7{Rx&F)RnN$y%UreUe^D>kjIZTfyFitsrS#!~w$fCVx;geT^*~J2%#<_;eO_^zd{zIIOV$_hil>RP zVMm{gQnIISMqz`~0-*3$eBhE;a!<7=mZ^uKefZ53pPuA`ToyX>OeVQOPY=|<{RU=5 zA6L#L3S-C}+kd;I_R2el*qj0G@w8Qk`bEAIBsnc*JS~*iW^zHcDTnZ9D~awhaUmpO zeVem)#49q=>Y)76sAeE1iJbMy9As;|0ADTd0gXqfh?p=ES_yKire#66dXL5mBeNp4 z^U}G?B$V)HoCA|{V?4+7AqCc&+(RfQa(J8~YTSl-tt5*E_#;&PH?J488>Xj@rG0YZ zp3lc6t|A=1{i>1YMu;M%F0@Nuxf8{JqaQj|ulNKm%W%fX%AL_lLUlh4Cc5BGQ5qAoL9ZZRvxRb4KaUnr--Rl;%>6d!!*+>6k-QN~-dJeKB{MX74v z7n!$5;yaIkVhgw(Fgg=O9A@|SHOG|-CoCZN)>kEl3r72j?$6lgV~Y>68=c%A5Z(pK z=iwR1BDq&)Nyf~%_bx^Uw;GZls@RJV zUak1j1tB!)x#5yIly?ZinLg3yH_BDykhpRL0XUC_ypWT0! zcQxN>8NnWyIgWlI5u~{LN5`5Y)RcvsZFZuct=x$?2Je2G&GgeQnj5;|Q8O#g zyKGi%p_~vj*-e)wZ9n9;R@t3z)MC1UaiJNW}`xaEwCgHGUnr^>Mutns{V61{+>OMk&ZKp(<(N8Jk?1mHeHTHZ_Sa~tF{h$ zPxK3k?|l%n6qlZ@8#!H!JXeiEo>P%_k0&DOPW)l#M8BBOa~naqOPlYUj@Jx3%-vi$ zd$@W(o_&9O3EmyMf4`bvD{`)jcpP|wmBv)XV+_HCX>d*n&BSAGnn9IEKbML ztWl3B|NN#&t64d&-mnSYO5)`E^Cf8x&7^GiPm{6|Nl;Yvf^=GLk4%AUt+-Q?b}e}p zP3`W3mMyhbs~5~k(MclDoALYg@J$MNX>?rL=osmgh}EsyM!Pw$exb6+yxr1lG*@^h zoe`sHINH+_mAsgzZ4Ivh6WTjQJ3>^yRV#sZV7r%`a?jetWfl<5NzEys8&$@-SQY z=X*^Y`x-MPXk+K2_HhzZ3Rx+OYxa-aw1oM>`z$mz#*1b=k$uaF!{BB`?pX94jmnGLZAznpAWK2}OH?4(k7-#{<6vqiZr%Om zyz|X80{`+3!A)+k(WQQSwk`@M>S!2LJxuRhs)T(bLi?2rKWzBmJ z9fQEEX-@b!k5lGZSsUAxUQOj+R)h$GVw+luMt}qZh^^j=dp)Oi{#b-lI|G<8aO#I$ z{j`lhKM#~OV?S{DWr54nT(_^me3c;*)*%3H5PhxgOID?Y3tKBCx_s8!#%JMxz|BCIdsf=dN{wu}Gj)`5 zRGC?Q5k3|8FQnE7Hwukb$}ho*tBznHC^*n)Q^7U8+l={v-J0l{AFk>IVq9R&v4TiR zoyR)6s;5ycYBLO*vYH2&n#@WfXqzc^4B5yEj657pb0aUNjygPAq|Qi0ujxc4h^#(# zXV^ws5Z1za2H>i?Hb$SQx|Z+#aJIyhpdQhT7)wrW#qy$`2FmZib~QalU@>NlL{qqM z)8?&cybR8K1?Q0D)T~TNG7WI!^@1=-s%-boa{1hA`f#V}#e-uVTk7dOzZpYz_SbV% zVQ|r0Bvw|jC(4R7uHBLzHv@}AS_)*NbSyNkOC0*Kc8?-+tADUpi`AF8zJ7vv2b?#L zSHOalao>#dGi9d9ft?LUfa-@QSU~OC5fVt%u)s&I?<#|Q#5vz8Z~!+T`+9XYRqM`^ z5!T&e<)f~Bcy7IuW1%iT}L2kH7an_GgkU*V2Y&ctvC!Jr+0f)^OCb0h+ZA_{c z+h&vuIyvRc!#kgoA_ZNJSNjhSjucMLyp4k|HaxUzCadikD3rLe<^Nf`-rs(h zXaE?s$4BIG{xF1J+c!P@VXtX#we9}|5BbiXzE8RZueY;az3=&FdyU|)UM6i8UQc7! z&eTmstJNs~V>jfy+R*!WB}&w44j_d%b7C2eIAa~T5<>3Zc1>3e%<6Zt=5%O#b`LpJ z9kPXrmT$~F>Tn>rwOmBF_ES770tbhfS;}h=arS@g{>l)%fO*rWUhW(Dc-i;}ZB zX?KwiY5eFeF93=kY(37QU!0LAS|0G`7w2Ib|h%sh5D9BXom>=q_Auwn72@PX|^+M50czi5|*vr zx-u(qta2W?b}CBaF)~6QeW?{KH#T8mDKnxlHGhF~b$1vyp-xsC8TG z-*i9W7gH~9#d0Fk&fvTWZS8U~ig#CRDrpAqzOR?9_G;VRVYW>H>^dJ!yZaTYHh&2s zAq!;R4Z~}w>$68GM58D09#3~I$qWnJ*eg#cnk%4oD)xhsf`CxjZcVHT1EmrLH)Ek- zi>>!igBGb#f*ny!EBN@m8MgdeLB=12q(>{P?yB0F!m7P}pAxM5Di%^Sk+=tdZDkkh zxp@3W-V1Zpd6#AUgSgw)voRk@I2yB>PTstH>o6g#nN67MVA3gLB{)9N%!Ekay4YbB zB~Q5kM=!L!3tnyoCdJDu(Z?Mwu0Vqci?q`76@dU7*brdUE9A0~u}9itNMF+%tYpRI z?7pozr@ViaOGUFCY_;PWyAr$6#BwN8v{1-A<}Edr-YR-6%N8X3uH>?)4Ioa-F5zW8 z1D@UDagSMwiQWu@Cu-n}n7H>yj>bgEd-)ZRpZVF$x{}_h2c?I$Kq`E7m?NnTEOqR) z-#aCcHI^SLjDE=;om8h>&<@R6=~AA9u*6HN9+J9K^H{!hJ6H}TEHp6y-0}jGJ`pZ zW!Za#>ykEn>}#D2V<(MXhl|0&l^sSwnlN+YoR1T81h8uA=H6=FPnZNdUJB%PC7@E$ z>IZS`1GSq!Rr%5Y;SzKcTp7A##wDHy2%8KM8yFYI%tYOsOqEXpw=DBT-BU}-X3{(F zD%RumPfLIH@ofh&*!p@<{X#lNK8B7oo7%qrp8UYoE z*US`<>T$e(!B20uw;F-;3#s-7xBbem5bh&Fw1hgguMRYJAfoSpCCZ{?L+8cH)oTGP zV^QUrmS8A%Lv8biN`czw>B53y)TR^VQLKZX)76UX#0~YD1hdGF2f5}=Q#LQd_XCOtB5jBRn#5 z?aA;aPh1RguL+y)$wbV3b0c%}j^dhnyC?9D)s6*|oM+Hh*B+q~KG$Is((# z;PA}yV&m@RI&E3qzUq1Xrde;slBWjdMl-`Jl|jqd-`Fj~ub--hh4uWHFDn7keCHkb zW)hxFo+()r?ZbzyfA(t}za;-?x)XrFR(lH#-r?hgMPZ))r2%pgGi z+%peumnqW{E7Xdl?iWV$0(M@AIcLdouRZ!gO32J38tntuq11icby92;@3@MFtj z=CIgsa%$FgQ(F6O5hSV5B;2y#rpgWBtgSYzSZ-2l77IlD<0I%9b1cKPT*E`$|JeQ2 zA)wBi1^Q>0r6!r{rkellyO{BP@VWk9e5d~t8f5p%HxZf1Gnii(Z_89$6-!E@tneAAP48lR_(G5r9muZzJSLG79#++ z3SRZA74pc#?#nkugxI87`yZxn@sr+@(btj+EHz9wJ+!BUQ{sj~x;IEXdYA!~ZC1FD z0W7>$l8uSleILRg6^iT&_l3(IhYF6cnZsGW3U8brMNy=4me^?}S)Log+1S+FnwF*s zG|~I9stGUT1oTrX!#H_`Z({+o6ntoWe0*NB(^t6`peSuJJ5o_R0AY%3r*G1Um?=G zOAFk_xy(t$%DXGxHQeLPnzth3qr`?0De3(X;Dwg~&dipj#!?PYGIyfAOf72VH8kc4 z)I_A|M>wE_9Y9iqP~MHjG4*CeG04=dhW6`PDfRRS=xB?JD~W$VwmFIG%K3Cu5p9MUJ2W~ z@6x);p7#27j&+H9i$n~`^c-!WDvGMu#BYys{Oi&Zu<48<0%W5&S}WmJhcgv6V(b>? zxDWH@Ps=^_{Plbvq-*DIC(p=dPd&{~OW_vP)GI$L72~QSvxGIkG()5*&jl)*YlYbi zk{ENLJOK;k-vv;&ZS?e}ZE%hnOaP_}#K6Cr9MLg(e4(3{gyM1VsUNv^` zNHK%x1|nc|UuqJN4`!-~^={45gfl%U5quL32J~6Fh6k#ELvi=W=#|ZofjKK5P(jTK_Kx~c%xP<%e zx4JkD9J0ebBg~y|?`?h|nOtk_69mQjIQL+F%0JDCCOmM{V#toqsZkKklTsb9CYM}* zf%o()cusk2jWSnpCwR>f28gL!D1@hk;L`26dJ`f_XPkllB6Kb_!HA${jJkgs8B=#D zeJX2=yatoO#+Za;2(&|eP=AcmTJ-Z;d4Ys@-5QK5+L>b2qjPV3FgnmCyR>Cpfzx{a z$!bei)b!}+LHpuMx2O6|(?RU=HFDe)|4e(H<3fd)ps-V@VcG`jfmf=(;!=QI?~F39 z4W-&cgzney;Tc_6Xs4kK!2RXn9(BSmq|$P>OA||$8E!X5Kw8$JP$ufvG+~j69=cnT zT0<;geKK8ZbG(gKGmSj<^Vd42O|E+khl|(!-mJIX?3NE=sumA`^XcB?JO+65nv6vL zHHfGTo2{39kFpoM1+?YpbFx;b9n|!5<y{ZVk#uW!nn`1}o9k83ip+zZ0+ZHKh+kiB?HtP` z017Nb=QByoed*o~-0atjGxJu0MsLakh|npUXDST2jpImtUPL@MF*a_IPWn`_VY7Kv ztH<))qf4^T*z)m|V!6Y}fQ&h*jh&VWW9o4$v&@0kY`xU1NyazRwuN@%2$(_H%^Qxn z?JbT^9Y>ax5t8nu?Pyv$Y0OF9N~wpq!_qTjqc0IQA_56UBB*aYo7vMeB|}M16eg?8 zDlkkddH6i{b3$|+?K2gVMwSt7(Giz2Uf!C7uJ|Y3v~PRe0#i&tm%8V#%j=#gFpPh4>Q-%-u+*d=G{Sh|U~OZ_433~t!{i6PmhxagcB`cAi|}+=HA^W z@G^Vj;)6Hqsx=SFBiq;HroI{={dg9sM|=tjita0faO%x_+Lz{a9z9l9cFSOM=7g=J zH>A9k{d{hPM)Y3Oy4zV}1F9(4Swna~X#HRwzTpfZ!l;FWM4&(z#dCN{I`AQ4ZVmEr zVS`jMOm_5iEx9gJev!AyThJ*n_d{xm^fF;%$!F*yaEsc*lWTzIM1(UkhCID>h~SHMhIN&T)IhD{rL0)wL3^X-&4N zU;b>JNJcMgI`UpIr>1L!IPU||EkV*W_Z;!{8rVzCV~ZyivwTzr zQ;;CjPo_(j^Q^$@+!DriD13gKCAbk5@^=5{WNn988k`5^Sl&b{Hv>}7Q)S^aleVvE zg<Q5ztv5z(#OO+9T_E>t2O#U5}R=97%p)Q4qfE|%;LCFiCb1>k=)$=Y{T z1lEh+evMPmJM&GJ!0qFncZro(UfSQBcP$gpWr)nH?c_^;2c?u{Q=A31l{P`<1%;Lf zF<8ctfAA>L^zT$u?`e_Bz+>hM<8%(rq_N%_X?q!h=u5K%S;a)YpZTR{6G#4_P$<7i zj9^XLJ?yY~+)0RyTQ#d~?OrJt;ykXG50&b@(%Z^m+P4oW0A=+JN}ET?DsiVbTp?+M)1tgGTKX^Xk9==(0)4Nt|pssWA|1eq2WH*}l7r>a8< zvv-T7@JzH~&IMlKNk0#43%n@QS$=Y#(WIuV{ufFNK7pmovM&w&8$Eb z=D4e>wwOQo^cNeq%!nWoG@PvsOEwPlEjMrf0uG&N4GxCT?uK zfV7>r7rFomwty~#N^E@TrEARvO^@g&Q8IeRXJ(Nw&1O&CB&ZGpSjqCZ^$!WwCvig! z@rq4K_P%bR(@aW|09bd&r`*QKpz{nE7mAlAM$>Kcqr!G8J$k^J*_k?6s@Iy?-jEttnKEKxn zrqDrTxnPek7^7YtPA^B{CT+*5qNnX^=T%M-*$TbEW#A4Aye!%W?H%U6dV0f|@HV3t z-PQo?Rhmbg;KY+`&rxe-SJ_%hJUA!e#mYV4;tQcRIUJ<;^`NIRl`dg2qBnkNlZFSVr zF3Yy8CfdJfh9hXB6(hH}#=BmJ{a~BfuQ!0{e2r7=8$AMbw7WaadH`w%bp z8USM>K3FeG@|Hx%>4ek^e(5Mu58o#gL!Lr!L%8Di8=&f$-x=-kez5J&z;j8zz66kh zX|Ty!YMN0@JohxvX0o(G_+sHJP168s6k~?e6w=J)EdCIF^lm#S4yFVNh8YNL`-(ns z9X+v1xal&NFOZL`yOP%cV*o>zCJ1LHv@vM3PfJV}vm1>T?nYf9Nt-|uxjSsCVe8>Z zN0w1!@|Y+GQ<>%9_T2ypBsN|{*0B7bFp4oyj@r8hqt&jxf>^>b#2KrLEJ9gy?+qr> zAb(D1qW=5Yb1z|~rV&tFVk1i~dyhz+wUk!q{0~1GV>`^Xzw<1Ts zCqRx^zd6B#HUO0dhW4sp=fEDu`FqXI!;Rd|($05${(f~(;IPgpNdD@rY{3M!H>JAz zAjL78tWKL6ABg^-lJfb;)8>8z>Kx~cHK20Q)^;qmz41$VJL)}E^_wkxBP);Ybi(cR zoXs-26k9T|@ZHC8$aH0`(}9-Wn+0Rb^^a@f#Ghr^_1_cDluKGe#Y1)89wvP~E^wPV z7v-QRECqqe#NWr-Kt}pAQf;p-8AQc})IqZ&Q#szknMore`mm={_v>J921pcJbV8(bOmV1GLi- z381x8#>+V^ZBr#@Y^OvOy9Sv*xSIi&EJB?e{553yX9R2|-4pWi8r}H$pWIAW&Tcr& zuce_yxu=mHJrXsBPX$ieWy`S6gb!eTxr-4)Q3=AmxoLOl`7L9Z2=j*7I^>lt9^N?3?z$*GWTI5P^H{30_QSq?mc_ac~g1j-q(Kj`6>T)^c*pW}lG5^K}UNGY|y?^es(8#uk*~iUIkOuSo zM&8t$!fb;&_yYa49_^%@_2+a+xK{$7vLwCBkT9<7cBVDTjm40E)-roJ>9~uplFLup{oEalCT|y|d?b!{Wg5wt7NVI17 z6f1`Y;-&`j&hLqey%othIzdc=Db=?GjuAR98}{y&np*MQGOu(~sYN*O-xQCNWPFi?BfiDA}*59k5cJUEkUkjF81(c#ysU~1&EV;UFK0qSl3;$H+=&Ci3RBLP2KG& zw6z{tzD`bWJ!j|l-bSFchY?uqR0L9+>)gG~Z2Q<}=pQftV_5#{O$TKzT^^PZ;17}+ ziWk3y#A76B7r0vOQ{4NI6>V_3f2;kv$D$}=KF9kF@t$#Wxm?@K4Zdj7**q*22CXk4 zL3u;#nfY0-tQvsJ$Agxe13;N>m7!=yzIr&MZ0`T`EJ(tZ^P4tMQ$^D1D2;Gv{~cep0FdFT3-3q z!2#63e*HX4NM9k2$p`aiv+mM%b~3`%nia@AvlRSxBl_F$GAy@Sq#)pNz7zS^(aVK zu{!V_D7p6e%BCrndu)Yms(H>OpUSYX!7(LjKa^`BfXlPM-q(g)QB%(j==8rSPHO?6 zXAx6;uwHx|!;gAIj#G!a90=IIS8j3&B{FF$#>4Z<-o1L|hHF=^9gxxoZTWn3_H@BN zIuWmzujbS6sA`Bw4@;yr3Covu%(1y?Tr}zUOGioSV*a5T(uGr93gY9Lz=4ICiPCfF(6*3<1JjGL zB`cUc(Bx4I`^<`{F80TE%W0_;#EU)=RfMGz!;e7hqQ|`6iMs{|JByU7;bY>8Lh}#J zZg)EzDb3lt43*71>;U_6xe89`D_^xBA5A?ykN1CCH1w-@8y7~M5|VjrXAtU8{otVR z(CcHCyq21%v%mZBDh9DCY<@EBWck_D_I>c=A?_%@n_bHf0?>J?X$ZyRsmpS%y>$H_ z?7d}BTW|X=N`)E)N@;N^g+eJ_yjXE}_oBfm?gVLp;_gzkKnNBBg#amT#YuqRS|E4{ z9(vOE_rCwV&pu!FoZ08gng2{?2@Gd>J-1P%B)wHa;(;@dL|_?b_p7;;c3DjMe!E4}j;fN?wU9A1}% zNjM<><$v6&M4Kj$e{VipJMBPLbUADnFWO8# z^p7;!6pZdeIcovyc#X`J3I5;(4oCWf99jrTL5}YjNRMV>> zjasCh$U}@q8-yP6(kkYfRbidi7up43Y|B&AB^>X?sw+4uuAPryuV`TzxNdWT1zWWd z<7Kjg=caWh2eRh*mQ$M)Di?9&o;*lCe#jjzQgS855b%puD{X0=Va;tK@qg@ zA197J!CDb2Mwv#LgIlAP!F;9i`)DKE+-2hZZjtA5k_}A=ftH;Urz7JJ(;w50rm$8s zfADxJ(95qgt7omY)tjbjW|$~`(G_-F&6)^|s|kgl+iBs!tui8wAwCz+SgFnsv@XqS zOsW`M!QzLCDr#thi3G!$oZke{eQN1~JalAsIWyXfgHKi9DcS*NoRv#o{2O(WMyx!uJIW*o|gqkN;5cqI5FNe68W$dQzN1U;{^l zhQhSvNksLy5q@<^lX5PkIP z8SEvJ*gI;>H@{U-clE>&OLOf1IcfMcB=vF&D?K$(byjXQ3dzCU!?89ksL`lOKgfoW z+2dx~CGhL4q~0{!zzxODbFacj0j#^)j$vw1S7J(QqZAN-Cw>;)bo)}y=~u^OF>4s+ z=^oSMy=)1E&pZ1K0#veiJAQfXk1%}6L4N!#W!lb`&N1(PkGh^|F$JC8bZGC?w|eX~$%g&%D|cq2lq!?Jm$BiF&WitJgFiBPm_gPQ z$fT^>aAs%*9nq3Fk38erb>CufVy%Q*eoX&q!-bPeeyR@esUROTdied(cTIu>_cj0r zpLwBZaGx}v%+a6_xxrRQx0vFKFrKCU+)xcWO+*K zy;C-Q6Km8LYX}^LHmU8|B@AYbJuq^XO>Y@MTzrjPMdSS(QXcrtduNSgL zX2VHKu=XsynNz}o|M{Fq>qmcW_ zzSKQ1646!Sk^}Z=tbfWm%}cxbvAdv;?f}|;E+(E(J%3}=5zTUQDk_fD-)+eMX>{V% z)vP%xXKKa#O^qC0-!qarS2NXs0zhEvakaKMM<&)THcP36c-VENTBYk*byL=J7n$he z15APh?bmnE2f)6Gj4P^3<~;i;k%AKLxO#=`x7Z2xyJByMoKPP1{M|jGL9R&cAwN|k zZ$ONeJ28K~$WM+WD-@imsqNzmaMW?9_=9JSo1@C)F7vALBvjJNpl7ol{&gnOecOP( z7W1aAq2xk_t{Sb#-HM#$juj&_LDTHbBlJ}l1$Pte8q!%$baz}nw)`^Yyo})Y7qMtQ zrEBymN^1~^I5DqjCcSUoe;+s7T8c58pZZ51_13S)Wd*9n95oZRY)~U`dUSwtfqesg ztTy2okpROQ>}xp3Q}W@NI2gS=6`L_>yP&pBHX((l$=&08+j&_MCC}!c5ksjHT8WQ|tS||VAPUTH z+Oa7UUXOO4mJE{KDH@v#Ek9S>N^WIPH+TxppYXa&Zd=iJ{%}Z+>^3#2i%)HbZ9H=e z6~+%X1J+!zXUdijhrf(HPG);m{4M4-8bivK{`1{8+bJyi+cOK2C2y*ge>y;U8?R@q z!QmxSsEZ~j8(R+miYm$H5RnE%A4PemL#^{k@{y;N4H_M^s@pmG6@-v(@Py%#@MG0u zS0jzeb1>WNw|aD0{1|)B(emlEo-8L~ArLII-x* zMc~!%MsrWUf%Lnkm(%?UlwbXV&9K+X+9bgt!y^f&%5{X93MI*aiY#$hRrzp*X^;#G zSDN&i#EnDTGC|u=pWez6k$boFG|;?r*%`E4emVi$Ap@YAFBQ!jh66tr8MLXLWob>? z`7vIGO*>@D*bRpZe$MU7ogo#Yb(|pgs}3z_+i6aU3gB3|P}td<4hOq6`{Y!IHnv>n zOF+|;doN$2?++@=3Fyb0SE&zM-{gL-iaP=lzk9-YYE*T!U%weH=o1!?us)z3Aie;| zR!-YrS(^;m|G_IaNSlE2FOCyBtXs*QUl_0r)5W&eijjeI%L+E%H25T->6&zSkTax~ zgKG~^;#Kh{-~7w`2n;hE&jT%o8Pv`SQo5GeHI30$b(U9gBqg-pYA4VKY)CW zs|(~S=rH- zyjIuYZCmy}QN2s#%2$t0T-tft)iDx6zl*CXA^-`NTbcCb;o6|OA)4YjHb-5kiq;>z z2+?ufh(Snt(s%)wQb}B z-9NEy_T9aQaBWbNk|UQcek5wKoFyYS0S{gIIWHJDo?nVFYI13t%(0pe@Rl^Sxs`bZ%(bc)`han zv472Y8Xt`*5YX_XX(}amh(Orc5H~BwR1d+bekJq>LEE=?y9l=CAsS?Pa8`y#T{I(z zTM;(C6os5K(J>p=*|xj9Q`HT()HaZMf@i=EllodkzD({wQ<028CBxy%$sy~n(|qcw zX*0Vhmdj)DG9&2=zxL*HhmWBWj`bHp-6A<1Rfbp7G9qN(CI8?}z*!Q!G;W2$0s5iq zQPCr=F}>&CH~ThDPa>{1qCe&@?y6O@PdV!!I> zhK^N2|$;W>RTiX;h63DV3PZae|%(s!z zyZ3k&MvN+J4>SHYieJB9Ct)1qyj&nmI#@m{v)#M{9 zt%V4>lF;-*Ukr-qrcrDAJuibZtci*QkWf+&v0B<(z(w!EW_4cT1&>qtc_vcKAu}a2 zWm|H7>yP&`m{%@k#UMH*2d!e*iuHYvGUu=hJ{~KVJ{wQj&oJtN!WdF-kvE^-bD=tM z#r3}>B^^?Vyn02${h`NRt(YnCD*vnJkt#3W`j$+0dqH%H{uZb%x((!v~^odrHWHTO1u&UnNWBk2Bj7Kq|6Yat61C!v0TxBLAkCD`)WiF<9$=pdG&> z7ysbFr2a|kM;ZiR20d(0m+{3oblD@)2GoyxwpE@LW-bd#-NO#|j|R7BYu~XpAR}o> zwnmaDP2cEOq&6;5dDnOE_Atme$I}`i5~E$5YYGEuMiAy5>3py(V052ES;OBa=BFA;AM@ZXI@S%bo=)M$Fyvov-$6AwGt) zC?z=SpLnFK)aw>~0_5}>M7*mV|Gb#FR^iT{9KhbROE$ph@q~q(phgN%Mzz)aq$te! zF*36R`hNMWh==`T$HB5RUUMV!=eINz2f;Z6*?^<57x%b0s-$aBa>^FMRwsgym6L7m zRUOt1D&)JL-U;Q_mES@!!c}^%WOkI`TOZfi5MT*@Vw?7lS4(Ghri+q)dwErQ zDNX$8!;Y3OVx)Qn?KRtw*H6^%GW~q{yBCk^J@*@mgz}tw|BsdSsdMax0>wjH12W1fLq2pMJHfDdvtDBm};dCn$kI!{J9?UfC z?^{fD#DE`kG1bVixWVLV0xsLV6&u_aZhznNFuy*~v0zoh4uvWq)6i0=hi38s4r;Bc zIgQLVnQR;lL73YlxsHJJH_yINkmvZei@%PFjcuypAXEpNDyx+I!_UIDSP}eJiDl#t-U-?aWMcsvP zB-SZJ#~qLOqpb^YMFBFClbRqUr2oQn4z%_={u1NOuc7edrw?e@)&VNwRg_hu@RHs0 z7HHfqjFM?;WPREWaTV;g1gU%YiInyibIVTzBL2;}o>C0ygT|)nhgn5Q8?9?ah=4Vj zxA(O6E(R)Ss*h3#IoHg3s=pecR;)nJTr>vnvX8oLYk|gF5K1q<+*C~N19Q_w>h-wW zujd0`+I3%~oKytW@_av3)40n_`B=Tv+)eY9GS8d{B4Fx;yoU(xHq}=WAmTdz z8oJ0^qC#{RLGHz9$3Deq=_rDZgZcywgjB?|-M=**9=K8b{%9%P81b@{DsHDo(e}fG zsNxs4mhR3C`qGBNcT)OYj50y04vf4{$Mf!AH`vanRNk@1EFN{*pCVO7>PC+U{=G#}gi-EBiBQ_h@{-HGY17 zzTD`y*ek2f?8@T%&0piClJW|2G1Zkp@OMw{#fBY;rU_C(9aWxJ1; z2*csBzfg_27}A_Q@mJ(rXg~ibHHBB|SEXMg;k?7zYRM*=oJYGbJP?D3D3crcK_2~E zo=yWJI6^aS;y!Ll#)7U4di5h|@QC{P)iu?ZLAj_mO!!QGaRrack^^E_=;Ery9MLPk z)7>4kcw4Wkm;BQevl$Yz!(Zg2A$J@!6UAoin7ZFyTA&6>$Gb>*NQC<`(Ni~ufBkHD zZ{ftOGdUx`_5JK%!Ewa@&6 zpYsE2>A#;>=z-EoT(@3N%Us_e{m6ji{AdZ?|3XH z7pTsfKM^TyNci7B{tuc!%JlO3TQ=LXNkikS@lsQmft$B9Un6T_J?TlQQWLn3%#|(G zIc10zBJ0)=%&mc9U)sP(IBYzO=TsMPR1kBnPaH($u)U4#{V8CTlJ?U$wV}pTeS84} zQa>?p7`AVE9C{<^F=Rvjy3_X1JunwUPX@m;sF4gN*w+YO+Tk+y zhu(`x=~6ghu2tCNoI+RP6qx0RYF72Sl9e!>qRVrB%66}tg$KZ-9wS;uvF5ir+=cl# z2AaO6%R^)1)$MJoL2ck@3#<4^v7%uy4sT^e@r>+)ayEcG_8~wMj{&$V_e_vNWn#_mlXDvhIWl*2i0jzjIBrYg6(`?P7h=#Z|vb4;? z_E`ZxX+EUFt4#NPH%LlQ#jli<-ESgoo}V8y>$i!z+C;47r|-vA0MR~|lSXC_7AH8o z%Dzv}!rqj*l1HaFW@OIa+)SOiK82h^+RSK4O@MWzhEBD!nGicGi|TH@q%eU7Qd8DU zs^3lilf*2uat_l9V{toYudJ8vT~G?gx^0(-oK^M3YjT zR>gi6a@_SPL{Kld0DLSHi=!A>>5jg~aY;DdSko?5G0gAay4Ntwm#d}0@jThtgIn<* zIKSC^xIP;xdfmDGqZuk(e6H;oq? z?|@a)EJK6HWA7LlzPN=$1#*beYo>0u24DfB?Eba40?Pv{Jz-H$ziCh|u_ z;3sd%HV7uaxT`R$2BD6;+sI$`@z*~cALfRp&oSVs{k&`*o~c68KTiq)eX1Zg|OtTr0YTm|8_iCmn8Q^q5iN87^th_vX1) zxO24h^ZfA6vBD`th&G0k2l>oB;@VCOk*6&a>7tmx zGX?>awQ6cj4vj0Vl-ZRd{H)JuVC8e>R}OY;o7NTm4(?^_DC8eZ%z zt|=mFk|2yf%Rmm-8+>Jk7}7%FxOgpWl8^Pi?A4I`Sd1GhqknGax{Y5LDQz89g-QG2 zsOCmQwF56o|59SNOs!g)Z%7wc^QdO~ZlkcPVQG_Lry<^cV|;>{kGB6bo2)H#w)t(Z z-n&FYu&kZkVDsTrOp4m@!_?EaKFK`}xLM|T)?#YSLKaZNs)+$RXCWn*4qo&obt6^A zYs0UQ^Y$>k)?4D)w9Z=+^Y9XP6qrg}BVwAz@J6@$^JR6Df0(#lG-Xy535C2PR4mt3 z#3P2#RToPJnfrG1z2BKISeQPaBisxzANIglo12Rr}hxt}$zwW(Vh$_g{?Tl>}T8|e< zY~~cUYCmZcD078MJHc%u(-tR38it%XIMB0n?<{t(s{i5zO4@$f)2?f9u0V+(9H2Ym zgy69b`%k-&=2q8=MG=HQ|Be6$_+L;^a+XibkC40JewAVFQI9@2JdPJ#+4m~V?z>wL zGi`U{Z4-G@(*ua+{XV{kXB*I_I^Sx#tLFnjo_<+%gzih*iZI~=Xc&A^YeCU+@xzau znTuNKn$HWjFWKmJ&Y|8`En-TnKwQn9_QWWu{iT^z z;5R5L;`JKEDp@felrrm~yahx~N`JPO!GYW%alLjnc6~(l2`s}u*g|<3uH)x#`-m+4P~S<&S!@y4jK!9RjoL)uv3EUlV&BRi#>rZ4 z;O1%)db3&`v5Cj)x4qcPj<{(@6hpdbNU#b$pVJC|QGg>~mF&IHl0w9vX)`$LW>YH@ zQE6C~As%kMgcE4J{f;2o?+#8@@sme7mWgD2Vp-0zcZjnx7Y6`kQhfpX__l0~ap4 z|FVmU@`rh50Uq|$#;rb;hybXQv36npBoFGFl^?xvgHPp205p(V`(NA;qxa2jExEKi zfAFpY7DQd7Y4kIVPMFT1K@Q_mvL4brLNUA^IrJS*>`FwM9Hf;zYH_6#R=)WCcjC@o zLGa3ze_Yv+?`%hi_4wE)DDEt~w=eVbNkqLx+zNw_EwJi9UK`0uTj-F)&w8Y9Mrow{ z^PQOPbfkI3gROM}L~-7`Iy6=vw;?2O(C9_&>#C6MX$4sfDR88FPP1p2+%<(c{AQ(C8jXI!U|JhrgqKNU&!fS z*5hTdWqghNQxI_E;OCux{_5saJ0^QR+hv^{;H|D#)ya3pvO)^>CD~p5c^x~k;FSP2 zg+=a;l8>0cl_3VxSgIq5in~c|%L1)js71|D9+N1lYK2!(Gi%HsQpRi#yVb{vW2z4u zlBjjRq?z9({o${WaQl#Cwv1B7EI}4)Z=M`IBfzr@leY}2UdmJ-dVV4DsvJi`xbmfc zddwK0GyMGQD}slhjsOjC&1^~}t#xKLF8_ehjlksZF77lv!z$*FeW$$@!Ru$BbhLj~-?Lc#Gb^@Pq0GQ*)0n9=QwIJ_usU`lb z-6AJzZpc(cI8I}M=-Z35b|kVGBH*agK}^5gtUMkcAQ*eUfkWQL;*CaC4^GO?`C#*~ z%clOpfJ*@*+3f}E9pQy)x_c5jInV7jgoVd@)d{m;)K%>W`|t;QA(QtTP%%e`hF|OX zY#bY?Yq#CUv#aAu5~LkIRjZOCyaoh-HFoe8gkB8ensx4~%MK#rWyhSzK+90t@@3;U zu?^vw=pounCf`1#k^PgNaU&btpq%dM*jv%n3wDF#HLPaGK8560oe84bj zv5o*nAz21YU7G#jYV$jZu^uLvUpt-Z#yvz)jyy}PQJ!HTR;*I!{0|a}7iV8f zR9!>|E%FZ@H#{=T7pO>i4{4Im&41;Y%klt4pdWdgc{lg?my$Q zhe|}IFzm!KWu0oKbWctuE2;7rR#cw>+#@EflfE`~B<4Xyyx*m-*mLmY7%Ay@$G0rp z4NuMf&B!KdsYk#QWyH)m?e7uL8i(hZUUBc%mFZopa@q31rGe2ucxBmzyJU^Jfuty> z&(_g{GMCJ$O23;NzFSYIGl(YVc%@XUrkso`l45f=2;*P2cn=s+oe~>8D0cix=#`~L z7gss*7FcdpfImbQX8VHGlj;f|9^K?_)h74Tr|6Wxm`(I0`_aVp`c0HDcN4i@I?b_` zz?G>y#q#aWesBV#Sbojxo>@jH?Kv}4e$tSMvTwJC4{;$#jlnQO-|KNlt9gE~)UTK- zYTz|>clmfKVH7cBb1Qp6T#_BX9delwXQVX1pDzeVw0zp8u7$&2wl{jc%1L2(IC8Iz zhmLN@ACb#`;JG*Pm=8@{)hsuH3Mr14bgkcs?(ZB0Z1(+qcP`hWB(uf0Uf=3=zIPLo zu6G=R^Pc0OyG=WB(5qKr3BMzNx_OiK4}bP-?Oz4|!F%BIE&;xOF?XM3?Fn*{*FT4g z{?4(hegYJN6?8m0zOBvtV2=zy1xJ!!)4DskW%fVe8Syb|FVo~ZYgeh^O(5I%atO^a zlsj=X*Qz(zO-X&h9h;uD){~!Q=(oCro9)fY;%5UjA}l{1(e?M{G=RiA$}&R)?a98a zR-M}3?Al?m4wSn!$~KubJ!b9WSK67pp9+VQU;ZS5+YaGogMTkL)Ki?(Fut{t(guZ8 ztI>~jG39u%IT;XEGGqqKX@j2JM2xsQ`*WJ4R4hN7+XdKIk@s|7VOwra-m7Xd7uT;Z zDvANDpp^9WR5+yez6QC@sTMIbACzWGmpm>!M0zD0{3rlulP}ah-@Qm}9po=Eyoj1U z@c^%L;D#WU=teC17kxPF9>r##SjQA5Fh4oKQAA?^{6mwXqbU)fl&#lAu|-L{fV-ueC`s>&qG*5Cb0 zU;Ff-YkB?44Hz8m=k8=)7_C^ahge=;)Cf$Xlnd$} zyf2py448&97|7Q<|ieEgHGyR^Gcm75Q%8tWJUH= zputOF5oDd*A7+}3C>N6!k1`{xYAlCOD}<$HFPy)TVJR?=(n*J2d~b>Fp_fQA$RFf6 z74bKnQY8@k9qgGb&TQ%uJx`vwSW{fX^X2G`H;CjWf5gq{7pHzxJdk>#_vWkjx5ZYA z#UzsneS{Jyr~#^OFG0C)8)QN$Rz{buNtV!BtEO?>R`rdnyy3H^52hUatVO*%vbN>= z6%IhK^#fNPkWVeRHn_2iUBvlI&$mQ%%pf-P+Fh{bsYy`r%D)fx!PDw43jC`a^H4Aq z&m{Led|GYvh1}$WpPd-T{`_G)sg1a$hmT1fOR4+K7}sVXlXmgiZXR zv9l)LtejveMIRZa=Glfl9kq$*+%zppZiho@cF%P6^A;1ueAS|Djl*S0Pkzj1cmwni?NA$O=&5iW1W7tTN$r@h4g zUL!*L=NuxN4NC6qODh+tV|0f2J?gKjIMrMj(2GfKACPWsMKS*M0(JP|5p(HS=4gWKnZ>Q z2ai?4scc8WrrmZCsJHdDQP8GjtjQ^CUPt`9>GyN#e**LoJ8H^}2j44$E8Kap7FqDU ze}GAUCs-5*nw`F`dz>G_XjMz zGBCo_r_}W-@IQNWOFmg1vC}h|^6(C1!HwPUnn+INzm2tJ-LQ zvWeVu2}UT=Bj=TxpQ^!XX(dKKl@JyOf6>OIJ++2HtTldZbyLs~8w%zZN-`WNLm8x(G zlIddfeGz_A&nw{$DKPET)_&@U^GXTXFMSJk5069OXAr7%<@XcXUni%AWl4jKn&=;c zkvg>1WyIq@t@^s`PIVXOxP6JVa8wC1Wu`ir1LY0G28zD^?K!6$rrUh)P}ls^f#5K# z5*PvWhXB)uQsK6@u5~0Dm%(wE9|Qx5F#H8WY<9J#>+uai%G|Zlq26uWddunjSA`L- zf5C9s`tiTsz+mF4g$G%U1U|rbgg&hWB^ZZBPy0PlkRtTWlw4u<`L?GQAH}CdI|pSb z6`t`bbbgjC??X#3(9*tiCnY}iQ?5b)eTPjwM!_dx)`kSD7KA9G-u z-6?Gb6C4rHDoP5o^4?!i8h*X=P+U$Owz>Iw-Lhq5WH%Jv=><5|XTN&P(SlB%YgDMr zsl|aBfQjmqW)=a}V2OyVz6i(`eiS=R zkDUqn@-=zmVIJlVRD62)lokCfehjLRoq7(cc?^EFNlRCW?y8yk~S*how6o%7CNb%?8c0QIZEX$VqKvkHWp?sUJ@6a6tjCe8k zJP(Jcj&?`G}i&PD;W{v9};!=zMzlZY6nnv-{86QUe#H4QN!!I z*w`v8Vr{u8@_f3nc>Fo~v)46EzQpRZ6`Ny_#qGlfA@*t+d9eH7F-;6jSXHTVjkJS* zh2Eh-)?!>Kyevg*xCU3h(9osg85cA0aGNZ<9ZCtcTl%lpU7V-e$uI)jri2B z*v4EF7D|@`8=UPpArT zArNso>BRt_e0gTuzPc5k68^{A}#jC(ewNK5r*NdH8H!f#CfCyySxr zU4!DwrnsrGOVY;FfXi#L-+%C^_IsGji&8@kU+gfpn|9VTDVwtSfL;~WQiimW^<9SC zIRp8g&NI(cfia9PuhP=hzE>X1U$&A({=s|P{^&)dTqhp;eo%vqx)48A1BprT>m5JF z*zh*gm#;fQ_%}$+Zrh*kHZF({u9dweGH!rzO+$K%G%}jDASUvm)Z@@786nMeu!HYrv`$$0?2AAav2DSgko&QdrH80G| z|5b5Cno-tKboEh>T5zlPH#Rn&Yk%+d)lhN~#&J$olsLj|UtdnreYbMs0o*ykk&Q;Z zB43s9>`}5GHJNv;IS5y5_=ATbB%d_`73mY^MG@4^sRVOj(oTW&tjy&jNg$v3`Bl7k~O1LTrh^F-h zS5&E)qY)Z3x7DgQgymG6_LO2yzhc3`1j4ZET$4!`lz2^atujI@?gpt>Ukr=8{nk|u zC#M);RzubXozlJ|W~Yg0sVwAnO-m>^uTM7LubwAvle7&qaz{Xpyew0$A{vf`Jp z->anSh=)JtZG0Oki0Uv9sfJ%)>4aU*Si!o^i)wKM2$YiiEsUV?wYC(;Pup+)>6DN1 zIbAppW~X9gbYZ9|y?4u#JiFSxZmDW(zK+xKQl?;C>fmT{j%sizg2u;qwHhnUfK!*f zr)}1&uNe}XFGzNmBW=>KBqW45^H>Da@}+>=gML@T(D>Fb^6PzBvggjqGKbr@pagI& zw~3{O{@Gf2G zCxyDX*!TJg(T};G!HeD%?>-*M!9!AgxyZ5Ey3{IX@AGQ3pB8JTCPDn)Wjz=G2p4_h zUY!OZ!(OkC#Y&F^Kr6h;*C*^B36|#&)!jTS5#_RfcvBZlxSZ9ds}VqWh=aMoLKQaL z+w6BI-k&Cn(*sbM9gF_I=-_oa*%2Q2GZC-v3XQ3_2Y>0k*aNCuslGPe0+n){R;vB%fPhgv30n`{^tnTx7$m zcXWqW*c*lh-d*L;PEVlrpSEwe+`GuI$bbK6gRbNUgYwT^1o7DC!D0ipo3aodQqmaM)h20?iZu9ZB!C4+R>^jf2GzJGP;aLopk zHD3St2h~tB2OQD>rb`gt`gh)VJz|cE%i{?G_^e%|6~dUlb;vD*E%Dj}BboJZ;Tq+Q zT^E}F$roGnF?$WFdvL;h6`mpljPXhMW$|w`MexFnHi)tP9mBcrUx?n{(%&X7-0XNo z5Inl67xf3P@2cSN0>m1;Kthfb1Qyh1?2VgUb|3T&yuNY<=KT{0kB-RyFsgi?T0^bT z2n~)%RqXRaOj{zz9PRRCX}{wCh~}hUuxM^Tm-wxuw#`Qw5%+#xj=D zzzpI!I8HKe^S8=uR&yIxiG#LukED$+R0Qqv>)$>#&)48aGrL-x@cBV%>5hMEgr6Gv z9S6x`*}GQGqnzh-2`hMvwv4!Z;@SPLYpj9*%Lc=o2ZP1)TQ9M!wXE{!?w+&PyGLS7 zX-B&*Q1)BpCKPka5&PWtGGc(wMrI^JS1m8(9KM%3?P1s8_cRredti}X{j7ZS1tG2? zxMNUYwQ~_Vk%PZWVloogap1*HU-VAUC(-Q-B-3*7{+;wsGdo_BK-BivdeWqP%Q8J} zL*rLe@2{?jY|mutJbQ_Kal~{^dXr3F(0lAhQXKc4DZ$gYrsElXnE?4d`u%7W&b`P4 z#})l^AOViFxncm>?XXccsx!{5SLpm)ez8OYCW`n|^dXmn8C_krORL7V5EkNCCvW z3@uJj6-{`b0QH@-ZVry_Vg;flPZF*SbJkX(2kuM+NH4TuicYn7o=C@kvMa!Wq>buB~p#byduD8yq4ye*Nh=y+-2H~Ct$sL zsclDYl)8&iqdH}kEBu^hct#cqYni}L*RF^B{(Xt@sK#VOL8PP%_V*OQ{dvb*1X z;UQQgcYrj7@qD6EmZ|Z?pYn(Y4Mze(c28eE86#Zta99j3l+_#`rCvxDJTd>FrJ(ZS z-NFKCr}}WWV)@PcZHDpLO%^+w%Y_>P!h(|&2;9RF_~KvtJaEgnO^mJoW@zWoclr;W zCQj&2{binJPtSs(dO4aJ+t0<@_G@Q%Pb{U$6>mFza0%Tj zjSKE?y5u{gO$@7d)zrfs^^6T|)Aift4FaDCZmm{N>-EnGDXh}FJXqd~QrDVA$ZZjwvR7?tZlL;pmbAf*n!S7&MSN;Izrg1>&}!q z+M7)SYw`3j3#(Td<_l*fgYW5^lA@^ZIl#RA6NLfdenIWjOnI^fOZ$h0A9mbvwK~h1 zn{>cD7h$Z3OxNIVn${$w^QsS|aPovP*C2z9jWlQGBtU$>0VN8`u& z5T~MXRif{4Fl|NUviV86PA!vd_4Tf{F~iyBDn6i*5FuuE{WWeCxd&yf zJMkSm5U<9MvJ8qs{nXJSWsthg7gX6kNVSC_S?5osT>I;vycDnXk|Ksl#Yt!#Pb;J} z#!)W=$~cb9xE{+pG+2Fn2V3wcjqVf+nI7<+7s&dR&FRq)smFk}ei~6H0OD{gBV1p} z?gI2?DgZm|)ELGwniXmrzN3BY&M|NW!m~<&Mn+O+gjg{})m|adA3R0(NR~#+Oe4-U z;LX;(dlv?@@dEoh>I|c+d;?EBn$kuzLW;d_E(OZpWiMe7d>Ydb@b!HXs0=DToKW0x>klBjULXnp{TXsJm6}-l`P^d*-P@5G0MMo|@2Y!6 z7ESiCR=*3<4YpU zl1ETjXB24rB-f#MTyrCB>$#Lit1O|NKAYa5vHEGIz*~E2inutVmTtyz;sB5kreB(# zer4rOY_%Gt;$tr`Pw=#s;Sf_oFw1#80fpD^(%_CmIZe{LUoimB%Y!U2g(WZ|SsnCB zpg8R)bsiCQ#RP*I6E^~!qg8Kpk0+TGLcYZ-GJN2W^~!IM=>W<7Tsvh`S&UgAo5^-u zVkwUbP^{Inyj+z$J9laXR_PBlr~VB!-Y;m%n?n)3Th3J5GiDEocVb!~3jvTjJfZ$m z^>6_V#}ctmMG4>>bKoa>boX8l=>krTZTFt3m*n%j%uO+86H1sSA?MHaaiLQ&Z5+}j z$!=u*ZJP~oSHB0%IE)@+Gy&PB~u+m>e&7F!RU{1 zVxVxt=*vj6Pcxmj5zqnVuQ=%@$CSe?HL+Kf%xP1GfdUd&PW*(v&ZlZ6nI$bC_VU{m zsQC0St`Az};pR*>kl&AEVL53jq}#D= z>EpS!290zt?)*A(0wh+DmehBJ{^u0e!p`354cpg4`)^V%2<;!U6bBvtPHS^7D}n^5 z(sd?rDL{0|bmqWkAt!2Oe5gUZ4kR7LLMpU@_ACfl z<<`S8XVntMKgp6}Um<{YroPUN{tLi(rT!-t9mR@p>VdxIr@DOHXd|d)Obh=-nOnI! zvm0u_EiU%3A*0uT<{;`XRoNQkInn!rAdxf#_S*G|>c? zD4@ViHY;v3QXlMf+NpuFh#{b3=>vOeF>>EZQmd8GVa?_q=bFxhZg2+d?A)yoVI4k( zpg4e}X7OxG*cmz;+V+d(Llk42-y6W|na~)Z7{n6wVUpM7uFjH`hb#wkO)PLKpepu6D zogDaiQGZ~$O5l@W$om)AJp-zTM}{tP8+hsnj;yDuu$RtCSH+%QjKK!12S*yupp&rq zpXAPmZVgx{8yfO>0j<8|cZBLc%7j_fVGB3@Pr9#dGTdQzrleeTaNvbZk3-)UPx40aeGc!b);gmxMkSYXHS>Z z!#x`u{NiB4U+zjw@9%3Z z)hOo>W-W4RH`q;=;YI>Mdn@0J@IO5 zBkbT3F=Isg?T9Ez@%BwOB8u8CRL$>fKl6B_hvVAehG+a?`6sr@7FS3{SMlFwK)w@l z^!vqsX8Vs)Q8x{%;}5_yg&R4!FvS7q z%73lcreRJ0P0Qe`a4TwqnctHBQgvRm^1U{_-*d|^Y31cVgc1J4T&sJ$>~s9&u%S8r z&wPKoDaL8ltJp5gT)uD5h8{n~%IK^dD$NV|(9Lkg#gUPE?jt9C`F!&1Rg+|LCW~h- z>$~yI?`3oqzqQ-n-XO6FbD%~UT!~l_^u_vhh7Etg(kD~npQ(kkzZPimH+RROFGM`& zlx$exY(z?0P9(}1z38e@2mhI>HBOYXe2o8tIwbKeZl&U9rsX=DYUNdIy(5j%R^Xhe zA=5pg#J%4e+P~t-_&JDWw|x~nlWgK5!>__{?o*6lCo#fCAoTyd%ZfI22P7+NS69#O zwv~6=*TgO3U$P2F><`@FE>Y|6P0&`c58fr#1w>ULo<>~w*D)Qt5)lMD+L4y^j!K?w zytbO>7iC(_zj*`x%=_;rvK^h~NUAyCdYnuuJ zJ)538^=0jSkztbB`^gdyFNy>1>#)<1r~mO&v`YH%As(9Go?$kV-tN6hi{Jr)+uD?- z$gi#DRMmGKWt*bIzIw4*ku99;Dc-EJ)ChXo>9L^uRfsOcD^oppGhb{O_2RQ48(Krm z3#VXEGarqhZ0AeoZthkw$ICAzor~{ZBGlE$OVEz?mkqORF7>fRFH4*(roEhx6evdV z={IpepGP}w``79Zc6NJI*XkjN<8vWN7v@U^yt(|TO-L+$?hL~>>-L?;=4Aow=rYF` z)ePA3igNK-Ei(ei^m|{B>l^45#)CQe0ju7;nU1X>>Deu>tFG8BtP)Xb0wM?S zIa*9k9)w?fGX`0kiKc(3F7xALNG77b2657f)-cU{{aXKLq77cdNnvY~#Pn*E6qV9z2{f+&+H*-81mI;E?CuLEIKWov4G7wR?y3LW$J@=hrpU;Csb1X{{1=Xxc?wFyQm+Y{pEhR#>|rt;S|;RB%kF7DsA}fdS;^dF*csBuMNsG3PB=ZaV=c=)hy)Vhqs|GKu<~__$g0ubDruZP%4l64_r zNlNCcvQnUyB<+l@D^+%Zy0j3~qe)zZ`>L~iO>4VzMi$@(#%W=JWKYC39rQxcke0W^ z@2huU280RpmT0tn-EcZ@qbhNQ@^2sYP?B?0t%vS|;-yz-Nk=*m7qALN!}qY_PHH~Y z80hV_UMCE{`)a&aIdT7ev$kn3u{2JONtjlDad8pUmV)3$3(8p@F))Kv#TIpr;6Xb- ze=?s3aY1$KoQ| z?5GF#8Uy|21P7V`Af3Ni4Pq(ROTd>wxJnPbLseCVjaN};ge)PvZn0sZjwB}Awq?3N z2m!GjQhT{AlKTcv`-6FxzB}VfIt-C@Jm2ZMhaeqQov~7Wa!*hC_T|K~N;uMN3At^(0pg^}{}N9PVP?SX44u`4eucFY^c1 zNutjMY$npg+Z;`(+YAiK?U6C34h7GkMs6Ka_pohK+}e8AG9m!xSzuj*F8K`2r%zs$ zA6$Y!hc!B8t&TBhkP)Bg#jXE6$FQXjy@R5gVJ z)~{=xYm>YCBiOAU|BBFQy{hB^T|oWyfx ziB(gWyx;h&4pKy9?o$=0R=Xi+;bLag4cca4+P|qj$P+KtGW0IB6zJjYs9cY4j#FEQ zUad^xMIInrm!T-dE_j}Mnn(qwKGg-;CWP%KwX%F{(0g&t>e(XttZ+Nh#?OBDeV3VW zO%u}Fy^nbs;Esc1-#h&|UM(66)>@ly2Kn$c@X3Ke7Nqmii@N?8W_ZpOyD=hl*za0%BxxK953(O`dm~6#y~U;A^e{ z-7sniJ9;SXCJ|<_T^#iD*vi3scBYjZWfviEN=BKR8W9=}=qW#C^gVPTwP1ta; z=HAoMVbABHR74yR3oCC)bOp1w0}>}SLHmhf8GMT1EFt1=s1)g4=EcW`3t`(X6`J0{ z?$K5rJ(B@~9CdOi1N7^FS>@?etIz{mc${`s7juG7(z6a1xw4j=Ch42HqF?o{J;r~9lpPZOj{LLwi$1MZ;ja+YZ!E-qP)d;)ID1LzYOb(L zJz}8BiRVifxJn*y3kj}1)L9#=zmqzz#z26NI^L4amy)H+o^Vex1w4a{3(-n84^uIC z1gdw)1-l2x1awj3oeUeMW3i<5D?Q|V6XpY#x78e$bU&KtH{_*OnLsg)J$cT$aDVJu zQDt05&e&qI9hIb_$;8`bW}`E<{*#>Fuc1#L4wZab%9GhWyvS~val>(L(3_NS%z=Q# zslMK!9NT3XSbeQh4zpPDAuG4o+m_g+~$*VKS%C3)^N)^@qSM8 zc6+S;q02G%6lg}|US|1#(B1OtLg6YWN)o1re*zfnC*9`N+}_4N$X{Wh~yu z9R-+vCx-4nYpd>g$T%ic=A3CVbYAFj&dZKk;UxltM`*-JG-y|H^zv78B|)lCQC?A@ zYG2_1KTk`7q#yh(iw&nnQ(w)?xLXbyhA?Nc^G?>;RzVr{k61c6SFc#?hm&gR)_U1v ztxw|abe8u`>jm!~?``~Lf|OPDbzj~$05V%MjBMj{XbN8_&d%M>Q+HcSRXh zSiaY3S#y0XP_8fbOYQSRn~=DIY9*Eri21S4RQ|Z$UM^qzdN)fY-wnxNx7VyQAe#9Y1*p(7iXv&fEF+VZA85`;q#s*o8o5-7}a@ zo};vp?Dc9{YBse})#rt!^7P8)YYx))b6bQ_^?K;9C_8y_!_O?aYRDFAK+QuqS09eS z5e|NFi)=B9q6LSf;?(#m#`Mh+jE1q8&v(gL$gKSO@}b0^SmPx#T)Wvz2m^nd01Z3Y zY7>U6@u{#dT?i#VCLg;rENg+9L3wTxGdM|HFvC;Y%&}q2}t_sp-9S0LPQLiIo zY8?c|3iexBmmDsvJg6>~1~MdO*ksfXYXoVWx`8X4pLOG2vj0BHnq*kV5*vL?G9xRj zv>8)X+a#?n)>q%=MZ`czSg-r)wJsYox`?uy2w6vS0ePGp*6?7e7LThrUO0|o4-bDv` z^>og{rK6Ke>H9$MriMLj+xbinuEraAr~ z)&PE+j=SjWQbWAxyqhR!c1H|Z)2cD;aOOV19%FSa116WtvhDKU#t{Y6ax zM14~L=Ic}uI|}EY9?Ra3+I1)juB6iG@>r2sTv%f1Bmx2nfsw;crbbL9oeug0ljSGv z?d=^u8$LqJ&>IFlBGm^Nun)XyB!RB3RVv0U*~sbq8&Nq6v~R;1)n$|V_7z@%b*f!Dn!Hfu>%vlw;+^=$ zg@o@bW2FhA$HcOO+utYM>YORnojsr_k{&RvE)~aY_lc`m7Aj>UU+B!q*MNK|vzLU5AVnETFD#|EPsvuAAdSsc4p;FhuT$YWLSZ0GxhR|X`v$_-9~vYOt9Rs&mq zyu%L&iFcRrtIg?eLhwiV?V||QfCc16($HEoOAaLCN4QuYd`K76Hfr zWF?pzlV9E6MJ&4`fh^s$#Hq7~ap?=vE!;X-l5b_4o8=tEGFnxo8kIDK_ES=c;6?B4VD_7>pS|CZ`Au&;Td3QOG^0ux<34`%1x{mduazQw| zYtzcWQ1QI|^UqyJ2a7H(nhS4Q63sbExgYYM8!^!kD*-?a0x2q#?c$9K;g<*X9D|+y z64vl>o&CV(D^lG7$)=Jt#ts{gf;@9H8k2Ku65bc6HNr~$ zLgSJE;hmQtoH+a5S{O>P9$?@lag3D*9N^mLzEHS@)Puq{+IT5+k(#81pSX1A%=TC( zsnpH_+MdYKUSQaFEl3`wKXSom8xbI$*y2hEF{J952QN(3j&SALV?fd~W=xQd#hw+n z&mU&R*1m7~2}64)yD%?0)Z{ia9>6W1HLhjN7CqyPOB1QJ#}DS&E4<>+r+dmL$MKOE zGBVR*)Q*4YeOo=fFkEMOM*&$Axga2U0?60bn`P$I1oX%-f4 zrw3=5=<6}VRu+f)r;|*mt*x41&-vwOI0CY0Hx2r_efM(Mr~O=GYO4ym_+-Sc`J-UL z3d^mA2Ds4O2-K{?Obp`U8`L8K8=pr=^0@eD@~*fNqRNP>Vd@)WH;@djEW_KT_O{Qg z;)m}Ij#ln1L9I3+)lA_gFJ_b~(s*CXJh`x{$1sH;eB{PtJJs1a(3gEu(_f^lrPmTgM1(`WJ_ zR~1s^1rtY??IH-&3&tJsa*!d+F|%l{JCt%yu)^6IsbGdI#y-thwuImro~jFpwx$;L z^lrzB&@K!DQ^8)YvnzQ!v@V@g61-Bo1g~LIA{=IAo|&X6`h> zZE-?sDu+1w*Pd$#fUR2R3_jOi9?Q;}xN5o*Yw(8h?_sneS}1bpJC>ly&wyp;#Hj6P zMxb?n?bxu3WNCp=yc)C4JlbT==Z1yc_ok*ATXbCSJ}fSsEJB=0nn624shc9`&w^~1 z))y65YQLcxzBQdB%iSiNj}$jkv7+Y8B@1Pt{IYme(Rs;H2d+Gkw5hNE1Ud_5a;pE* zzNiTsQ*g`(a)vpeRG3H(`@#P7=#2lgb5`GVkzKK5aC6?lLA!6O_*R@J-cU`PR?5-$ z!c6m-;Or-y2RbV8j;6zoa^Y+`S%_q*Kx0#czVY+tE)A$;_MT4-*7}7K-wPiqBoEUj zO(KbA=0(>r%_cU1juu?BVuzRqBsd8#(NswV;qT7KAW?_paoypQ zu_0O1XJa+BPuqEvUVK}M({Lv%Ar5v`Jun0}pC^U;Z*Yi?6?G2d8T5A)g5EE0wu+26 zHlw9hlS08AXNz%3VhejMM&Cdx?XoJhHc|<=*{{t`%6s6ZO$tv+GBg93`ELe2NL*jW z*W@q346V*S&Y0BMIVJdj_O9C@4ae5)=0M@Rx+ek?6H=x#hVF;d`f0+kj>xpMBXJjk zE-MI4^vxi${MmF-GfqHcHe`-!uI)&7r8elDA!{pU|r(D zoW*(fh~T*XXZ#jq5ZVeBmqm!po$5#Yr1hjp&exB}T#Di$z=v7`#1u{X_j`vEf-1Nxh7Uk=VJ(>{AEzb;Kr zmv3UC=rGUmQ6V#rruW5lW`%S+U=ADJj1?26Br=M%Dz#$R?p4*JNztX=S}NhU3PBbH zx6pYloYZ&$1}vwe0siTLl@DTVsHS3E8)O#F2x^*25CQ&H7J!rGRsUr1H(OR9O9S$j{Ap)#o;aj6(J$o zPOHOD_ne56dW<$pyx-%r>?gf6ccdsuiLFZO(x0#GW*yf;D`qpF(%my|h&o&{(mRxM zrPfQAKtT<)F%mOOwt%=eU*BNloqnQTkMo$o{{4NhwaCiPUsXzaH`M=DX`ajon{=X72{fZ}#RCL;k{m4PtV(`3R5tTJ@nc2!mOwBcq zM{u``L(mi=kTS|Qd_y2<+Itno$_DD(B|k@y;ZDZ?%5uG+O$)zX z^wjE;n2Brvs9qt0g&`pR(82Z^H!0coq|5h*P`ng8_<g3aSIdrn9-9(Xy*>5*zdH9P|@(|0KMUSlc;1*0GRh|GRN-ny>v0aF$@$z>-cO> z#t_7qlpj)FPwPB8qpYsIoFBOiKcLZHctr!*yEoF9%L?f3`5GR+$W<(t@WOM{#-Y`5 zJMnhv1nuhTS4>_{jvlq-Yt!2u@ZHVO$x z3;xp;VL5+^@RS7k!*r&fM}Tl*D>{X8uVKUD&QZ$pbN zTyO?I!DO@Ggi6}Fm@MuS$qRfPOLS*3|Gwf!`PV(f6zR9iDmb;ot&zK~UJ)%#jsk>x zQVO2+M)+-|x7l7$7x;xK9$<7HKT3ItlMZm?>65 zN2n#&x6e|r6pxiKT=k7kaPQjO^~}UcjE++1;`MzK+w<27a}vK=cU(u;MZDus$fX?R z>kJ)IC~Y;ay%>wyXSDWxH-jF1yhgk3D$drhN`39NUfuy_Ygne2Btu}=y~UwY{DGki zMxEE7%#eAV1ZiNVGpAU=hjKz^Y-f8rLxO~L?Ub0I>l(S>5e-b< zHTSxHJkhyxB9-&sJdH!L0RBK?Lwlgx>ikE?_MPCbMn3+0|0+rK|6F(buTW(FyY&B_ zoLv6he0!ZbUCpN|Ac0%oZLu6%eusf}fhR5Ulit?|`q|Ebkc=N#k7>l3;4CRTX0PhG zd75BmsJ(-|0V~(0;5vH#7ITJg0R=H-Gc*%ot2Sj$S5UScsx_dsb4iv`2LR^x;Aq*p z@-=j=dVrxtEb$ve4ln)5g?-oG2)~&XSC3wwx@FuP*w}H(pikYLkS(90x}}C8OW)@U z3sM)vsPmTNIM8|)#Da-}JxfZ7lS(m0X(uv`BYEmz!<9($*$oLsva{J`C)&L_x7Y3LsWdgLyDd_J!;@=D`~v!#n)4i~?eRC@elC9jU` zYP&?7lgG0je*re-&}Tf#?4)o^F#UPrj*!B{^x3;$(!Kn{)PAGO}x~)>TlqB zQ3lbagiH6%OCl`I`?2nZ@n@aC;-@lNmQZJb8uOY*t(`(K_OT}yFJ?p(c@7rtrA+Fw zvPI=zT%e)^@S%fC%)xa5OJBP8@b=QIdEx6*v|^{U1`Y@Le+ z&1<)&)lRT*geyRbbk1j|prPT$@*U)(W6BmajTgo8F_kD&NDDM9xGM%>*50uD{H;Lq zkl>*jmPvuoydR{?vva8ib-_E_By5{7PPc^Il`gri>df$5JcC0=WUqMxR`J8Bv5i@HsDK>Y3+iG{wIP~{8y^mI;kp3E}ssbw|Ff&m!&b}QcY>emh^m%#*4Z$ z?Hhj#CwkTX)7s*qaN~;v-N!$k`Qba7E5{1@@pBYXg0AvOoD)%>&>{J=?7s*c&GCo6 z9`NyjONDjZLmJAAb5c_qKeXin*vV;RehO>!A=0pqb3$Ry=7(}U>6_I(zD1l#pJLpb zo5T!r_&d_7tE_e!QgoIX*5ImzwQMC~_T6!nD)U&5#u6BMU`1BKSA(hO&ZcbJS9{Wp z*9u%N#;gfcq@NHx(KV03R-PA2vWMTek|iHv=bAiH>!6x#u&Dk2mM9AN3H#N4hhF&_ zhj8xn@O_bg6j&X(|4syS>Ofl~a%?i&AJf?SDM9vDQnHB& zhz(*p5V*bQN#_2!iA&7eH5t?v%t`(=#J}gMlT&ZwFLRvt^hsvcZ({ZS(q zRQ;{QW+rolrzRky+B)+~-nG2+^O(Z6%alOpq_0%w~3c%wLK2PM`Z1zZ10e*WvKCWQykX=0(Om}u#oY8HmQ%%AjmS9dkBG|Kmfye4PRjq&yP{A*<;~nsf4K#`;<&=Ent`q!_qW;&y{oyxek>Qr=wz7p0bABsAwAYsP7}%IlyP z3kj73SGp1sfS6vQ@*o{7s4vw_s}f^7*V-9KSWApnim7gzxt@ZgQ&c5`c7s*M#no9D z7xM>~_tq+ZHDBnQd~OOM7?AKv*|ii3;D~UF8XJaFth63WgJe2hnzuuHj0L>f5fWjG z#@2^!vBcSy1$7V=X6^R=eg*SMwxUzPp3=gh58p8RErDd*aisTX;>J>=?1A1b}u9I9vhk3Y_Gh- zd@)6+Dh(s5qr6*`v0LN0fAcqCW`za~QwdZp;lUSvoAnPcAc!I6AK#?VCVDG=0xyZz z^5(3Iec9stB}mQxv+?*Ov8YL|s;EoXObvGoGt1oIB}3qR=hC7@I5iXYUgCFkeVA|8 z~?UEKRn4LXl&;}6MAYotwT%h23|;u9A`z+F87ZLPdCZeZ-hQtYJf zMhCvs3M4a7W80+r(64fV9grHJRMMAdj@B#&0F7uns8iqi%yDuxFJ~n=?o8J`rBVEY zl;n5Kn)7(ze@e$l*p|lo+amM;Xs%G+^@ARK(1-P6wE-iH74k}10%xKex8=fLVBf$SO}SH__^;aE$M_+CX+ z+1_!dsomMWK|BXmW47}`WUQ1B3%&cjgM*>P`Rk23pnx19K3h@-BNgc+t1wqX?9uW8Gb^hAg+Lx|h0A9dYC}a#>5xVlpg2iddMUAF>_mZK^ z;>b+0#{bpX--fz-w%M&2b=PhUEerpN)c9S5Fi-xuMu4y8yMWelh`i<-=GM{MW@c$x z-^jISOma+6}eX0uoYNcPt~h8KJyOo-H@MtP2_ zVN~8Ge{7ZIAL&jKZaMK;B?XjxCt*vaG<(po-YS3fS)4a>F_`TjWDrHLm@Q5{!G1Cj zdZD6FJ2y3*xUVVXj1t_?aHI(|*@dj3XRK3sE1VA9@VRKF_}~d&CS5v%i&@_f;dod8-D;G-Fa`$f_@EihPMD zD>BNUS(6?6h*Q#$LrK6}@WJQ#0?XEZkCr)QmMOvSvd6A1P(m~E+4pTnr=J;;7QrIB zK(d+Wa)%R(th;yjq`7iw<(^pLGfl<+tYcu=@9}^1KK`zQxQ>r0EZKHihDsME)f%ey zTC>jHH)ZCsc(n**cr6B&7@83%YgEMU$zE5zY^v`;6;dRhp^#CGf3ASDI010J zEP*&3%(pA7U{Q%H6!T%O(#B;{bv+x=C$q9Ya9;=%?DH-wXAG=^y_B)G_CcYG$$i z{$g>DN0!iv>7ki@go!G3mxOOoie$CUt9-zC`QuxrT1)Uu+Kv6-2x zvZ{JK92|5+<1}Au?+My!9%1;xR>H+W?EFG>KG>fftzRZyRf{aA(oM4LYLV92(XK^V zbG4N3xd)8CGt>DQUfrC6U4~`4G&vqCdFqNPbnV1q7K54}`q7^35xPT%v4`Aqr;Q!_ z+gPd9pV;I-7*6k}5o5pKoVWkVk-Wy+8u2nR`*T<0xoxi6lYM4Z#$bj+zdNICbA&-6 z31OrUz@-)zL}t#xL;5D}{CX;rQQTqHhsu#vNi zl%&~&-1*sYbSHHWu$VvZAkwI+VMKNS4|$(o?lL$T8f|?7vSvvVZ_6LsSCrRsZE3+W z^P5eoIFjZEF~*dR4!>B0_6Yi0w`jPeDE?>_*lk-mZW1i|s6_f1p8i%5e#Q9ry7%FA z9^O9oy{%SB?o`(XBkKeZB^S}?CFWL{gb8f za1r*^p*%$+&t*Mo<+B5rv4f|~)qVLZi}n1crT>a!cU0~h=pU=u(Mx9v%rh&-=9m1A zqgc85bv39XF56!YrH;;`ZX+&o+gijq_?57Sw>ag`plyQLZ~GkLzF*k~Gbevm$8aBj zcg%5m%1Ch8)5n<0T04NhNpg3YX;BV66dg^8i5!6TSO3|r*6BsovVAMaCL2Sp2>B_o z;A5P}xX#A*)>#WzN<{VxCr0{_3$N18XsIP9jl0Y28Cq88=C9bc{HG?%l0X4Z;2|pv zHD&=WZl5M<-DW`dK@L3v_Gs^@cEOi{RdxK!M+=FZ(Pu3;?WE%Ynv<~Qm8c@8Dx*%l zVQE`4H@KYu-*PFdn=U1{h;xd$D&#SS;eK)RIIqe(?AOHcqsLFoPOf?OQ4(|3c3QB} zQ25t4MHuP@P9L}a0(gsXUiCZG?Oi!piaT#QwcmR>HE2>B{O|XY|4Bc}FNFJtE)FNE z&&TfH+rL}jUu%JZ-zD&$OYzq+f8}!N@l(fHjNe$N<_fiWX_rx-zR`Dc<0h_m(Bq!+ z$0=IR%YSqQ7tkruCnU(u=z2P@Is4xDX#6Zb`uXg4bNPq$F;;j5yHZeIJz8=2dO2+8 zk1@qxdSzfFMBKU0e&fH=H=(@^|7VAzCLcIg$=ne5@PA+OuQsyrso8f6grhF4Uj_kO z1OOytG!zsRR1_p6z^^|f03id=>hw%TXT~$Nk07jwo>#j`+T*Kb=r1b(OvFh@QVc)O z8d6tKT5g>-Cm*SXg$<^dKI?8=!TQ>I`KCe?Lp{H@@#iY?i98f1d(?UD16yi7HOp8=w*(&2MXym^~X+CmvJRp6Mdgv_n-;z)A< zYZ?5e8I1KXS)6xHp`)DyFuAO*VdkJBX8K5+ZPw`{n9e5ul+#2`HHM+|`A32ytj_07 zwI*t@J|a`h%BgF<@%b3HAH9d39-#)YL}#6S{D6G6ssa#tLO_NNmY>HZbO-PWAYlS& z-&uzaeqhJ|pi;l{PQ!r{hMpuPMS3t2t4mAs_IsxhA1;}q@PZtpC-&F99?%GI0V1!X ztGb)L*`LJN;1$eBGs{pYd)Zj?AX63+Y4vhGe@XDOej`Q`KSog`T+r*Jmz+qjk(W^} zah_lv8>QLG>QOLCOrnXlH)=vDZ|JU~7bf`+lxj&ewntTsf#iHW9lL0k^JI;r zaA061RJSJvhK!>ocu}BRJD&z?3!J6q;nfg2YabEsN!yUn&FSwVGjwz3`{3yMt)hRk z<@1eBVYQm-OTDa8_*zwpm8vX5A`D=&XyPm<;pdgb&>%>Z)i>@P=7C207=KTU&5SJX zqhTbAji!J;#RPnz&I%$l^AKL z2H$5?Vd9(glu4-5GL5#FTS`P2K8vo{`+RSic=`(sGS0@#Bos%nI_{&CnNm9YG#3vb zBN4$Cqa_IsuBASOytLb^nh(gt1DkxJaRSyy8_`69DH~yU!qQ5zocLo=3GA16s1&ok zVo2P(mZuC_qf&l30*cjQodU{5Q_lAbu_Rs;KTZ_?A= zQvKT@>+K5wfcbT-o!>o2&sVcw0FS=k7`^I;{v=@9`>gOE6G^|EB1j3M{(nry32q>CK6jG|V7`bR{Xp_n0hz^PA@-yg(~3mk z$$)-9E_j&Hl?uM{Y}@^g;DaO~ZW^8kRsNS7f`lIpV9+V2Fbnd9V~P#91O$kN#OZ9% zD}NpZROhSXSXV3GtL@V}_S!|zH9f_`=T_L(c&7~1=Ghr7#vx%XRv@4lX2a==MZ2`t zo7EY`U_o0649&q-eIw4x96wVXF4*uo6R8v~i=oZb3Z&o_XD+ZE$9`P3RzM)A*Ek`q zuN*NTL!lz@xPsY<6=?@QDm29xUD^0!6am*`jb{Yy?h!}fy^B8!uO%2hU?=JfYSg2C>G8pc z6vABY`FKZ5MtoyN2a}rY-h@?#S!B)6om$^6r%$!9etU=!@tkE#B6W~SLg&2CNQMaLJ?WogHQBIf zJi~~vK2Yd=<*AhBCeI&Z-PacEvpts1qMpNNJC@E|SaSMdP%ArMu2J=CUp|szBQhZW z^{CRj5_?94WE+x^?qRI_X{&EOblFT*vga}V!wbyXRTuC!V?w#*PiZhdFHmJeHtbQf8LB|<-%8U9z?8!oyUo!dL z6LCy$A+A75B6*hhaTz4~_LVGq2bh53(=oYa+BxACX=#yA{12CM1xtJ<0f(^1yvQGL z<9G>m25x!MF`o47Bf#1HXr5zZM3#iRrZ}_6YHuU@gG&it$2|(iqwJkd&6~LZaD*-u zBazbd6#wA$GM!xs!_$kpM+zlG!SLa<4{zo5 zVh|$7nv%;w^#?ONsnme;v9x6yR2ePZ*xy@xm;7U!qv zZh+VCLeWP>2mqPbtIxvG`UDc>oD06@-(g5np;8o!`iGyZ;YB^-l~MB8(6#ft$1auLPY4D<$Lo!Iv; zwbBAZsga_s5E$}DL#BPj2^;9lDnzO=Vs9(i5+)PI+^Ep|Fj}s#I_M$;lfAypQ`Np9 z3PQK+CyT~K^-*NlmPcj;0ArN6H$o!`kk4T$(MUG=8}pwZyicE;uUbl@%%oCSa-Iq7 zlCu8-X!25T=k>sYGW9rEMn&`cF$lX)S?*DjGA{$8S^CIdDKeS@!`{BGYH0xl-{SaCY3d6tgfx_2S8XA=1F4Y`f0D*JEZAC z6DeC2Lg_FETc;zUayNXvn^&C2^%LKI{)l~pR9p$JrmcSMT(t7*pGw|zMRV2PW7Th* z^r5O{D+b)NRp3mu)@rjd-Q%Z!Ke6IM|EF`|q~4F}SAtr*RrfHd-2ZZt06yQg0HJku zZ0J$HV9HU|qGpHhTz$UJVTGC4{$C?*DE;kt0Oswq=Y?Kc^O})4jUJW*GBYysV@@cH zI0CfzCQ@s!eO|C!CCT{^;JvFvPS7~Ud2{fj6=gx|I zB*})%Dy1cyMbh^6-kPdVEOvv17eJ)*mR>~Ak26_T$VVWGaU&HqfV7FeiQB3wSQ?35Vme%9DJ?=i7**cB`hb!uQkrWb*_h2Up7L=uD+U>A@7`->g01-$ z-Z8xNhudDc1e%FrM$o80$Oj(@5_P=6QFb+aMq@YdwGzNFl|iPHnb4sE>#=40H^-4B zBto1CBtV+xq_E~qqCg_}7eH%Akww+rU7Cqvh?WhkE|M4u#Q)I^Wxp3=J`;n8a;DwZ)8Tz!MLI%8RE&ptX8tDgYcI!&m}cjM?ya!E^eqRofn7*e^)ZP`B) zDyE=7Lx!b6?woHMoeV_A(~FeF*W;s2olUkSB;MIa)o5eSZeDd;@lnX}jpiS_zKTnF zC$9hc&Ibuo>N3<~$4Hy*QpuKgW0Nob^+07fZL5S-E079_q2W&Wp$zuuLF-FNDz#Q4 z;KYUmm7vOyUogd*iAXZ#QXe4w0K`b&i&ke-Y4pWe<%6}Wts6OD=H&3IZ^@ymovE=X zELkSAS4cCF;Lx|pjf`620&8Jp{VpGMIeCyL6EK@hz3MJL<|U6AP^ux=vAc?Kq*$Lf(1fR zih>}hpdg^A0Ry6fCQ>;`kMk(blV?W1Tl7p<;+^;Xd107RBk|_3n#g1VDJt9IbbOOf>1KLk~JY z!Fcg3{f;FI01%K=QE}cD0IcUR^L)C-$;r4_W;PbdeA?m`wZ|E@@6DK}m-{;wQ0yTM}tG4U#+7cf7d|0lk|X$K#%W*eC8 z#vl8?U2!|&nE9Qp|B~=udi~1^ZQMKF9~3wkgX#AI5pq=7cnA+=>bu34$edio+cE4q zcPL-6KF|z>UoTsHG;4JBNL;D{HF^GV#yk0g=9IT4^(;dr#?_17ObYnm)$RkQ{X9=RQ-`&l{X*iecL zW8Tt?bjJLdlRHWmkVyS%?V$*eW5v(lZu82u`^GO1nK98$O}`WtFKStFR$Fq?_?&AD zTeKoVmL(PIOoK`?=j0sTDq}FCwtNxjs^i_npm?sIZunTCv69Y=wt$F0uLw8}309-- z%zkEE<2b80PqO)t!BS6^=e3$U*A*?5_XhFM_mOI)0R%}i9(J6cU#TND$tN}Eu%5_M z2u1@k2Sp&!^mi@AK}>rxnzgE(?*wWvIj|qlu3uN+p;Tz7>g~R9No-OXhZM4c^VW27 z-a*~9?pQ;>AU6~c9^$%curC(186>SbeQJiLfyZbv-a=5&U&dGPy}e}RLqlO0E^GIc zjVq^lVdN6q(PnsSc5DT@5Ir5!y~_$ld9AyJ<8OgUu2n`Z*q6Ac7U;#u`wVQ~43~?dk6SIP`<|?W^Cn|KUE*ZTtRR{I?wbD@x!b zExdSSeiVf2qS?>o^7zUVr5?S%5FPZCyMHkNg zyZCQ8{H+8D&5J0+a1~OydNd+vmBUv+od&?RTB0_7PovOMNhmM^ios|eG-IQctFz&! zYl&i_Kb7z6m#1O!snVbiV7;{LLo$MMu{d$)?gLNmH6c`!+_Y6ffo|es--R7VZx{;v z2Jq+ap4>=2abQ%|A_13OTp-;Yh^`q#L0{qZ7!zxKD@y2tWZq~~WCilPi7Q3Ro0rl@ zu{mp?8oQa*H4<`mPNZ`8$>~(|88rJl0)I3I*q43omqqbqffc`)e;)mQN?;Y-@o7|L z9Y4v@I=>>LEGg{09_yW&2abA}M$FT#kCWdS`24M5?8$yygUGs$ zPI1>{mimOZ!W^W+AQ*a5Sz)64vD^G^8qu=i@Y?O#u`289q*tm^P!*7JXEsj z7XB12l+Wy_mr?zuG>b;S8h=9?ST9PZrjGae{ z9`c!vG`RRa!uk0_+&oEOs3Zo}nq70e0$G7J)`4!SSg3Gss@$zpG-vH35uQFj%sptibL$-^|SR}9VT z!|JbQl8vYBikteul|-l{lPE?GavrFy7qmr58xMm%=vaz~f_Iq907yx_!S`t;XjQ2u z|1s{aH1Ppr*yZ1V)#pQ5s2|l~07zlO_$%a$ILa&8u)EQ$tt4rG(FNwCU(sgQbue)dw#_p?dhkn5=V|>q! zJaI4qCMzto{;sl00xJf2&Da7gYMn^tBJ+QaEUOjLvexCOuD9jig zY~PzUWpfm6S0PoeyOu+@r9zh`$4lPSm<()1Y2}qqg>_rE$(}QOw#Qb_mKbV#U?0Nf zrIQY0=$PCMW|@!j)>Kj)ahc&A%qY*0a0Ej5CI-a9I^}wDA6_e$^k39vG%3I}k|m3! z0SzA1gaSPQuL3F41mdA|v9}PWDBLN&7o7Dr?vU>NU6$vJ24phtT4~Wd^8<;9ji2*# zcdC}}ypivGd~jrZ(^QzOo&IRrHm$Kq{k)GHgap8gnav)?EnS_Dgu#++YjpI+$$-pz z?VbHi@y`qPRnCLP5tvDwb)3aVUSX`tNqVI%i|u{}M^wjEuab5vRtOsCvPSWZ?{!Gi zEHY8E0rVJrN-C{mLLcW8V$pRAO+N0YYL(m@RRTYX9jq?|`5>$$l;5+oj!toF4M3QcBaQ5521_t}tn5^k3p+z2e9LQ9a1KOEpd&eVJ2@_G7R8mSK^mcO)%J(L{zP@jt~&vYL@etZmn6ugC3T%Qo?dU ziKT=U3m2%+vDUTO!u(9W4wHw{1%`43ChHf}5|_@2?y%qX4u(?g*n4X?78Zy8=@ToL zt8%tO%!2RnKHK!eSb!aC=q;jSyPCB&=I8*Mk-nfxNc1jlT}2;FYF2rP?C>^JQ{iJy*AZ!@k@L|LKBbu%yYcKaX2EXU|V?=TwJ}1io3d>Uq+18%37K;R}G0|UTjAL>0+R+b|Sz*qEd9C3nH2?F+TLN0(TBS1~>lhtWHq3Q^O4BloAJzDqE=|)E_ z<5Oq8n4Ny{$9TR&n|+%<=CZ@yKBNwg4Y#C(h+7MxF==^9ay{tYSm^MRBAq+a?i%jO zUZA=`phb}jx~LC#5@mRooAuH!gDO>Ei2*A5zRG=P@44qNnKRIvin3BsH^K(YlR?n9 zvn+bcp)dO>ghRQ8iu8O=LU9}p(rGpw!Y$BuC7CHBIo?l?dJT&hRyP`IX+wa`sx8ZO zo&UPe9J(N(+1lccdn8&-8U?G#@}Aowy+oat&p{i>np9#(;dCDATRgr%jkvvc&PcC` z)H{LEV!g3s?c?j2$T!-S*{Y~;9Li(ks4U_UOgQL z8XV7>8hz1BCwJJtWf8St2n0At&@c#K$g;9mazA}3y&M&1pIncK7cJmOnt$2+>u>zQ zLa%b?1tkF?+|49@F75x#DLGyQa@o}XTGiCp#b$b~d2H#;q8J~K=PPG4Ter63#f)E9 zs-Gq?L^yOgvxdKIz@%YZz{Hs>E4er(QCv(`twTU)GOyRdp9b* zkhL`q9}|QH4IOBCzNjCWe)!$L3;(MKfmB~JH_mX(eevSfRe}*ndb{tJxZ_uDOGC*4 z#6!myO@04DUn_;~cgar%O_N=8bWyd>G2(WyB4^@Eci+dr&m3_q+4v0{+IHiJn=tSZ zD@e|~{Tyjq(*%I+TDrlbTiTl!+K{o|xxe4&pv_Lz_s3+fS6=u}R;_F)BmL=r{7#_b z^dCJv{V^uyCEs6NV7>XaL>yMh)k)g;E6la&ZLcw6M4?Cfj7kXMgX!KqC&-gtDG7~} zx5lTy-WJ^BOQniSWFSB4A& zL#2f}iIc@b{3^s>ijlYO02tsf43R|Ss)D*Om%+oDOczer@w*#dw%f5EEAel>w|?V~ zlRv*@byv;KtZvY@hEhl6WDBH%?q`0a`9GqkhqSu=?a`!qRO4~Qbh4KQZt#|I20CG!iycGU%G+?{t;6)_TdA}fu~QPIev zI_Wt@9A%TgE3frIhw|Y+or+wM`VTwmV`v5N?mqb@d`@(KY`vhtkzmSkg>FH=U!o>+qz6N)v2{8^ zY$gbeHdH)v{YKzgzvb(%a^|!LzH9Gg)hZM6Xbl{wINV+m4*M_4ufJx{g4$gi082Y z!^-=&wlPhb@xuLhBeZiiA>cr1ugJTRxA;bv5YxT$}tu$WfC z)AxC=^J=th=G&Yqv-nUT*yrj4(m8-oi!P-Dk(Le`<>N5~-d**(_2Q>B_=&b)%K1mQ zM=JaDh;@4N?E6^Mb+8PZKloFym*zRQaqXW)vYV5xH~o`!=Q=gkD;#dDSMIOz+{*7h z@~U4TK*u}s`u=1C3Bogr{0)e$==o?MU0`*gw8JL<*7iMg)?`0+0`#=5I$2a~YZISj zLUfPC@RhRmvm4u=c{19Zq3~5bA(|3clXC=Y(-HZaR6cIy?F}D}itt`@P5d74s{#rl zrPD8`guVoAZCg&hRx>xbA&(?5Hr(`7_yQd%D{Sd!5v22j{w?+$B@|cLF31WPWW2Tb zJgrL9mSu{%tCHJ3Qe%&h6v7%f`$}bVy!aH(eY=gu6a_wbQPzo8{n{aXdmoTAI@_xH zDCKxW+PxdsWgeu{b7_nhKIV!9)2yap65EDQE=Mt)cFve%-}`q0yWa0jEoFBtOW)_^MLX{{xoEBu70V~a3v4)CB$n?T zM-pb|goJ;uNW$LXNoI!a)D3iWN(pw9d%Vktr10$M zEXdm6%48otSvhSC)$jEB>ks>6IRL3eYohGXvuK&p{SEBTT-8f)yIeW^-n`en*aUp6 zFy@)9X2t*Q2%eeC&w zgKy%yK~Tiw=*LzSmdDmf?p}q;!|*f7`^0O05sPax>l7B5BZB2)6s%KOxuaz zCh_VYp2*f%t)5hZ(}Lv&#*rJoUCG5Ls&;WXX-t7%oQ-CwTmjF3!3L}b1^KvTcN9@~ z5rbzaG8uFxwgxJ^-;*1g_PIh2p*?MFb(hn3a$a3jC5=SGGAMZ98`}S@N322G_pS6Q zgKBEwPgnE1sz1LNki%_k2ZNav)+x&W`%;~%XZIT0qxW>D+6`w=x`Q`in03lZO zWX$eoAdzzl-uD^`5cZ3JTI%!N+5j^`L{?~59A8(mV({I>u!D&!4$e>CYZuWBDnvdR z-<=iGMgU^=h3}t3hXPL8_cD7%`AoRYSumqO*OJ_l-0Xf_yvT%d<~u;#RsSw`&g00o z9YXuljK>kc002JSaJm7HZ7>~qC6tn8h;Qe)0#-mVub5XzdC#n06n&=N%I_9j_4P_3 zx9pV>tm1o+97fDkdsNsQn>FN0Ost7!DDRKn@h^qzNPFd0rb`YHB7{ zK&x=y%S))X+Uos(e(CQ|XkvG8<6fd^zVfAs(#5M6{pRwlQ~O>Hy&N~i&{iBG93reh z_;U%<&rSHVVTh1zQvGmv`oU;*S*2Xl2ar0r-$4N;&{e+(5_(PWdGYx-UjYPQz3A-KU z?W7=7X`{Ya0YQkCOQ~pu{&m=oC}Rn+nle$i8=hzw0+(3%fSKJ6aQv zFPRoM{WY+dmo{)W!}LN%nAZcm-Fu_)KcC3bit`OR>v!bd#_Pe1S^3SMo3Nc)Rn}?I zELiJVn^&X=P=AVw3BJ)Gl}S2aPjfqKu=4|?jH)ubOS&iB9@#^*7rg}}l9R5a1G#;?@4rOM!-){MgR1w|rB4HjZHuosub? z;#N4(*_ADt!LXD{ZIUiuBM!LB(-vbh9c|5SF1y?$VdKahcfo4uj=X)#sib;#Qu`Lz6_T4`{!X=I& zDf|{-B*CED+>nglKo|JE7j7v*#iVk1WuXSgE{^M(Gtga(t1Kj5^Vkq?rtf2~bqo)o z5yjO4S4^LXep1A`ul4;BTnT%1PuYnapYXBFS|isuv`8WdS&)3U zR*4tCr7jv1*{E9K2L{O76;H~zu%ep74DUbI{NgE~S7+E=dJh)(rr z8!bC{Yh~k+fN_mchg}`mZvP%BgR{0;5!9pj;W!0R+7iQSXpnN6C3ctCKE^LMi6|Yl zbUSF>lBE!vc=is+_IB)U!?}#w3QmV~FxsqtZ_I;5>}&F;Ps0PAU3NN#}^{KpIA@AB`TP*up5}v5*47QLO<6Wg+%*);W z?m_4FxqrDn|A@*Np8*i6P_}H`${Jy9T*>!B&VJj2|4%P=f7rWKwbxtQ(|Ek(HeXw? z{j1e^@@qJY0QX>Cm4&DYLjb?xC`eSmGLs;Cr(UXL)JoJnP<0ufz!Br{u9CRGuJ~lEFP$F2&X=ep)_Uz6v%Z%En97VN^Nb zuSyEa+mY-HMF2E@CO9opv7xUROokr~Ynz++6p|hrF{C|KxQBE@hM^=?m8gI7QGreb zp-Plm7{4mtKZIdrJ6|GO=sMX%N5Y`+9RTGyFF+tHqw%$E4Hb3_B0&s!hrUYVw+2;J;xMnHv` z${n(D4XP|;=<7k#(JU3{X=4p~ti6XHeZ)#Z%z(kf4`S%bLc%S09K#5z(HW>d;)B%I z0E|s41ubN!4U_f`M_w0ZOX#*>1!LD^cg#XKAM41)3^7eyDnn#)L_F{0$>n!$UrYwuz<@*!} zk_is8c2LbYAE)>nk`~X9dcs=;SziIM&C8Q{?jwt$#LJ{0YqPg#Z8AWECTb`vLq{GO zoy}7I;6tqBC&OsD@}Xs3TP$>&NwE?Fe}%Cth~;v!1i&YBIDb-kvHNJRXq|&}7K`YP zLdH@Hot=#fk%$*22wOv=S3Y6>Uq5cKH(k4D!8Quoad^uta_mWVvYkGz^qr#1;GlDF zAGCP3Pv7R*k+2t8F7Aom{21_I@>OU&@tyC%Aj9iYQb~&mDmw^uP)q{GU09rjP>~!| z-&66!uv;okn_yIkGOz>>&^p>?xm`ksBsxq&N5D|qB1_*e$>-vNYQD-bRW-4OfDe(9 z)FiSVPm)H&3VK!gZQxi`-z>`e_+^CpQb)+ze=2i>%0f#b~-l?|0E%UWp4E&!)Hzp^2w&FEIeTkzs%A*Z2+4h-!@ z{pHmZbkmh&2nZKs&)l5;Hj{-(bGJpvgjP&^t^)^&g-06r0Reg+eDp{pb|IBe49mfM zT16O&eWjAuZZAQG!v|0+rjg<$G!K4??f26llnVR`_Z9w@fVn~*Z*Dl-$EeU=S-Z8 z$lG=Chqu@k52?^*am{urS5OvW2t-`2qpw4p@NaVHAbrS;2u&|9d}wgVaO zgQy+emn9xA1obU3Q%w)O#I1b4OEb-9hNFii^Gf}61;;eUO^7GO$XwDU=4?mFvs;?{ zUzh$HorsEIp_fCHBj&Yk^lbh4jwTf#wDnKkwiR$tI6VAD~f*hR&B9XXq=`5c|~ zjub=7-gv!W+8L{^^Sd0*${cVx8?+B7sh}pa6xsuefmHHxMWHw*}rxn!oKFwYspC zi1LSU`1Jo}lH`$tTX>Fr^pU?JSYY68g?Nq*asqH#tLXO8LfIkML2DgFsTlDo5;EW| z4xY~ni($X2v&ZdboAo}%&sPLy{`hoE;%W4o+!{*;%A=0>_N!7?--cCqfs&~4m-wXP zfUdkd=_iUwTbr9-VX~#qoBRfP{z(j)@8&-o3P_0X<#xV{VaQyzO}23VG?A_)cMR-C zv;&OeRVESda9K<=bx12PLo@w{;yWC6bjNRCmv~6=5YKwVUMx9qNK-2wS2WVtvmVrY za|jT@4+)4&??vB?2_nD2b3aI=oFN# zrI@j53wy;hVCex&PDqpZ>`#RND;A{2(kf<2k!4o)Ba*$f%FqR*&ON_sM=f9 z4ME4N2)k1fPk#Ic#(4!<{18Z@19RrrzB~yUL#o_zw>4PO+(}#=>%@0IGkMettxvAN z-M`pFplCCuP?m z6^%gkwt3Uf{%YtSAZr<9OHNM!5Fb4(7DNCntK^Sq+T2BgwW${{5CK`5!=nWGFSncN zHg711tPC~LJz2(aJ#Q#PMq)5#PquW{=HCe*%fZ1yX$1HAv=1Fjm=87VkiY$+cWUf- z6ESW{I-^G9Btb(5r?dP-kjp(cuqNcI=>ygxQYG=780Xt%htL?Cz&v&VBNj(aW-EiD zPgM9?1PmFZqf<`gnKuA9a0IZQasnY;bze=*E(s$UYno>ychNhZITl=QX%F-Lp8dq{ zn!m>!215oec16S~@RDTvV3@7$A)|a@z%v_J+Ws$z3t0#=q~i3ENpcIp_AdmBB54nD z(X`Ae*_2>134VM|6+_Nq=BRu z={JB;D}HWt^|afE+5y+XYJG>m|D|pPl9vB*+UMyqQ%(|mRX&|p_zLsFiYelJS!DO= z=ZN@uKRe@XvEG<5lgbl;p&J2HO*>OmDhKfnHD?03^$Dn*$6oLy)R7qK5Y zt%J8y(FY(17;t zYuT*zupW%B!+&)XJZ|-E>dq2Gb|^qs{xf@@WI&SBOmg;j6q`nOSQ4{KYTW2)KWGeu z7R1TVBhK+no+`*>sC-# zm~cL1o8Afc0I+kzUP*3HsWpFEypaS-J)qha%Pwg z78g>UyHou%e0seyP26FYZ)#3gs*wcM-8b5?Y?9HZ3Yb*Gy~|NWf_0}_M3*QZ9gf;? zew=d3F^pi?vn8(5oy?s`tIN+|lZ-a7kGl_Y*le0T5{KmonCWQ=HRjvIZO=7?)eUz) zd&MuWx=?V`wlsa6G{``MV5#u?@Fisd0tA!bf#4?i%XW$;Ua54gbIn z2@=7CJQNv-W4_J5DtpU|UMx?uV0tWJ8Q68)G15oCmk#-s1mkRCDl}T;XY|&u2(&oW zpB#$S`urxEqn)csMC}1n61L+H&u#%{zduQHf5qm1N;V6c#l-%lUyDx@cSV%G?SOLJ z76=@+G%e%X6&|s%evjt^wyqu?ad2}nR5{apZ?@~t4#|c1S3!rO(H^A;26LO1YHetj zlY@B!6vB$F!9)C6$z9dmsaWSK7(qSt(yCTU- z_>G!g$FDdA&sMLaA7>=&+hh87=%zCuGXd@GpTUBQeYxlsFL-4Q_vP5p-tq^2;?s#= zrS6?`d4kF;fmGJde=}5!ET4NXVXHpb`}4rQZ9vfvrOc%2mJlZuN9Pb%d_MMYy5$&# ze?lclR^AnsW6-Q>7tN2nsh;qudffc zfk;-xo`9rcYzOXU_~Ks~2kaoRIuTA$1i3s3ZS+*`aj@AvkZG!Rfy%-4Hb>@n zpRjEA)%G|)mR6Eyl3dR*sq{p&*fy5$A`4mpmx4a?l9rrc<)-H&JR3cRi!eJ&CZ!$> zSq5$Zr>=jAu6$O-pKqvc4pJs)C(ir8aJx4B+KRg5cd4bvWCChn#U|8 zT%Pj?{mf`xyDdJVfChpNKH9si3L1-guQh#Njq^n`xuC@*e*W>9gwh9LdKtBKv*jLek^}M;Cs)fI7rb74l>|Iu#jxr4wfTDq++0|vVB1H@D3yX^rlp;Gk z^pLt3VR?Q1=o`64*Ox@!_eMBvg(h*d100h*Y;x84#pzPU6wcY?D44uI5C16gfDm zbr;{5#(U!A6z|Q~0uDj?4eO|Toe(Alg| zP`yRcx$%ebEnBgRf3dxr){tD{=&o0%Z(`Us;rRpQ4))Xi5Qf2b|IEMJHcXJ3e)+=U z8)mGu4CIYQyJeIrGv&B@JhJHlWlBwDdzmYtVxADOq6;cG+NPF(fq%1z*FJZb&7gf4 z)2c*DRqQ;g+-iCk64`lVUhQ=pkZUZG5hPJ-1@6n20deKt@q=)y3Jtk-BNugUjZx!w z^~~-OS;dqTto&IqLu+4zGbek|*Ki!(kz?*YWxaq4vA&l$c4pLD5O}1mC>)ttj`&#Y z(8fFzkcRSrpFR9gQZZ6u8T`%qSZ=Dd1A;Ds z(~jJfgrC_+MsI)f!5PW|P^zC}-s#^$Pd^k%7bdb#zl{C#$LIPXwdE%LO1J!yy>!I) zyYOktSEbpPHmxiT)}=oEZHR4P3gMDwdzidPs^imN7bi2Y2j6T#@qZ;_b_kL<;SIv4 z+A-vd^D|zz*OhKZ5u)9swSmiG=M}rcQYM9OG^BoPKhFINaS&Lm-D9-7+pDt-cx{tObFk9JS@U)yPJoP&5)|YqdU!?BR-=_1X$+WR} zt?6^B9N)nkQ2KU0lr21QtzyI!qI2WO1US`6@x9fpq!)j|h>1&0tX;TUzlyb0n(>?e zymT~rhH(*)Ed;hqnifwy>6x;%I)m5}f?3W#a1tl45V&@iw(T=;O0IHi1$Z7BI`H&N zplKlRQ$1evv&5^KryXG~>r3+tO7Ig$7NZnD@VretjoXJ0ze^W58Jsm8qc;_kuQ z?@T|<|I58K2N9b#{_vE4ON~Aw59)kT9`=l!^!nq1j1Q@FxZQ@w4}vw}R({BBUN%9y zy#B)1#2=}>4BkZ!Mmciv`5Hv!3ixv7WneYb`bn~ zZ@`r~yur9}O`_~Tx{rQb^czLWd6lBtOL zc+4pMffIGExJyxYzI30<{(OgM-KHZlo z<2AN_oY^7x=Cb(zun6;pZy0!-n5ANk0OcbXFv{^e(Q?^Gn7AZjb#I!#Ls>F5ISzUf z4!D2w&d*krK$U2vcwK&U)yKW)p#t*dubltM0gx2khIMCi@9q&E|Gzj1SGO}u^3AUp z=0GKL+>uia+G}!NN!)U7^pCek-QYFwM^JF}MKKkmPloLVPDXt_WbKcC!PoauR#~64 zeKYlszY%-y^XX0$6Wl}I@;RJ{)=bm(`FyH-&GMrftA+OEDuDT^y4UfAK^Qy6>L1Uf z+)KnhY$E&=^HJ>-xhptP1EG)iFyFfSpS>2R3x28fKn1}*eN@b_+OZTJH|_P!+6kKm znuaHLeEor;7C>w6cy~1?cL3d@uSb z>jIXL&X3~bVc%o51$4FZ3#qvOZQT#SD7P`+SlZ^rfBFLXuOxDQ!GkHF+IjZ~dn0Bi z6_+gpeUgRc=hU%y*x?snDsYBACtuXKP#QI? z+WA7!&`RiOcfwu8eru5k43yti)ZyqEC{lDR_C8(3T>w8VszZ-;=n{!|(o?nZQ_YzC@h0em^bYLE=vq^Ui9E4XpquBDCZGZhlsFXk${0W}dR(&BsM{Ol zM!R)bC*>UjcisD8HJUQcTH=b-L8gXUNPG%;GL7Y_+Y-yo06A^$a?Xy9kIJW9-lR+K z_g9eGa~g~~G+)HzD41lYes@GjJ(PYh{^A%hHkyRpir)?k=YUeRy5*R7tX^p_W8>EM zeIa5ybxauB2svW!ln4x;A%7q^DAvXFlWJY5pFRJ>Pivd*vdGat&Bu$KQTUFIOP6(U zkFd(_Ism3@rR~^G+ne3wSF?k7o7%phW;6U1X}8}@OceDS;&vNDB{VVVt(YL~BLa5BUrune%)Z{h6(l^m1q4Wfv$7+nKUyOBexhZ+lam^+O zEFEBTr5LeCeqh^JD(=Mx(aRJ7*P;#G;oz8a@)Dyppdj43S9-^CN-hT+6*uhSQINSH z*M)Wyx_pUhKRhxkKWBC{=m{(iLmy>I`N=m_N~J|wcGCAqObne5+Di894K4OknZ+pX z3iK??d=}~iO6NRW5VPGG9sjio7X0@476fmBkNT~ay=p75`Zjyq*lA(=#>Vf7HA*jkPGCV)EO<8-6XoK*SJP4yce6asVl z#Ntnw$JM0cFefw|8yij^Iy^QVwY@4_F|0Cs6i~CMTD+Q~yy)a4RX=Ey}8onnhKuT`@ z7?BleRFMT;pZl)*%Zu&h#6D8AoO0ip{oWE@bt39wO-_GRw7G4i0Q-ys2Ic!kaC&dz zGhV@LnqlB)9HAAbijdDccH0%+APgYCQEX+CgdP;*56Q1VDtO61b?Y~?2mHEPNP*Xv zDyk#MkpA7omlK20=!9M`)~jpA} z2+w*K7GYVbKoekmEwS%Tp0XwbxL!7ab~jlzy~&e$O~lOA!s;qPV3ui?dUR7s8ppMS z@cLD^aqQ!#H}G{LTexRnMzX+?Jf&IzmG@t(ZuY|$xHd)MlK4hNqVA%@>@hl>Fvh2HCjNm|v%~f!x!m$;{R*$}SW4X}@tF(tE06AF3@r45sfQmvB@h-*XwBf{$&+4nysDrb;zQxg|i?6x^_rY zv^(xt0J;<+j{r>z3Bf07P&$3e!mOR>I4-c_8!3@A{1+nIjH#6hGClE6r<{d_Lmyid zzKutVaP79akgKkUuE6d)?-GYunn+=5N0IJL2KM!xwpWd{yI)sLUD>V++@Uf6KoFLC z=#6p*-*6iuB&cwAyjSiP)V$}WQ5@vvu@fm6@X3Nz36%KtGC&9<Tc1{S9NAn@GEnAuANc70@2f8SEb-Y zuWduUl5B98^s;IQ(pc16e!Bt608M+_&rsT6g|dZDS)BT8?{e|rZQ-Hv)76XL!fe)G z#GrFdW)mVy4a0hdz#PB;*-c3w^{me6RC(7A8F}hHLgWW5NVN6!#`Q{D2|S@>`tp7J zxThRb;erg~dl`dWad>~tp0fb)Slm!W$tEc_G3((t{0ms4C*Q{9H^44xaX85@EmRO2 zNO`dBaW7IW}BC~|8!Ls(05=iC+B@EFtw?Q>uLkuJc zAb|u!jmPa_I|=_0Om#pk+_hw#e_lfigIW zuPgH(s;q4ekW4}V96&W;2L@Zf?^t(fL)hivbsaEmS?$2t+TCZC_2w5;<)4AkDbF=s zpt9g+bhGMgX|hzsFzUmbf?GpsyEb+#1kdQ*kQma#8`s1=EYInTAH6@Vt0)rviLXGx z>NhYUyaG!yyf|mb3A5r`BP=X%KV%8haOIf>D{;7-MW-df?q-h(yx$%INDkDi653a7#aOe>X2Q6k z_6JiXGs0B?0N@0eRf>RfY{n`W1!mRWjzsAqPZ?#FZ^j_EE%h&|U|I5p%=v$qxL>f9 z?;)%96nME-mJZNlGxgF27i%+>+mBF;Y>8=rbK0!~IhPfgyuSJ?X2qgJ3SSVsl^5!e2LJMQ zuIG7DZ{<ze>wghs2?D%g}Mp1`m{A#X&n!2G{QfRisxG=jh2-p->N~rlb#;_ zY!CH&*XsaZ5Ea~Lo$8FonP^+$-UJu-?vtP#)>d3|*b8}nYlvt~4B@I&6+#cP#@x(r zJ7Uf@lZE?{xxO-)E<_P3IMm(ASbvQk@8eYPs`{s-4kL4Gbyy&(jGdO<+{2c)i!G|# zZ#cSz`(!?BAGO3?QrFB{mR*`)MOcQ+?}o0AsW-q-rRkRHAONAkA8Y_`pH4OEnbHzeJ) zf1c0!haLHB{Q_d>tVt}6*M$=xpY%VZ#+-6mQlBm=vC7pjIV;S@IWy*3%*K}Dvp7)x zm^{*&C}eIiX%XY0`*yIv6uj-F?K5x8QZK8Z@j#Arqp2m`JqSMUNC!?GG^s4svz3^& zqM(7e>G{gpEENkT9;d;r4(`(8w-YpBg0Fw*X}lpOf>^XMW#J`{yuj+T#m;~hF0s3d zaskoYQ(8~Plr4lhh$4z})DRzZ*@9RJZLChj(qD2I>^pJzO%5reOMF)i3o7rhXMc2p zD(5Y3vMp&aq!1_!MLlI>9qxdF`EZIOWX0E^d%+@UXBR0Mo9Vh2DGykINz4}lac%Lq zLNp=)TEG~)-7^X$)L{th+A=w)fI&~dd91k1)*icmTeo#4gTR5}@Ivozcq`>e!f~9r4uDKEbfwk!xcmjUspN;%+5x5X`?b_l~;)=JJe(Yj;b#v z)qX2eEz@SUdkN@75I;JZ4vO_4_442s{6X7V=@ZFvI?kiHM@O?$Mvn+17VG+?ad~F4 zkvKPRI!`5z%3M^^4_(#9tQ@Zvu1&gdb_tUR$XvYq-DAhxiU=0PB>B)eYv=|!Y_jNH zXWHXu^XcNVtM4v558WEuRnynIQGODG>P?t*NX^v|-Mc?G*yr6#b+zcjg`-EvN50n% z%h2Qx7e%6KUEs6l5&DV{nsDa}tyQ75WB1PE;d94j%uja?)js&lRz%o;+N@yZ#&#Tj z$)8yMSuBcb^*!gf??(2cv(2AV!xXX(-D@voy*|VZ>Ns*J2Mh(u!Dd+Lx1`LZV=^xu z+JbVeXw*e=yWIiA#xrx(8I&btYTn|X&fenm!AnkGdB)iReOsJm{bJ(H%g%Ft77om)q&XdIvM@`!8F%jlV4f^H5BFxWfl6H zc|#X748jAORy9A(V215J_z1pR7p}aRM>%DGF7cX$IVJQwg}q&>xBAQ!crzjEMj~X* z6ip2=y1kZ#VfIYqq{{58Qun-%P9)V4l#LK zjXux2z1(o##Omf0#M^e;!h4&JMj+;x?EJzs^AoyHH=DS-R`7gI%1$k4p%ZlNYR}hh z`^A)dkG^sCR{3U`A+GZYH@#U6kJC2EHysJ3vaKvQ1ifT1L+TsQlLCSuu`GyY;B?M% zX9Dtrtl1sY-f!7C?67;eP$=(6?1;|fkFY$2yqP8rSa@dKvPlfF)hYmS`wf( z4*QT3G)rB<4s?d5a#@qpp~55B&CLxl66Lp;$Yuk7kHZT-KDNdpAIfJj=(qkSuPpz~ z8w}tTZeH)$S{nVV6;W@HNi@xR05AE0<^X)EbVp*cu>kS3`Ytu+6V=Q!b8`Q3 zO7)KCXPMZHG*t3D8}b$QAy+ZOW?h{{MjzYML6+Z;WG964g8PD3Tib4T z8eA4$F^nq6Wl-TaLgn&KGsLPO&Nw8t!>fALvxYbZw0GA!`yg9vp*e{p7>S(2vZnfOWC z^KmKW>%X@LOPcEP&<*@XBIM&VXmLqwFY+C?TZnVYhZa9QvN`JD&=WY12sr`~z*#XZ zIYEJydO7Ee|3@H272K_vZ=797vwwh)XJ6QReEYo_d0n&ARvoo`ZwS^`rb5TMDK*v} zOM5ROF)Mr4WnZj@9uw`3k7M(OcT-i2CdKc*7MW}BUbcz3=Syg2euX8!qQD#U}OF=GOSwCuA`qrF=f!))N`!x8R%nFxQ^`xmmNS>qpp#v4Dsv|VLGQQ#n3|!BZ*;+o)gQAYE$-wFU2dFnW(?>92xQxhui~H6@2ky@rNz^NgwJ z7Aa9zOIXfEm=$$Wxry*bZ1MytBn<)-eeTzylK7fm%t^f0c#4l-=!hUFpHL=cZ9q%} z-7cDNzn1HMZJddtHj#$1)kc}k3=HWD#E+xYh;$@{Xv)BCcF|AKE7N4acWF6VLgplf zY@4-qFV_WU3ZO$@yDKKRUt{qJ(~pf;>5j}uhv6LO`f1bq+bMDH<=z(&1ni-qpFO^E zz&+1b7y2rTdtWYOF)FRyk*o>!JER-&r3PYn4YRYCn|8HIt8 z?(M7yhW9vC-cix`uq+V@HD@%gSI{eB-*}1(9;sTfvF9H5>izLRLIl)^<$9`-8^lDx z`##4$-u2bBqp7B3adY7{ZL|vZ560QjHCPvSD~tARTynn#W^d3|grd@dcIXjGrsGUkV(P0Jd8%T-xi_S#qT6Aj;8G z4CTU+zmZ*X!*GQPr%e>fePB{Ef|7=rmbW=QmXv8xs~K-w9(F1s@%v1N2^@9QVAI8u z2p^pm9sAIIUMm_cXE66Ccy{fLW|?GV0eCKE8l42x->_C1G%C}n&*$4_r<}lX_C`>K zyVt`+WeE6i*B+`JI~i8NqZ%F09(pi(DYU)QuKhVR=KvMq*~ha&Z)^d&Igu#5Gu_ww z8xv^s!obNc;kpwZ^P2N+*-EQX<3QZ-vS7_`FDH#|t7vssUVh>GEZU&#{Q?_U!duAptOE_XgG8Cf# zPDHglQcNMDq`TiTV^NQw;SfVO!#EzQ1FcPhi0pLgJS$~*8f;&1ck|)<={=PwIK`pp zc>??sROV2rBfJ~rtf^Biwi1{oe0{jGV+|qrBA5*YKN>WemPv)yJ=t`kyg?FykbDCUErJB%f zACGyM4Fh6rUD|rG-C>rLE9vk=DhsLx%{XrPbjMHk#SE$XUk>wrHfXXU^W=F#CR|MYeDnzm>th zP{Qz5MVhxVORTPRVhfytLussGxs#SU9L3-4C z;OhRN^&%dG>biB}qJ7#~B9EjSD~N%(WIqxlL7z8pf)D~^lq@@z$pygnXx7muwX7Kk zgYPOxP`8)Vxn3)cC6n+l)GJlhD+ z`j!rjdWdyAEeOP&j=G4*=4^1#zx}+rS5}D)CjOWZa=2Y%I##e&-$8ph$^>hD5axg) zb&8iyWcF1ECF)TS5{nHZ%;Q2!5z-r>rNz`6!za}x1ZlgIXf`;!Y?PG43DI%7v7E0f zjG>bF=Twq>aAH9gov51m&XAXy4^TVdrV%BUo*G1GiBHsed>wnEG;cdXXS`T zaS?{Y40>7O^KVto-6xpS>6fdnK^}nFi>R=mE-ukOzL6Y79oY$3gz`M6K?-vMk#CKt zJ=CPf<&YPHz456=Io9aH=!k}9l$B37AB0Et_fjYy2%~~mW&6{IF%~kiDG?@wy2Q%m z%Ye-tJH2{nga7A2L>?6XU0MgX@E8K~VHd%qbPf|Q$t6S;tALGaCoJ^@&W_nm zXuT+oT!>nfdq#XzEP44v9L;g=s@nZ{nNvXTgI6vk(0KQ-@b)fsl$)qGr;#ds+?trI z$#gd4WnmjMg1tLV5>3NS{J5_X*rk%}sP|kIK0Jwc|I{>|v_bOY<=^L}y)N9uV|{}! zMkeILRmZD`J$}0|$I<0rn_U#1&}5r(o?>hVB}}aMkSj$r2bxGC9M2_1#?ehw?>Nd| zzoa4iJv%coJ8vz*KC)$+XJ`n{OcbV8#fx{Gm|e78JDc^=8(`kqzc>npXm1XK)zm5T z()5H&AMk>=%Xcas#Ey0g`4s~{^ z2MNLBVu+l3c|$gU{EmzuA~e+88EMxi;=+M2%&LAYp=pp>lc#xuDWX>I&0fDXq5M-E zp(uk%obN`uSaT?Os9Fk)x#j$98&9=%*tt2aW-%axLmg#~Xq$J8H86jp8ha4P?(fM#F}9_u86EZ!i$Cia=K$wPb;$BhMqulg_oJ0^f^L> z5ZZn^N1A`eG@t8io@}=8d*gKIZjz{1yZc??VL%uy9kUz}s%uh_`w=Y8hTDN~VlBDK zzl?P6E?H8MFhonnOlxeo$C`>ZD`|E)JiTWRziuF&1LTo6Wm_LIP`kP1jBx80YthuZ z?tqW=m|YEm$z7bUFTaGdGQ2UR?3tyRn9Y@>Q0nr;ejh*MN%O&*ooCG?UR^0Z^?xLg zn7kLj=)p#liCh0~W&98NC5RwXRwzNoz1Q4OYR*E63M5c0S1!?7wce_=@FNj=bojnN zLsX{ce}n#~GU48(_DG#;U&q#F32R(Q)@Fl9!}_p!{}PYm^z^dKnc|MZ6fGCF|17gM zTzUJ!7?nyDqY9-b0wmZXjlm5&)E<=HlhCGCs`QMibUhg%iVabkBfO)R^H}xb@+m;V zxsYHYR17uVN^EkL+&d_uKs2jfz5%WtBvhUGbjn`7ms>$bL|Yi z)w#zu-dGMX!~Dv#c~ryn?03gvI1M-4!S$_d&4b`IRURxoCcH(4V9ufDA}Yi;xg+`R zC2NH@QSo(ic&t{fp2Xt;;Q4y)T7+9QEy1{oPMuR`T@*?SoYR2Wv-9amS~rmjsQXWz z(cm8DeQlUJtWraizU0E_T&O`)bmo9-UQ{ZC*d=)}6jpGewNIJW32MCnF3(7cU~Tbf zpfkSW^PcX&6|$~TBtWtKOx4zo(hOT~l?)~ZchcC}Fm-xs^8s*+(_kSmV4h%sl$M9_ zWY%mJyQHmg%v-1mW!vqp8$@`H% zZs^#MJk&wlj(%RrUM`?EIe-J9E{$5uek)Lyb)S@x{amT}QWXrm2ZR&R88)F6OQrPQ zm3~@_o{08NcUX)jV!ST`wGw~i3h9eLc?D^GDFYGZr|D|3X52%wcLMgbTtUc$tm|l?s!Wpq6Qt4(>UF^|nTOKhbCx z(7aq8S6pzqodwmO-6qGeN*JC%iDeX`mqn@cDYpYaOfMY-o>nV_M}9{q=kUa%@mOU6 z{#2rogIl97L^}a)FvaE=WPpWH?qjA) zwnOY<-rV%rAL`0Y*kXfOXtvf?EP;!8lB>RQKqvSOjwQ|*W=-31Vf6hIXpRtxvZT7x zcp_CjVOe#v1&l7?c(1yvTldC`IoUk)=62>*wnxmQlBq8f;pnaDNSP*e*9rh3zEnEFn2IGuosU-ez07Hbr{Z?B z3pYshvOl)wuiOEd(=#V?|3zcRE zBqAvZTH?fu3KS=n_998HIMp-r`_Jr>9Ba--dO6&dWg;Yreb1Bn)_|0RC~``JnkX;* zn!a2iZC_F~+wrGZpW%0v0V!paoUsbD+?`ps6?t*{Lm_wj<%xoA1P+TVrX!XCQ2++G z5C**nW2PKyyATw+xbY%t)xa~|z%yP5&pl5h>ahAV5fN@d1{_1CDkALs7F99(d1}+m z?PivfsI^rp|*Bh z!AZiElQZ*m}NsGr?&>pF-WL+gyG5?fk@^7owv>4?VFts zWULafUr;(=d4q0i!*vC1`AL;!q7pvkDH|ZprBh(KndKr95FzD_b21l(ykeKLJ6;jl zvQBd=PF56Vr=e<>k0j?F&ysJXgk?1IM7JnInuC`@38KkkjUl{O?CipMy$jR-vCW%~A#dR9sO(d%BXJmJL+;_|eK zF-Kvf(N_ux2bSc5VwFPQVbDlOp9&30eucKOw*3cQ;aK)FZ|3Fs+zu$(;1$$FX?ik` zvS=QQ8#z2^Umzs{<3^HDmv=}&VKSPsT%8Qzo*LpJ)E^pX1zkTJ1osIW5#v*`ZNwmL zqvf60VVt4>TOXrzo(N?xgKAa~jxs;t>a^Pk4RS(Hc^yRyQaGB&56`;7T33`A&W z!chQHfMT*A-Js^fy(O+7y!X5%%IqU>p5t5~W#kS#`mU$UiYy*^`w5hzBd+$lZUao&2R*#x(HU>&gT}B zmAiGxUEL;@@K}Ym+VUp7Ey5GhezVxyqgf3;CFv&=1DL@9x7@a_B3@~!#544%?O9=- z<_!1AZ@Ha{LDvvwFNJQcw2T<6b3k_Ggmiu`EC4`$8w1TngU|VF7vwdr9UI|K9f#sE zBKfaT_&bIXB$u9SYZ>2`we?S7pq*W$HK{z6hP0RM<>*jthP#tTvM;e~iv`o*AxJgx zP^Wk=ato>9dJPIZ`3(|IZ>q|(2DQ>tr1Jt?;)s{}YMo1Mn|Yh#IZRi0PbeRA_h9Y- zAowk*Y#mOcCM4u-Cty_j4#!W%<%bI?Bsv%{(=ViQP`uQMi|nj1E;(fmozTFSlj-AC z<%pLBngvu!)&nwB$z8bCKsljCxAxn~UlHiAh_Bk^xVzUh>yoIMUFqjj6Ff(f&qd=> zHu39N0P$ocIMOjL6weVDh%Yel#%W$eJfF3}v5)BQxgQcvHV=>uH?r<)b!mYMh0A4+ z^;ujFV9vh3*nWp7?lyNyXsj+QzL=dMOj-7Pi`dMay}83Sq*DZu)5yf&!Y4vDaUy;$ z9|7IHm%(?*<$H-q6vf+Q=(p*L9J8ma)ejd#)9WybI2I6cQ!6Nq5VEjrLBsavcWsC{Zm>w3%O(YqSz~cF~$>KtMhFFO3kaySl%SH z*Vl|Dx{H`wWH&ENMGJO2Bxbj~8I|>6Xg+S^!*G+wB2zCpakLqc6)K?LK+{Kxctk&w zN$*J1Lety4@09>ky*v0&+jeJqEmhQTurL*0_GYrTjNYP2a$i!aXll=h)d5#dn6lcb za8D)zSr^i;b5;~PflMKI!J#+6cn|%SCC_`Mxymv|0 z075N87E08p;BOak+_|Seju{8lE-QxOWK3{SoaOji?!#DKR; zwhdh!=CVvEgxp$dR?|5P;I<*-y(p=*7v`Er{vetdkHz8fWY=3B2UYi)Mm|l2cJ-r$UZE_vsPg7T8-3#8^cERJqOkt%ZBz(PFR zBQ>??=QJuNq?8Vvhs-#X%@+tl>-)`Bb)(Nv|9PsZY+6Gs$}(43Mv_IRV7TTgA#q9J z*mT0+Yk_Hb0ZCYN!;zjo4at(ltQA!^3xkslxh8jMF18Fs7_>8SunK9XO}wKeo0I|{ zO?-JA9Q{}F8MG*4H5Nk_z?(FfyB{1A=3_%t5NB2L_b6h#W8641CfLfh6d=IOlr2*S zI5P=kJ#y$G;g+!wZS6^>)%C2jk4j_yIxtd5x&QMeRJ~v@XO+LxWc@b{P8nSITLNxL zvaKv|tG=D?Gg*=dWHKRkv{^Ra-#JNT(%6WDm^6Eo>CWb`aiO%2OiDV{VNwjyK=~vxT4ZV22>I)BuvhlT0U&{Xm@yS zy%{RS9X(Q>r*^uaoQOjy@pGkjRJl4Vv$e19_tz zp%kA78@4JKm1P(shnji^9&$hie8n{^dG-MxoZT}LP91_y_Ae~DpC#2jwyTUzG?EC} z=OPk*A>5ojp*I?}hia^zfHAPXEsy2^ep(Mkk_e-r4w;F?LsHwJOJei;kuhoHP%_Q9 zb04@Mqtq;TFr_oSQ9VOgLlPR^<9P%Ac~Ht$GnBT3uC%^03{w4`9qUo_5imbUBtRcY zW2j7zzCHV(ds54rA?6{Q7q}4NRuAKmw&LOoSd4<`x@gLY;%;0POX5o{E5i;W`icy> z-cf48aBp46JsPF9@Dh5CZu!z^k8nvQE;a8%Fa7$%1LKLpM(@)23^SXuClJ|}-VPIq zcJ@`4j@N9Es} z>SHE{rWFm)>0-)6rv&!`%|2B9>_HmnYVdnlcb`GV+r_#)zxmneo&8Q0?SSpX1+d!Y>obyttyt zHhZC)NX)F|0KVI*y#@G0px`#?`VavTaJhb(a?u0-Q=%Sj4CKx!ExiDtK^BMZ$hF(B$LuFUM?}!a zR9GxzI(xEdAGT2_B;35JqgaOHA?TH8gM`LImE*=3p5l(mX`Z%;A__;{KH}D=FGd$j zW)I6mQ4Xgix@D)jf1qMU#BP)~9rMD3igN%Z+-chRjJMtT`ikMQe$y=p*;s~=Rea!Z zUcssc&@vq-;tPkS=Jj#{YkSA|9sc}>y#=uSOz?m0&i_(t^Lw_wXLp8MrgUXu!)*xq_VUdU zXcvkikk0M}$e#N|=UT^Ubw^?nV+9ZFd@nPs!ejWADv+Jz~L%;i7IBED(6oT|+p^Yp! zd$8LOg2{nA<)o6Q)o;b#uB9Q(9y)V}kiEBGypCm1NswVellyFGHi}UC&n?9lR)kgn zb{5>3X6GIntSbCW>*H$*iIh?r#n<0!v>Wh5p%ugg0SUz@q5O9DD4F(?A@^7;i{zSX z;dq=+jtcs!0LthBc2%1=amxt_>cpsNsCf%l56s8mF%!4Lfe^&ROWQ005AFp?4I=z* z-Ml}I2rGWeOXy&)W}}nTK9oP1#!e(ki(aOdg;G&^M%wB3)|Bu<1--&=D0P z%t_>7Oat=ImBYDK3}v)b{O0DoAHKb(cinxbeOS-F)O9~vJe_}~Nj=%ltmgoi+o{UG z{vjv)t!uc#j@n~zQs5)Nb#A8WLq-Vp?kkH;9i<+pcmECh-@*aj6s;@Ur-9SfuI7Ij zNp03A^;0RT&5K2NtB4J7)|5Z;XWH0I*coPR)<+~XFt)h9oS)k>BgsTiYT(c{Rnzwg zVqv^3jA~IEzO}9XZ#S?ij%gtxN=%(Xh^uZySv+hleeuZ5Z~2n^ThlWicHi0D_1{0f zM@hqtD65C9(6U}PNhY(0LQ^hgV( zV?)-ye>WEl8PNs~(b;4~ZLsm;dJgcVO@ebVS;47HxxWB8#35RVqEPKuQ_X;iMx(%6 zf!KcrIoCb@pHW~n7R|r?z!><<*f0L3^8HiDX)b>s+2Q+Th-!;o{fR9$YM9)wwQajU zM~Kr$09�bndv8R1``Yu0uA0+7rU%ET`}W-Hxc>c1 zJ(jq!KP^`nMmgCyfx;dMI>kViGrE73;o4U-M(|KU!7b>sdyEgil#QC9Q) z41F2;db>afOl)83=dQ3L*S~cCIpnQE{KM@3R7?;#_}?Sr>Xu-We~@l`3lTfU?|1LT zM#z>9ZhQpTwtlC;EiYeed0vP=`%*W*%D=fS%U_`#*ploWzi&e`xuWR^$pNki z5x9K!>jb~ze6!|5BYnsFeSe0vP0&AADA4?0nro?vpDL_dk!xO|QE6YL+CoXK`=_c% z>Oa=%rS|ZZ*V^+ce{$;YEqL+G5q(xzT)m@ zPyabn^v`K9?Q_`(_}Se4b$pMBw0Hkhsr%=6{t6ihj#Pfh$92o(d-~OU=4?#tS9NeT zCom`ZgU>ks6Ub>7_(L3MenS=?5}rE-E+7dZ-TU{YmwwT61Kfe|k3^4&$qqlgeh6D| zVf^nSlit3=aO_*;zYqAwQIqDD84Y>|>$>kswq;pa3)4 zEn?BP5_0o7mFr2Bzq96ZU6A!Lk2bYyUB3-m27~>f!NRaJUb@F z{sAi^0S2U5{~J_*c$yPwV0U7xao_HEeQxE~$3%Npu%gXdm%N$y+lBv*2jts@-*5l5 z&(K@Ho8x2RJzf~Sg{>T18~Qu2pSb{Ykou0_59|m1@mT-G?El^k$@#^|e<+K;W$WMc zfO@s~vZ(=OMh=1tK>rgCJkTIr_)0j`b+!Kl(LMrH+roWai~oa!1AA(}cjC5-;(wHI zC*v9xMDl!oYYqN$giGV&_bp;Qk-+p*!j*$#(Z6?G{@2OIw#ysl51qo#Dm}7k4I0Xn zkHDKh;&^5$eFUEU!CL<@0tmWuY=RL#AM~I6I-di+{w=w&Rq|!OX}`31{gy+wh1fuV z7|}_OFTYg;x325DDLmW183B57N}fDV=|aeZL&QzeH|Mz6PMzEI-h$sO4iA3F|GrXd zotLjlc=NE*))l@jz8X!=gk@omoVW`bVpfNloQ|J=AI_#m#+0qM(%1%BHxv=!Kl{e_ z@U!Qub%E#Y8!^P08^v_(Z`RM!Hd>uXv?Wo@xFspJjeOJ)Y|nSTTP#-D`i5ob_^IkL zQgiC!>2lL_qSB7Z8U?~mk?gtb3_~1l9h~DDj3y)OQBDgQY~?(N^;U4HJ}3Vz$&Y)skS~0r$zO&1tp;l9<^LB8w(UDlhRU%UGi={9t6L%7vY^W@2L__a&9+?XtqAB^G0@e(Z228OfG#Fw3mH@Qtt!FD z|MnL|&i<#6|Iq=*mzK!k7Z9;c<>r zve*wKis<$p2g63=NSHq3XlO1Is5R;AE?+#vh98%|2xQk1-o;5 zc&F5*Y0SI=3%^z&77nX8xt&TD35K}r)QF!%KD(W22e~T$DHS>qJ6t$!vfddolSqle zGI5ED;A%l*4hsL1$U6*dBlCO&2p=24BnFaiEu5s=44z5TYQ(y;yo$=7+O@PKtMIeX zIa@+|Z$oqCpk=k5a4lR&7Uq-C*Wg%E3AobXy$RlR#IT<@8laH#H>8%<-G=7CqTA1^ zanP0?BtRpn&|CxB5nL@OR-y(hec{0F`m;ZYyd^XR^ENWY4maSMf*sF}`*|vmGx;Zx zw~~u)l{+k&_)EZV{Xc=cg@!r}x;9&N1&e0>7VXQBf6a!r2Nu26;HT{%56obd|6Sy8 zGzzP4LxrACbrA!Rv%pg{DpwYT1$L0PPXFTjCo=PZNf^I49$ICYTcP_eDkzxcquQ#Pcm zDcP2K*5c7D=};6@kEf3a5!rykXt(cbcD&}oQCzWI>b|l`-!SuiHq>eaJhW`Ib0a37 zo?bmA+j{%#Xl|&A#G>dq<&)2lDl6M%9R=61$M5+}4;<({kqNnSmE#Sjf#FKwk3c7W zhiEXLm&Cl_m>yKCHV0OZyBy8o??at@3?}M?N|-~X>iiILLg)8J%4n34xWaZ}-J1IK z0M)~e+C&3e^lhu^M`TX>6J#vgj)u5Ev`rAr7<57F_DO9&g8Zju6n_T<0-|wm18(7e z{(gyk`IbWldP{%|@ZTQPA?;^d(PSN?zRxoX3*EtiC8Ha60PE4PPsrNU+sK^B=*46W zZnN;ysy%|>C?iMvNsv~dFaL8aU*Ukf@wx9Ki=?3?whV_jhuJ>eq+9b?3zTW|eJXVO zHEPy0*_~p?Uypux$WSEz>Bd?Qfrplikh%{7jnWsx!#eR?F{AT1}s7f>^*y7uuPYtMWfE#%*T60`P^HD#e%h4`eQrRhW{L%q8UZGE?#-R54 z$GkmQICz{pjiD$tIWp4%>`zAeeGfTntE}yOce)r`{<+^3hyi6z5Np%Dawx87aGw2<@p?gEU~t^k&Y2oJ3TemA(aai`wpes!@!8X zEw=AAmR0~nPCGn9C62^q1N>q55Ae@W>C<5qPg7o>vMA@dEV{=*JE-V;GGozFQrer9 zYOYwO##E)kQ~OYOE?jYFnq%67MqnF5{;3Y;K1RLI<|gT(&Dh5vh6=)xkYZX2U)Axb z&WUSkuXKJN`S+av#>D9v)@`)dTPWYE#Qx2;(KxQ!JBYjB9HwtWUvzU(0w8EnE2Jrb+5=D z$?m_1vsJynVD|DniDVH{5JUodVVF(Uy%F{Bg?7$ zP-fAn6RelFM?A8oeg?rH^UA3Mivioc2OjrIWh2cmso0j;)#=BOxe`1F2DVg5HcANH zYU$A#H|`(h*z&MHx(Xlo7J2KhU-A70S>)H?qPf3879-2*M5q4{JWSzJG!k$v#8x)b zz=1v6AMX*(e|rJF&5(rZAG!c%kJt`P&%-~xKrkiefE4Vf@5NM1&gk3KZLyZ zn9&Zhp5-Tx5TN+4Mc+yD@4MfK{txPtt!#+%$I75q;3w|z3O{)SKIwC9i*t`}q!v@m zlhpq)RjQ!Hc4*^2x#LOOxVNRs7oUsE({Is#oM&}Bqn*gQjGsJ5KdJLiB>xBb{&A`Q zI_9^0u$2uM|ClB<4q|t}gHM0*Xf|TO!T)yEY5EpfG4CwxkLgi0i!*1T0N1X z=ETw8?mB%}k6%qleUj#wp%%C{Erv-wvGQE zSuc-!4E*cNZ>vRHTx=(%cGV}3(qHN`fD`+J$mmd`Psk^BJgJ?dU-wJ?v||3~HNGlZ z5?F8%&X>pk5`F$nI=*6O>-N;=9_Ef`?32#_J$#Hdit3+1PDP{ssi6pH&Hovhx9Z2& z$P+H#sN!47b^fTEuT=Hv^c!TU@5lQQtUty%`>TNdzv6ss2ZSiW2go5%JbV}g9|D1Z zeM1O9$u4SWtKx+SOU+wGUTNtUQ8uvgeDo3%3O;a72!TQ%N{ElZiDz;b$A|NLrdHr2 z`_Wu<2Z&8`hp#S7H_}PKFV1@9H?khWFD$K~+i&M$ubEsse=?-*s))uBRY8?&(uV_P zR_(8*}8l2MRJNrjOZn9^09^sOGNpcyz&GMaF5JRl|9`2+!3z-6wc%NOwH zixmto0;Bx?4f2l*EDY`$k1AGQR)U_0q&Gg~-bCEVa@3sHp`I;p<+|W|vAE?nz2{aT z$4SV^YjRi4FKUrpqY#s9Y3O(o5$1Vuzx#=f>_HS0*)V_E)Ur{uh4Q3am(haH6YHi2 zBb9qL^HPkC+NIbfyz{@>Zh4*V$^PVZzjk#pixE`R%Ek-*({l{T=l##W=`id#oP^(+ z@M>_v{qU@3?D5NE;su(kjO{7X2A8Jio1SJ`+1K7PZc$s5TAe5a&N4%2yY znZVq;RdX!)WICD2CD->VQRnOKm-di1t9PrM_2w$LpmEtFH#s9BDxA>gitSU!m6F3k zOc$RinkISFMfk&qeCAoLtYlB+<#Lvjuq<}E#>nl>Hq?Ha#B%U}M|Kl-fm)SCL*Rwu z1a@{c^ubDN`O-@PLq5ijz@4~>7n`MWZ^at*Z>X%u>6K7)FZ-+vchnr&XE-$Bm3P77 z22`z0UxN;JKI1&;p;x&aXE<=A#K5ufs{4V|YAq&Y0Mq37`aO(hefP;~g&WlHcnW33 zxfcjVT^V?a+V_qS<%;UFEpc$-d-6L&2l#N;AeJuh-y_Xk-vPUNSyb``FlCf z`oo!rQ+Pvjcdr}StQ=oxyw2DsZ*DE)-RXZTbdCV?Z1_2TGH1VaGd{{ocMl7O3q<;9wJp34+Ab*>w1-|NL7?|U5`^Zww%DoaRu-+B_oTHU>Qxef1eV;8;iQt99i`v1sBz2GB|ISB&> z^^Tu=7Q6F#8*jT3l6SxTof5cx5lO*t+L0=Y>%zt0-gMV5X>R6u+_ahtHhtFhUQy9W z_z6Kqo~5-A={v6e=?rgo$vs|FH$MUnqqpf=XBJlz#PLgpOQEN_PFoSL>|biU9GlDg zMoIDwvrH!ObNeQh=Y9uaUH2&FK=VQEC;5qwhYXZ(zok zs>)TgwsJ(bX)M>t@3G;q#LXq`C(utwrrBMtf7V*z2_)U@j_z9U8%izY*s-!QCfX$} z)%;UWD^~n@0w|>Euicb0o68ltW|};IYw!K{c2{0o;~Ro6Y+O+^8?j2@eI@$hT}g2X z@Zzww%u3k-%jF}-ivV~=zAwM;826>}h%&d2z(RP&W~bQ^lPeDlB&|t?%T{e|4iwJU zhxJ{wbiKTnWWmH>1%KVt|K-uX=iX9sH52w`S4a{0gfzQXZF>^Ltmr_yamr?>1TgjY zdn`^`GTL@2PrcRl!0zg}DYS+au}=p)`Iuc5nT}Z2Rc)h7qq~th`nJ#b%Tpb@7aM}SMGr6J z3S}QB7ofLRnG3Mi&rHHS<7#HS%*HGBb}Fav)q$lwTy`(Y0w)^OW%E$PhN>_&JaNKE(6 zX;zPWIofy~!M++;w!K(+tK+7P!UTn@ODl<$EeoGct-y6Xp#&ey%Xg=n5_`8k8*Btk zfsQln6fHNZn;%-+Sl?gGNs4*+{9aqF!)uBvRs&v1&~&e{dWAd3G+nA3@Iz~xMfu%) zcKV)8=J0vxheT(^gIXPh+PaSpw8WMil(KJk#U zG4ScjAZIt-*YB1?QV-2f(#^c5Z@?d-2=P69>-eFXOZ{~bR}ajbdczPQv1f?&BJ1%f zsU-C`v4Q1x&wohLKFpN!*!ZAU(#hZx>x1vYT#aP_Z*D)LGVeN1T3heimw91=4VT)B zr??YrE9-^L%5-(31dsW6)Sd5JImBriC#zvKnpgV5C!ss3<}iE2Wn-eiy_uq;ICN2s zW4MGvBB!=u@gDRML(Njr0^5C-vy#bN&ql_tMa@T%3=7G~v!InPUffkLCG*C=jO_`b z(Y@!Q{dtGV$)8shl~tQn+K%C0z}?=%D7V1Ol3a*0H6@;8Vh*@&mcpor^XITAPp_9l z4A1F}6r8+m3Y1Fn6BaIJ-nnoqY@XRj)PD+c!!j$Qg!MSpFtkC$zo*HK$CcIloSWqo zPdBk};Pd4%0!g_5d30N&St$-ugL83 zPVhFnvCt+y(9%p_pk^_J7`PoQwjy)pRm^H1>5CUOQ7f+=-g7v@;nv0atAom9vCXcD zTElxR!^6tq`uW+(E4%Zbq?&oV4q5nRIBB0s$5|bLYYLYO<;4Ts*@(Nwk^}2Q+<1FQ z=uR3{($lwV3agIw-6<$3h&zY!I9u3p2=`{N>*=vg;~Sh~MG8|Fdo&jeW*c6vcT^iJ zu&d$tPwo${WV(=VZ{8>NU-(6L^o8>zpi`=PRfEHB{5%j`C5-Llu?{F);tS?(TH<0933?H8iSLBp>; zKlhgR%~4TnFaN^#w?`>3`vP^O`n*aq_cgqkgP5(DZFp=nBDkWIBA+c6Nk-KBEBP?4 z`DBD$VV+N@nmoF^*S&*JO1)f|`{oPb>gz{LCL*3P>fJf-p0LqUG}V;d zsMGrV_3KSnaEqIZ{5kiY9UMt~)!P^`UsYrM{39S)^^Tf7rhGiOK%b1)ckb<=o94LO zlQ-|G#b+2Ni(gP$Sl6YTy|R1a;nm>j1Hr+Hjsh90F9gwpOWKdr>|eaQFeD#y^~1t| zptXy>qy-h}VEs>pUBX;Ls9y>HFo|_|M6}-pi^=aJ` z)@%}UP_>YEb5CdqI#9G{y8NB*vSl0B2JXLA#Hr#RF?oC4e#Gcbh%7g9m7pQ_F8yjY zt>%ZdaBq#_H7@RdSAW5-cuF!|NSgX%S-{1p1?^A-g26oFBZ+KY`9EI+q{x zV#IZ7V(iUj*~?FS-txS=^r-ZzLsO{Pk^P#dOuJPHi_>uVxdjFHq{9);*1>OvhMhHs z)gDB#KRIIiywrDgZ&&oA7tP$@4+EcL5zH9da9Ofu^FC@(x# z=K7KI*qe?M-X_$pr7td6!l5_<>>kmiL?>%p_2DS9wIFZ%*ho;t6VC~oX-5)iBds~# zk;;z9@+JG6zEd-8kJgHgqDE`%M>m%44~3`som7`oJgHy9ydcTna;J&Ltfz)5eoXHE zz(qqpxus}gZcHaOiSvv-cmy6?U{1fi_snj3-e`$a@$YVcS@d^vdvxDNp{R;jt$y*1 z)4>Iyxgeo)nO0*rpFahf!jd>LJYC+ICEUvLS0bRPxsYX^})5jC|YUu00T^mpZUB?Hzi zf^#|q=`7SFBp;+MCc^0b)LsxJ$(68{=0i;%@Hb&XFF>fJq83c77V+ocp?w^Vrtd}i7#O@fIq?na#J>C+0_OwaY!5<~m<=~v8H?t1m1o;i<&Ksc zvh+se=DNx2VoHf-ck}C-Z_G!J^{odV9aH?7?{1R|M(6jQ`XBdmx%_;{GL5iU-KpO4 z!^iov58iyb|Gy_c$ARst02}yF>Sco)@2HG<$#N&>PD9I!2HuTUFR?$QapGrA%@LTl zo0HD1a?|yICrsCq_$TivSDfj}N>PNuH zIphjO$^HxJm-Od5UK#fyW*v4%)QSdPd%f!0r;x;bD34}l@Wt-D0lH4ewSLj0 z6DaObv^WV69EyhkK@ucLZ~DG>?0v^Qd!KR7hkHNVan{HfdGcgssCU8Ni|8eppDHu*$Su00zUh4&(1HJ29ZW7T)n_aCa|Zh)BPj!O^V_?AO2+F zXD{@s77CyVIzJrwE6ZC^FjN0NaeVm(_dK~cQHwoMfMV~x3{rigQ478#aJ@qQw;#5o zOsddqg|)_t3T^p2eK{Owy>h+xW)$I8If5?~At}n22Si!kAW(%0LhxSn^^HWXS$wzg zUFVr9!J-uxoyXpy`^m+gRfw(@qWj&#-Qdo&2_LbvUAu47TENy)Q08p3ra6T!=^Foz zSc<#zwL$NoS@g&=vZ1`MQq6WQihn7-%??Z4dU`T>IEpN*6-3a8n5Eubrm-LT4ZX0hd)K80z?5y{2Y;j9iwn~^ z;imKd5$<5HYpCPIkTv+W!5Kq9I$?J6SQ{o+USCpxIH2{o`_R5OSD#Ajut{rCE^ZRR z*+|^+;nR6t6BWSSLq_S7)UmxF%ninRzOP|w@qxC%XKD?YD%8Q_s`ql|0ULD3n#m)^ z=c9Ndh!(|NTqF*b8eGw-===kiWMHA6-!pXtab08_Y-|PkIc}|0G2ALPO_di&Z0DB? zTC7avYU$dq2+PqR`Y$U<4}xwJ8_(XsUt5(cW$G=bW|@i&e0xxZr=OjUv{m()iBWAd-~1E3uY=kQ%brD_Kfu z^HVc+j=yx|&6it!mc3t;>LLfP2Jc z-dfnb=}jn6@wb9XB!Cm<@-^WlglD7C4`j(LhFnfXnYH#1MB@DYuZPDF;FkV@@d91@3 zYSg@k$*X2&ef1-|bx^yC+->*FKZGGv+aRi_Q1SEFcULGdTL8otovZc-Fg=J)d_BWI z3_FybW?&&LHMTpQaj)o1eG5qI5t=Dn^)V1sjNeiLA6PBwzcPH9@N-hhgYFNYmP_hE;6 z`s$+EQ@e0wVZBJ!fj-h?XXmPw1a6f-r)ZXBY7eaaE4`Z=phdvWrinBN!X?r(@{Vx;OWl_)x%~RLtA_ zrZT^yO}Pb^(R4!#sMiT*Uv!yCyCU*@XUp0iPpKL85177=b5@PIcvv~J9TB;o*WrF6 zo401StGNI_tbJ53h%`?cKX!JLIoKkSt-ajq|E0)=7GsL85R3l-AtsV9NadZ+cEY5) z?6O4qB3=w~o9{MnRN1eJxipZvkBg4LDhQ&LChi6{CX>O5?%}YVGJqjbPDjl7*Fspw z*5L6x)8n^OTRSD~GWuH4vS6=)TaD(mAG6h0W@I?%B<@VwApB~wxk9h`5zxhnAl#2n zY%F)r3QIV9N9uEu%pk@l`ikmy?ys^x!1?z74ukv-ew|-lA{ZN+0j_eKOZ+A~hVcWt ztI66sE@^{g3Pyu<@t#a2f_}?V?ADKY`-B85}#-?$}9Fpms8iJRAPT4FEt~m2BdpgE-h6)h9S8Yg$^z)`3A&VW*cc@lUVynIIL0E5qiBYTqxs` zk~sE!c5c*+3(e4^mpJW6waoAEg3<)^KIZ2HLSWFM00G;iH{A4L6UK5({@Ty>G zAWW%H@aA794F5W&LIA02Y+GlTWOM%I?|tZ*a-WmCfyH9lJ@JccaCcMojOXn3d#5)( zJhvYIxzZ6Z62Tknm#P331ME1sdAG}ICxvz$mGT_Yg_(Iwza{*~=|zAc@Mn z@Ze2m_t}GJGWwHeGM$Eb-^T1Ug)IRy$Lhx3@)=HHu(atDE$Uq61hvzKwL6u`YlYbQ;0;dEw#KqrK)&A`>2$A_RW` zmW`m=G!ACz{O$71~WDYiLYk(~C`G-*tY3 zy!MktKL|rUSY8zR$7-)H+qe;RS4ArFxzQPlhbW+A&wR3@vg^&t*fDbToc}{YLlLuh zrF&^VL3HgE8^C_8p^`AV2Y>v=?`Mqo(-GbS1TTkNNt_O^ohn_0!{DK~w1>bV&oRSv z?{mgNDns=4h!m}0^5mzoJ^k;V23SE}^Zj)^8;&>Ls1+~u%Efv-n;ZabVH0ibRrgS*nKbx$(!@)OEZOPH1&Z3jPU# zrBF;-BPjcr#*RBC?k>tr)^;+kRqVSL(yr^b=vDw-DwJS5i3?YMv;c~Ntcbw zRZ$1$4s$m{6$O!=etzc$R&sro8^x64ul|D}!g$skJA-0vSi0)TP@*@RwBPqSY*m+& zpuF1Q$@6{SvHdxArF1L9e|& z$cS6RXLJ|ZRE$I4u}44%eEjw`KGDtTQMc37?&(dBf{IZqWcLW>xe->fNBSi0fpdWJ zdagvC!YN{hDW%=+7F@d!IDV5S4zPQhDNxqyY7R;Su zntYsXfeh}m%0J;d-E4tzSe-v~p0QK;dhqbZZ*b#DL1EtH<)EgY4Fk97FIy$=8*ujr z_)NQ|@$X(!Qc3^u#V^fDzrs_4a!2o+`ml=0p&ph6PH|I>R)GAHtbM@H9W9I6%nSNSm(#v8f57?Zi#|`Iip_;PUanm? z2yz8}JCLIG3AV@CXl!gXDP@?yWSbY#kZ{%$vADDxFviR>>^ z&pBidY#n@4CRk?YEf)P#p9ITYLInZs<9bDGw(oR}4*Y26F2}f*P#J$Ul7255dHN)6 zC-Cc>=EPf@%$>Y@%$tjI$(jN8^FbC4$_TAJ|aLe)tB>CwXEX?858yE42)p_F}1KU*WCe`Zron z6}AMTuRuA|&?{<2rM7jiwE04`MKNX6)QTk0I{(Zje8Gm)qTrl+`FF)9#B-u4#*pPz zW+jQa&dvf6!P6sJ!^*2XXKYdNK3@n3(jz#22Z8VNIiDAR$j$P3#qq-cR=r`U9ZuF=J2CKc)`V=w={_OTY9C zESS~*c?%uAX3>z9-3@|QtOd7EwW>?zXA}3fjd3*Em^Zz^EZkE--wb9a4OCT)A4N)S zNOiTv005K15(JEoFT=v;-l0Ov$1G^|#yf2d!Q>ktAuWSR5=OB@H0G!@G9xkRW?S&% znIyBcAbZlwg3Rx@68?iL=RbfPc23x`DeH6M17W@cNfGPS(E5gzz!|zd45S{`uZGOEXqxOP6p+01Oa^7s{V?-qCZsuO-313i3T@Y7Ra$qPQBKk<;D)Wv5HNQ9cnfcta^4 zY-X+V3p|Z#L9OUTb&p_^zR|DjqR%&3<57JP>-FY3 z^Tp2T;61Kb1jyI!te^4Sja0-Qn}sKx8T2-fGgL}{Dx3S5chEviRwW1hf+=exHpk^lBe!_Xjphsf-qpT2H`zLJJ z!ECWfhVcRt71KQ{WtrD$;yzm>niG{<_bvg!_Ql}=^>L|^sFLN@9$qC;Rdef&JK zI$CeKMB%Kj#t6Tb#|WjfZ_>A|uE_Cli)oqwST6E)goFEpj|imric3tn(jh9N_S0_~ z|F~ZpKJR4-j4%RWGa{0B3pnR-jxsY+q{@bB(BPbyG0hBxE{;A4z`wCCS>2TalS~fG zYHBzrFwrqjJKuc%Pb$oSOrQSun^XkOv=6(jhoR7{i{zARvw3#UT_U41WB*%JZT|fw z2mVX??r}mlp|C8nHQWFF;lH3kZzz^>tKauLB99Rr`+6$;Y3?ioYq!W(O~;u;7c6pO zSo$O1#pNl6{DGIB{{E#_n&)6E>(@U3dy$KOr^u${Zjw6iIx(Qn`27rwL1mv%INX?? zh&Q`%U}oxbYgSOa+SAFhVwiBJN>{3i<>+CP5jk?vSz8N_a`Tk&3^E^n2B*HWE8csY-boTe`W`(+=CW(Kv9#f9rFr5wF zIW+GwXsGVptPfZ>iV(&AfY)Weg5s4tZuJ+@pU^h_1Nf$~(iwO#`&4A9bKxe3p-)#) zxw9WWUiZ2Doan^w#&+hzZMi^WtIwUQ+Zb;_Jp|5blUT-#f5q1eT^O7<5Hx+7uVwM` z);RDFpi)@6KxYZShdliQC?p>gW(fm19^!}Fy<*aBKlm*-c(TddcYu}LT4DK=<10x9 z;yal?{WzgAC2orFg}=O2jhT~V^{MZWtz-?!Zi&37MoW>b!e5-2oXYSz>cH#}wAr3Z zboqEnSlWM5wGa4(zdfL8TbmWRUJ8suWofm>^0VOG2@VfosW_SnDoBWYBWr9VJpmxLY|46 zpFWVVm{4`3@IX4waEmjy;wdl~HT+;=CP9u^cFG#wsqQ*&J6R0*_PBr}ht=y~^p~lc z?S%3|4et3y3&}hwjI$v;?WShmVdfq)tq5p^kD2s0zT*R-mOP6=i3m%KV}`=wOLb=e1sEnksHUKF!jsvE;`~m+63Y4sd2Tm;1+QIi&MhODPek5^elWT;p+3o{!tOq%{K1!2WwYVfsk}Kv6IwC)lC*L!xHKhveD>DJ#NFST;SmhY+DrSj?~Zw>F_rmM;G z^0Kdc2(-$Om(?OW2}}*pze`N_lzE`pZRX`TaC3X_k|C*gxFlT!MsgT{+0SnVuk5Zm z&CZVMY?u0A7--ua;~~p?b>Eb{tGBHf9mk@?reM~Sv9Ky;<~tWci3WrYG|kGMAWH=Hm}CL)50pfo#?$c2mDf+_4u0k+OG&n%ED@^hMaNYkIXAuozn8^=XkMPDc^GW zm_MPn3^RKMEm$1m*Khmsr2LH301;p%FyHFvt_b3({fH*vWo7^tE2B8GzRnNpakl+x zK|Vi8aHdg>c;8WW5bq=k#gN^d?cZE9h@^M0de>5&cm<~-7(y0T_;nZ5{tD-cnARh8 zjWbyR7P(ZuXr;EsX4jW;w(|L>uck*uYEAD`1SZ9I5-WbE@!a!S6>cd~tuR8Ic+CmH-4iuR6GYoBuB zF$3uv#giE#i*OX4zbW)2L&{VXL972wcdN*|Od+wKIe}tH%~pICiy6QCR9c;CVw&J= zndHs*Y&_>{ay41B>^d;pj=ze5IWaRN3OHU8{+N@Es?-Z8x)`t{xmF?IiC`XDEY!;^ zQ-8vQd)l;}L;}U&8vaq&f{gp; zz4Y}n+D!vn+D#k0ynI{x;Ul-hb|Ifz$4f4$F*=a_;^^u0;-XX7qnRB$1UZ$ysScu; zn_usJaf(FBN`k1%v9^cnWBXv8w%IQOrc@Ztfy`+}{%gZoFR2c<>8r96&Yyc5>3PDf zE5}``%WkU4BQ?^90~!L)Je1X;hu8fwAUwwi%`Ex{K=(JWt^3LCU6&yCyKujL>Zr>% z-cwh;TV%tIVOdZR%I?`yGU51;I2`rh37rjr@N4`=jy#{8x0h~K2~RS; zKx^kCG0&?6yz|cKjU9&_Kp?GeF#dfw3`>f*ZURC7%7s-fg9NZk!SPGZPf1Qh4o zQV6|cofa&-NJ>?Jvkq;%2{odej@^A6T^pMdekXvwkmO7XpLgbgCEntb!#@BSh_aa) ztIuw}Lo-|51Sp4z7a2tarM=IC-%JlZiQ1cloHdaR#ZE<;s)D|Ma*KBJz9Z81v+Z|4(-;^Dlp- z((3I6SRA^MqJ{83k1mW4R?k`^9N+HhBEzerD}FHo*7&I~WIXw4uu7sN3pJTto@*cs za1?`b%G1Bzs#>7LEyOHMT{*^cmoD|~Vn1duQF5xJPH67qz`j&kln?kkWGDK0EZz?; zin%UMQ&}&ckTWyvYyjriH-YV1F}1mY-Cmt+at#51!(EEGa~lXyE4+B^=X?cPe-m>cM_>&&I!YepF7?;fObA zgLtN3=A&F;{*K#+-wCZ&gp0Evb0GN=FAVjF84)~h{&}`~kC-RswMpg`(@!{=xGOPX z49CJ_IM~b>(iHy4LJw6k{ck$11g&mvew4IQ*5Z-ObwB<~QbyU-l$={u@*>dcZk`B@ zU(%jnQ3|N`CEb>{HS2U57eI3n7mF=p7I{~xAu`g^i@H1had|-6>_g*E2QT{FfTZj2 z%-2aC>eGEr{M8&T(Xa=2&DeE6JM8_Ye(W}YThWUQJ_noKHg-e1ylO3ysK0tQnl!Sp zfNHc}@k2khFIR$2)FXMCCi+8%QP9&QB6j=?CVBb+g}vZk<<;IA{yTlTdpfh((V;)P zQ3c39fVzfFda(b6w+N&b^?UFn_;Ff8!~_-bu70#7{;aoq2n)rCtkUSGv3EhX_77k$ z&S_Z`ZnosyIu!#I%!*{0Dh?s_MgFwH-=@aU5^MYz#Yx@Wb-*ttaj$)<@~yqYVKLKI z)fj4yD5w#YxZ-F1X{z6g?B~HWA za`fI?=uH@KaHP^mwFn19HfdEs%So;U3f8-r^P{Kk!pGF~z>7sq{!VGFxJugzgHmDh zHc#Q5qnj?IIttIDD zvY7G7p%Q*m3{I&1T72e>a{=A&@iF_G<8^&cw5M+8{jCq7=auR?|LTR(Q`f)%)n(K# zfdHw#p+^3uIGmh)rh_4Bhh3}CtRDUA+AR9>wRT!<$e+6f+~mKQ#`fsQK6ovuDn0mi zJ^->)WBee=?>tnbK`F4SEO0juMH$JZE_9CZBPv~*h&;35ZCXpG7&-sfNfi~%;t1Av zWEMQ}mjpMTr*`JVES^#Gs8KI=3mT!H<-TP=CZ5|aXkz?TJ5O6D0xvpSWs$VS2+aKH z@pj&M)_s<=5V~jo>`Qmw`p8a)JhDp)@1xyg(Z3#e zNZW84B!>@ci{atbHuD%6mhK{A^4^{hDwzMou*;yLddI2atcQZmC@ATH3%Y62AfW#M zl*EwqqF~eGccoU@TQX9G?FI-xBrSR=vAXwA0?+6fY3|0udzDhO1U|WbEBqL7>dWy% zN|PIjrCdL+orBn~Dy(5n6WKwm|1yYKr``TVd5yTekM7XC?fR3w9a)=?Fs9|`5i!VX z7w1i0{^3-A=*y9OmZFz1{|M_rGI{Eyz*h=NfyBN=2iFoAQm2jZz-dMBX+!EXgyO2CqfSZ|SIF?V>gRQ^?dM#%BqqJd02X>zcvGVIl;l6?K(#vP z?I_E_N+;eDrS17k0!iSNoRG?(Eys-J=6B{1^bzBNDc1Iw?qyTM)G6e+%0k;T#UN_J zA-wHJpZeDRC!>y&>}lpTSA1^r{#l z6d+t4K};WtN9kVZ^WieyOX@Xfq0t>lEo0Nlg-A0$$4Sq{Yi*TF+rRuCq|Bk&Y-^7t zXphQX-pNaHO^r9RDZ-$oc{;!!y&UJH@r_3Xpn|VR)xC2rj&?XV1^)nS6lNzhqZ45o zb-z&6aMnnU1pmerK?i}O3dnb!0HoXfUE^IrroC0g+hm6O4TI`NDHe5_OP)ukb(0(( zsc`A^r8e}$I_F_IoHTap3p$W&qC0V$qiBMiQjdPTb0PTpm0+rry19fT5!z5IKgIhJ z)(hp=vk_IQ2&QQj_)stH{wV#5STnOIpkOT-GdN96t9s&l-t(zw+ISADHjksU!TB`{ z^H4{{DOq(2tI# zT9CcYBY4P>a#Rn-wuioK@$9^qov`wyW@mBQ^r2VycB-ot&&K_e59*py5qwRmnYL#i zYxk~rKl#h;BCr15m5@93UV$_Eb5KZi)#mzP%f!JzmOayA`5ypLr-`hBeMAFg^YEgX zwiXuqJtsZnljDVNF3vRDR1CYfQ#veQW3+^K;0S1A+1K(JKUZ2|pJoe#JzUTJr3=IV z@fu2KHelmRs8qC@spD*VCUlWG=7pK4-+IWrI$bCtw|E4>_8u9}~GP$6;rgiz99bEzruO{}wN0c~rd*wnKO{)v%xhs+5bAz9C3OBKoZ zv4b30_YZ2fPc$(sGZ!&ovwG;@M_1Hk?@C*f_IR!3d{k}Pd&B13Nimw!k zpEVfn2*&}Q3XmuI`S`#wHQ%8ShV1{MaQqsC+)t6lQcO6OqqCZu#+27t{?qY#>5As;yS8Fv@iOPGh{`(Wm2Fv`Q zkU+*fDhmtl$6s{w0x&-k&~ zXSI5Vfc4u^Mnvd7iL{5=y<8yK*&QAg2tPrGWe!?U_{F6n-+0pqZ*qe=JQ@C-+8jyA zqOK_|G@{hel{Rqs!b5184M57*8d2qw#88)5&+J!cfW@{~^WG5VxP9k5Eem3)DJ`3J zch&Puk~v9@y3nhpfk)0?x|{D#F*ue4Kji}3H{I-=AH(atBG?;{we@!r zn6UjaB$)$m29sM3Cea^1u|`o`*c$KK%(GWG`3gn4*2^(3KKuRlei0c(W_x>2-qc_v zC%@dtZN6=desL!fjRT?=IO^T}%l5c#Rp_vyLU5Wz20wO*xAH1Uf3KXuOdf%^W^^C^ zATDpi9-}#|@6C=S3)oqCFrI@EI*}TjJRD6d{ONftqb}JL4zo@pJjV!9d_4|_#}MTA ztZf+Z9NIj7U42}ecR+1e>9BO=jHxQN|1nDHbwu;)Zeid$xX-}e`iRPXi&pt!Gj1ct zO0)nSmDq4Iv~mh6{XF?QJOZyIT6N}C#bYx&^Mn6$!GlW~W`A?iuo7)a?R{%k7sk5R zdlA&{Ch~Bevo@dG2i!?NEls3D)_oc04`>->(ex(45AaauSOpgKdcBp9Pm_>cW?Sv+ zkU4cb-@l-G_hj8LnkuL(zxI{DKF;w%VX9%<371me1t<<7G>f2gzMfi?l*xT z`%mzQgSEeqr+~!}6>GkO zI|@obSFELoGrCQsLQPn8MMC;wqc1cWf~z&|0(bYx@AjT`NrPz%erAV!rc=MG7D%{u zy08-P^5qfTT=0~!TTuJo^c=KJ`^1~ZRkXrASP6|7^6*%bcD75Q1nb{(e}b&(jzY-9 z`}2DwyS#&`&}Mf?2m+C<-VP#|4x#*O#y*E9=k0Xc&d!`dCWntkK3`1}*xG-&;*Z
@@ -65,8 +59,7 @@ response.results.first._score response.results.first._source.title # => "Quick brown fox" ------------------------------------- +``` + +Consult the [documentation](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-model) for more information. -Consult the -https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-model[documentation] -for more information. diff --git a/docs/advanced-config.asciidoc b/docs/reference/advanced-config.md similarity index 55% rename from docs/advanced-config.asciidoc rename to docs/reference/advanced-config.md index 916a8f84c3..a05d51340c 100644 --- a/docs/advanced-config.asciidoc +++ b/docs/reference/advanced-config.md @@ -1,14 +1,16 @@ -[[advanced-config]] -=== Advanced configuration +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/advanced-config.html +--- -The client supports many configurations options for setting up and managing -connections, configuring logging, customizing the transport library, and so on. +# Advanced configuration [advanced-config] -[discrete] -[[setting-hosts]] -==== Setting hosts +The client supports many configurations options for setting up and managing connections, configuring logging, customizing the transport library, and so on. -To connect to a specific {es} host: + +## Setting hosts [setting-hosts] + +To connect to a specific {{es}} host: ```ruby Elasticsearch::Client.new(host: 'search.myserver.com') @@ -32,12 +34,12 @@ Instead of strings, you can pass host information as an array of Hashes: Elasticsearch::Client.new(hosts: [ { host: 'myhost1', port: 8080 }, { host: 'myhost2', port: 8080 } ]) ``` -NOTE: When specifying multiple hosts, you might want to enable the -`retry_on_failure` or `retry_on_status` options to perform a failed request on -another node (refer to <>). +::::{note} +When specifying multiple hosts, you might want to enable the `retry_on_failure` or `retry_on_status` options to perform a failed request on another node (refer to [Retrying on Failures](#retry-failures)). +:::: + -Common URL parts – scheme, HTTP authentication credentials, URL prefixes, and so -on – are handled automatically: +Common URL parts – scheme, HTTP authentication credentials, URL prefixes, and so on – are handled automatically: ```ruby Elasticsearch::Client.new(url: 'https://username:password@api.server.org:4430/search') @@ -51,37 +53,25 @@ Elasticsearch::Client.new(urls: 'http://localhost:9200,http://localhost:9201') Another way to configure URLs is to export the `ELASTICSEARCH_URL` variable. -The client is automatically going to use a round-robin algorithm across the -hosts (unless you select or implement a different <>). +The client is automatically going to use a round-robin algorithm across the hosts (unless you select or implement a different [Connection Selector](#connection-selector)). -[discrete] -[[default-port]] -==== Default port +## Default port [default-port] -The default port is `9200`. Specify a port for your host(s) if they differ from -this default. +The default port is `9200`. Specify a port for your host(s) if they differ from this default. -If you are using Elastic Cloud, the default port is port `9243`. You must supply -your username and password separately, and optionally a port. Refer to -<>. +If you are using Elastic Cloud, the default port is port `9243`. You must supply your username and password separately, and optionally a port. Refer to [Elastic Cloud](/reference/connecting.md#auth-ec). -[discrete] -[[logging]] -==== Logging +## Logging [logging] -To log requests and responses to standard output with the default logger (an -instance of Ruby's `::Logger` class), set the log argument to true: +To log requests and responses to standard output with the default logger (an instance of Ruby’s `::Logger` class), set the log argument to true: ```ruby Elasticsearch::Client.new(log: true) ``` -You can also use https://github.com/elastic/ecs-logging-ruby[`ecs-logging`] -which is a set of libraries that enables you to transform your application logs -to structured logs that comply with the -https://www.elastic.co/guide/en/ecs/current/ecs-reference.html[Elastic Common Schema]. See <>. +You can also use [`ecs-logging`](https://github.com/elastic/ecs-logging-ruby) which is a set of libraries that enables you to transform your application logs to structured logs that comply with the [Elastic Common Schema](ecs://docs/reference/index.md). See [Elastic Common Schema (ECS)](/reference/ecs.md). To trace requests and responses in the Curl format, set the `trace` argument: @@ -91,11 +81,10 @@ Elasticsearch::Client.new(trace: true) You can customize the default logger or tracer: -[source,ruby] ------------------------------------- +```ruby client.transport.logger.formatter = proc { |s, d, p, m| "#{s}: #{m}\n" } client.transport.logger.level = Logger::INFO ------------------------------------- +``` Or, you can use a custom `::Logger` instance: @@ -105,8 +94,7 @@ Elasticsearch::Client.new(logger: Logger.new(STDERR)) You can pass the client any conforming logger implementation: -[source,ruby] ------------------------------------- +```ruby require 'logging' # https://github.com/TwP/logging/ log = Logging.logger['elasticsearch'] @@ -114,60 +102,42 @@ log.add_appenders Logging.appenders.stdout log.level = :info client = Elasticsearch::Client.new(logger: log) ------------------------------------- +``` -[discrete] -[[apm-integration]] -==== APM integration +## APM integration [apm-integration] -This client integrates seamlessly with Elastic APM via the Elastic APM Agent. It -automatically captures client requests if you are using the agent on your code. -If you're using `elastic-apm` v3.8.0 or up, you can set -`capture_elasticsearch_queries` to `true` in `config/elastic_apm.yml` to also -capture the body from requests in {es}. Refer to -https://github.com/elastic/elasticsearch-ruby/tree/main/docs/examples/apm[this example]. +This client integrates seamlessly with Elastic APM via the Elastic APM Agent. It automatically captures client requests if you are using the agent on your code. If you’re using `elastic-apm` v3.8.0 or up, you can set `capture_elasticsearch_queries` to `true` in `config/elastic_apm.yml` to also capture the body from requests in {{es}}. Refer to [this example](https://github.com/elastic/elasticsearch-ruby/tree/main/docs/examples/apm). -[discrete] -[[custom-http-headers]] -==== Custom HTTP Headers +## Custom HTTP Headers [custom-http-headers] -You can set a custom HTTP header on the client's initializer: +You can set a custom HTTP header on the client’s initializer: -[source,ruby] ------------------------------------- +```ruby client = Elasticsearch::Client.new( transport_options: { headers: {user_agent: "My App"} } ) ------------------------------------- +``` -You can also pass in `headers` as a parameter to any of the API Endpoints to set -custom headers for the request: +You can also pass in `headers` as a parameter to any of the API Endpoints to set custom headers for the request: ```ruby client.search(index: 'myindex', q: 'title:test', headers: {user_agent: "My App"}) ``` -[discrete] -[[x-opaque-id]] -==== Identifying running tasks with X-Opaque-Id +## Identifying running tasks with X-Opaque-Id [x-opaque-id] -The X-Opaque-Id header allows to track certain calls, or associate certain tasks -with the client that started them (refer to -https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html#_identifying_running_tasks[the documentation]). -To use this feature, you need to set an id for `opaque_id` on the client on each -request. Example: +The X-Opaque-Id header allows to track certain calls, or associate certain tasks with the client that started them (refer to [the documentation](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks)). To use this feature, you need to set an id for `opaque_id` on the client on each request. Example: -[source,ruby] ------------------------------------- +```ruby client = Elasticsearch::Client.new client.search(index: 'myindex', q: 'title:test', opaque_id: '123456') ------------------------------------- +``` The search request includes the following HTTP Header: @@ -175,15 +145,12 @@ The search request includes the following HTTP Header: X-Opaque-Id: 123456 ``` -You can also set a prefix for X-Opaque-Id when initializing the client. This is -prepended to the id you set before each request if you're using X-Opaque-Id. -Example: +You can also set a prefix for X-Opaque-Id when initializing the client. This is prepended to the id you set before each request if you’re using X-Opaque-Id. Example: -[source,ruby] ------------------------------------- +```ruby client = Elasticsearch::Client.new(opaque_id_prefix: 'eu-west1_') client.search(index: 'myindex', q: 'title:test', opaque_id: '123456') ------------------------------------- +``` The request includes the following HTTP Header: @@ -192,12 +159,9 @@ X-Opaque-Id: eu-west1_123456 ``` -[discrete] -[[setting-timeouts]] -==== Setting Timeouts +## Setting Timeouts [setting-timeouts] -For many operations in {es}, the default timeouts of HTTP libraries are too low. -To increase the timeout, you can use the `request_timeout` parameter: +For many operations in {{es}}, the default timeouts of HTTP libraries are too low. To increase the timeout, you can use the `request_timeout` parameter: ```ruby Elasticsearch::Client.new(request_timeout: 5*60) @@ -206,42 +170,30 @@ Elasticsearch::Client.new(request_timeout: 5*60) You can also use the `transport_options` argument documented below. -[discrete] -[[randomizing-hosts]] -==== Randomizing Hosts +## Randomizing Hosts [randomizing-hosts] -If you pass multiple hosts to the client, it rotates across them in a -round-robin fashion by default. When the same client would be running in -multiple processes (for example, in a Ruby web server such as Thin), it might -keep connecting to the same nodes "at once". To prevent this, you can randomize -the hosts collection on initialization and reloading: +If you pass multiple hosts to the client, it rotates across them in a round-robin fashion by default. When the same client would be running in multiple processes (for example, in a Ruby web server such as Thin), it might keep connecting to the same nodes "at once". To prevent this, you can randomize the hosts collection on initialization and reloading: ```ruby Elasticsearch::Client.new(hosts: ['localhost:9200', 'localhost:9201'], randomize_hosts: true) ``` -[discrete] -[[retry-failures]] -==== Retrying on Failures +## Retrying on Failures [retry-failures] -When the client is initialized with multiple hosts, it makes sense to retry a -failed request on a different host: +When the client is initialized with multiple hosts, it makes sense to retry a failed request on a different host: ```ruby Elasticsearch::Client.new(hosts: ['localhost:9200', 'localhost:9201'], retry_on_failure: true) ``` -By default, the client does not retry the request. You can specify how many -times to retry before it raises an exception by passing a number to -`retry_on_failure`: +By default, the client does not retry the request. You can specify how many times to retry before it raises an exception by passing a number to `retry_on_failure`: ```ruby Elasticsearch::Client.new(hosts: ['localhost:9200', 'localhost:9201'], retry_on_failure: 5) ``` -You can also use `retry_on_status` to retry when specific status codes are -returned: +You can also use `retry_on_status` to retry when specific status codes are returned: ```ruby Elasticsearch::Client.new(hosts: ['localhost:9200', 'localhost:9201'], retry_on_status: [502, 503]) @@ -259,23 +211,18 @@ You can also set a `delay_on_retry` value in milliseconds. This will add a delay Elasticsearch::Client.new(hosts: ['localhost:9200', 'localhost:9201'], retry_on_failure: 5, delay_on_retry: 1000) ``` -[discrete] -[[reload-hosts]] -==== Reloading Hosts -{es} dynamically discovers new nodes in the cluster by default. You can leverage -this in the client, and periodically check for new nodes to spread the load. +## Reloading Hosts [reload-hosts] -To retrieve and use the information from the -https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html[Nodes Info API] -on every 10,000th request: +{{es}} dynamically discovers new nodes in the cluster by default. You can leverage this in the client, and periodically check for new nodes to spread the load. + +To retrieve and use the information from the [Nodes Info API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-info) on every 10,000th request: ```ruby Elasticsearch::Client.new(hosts: ['localhost:9200', 'localhost:9201'], reload_connections: true) ``` -You can pass a specific number of requests after which reloading should be -performed: +You can pass a specific number of requests after which reloading should be performed: ```ruby Elasticsearch::Client.new(hosts: ['localhost:9200', 'localhost:9201'], reload_connections: 1_000) @@ -287,38 +234,34 @@ To reload connections on failures, use: Elasticsearch::Client.new(hosts: ['localhost:9200', 'localhost:9201'], reload_on_failure: true) ``` -The reloading timeouts if not finished under 1 second by default. To change the -setting: +The reloading timeouts if not finished under 1 second by default. To change the setting: ```ruby Elasticsearch::Client.new(hosts: ['localhost:9200', 'localhost:9201'], sniffer_timeout: 3) ``` -NOTE: When using reloading hosts ("sniffing") together with authentication, pass -the scheme, user and password with the host info – or, for more clarity, in the -`http` options: +::::{note} +When using reloading hosts ("sniffing") together with authentication, pass the scheme, user and password with the host info – or, for more clarity, in the `http` options: +:::: + -[source,ruby] ------------------------------------- +```ruby Elasticsearch::Client.new( host: 'localhost:9200', http: { scheme: 'https', user: 'U', password: 'P' }, reload_connections: true, reload_on_failure: true ) ------------------------------------- +``` -[discrete] -[[connection-selector]] -==== Connection Selector +## Connection Selector [connection-selector] By default, the client rotates the connections in a round-robin fashion, using the `Elastic::Transport::Transport::Connections::Selector::RoundRobin` strategy. -You can implement your own strategy to customize the behaviour. For example, let's have a "rack aware" strategy, which prefers the nodes with a specific attribute. The strategy uses the other nodes, only when these are unavailable: +You can implement your own strategy to customize the behaviour. For example, let’s have a "rack aware" strategy, which prefers the nodes with a specific attribute. The strategy uses the other nodes, only when these are unavailable: -[source,ruby] ------------------------------------- +```ruby class RackIdSelector include Elastic::Transport::Transport::Connections::Selector::Base @@ -331,24 +274,19 @@ class RackIdSelector end Elasticsearch::Client.new hosts: ['x1.search.org', 'x2.search.org'], selector_class: RackIdSelector ------------------------------------- +``` -[discrete] -[[serializer-implementations]] -==== Serializer Implementations +## Serializer Implementations [serializer-implementations] -By default, the https://rubygems.org/gems/multi_json[MultiJSON] library is used as the serializer implementation, and it picks up the "right" adapter based on gems available. +By default, the [MultiJSON](https://rubygems.org/gems/multi_json) library is used as the serializer implementation, and it picks up the "right" adapter based on gems available. The serialization component is pluggable, though, so you can write your own by including the `Elastic::Transport::Transport::Serializer::Base` module, implementing the required contract, and passing it to the client as the `serializer_class` or `serializer` parameter. -[discrete] -[[exception-handling]] -==== Exception Handling +## Exception Handling [exception-handling] -The library defines a -https://github.com/elastic/elastic-transport-ruby/blob/main/lib/elastic/transport/transport/errors.rb[number of exception classes] for various client and server errors, as well as unsuccessful HTTP responses, making it possible to rescue specific exceptions with desired granularity. +The library defines a [number of exception classes](https://github.com/elastic/elastic-transport-ruby/blob/main/lib/elastic/transport/transport/errors.rb) for various client and server errors, as well as unsuccessful HTTP responses, making it possible to rescue specific exceptions with desired granularity. The highest-level exception is `Elastic::Transport::Transport::Error` and is raised for any generic client or server errors. @@ -357,3 +295,4 @@ The highest-level exception is `Elastic::Transport::Transport::Error` and is rai As an example for response-specific errors, a 404 response status raises an `Elastic::Transport::Transport::Errors::NotFound` exception. Finally, `Elastic::Transport::Transport::SnifferTimeoutError` is raised when connection reloading ("sniffing") times out. + diff --git a/docs/api.asciidoc b/docs/reference/api.md similarity index 68% rename from docs/api.asciidoc rename to docs/reference/api.md index 85386c8122..261413b45c 100644 --- a/docs/api.asciidoc +++ b/docs/reference/api.md @@ -1,52 +1,49 @@ -[[api]] -=== Elasticsearch API +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/api.html +--- -The `elasticsearch-api` library provides a Ruby implementation of the https://www.elastic.co/elastic-stack/[Elasticsearch] REST API. +# Elasticsearch API [api] -[discrete] -[[api-install]] -==== Installation +The `elasticsearch-api` library provides a Ruby implementation of the [Elasticsearch](https://www.elastic.co/elastic-stack/) REST API. -Install the package from https://rubygems.org[Rubygems]: -[source,bash] ----------------------------- +## Installation [api-install] + +Install the package from [Rubygems](https://rubygems.org): + +```bash gem install elasticsearch-api ----------------------------- +``` -To use an unreleased version, either add it to your `Gemfile` for https://bundler.io/[Bundler]: +To use an unreleased version, either add it to your `Gemfile` for [Bundler](https://bundler.io/): -[source,bash] ----------------------------- +```bash gem 'elasticsearch-api', git: 'git://github.com/elasticsearch/elasticsearch-ruby.git' ----------------------------- +``` or install it from a source code checkout: -[source,bash] ----------------------------- +```bash git clone https://github.com/elasticsearch/elasticsearch-ruby.git cd elasticsearch-ruby/elasticsearch-api bundle install rake install ----------------------------- +``` + + +## Example usage [api-example-usage] -[discrete] -[[api-example-usage]] -==== Example usage +The library is designed as a group of standalone Ruby modules, which can be mixed into a class providing connection to Elasticsearch — an Elasticsearch client. -The library is designed as a group of standalone Ruby modules, which can be mixed into a class -providing connection to Elasticsearch -- an Elasticsearch client. -[discrete] -===== Usage with the `elasticsearch` gem +### Usage with the `elasticsearch` gem [_usage_with_the_elasticsearch_gem] -**When you use the client from the https://github.com/elasticsearch/elasticsearch-ruby[`elasticsearch-ruby`] client, the library modules have been already included**, so you just call the API methods. +**When you use the client from the [`elasticsearch-ruby`](https://github.com/elasticsearch/elasticsearch-ruby) client, the library modules have been already included**, so you just call the API methods. The response will be an `Elasticsearch::API::Response` object which wraps an `Elasticsearch::Transport::Transport::Response` object. It provides `body`, `status` and `headers` methods, but you can treat is as a hash and access the keys directly. -[source,rb] ----------------------------- +```rb require 'elasticsearch' client = Elasticsearch::Client.new @@ -91,22 +88,21 @@ client.search(index: 'myindex', body: { query: { match: { title: 'test' } } }) "content-encoding"=>"gzip", "content-length"=>"188"}, @status=200>> ----------------------------- +``` -Full documentation and examples are included as RDoc annotations in the source code and available online at . +Full documentation and examples are included as RDoc annotations in the source code and available online at [http://rubydoc.info/gems/elasticsearch-api](http://rubydoc.info/gems/elasticsearch-api). -[discrete] -===== Usage with a custom client -When you want to mix the library with your own client, it must conform to the following _contract_: +### Usage with a custom client [_usage_with_a_custom_client] + +When you want to mix the library with your own client, it must conform to the following *contract*: * It responds to a `perform_request(method, path, params, body, headers)` method, * the method returns an object with `status`, `body` and `headers` methods. -A simple client could look like this (_with a dependency on `active_support` to parse the query params_): +A simple client could look like this (*with a dependency on `active_support` to parse the query params*): -[source,rb] ----------------------------- +```rb require 'multi_json' require 'faraday' require 'elasticsearch/api' @@ -151,17 +147,14 @@ p client.cluster.health p client.index(index: 'myindex', id: 'custom', body: { title: "Indexing from my client" }) # --> PUT myindex/mytype/custom {} {:title=>"Indexing from my client"} # => "{"ok":true, ... }" ----------------------------- +``` + -[discrete] -===== Using JSON Builders +### Using JSON Builders [_using_json_builders] -Instead of passing the `:body` argument as a Ruby _Hash_, you can pass it as a _String_, potentially -taking advantage of JSON builders such as https://github.com/rails/jbuilder[JBuilder] or -https://github.com/bsiggelkow/jsonify[Jsonify]: +Instead of passing the `:body` argument as a Ruby *Hash*, you can pass it as a *String*, potentially taking advantage of JSON builders such as [JBuilder](https://github.com/rails/jbuilder) or [Jsonify](https://github.com/bsiggelkow/jsonify): -[source,rb] ----------------------------- +```rb require 'jbuilder' query = Jbuilder.encode do |json| @@ -181,16 +174,14 @@ client.search(index: 'myindex', body: query) # 2013-06-25 09:56:05 +0200: > {"query":{"match":{"title":{"query":"test 1","operator":"and"}}}} # ... # => {"took"=>21, ..., "hits"=>{"total"=>1, "hits"=>[{ "_source"=>{"title"=>"Test 1", ...}}]}} ----------------------------- +``` -[discrete] -===== Using Hash Wrappers -For a more comfortable access to response properties, you may wrap it in one of the _Hash_ "object access" -wrappers, such as https://github.com/intridea/hashie[`Hashie::Mash`]: +### Using Hash Wrappers [_using_hash_wrappers] -[source,rb] ----------------------------- +For a more comfortable access to response properties, you may wrap it in one of the *Hash* "object access" wrappers, such as [`Hashie::Mash`](https://github.com/intridea/hashie): + +```rb require 'hashie' response = client.search( @@ -205,16 +196,15 @@ mash = Hashie::Mash.new(response) mash.hits.hits.first._source.title # => 'Test' ----------------------------- +``` + -[discrete] -===== Using a Custom JSON Serializer +### Using a Custom JSON Serializer [_using_a_custom_json_serializer] -The library uses the https://rubygems.org/gems/multi_json/[MultiJson] gem by default but allows you to set a custom JSON library, provided it uses the standard `load/dump` interface: +The library uses the [MultiJson](https://rubygems.org/gems/multi_json/) gem by default but allows you to set a custom JSON library, provided it uses the standard `load/dump` interface: -[source,rb] ----------------------------- +```rb Elasticsearch::API.settings[:serializer] = JrJackson::Json Elasticsearch::API.serializer.dump({foo: 'bar'}) # => {"foo":"bar"} ----------------------------- +``` diff --git a/docs/reference/basic-config.md b/docs/reference/basic-config.md new file mode 100644 index 0000000000..f7bd47df7a --- /dev/null +++ b/docs/reference/basic-config.md @@ -0,0 +1,37 @@ +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/basic-config.html +--- + +# Basic configuration [basic-config] + +The table below contains the most important initialization parameters that you can use. + +| | | | +| --- | --- | --- | +| **Parameter** | **Data type** | **Description** | +| `adapter` | Symbol | A specific adapter for Faraday (for example, `:patron`). | +| `api_key` | String, Hash | For API key Authentication. Either the base64 encoding of `id` and `api_key` joined by a colon as a string, or a hash with the `id` and `api_key` values. | +| `compression` | Boolean | Whether to compress requests. Gzip compression is used. Defaults to `false`. Responses are automatically inflated if they are compressed. If a custom transport object is used, it must handle the request compression and response inflation. | +| `enable_meta_header` | Boolean | Whether to enable sending the meta data header to Cloud. Defaults to `true`. | +| `hosts` | String, Array | Single host passed as a string or hash, or multiple hosts passed as an array; `host` or `url` keys are also valid. | +| `log` | Boolean | Whether to use the default logger. Disabled by default. | +| `logger` | Object | An instance of a Logger-compatible object. | +| `opaque_id_prefix` | String | Sets a prefix for X-Opaque-Id when initializing the client. This is prepended to the id you set before each request if you’re using X-Opaque-Id. | +| `opentelemetry_tracer_provider` | `OpenTelemetry::Trace::TracerProvider` | An explicit TracerProvider to use instead of the global one with OpenTelemetry. This enables better dependency injection and simplifies testing. | +| `randomize_hosts` | Boolean | Whether to shuffle connections on initialization and reload. Defaults to `false`. | +| `reload_connections` | Boolean, Number | Whether to reload connections after X requests. Defaults to `false`. | +| `reload_on_failure` | Boolean | Whether to reload connections after failure. Defaults to `false`. | +| `request_timeout` | Integer | The request timeout to be passed to transport in options. | +| `resurrect_after` | Integer | Specifies after how many seconds a dead connection should be tried again. | +| `retry_on_failure` | Boolean, Number | Whether to retry X times when request fails before raising and exception. Defaults to `false`. | +| `retry_on_status` | Array, Number | Specifies which status code needs to be returned to retry. | +| `selector` | Constant | An instance of selector strategy implemented with {Elastic::Transport::Transport::Connections::Selector::Base}. | +| `send_get_body_as` | String | Specifies the HTTP method to use for GET requests with a body. Defaults to `GET`. | +| `serializer_class` | Constant | Specifies a serializer class to use. It is initialized by the transport and passed the transport instance. | +| `sniffer_timeout` | Integer | Specifies the timeout for reloading connections in seconds. Defaults to `1`. | +| `trace` | Boolean | Whether to use the default tracer. Disabled by default. | +| `tracer` | Object | Specifies an instance of a Logger-compatible object. | +| `transport` | Object | Specifies a transport instance. | +| `transport_class` | Constant | Specifies a transport class to use. It is initialized by the client and passed hosts and all arguments. | +| `transport_options` | Hash | Specifies the options to be passed to the `Faraday::Connection` constructor. | diff --git a/docs/reference/client-helpers.md b/docs/reference/client-helpers.md new file mode 100644 index 0000000000..72220c37b7 --- /dev/null +++ b/docs/reference/client-helpers.md @@ -0,0 +1,14 @@ +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/client-helpers.html +--- + +# Client helpers [client-helpers] + +The Ruby client includes the following helpers: + +* [Bulk and Scroll helpers](/reference/Helpers.md) +* [ES|QL](/reference/esql.md) + + + diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md new file mode 100644 index 0000000000..fdebc05c75 --- /dev/null +++ b/docs/reference/configuration.md @@ -0,0 +1,14 @@ +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/ruby-config.html +--- + +# Configuration [ruby-config] + +This page contains information about how to configure the Ruby client tailored to your needs. Almost every aspect of the client is configurable. However, in most cases you only need to set a couple of parameters. + +* [Basic configuration](/reference/basic-config.md) +* [Advanced configuration](/reference/advanced-config.md) + + + diff --git a/docs/connecting.asciidoc b/docs/reference/connecting.md similarity index 57% rename from docs/connecting.asciidoc rename to docs/reference/connecting.md index 80e2acba63..8a75793639 100644 --- a/docs/connecting.asciidoc +++ b/docs/reference/connecting.md @@ -1,34 +1,28 @@ -[[connecting]] -== Connecting +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/connecting.html +--- -This page contains the information you need to connect and use the Client with -{es}. +# Connecting [connecting] -**On this page** +This page contains the information you need to connect and use the Client with {{es}}. -* <> -* <> -* <> -* <> +## Authentication [client-auth] -[discrete] -[[client-auth]] -=== Authentication +This document contains code snippets to show you how to connect to various {{es}} providers. -This document contains code snippets to show you how to connect to various {es} providers. -[discrete] -[[auth-ec]] -==== Elastic Cloud +### Elastic Cloud [auth-ec] -If you are using https://www.elastic.co/cloud[Elastic Cloud], the client offers an easy way to connect to it. You need the Cloud ID that you can find in the cloud console, then your username and password. +If you are using [Elastic Cloud](https://www.elastic.co/cloud), the client offers an easy way to connect to it. You need the Cloud ID that you can find in the cloud console, then your username and password. -image::images/cloud_id.png["Cloud ID"] +:::{image} ../images/cloud_id.png +:alt: Cloud ID +::: Once you have collected the Cloud ID you can use the client to connect to your Elastic Cloud instance, as follows: -[source,ruby] ------------------------------------- +```ruby require 'elasticsearch' client = Elasticsearch::Client.new( @@ -36,55 +30,56 @@ client = Elasticsearch::Client.new( user: '', password: '', ) ------------------------------------- +``` You can also connect to the Cloud by using API Key authentication. You can generate an `API key` in the `Management` page under the section `Security`. -image::images/cloud_api_key.png["API key"] +:::{image} ../images/cloud_api_key.png +:alt: API key +::: When you click on `Create API key` you can choose a name and set the other options (eg. restrict privileges, expire after time, etc). -image::images/api_key_name.png["Choose an API name"] +:::{image} ../images/api_key_name.png +:alt: Choose an API name +::: -After this step you will get the `API key` in the API keys page. +After this step you will get the `API key` in the API keys page. -image::images/cloud_api_key.png["API key"] +:::{image} ../images/cloud_api_key.png +:alt: API key +::: **IMPORTANT**: you need to copy and store the `API key` in a secure place, since you will not be able to view it again in Elastic Cloud. -Once you have collected the `Cloud ID` and the `API key` you can use the client -to connect to your Elastic Cloud instance, as follows: +Once you have collected the `Cloud ID` and the `API key` you can use the client to connect to your Elastic Cloud instance, as follows: -[source,ruby] ------------------------------------- +```ruby client = Elasticsearch::Client.new( cloud_id: '', api_key: '' ) ------------------------------------- +``` If you create the API Key through the dev console or the REST API, you may get instead a pair of `id` and `APIKey` values. The client also accepts a Hash for the `api_key` parameter, so you can pass in these values and it will encode the API Key internally: -[source,ruby] ------------------------------------- +```ruby client = Elasticsearch::Client.new( cloud_id: '', api_key: {id: '', api_key: ''} ) ------------------------------------- +``` -[discrete] -[[connect-self-managed]] -=== Connecting to a self-managed cluster -{es} 8.0 offers security by default, that means authentication and TLS are enabled. +## Connecting to a self-managed cluster [connect-self-managed] -To connect to the {es} cluster you’ll need to configure the Ruby {es} client to use HTTPS with the generated CA certificate in order to make requests successfully. +{{es}} 8.0 offers security by default, that means authentication and TLS are enabled. -If you’re just getting started with {es} we recommend reading the documentation on configuring and starting {es} to ensure your cluster is running as expected. +To connect to the {{es}} cluster you’ll need to configure the Ruby {{es}} client to use HTTPS with the generated CA certificate in order to make requests successfully. -When you start {es} for the first time you’ll see a distinct block like the one below in the output from {es} (you may have to scroll up if it’s been a while): +If you’re just getting started with {{es}} we recommend reading the documentation on configuring and starting {{es}} to ensure your cluster is running as expected. +When you start {{es}} for the first time you’ll see a distinct block like the one below in the output from {{es}} (you may have to scroll up if it’s been a while): ```sh ---------------------------------------------------------------- @@ -105,31 +100,25 @@ Note down the `elastic` user password and HTTP CA fingerprint for the next secti Depending on the circumstances there are two options for verifying the HTTPS connection, either verifying with the CA certificate itself or via the HTTP CA certificate fingerprint. -[discrete] -[[ca-certificates]] -==== Verifying HTTPS with CA certificates +### Verifying HTTPS with CA certificates [ca-certificates] -The generated root CA certificate can be found in the `certs` directory in your {es} config location (`$ES_CONF_PATH/certs/http_ca.crt`). If you're running {es} in Docker there is https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html[additional documentation for retrieving the CA certificate]. +The generated root CA certificate can be found in the `certs` directory in your {{es}} config location (`$ES_CONF_PATH/certs/http_ca.crt`). If you’re running {{es}} in Docker there is [additional documentation for retrieving the CA certificate](docs-content://deploy-manage/deploy/self-managed/install-elasticsearch-with-docker.md). Once you have the `http_ca.crt` file somewhere accessible pass the path to the client via `ca_certs`: -[source,ruby] ------------------------------------- +```ruby client = Elasticsearch::Client.new( host: "https://elastic:#{ELASTIC_PASSWORD}@localhost:9200", transport_options: { ssl: { ca_path: CERT_DIR } } ) ------------------------------------- +``` -[discrete] -[[ca-fingerprint]] -==== Verifying HTTPS with certificate fingerprints +### Verifying HTTPS with certificate fingerprints [ca-fingerprint] -This method of verifying the HTTPS connection takes advantage of the certificate fingerprint value noted down earlier. Take this SHA256 fingerprint value and pass it to the Ruby {es} client via `ca_fingerprint`: +This method of verifying the HTTPS connection takes advantage of the certificate fingerprint value noted down earlier. Take this SHA256 fingerprint value and pass it to the Ruby {{es}} client via `ca_fingerprint`: -[source,ruby] ------------------------------------- +```ruby # Colons and uppercase/lowercase don't matter when using # the 'ca_fingerprint' parameter CERT_FINGERPRINT = '64F2593F...' @@ -142,77 +131,65 @@ client = Elasticsearch::Client.new( transport_options: { ssl: { verify: false } }, ca_fingerprint: CERT_FINGERPRINT ) ------------------------------------- +``` The verification will be run once per connection. - The certificate fingerprint can be calculated using `openssl x509` with the certificate file: -[source,sh] ----- +```sh openssl x509 -fingerprint -sha256 -noout -in /path/to/http_ca.crt ----- +``` -If you don't have access to the generated CA file from {es} you can use the following script to output the root CA fingerprint of the {es} instance with `openssl s_client`: +If you don’t have access to the generated CA file from {{es}} you can use the following script to output the root CA fingerprint of the {{es}} instance with `openssl s_client`: -[source,sh] ----- +```sh # Replace the values of 'localhost' and '9200' to the # corresponding host and port values for the cluster. openssl s_client -connect localhost:9200 -servername localhost -showcerts /dev/null \ | openssl x509 -fingerprint -sha256 -noout -in /dev/stdin ----- +``` The output of `openssl x509` will look something like this: -[source,sh] ----- +```sh SHA256 Fingerprint=A5:2D:D9:35:11:E8:C6:04:5E:21:F1:66:54:B7:7C:9E:E0:F3:4A:EA:26:D9:F4:03:20:B5:31:C4:74:67:62:28 ----- - +``` +### API Key authentication [auth-api-key] -[discrete] -[[auth-api-key]] -==== API Key authentication +You can also use [ApiKey](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key) authentication. -You can also use https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html[ApiKey] authentication. +::::{note} +If you provide both basic authentication credentials and the ApiKey configuration, the ApiKey takes precedence. +:::: -NOTE: If you provide both basic authentication credentials and the ApiKey configuration, the ApiKey takes precedence. -[source,ruby] ------------------------------------- +```ruby Elasticsearch::Client.new( host: host, transport_options: transport_options, api_key: credentials ) ------------------------------------- +``` -Where credentials is either the base64 encoding of `id` and `api_key` joined by -a colon or a hash with the `id` and `api_key`: +Where credentials is either the base64 encoding of `id` and `api_key` joined by a colon or a hash with the `id` and `api_key`: -[source,ruby] ------------------------------------- +```ruby Elasticsearch::Client.new( host: host, transport_options: transport_options, api_key: {id: 'my_id', api_key: 'my_api_key'} ) ------------------------------------- +``` -[discrete] -[[auth-basic]] -==== Basic authentication +### Basic authentication [auth-basic] -You can pass the authentication credentials, scheme and port in the host -configuration hash: +You can pass the authentication credentials, scheme and port in the host configuration hash: -[source,ruby] ------------------------------------- +```ruby client = Elasticsearch::Client.new( hosts: [ @@ -225,36 +202,31 @@ client = Elasticsearch::Client.new( } ] ) ------------------------------------- +``` Or use the common URL format: -[source,ruby] ------------------------------------- +```ruby client = Elasticsearch::Client.new(url: 'https://username:password@localhost:9200') ------------------------------------- +``` -To pass a custom certificate for SSL peer verification to Faraday-based clients, -use the `transport_options` option: +To pass a custom certificate for SSL peer verification to Faraday-based clients, use the `transport_options` option: -[source,ruby] ------------------------------------- +```ruby Elasticsearch::Client.new( url: 'https://username:password@localhost:9200', transport_options: { ssl: { ca_file: '/path/to/http_ca.crt' } } ) ------------------------------------- +``` + -[discrete] -[[client-usage]] -=== Usage +## Usage [client-usage] The following snippet shows an example of using the Ruby client: -[source,ruby] ------------------------------------- +```ruby require 'elasticsearch' client = Elasticsearch::Client.new log: true @@ -266,20 +238,17 @@ client.index(index: 'my-index', id: 1, body: { title: 'Test' }) client.indices.refresh(index: 'my-index') client.search(index: 'my-index', body: { query: { match: { title: 'test' } } }) ------------------------------------- +``` + +## Using the Client in a Function-as-a-Service Environment [client-faas] -[discrete] -[[client-faas]] -=== Using the Client in a Function-as-a-Service Environment +This section illustrates the best practices for leveraging the {{es}} client in a Function-as-a-Service (FaaS) environment. The most influential optimization is to initialize the client outside of the function, the global scope. This practice does not only improve performance but also enables background functionality as – for example – sniffing. The following examples provide a skeleton for the best practices. -This section illustrates the best practices for leveraging the {es} client in a Function-as-a-Service (FaaS) environment. The most influential optimization is to initialize the client outside of the function, the global scope. This practice does not only improve performance but also enables background functionality as – for example – sniffing. The following examples provide a skeleton for the best practices. -[discrete] -==== GCP Cloud Functions +### GCP Cloud Functions [_gcp_cloud_functions] -[source,ruby] ------------------------------------- +```ruby require 'functions_framework' require 'elasticsearch' @@ -304,13 +273,12 @@ FunctionsFramework.http "hello_world" do |request| } ) end ------------------------------------- +``` -[discrete] -==== AWS Lambda -[source,ruby] ------------------------------------- +### AWS Lambda [_aws_lambda] + +```ruby require 'elasticsearch' def client @@ -336,17 +304,16 @@ def lambda_handler(event:, context:) } ) end ------------------------------------- +``` Resources used to assess these recommendations: -* https://cloud.google.com/functions/docs/bestpractices/tips#use_global_variables_to_reuse_objects_in_future_invocations[GCP Cloud Functions: Tips & Tricks] -* https://docs.aws.amazon.com/lambda/latest/dg/best-practices.html[Best practices for working with AWS Lambda functions] +* [GCP Cloud Functions: Tips & Tricks](https://cloud.google.com/functions/docs/bestpractices/tips#use_global_variables_to_reuse_objects_in_future_invocations) +* [Best practices for working with AWS Lambda functions](https://docs.aws.amazon.com/lambda/latest/dg/best-practices.md) + -[discrete] -[[client-comp]] -=== Enabling the Compatibility Mode +## Enabling the Compatibility Mode [client-comp] The Elasticsearch server version 8.0 is introducing a new compatibility mode that allows you a smoother upgrade experience from 7 to 8. In a nutshell, you can use the latest 7.x Elasticsearch client with an 8.x Elasticsearch server, giving more room to coordinate the upgrade of your codebase to the next major version. -If you want to leverage this functionality, please make sure that you are using the latest 7.x client and set the environment variable `ELASTIC_CLIENT_APIVERSIONING` to `true`. The client is handling the rest internally. For every 8.0 and beyond client, you're all set! The compatibility mode is enabled by default. +If you want to leverage this functionality, please make sure that you are using the latest 7.x client and set the environment variable `ELASTIC_CLIENT_APIVERSIONING` to `true`. The client is handling the rest internally. For every 8.0 and beyond client, you’re all set! The compatibility mode is enabled by default. diff --git a/docs/reference/dsl.md b/docs/reference/dsl.md new file mode 100644 index 0000000000..af686223d1 --- /dev/null +++ b/docs/reference/dsl.md @@ -0,0 +1,11 @@ +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/dsl.html +--- + +# Elasticsearch DSL [dsl] + +The [elasticsearch-dsl](https://github.com/elastic/elasticsearch-dsl-ruby) gem provides a Ruby API for the [Elasticsearch Query DSL](https://www.elasticsearch.com/guide/en/elasticsearch/reference/current/query-dsl.md). The library allows to programmatically build complex search definitions for {{es}} in Ruby, which are translated to Hashes, and ultimately, JSON, the language of {{es}}. + +See [the README](https://github.com/elastic/elasticsearch-dsl-ruby#elasticsearchdsl) for more information. + diff --git a/docs/reference/ecs.md b/docs/reference/ecs.md new file mode 100644 index 0000000000..65100ebe4a --- /dev/null +++ b/docs/reference/ecs.md @@ -0,0 +1,37 @@ +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/ecs.html +--- + +# Elastic Common Schema (ECS) [ecs] + +The [Elastic Common Schema (ECS)][Elastic Common Schema (ECS)](ecs://docs/reference/index.md)) is an open source format that defines a common set of fields to be used when storing event data like logs in Elasticsearch. + +You can use the library [ecs-logging](https://github.com/elastic/ecs-logging-ruby) which is a set of libraries that enables you to transform your application logs to structured logs that comply with the ECS format. + +Add this line to your application’s Gemfile: + +```ruby +gem 'ecs-logging' +``` + +Then execute `bundle install`. Or install from the command line yourself: + +```ruby +$ gem install ecs-logging +``` + +Then configure the client to use the logger: + +```ruby +require 'ecs_logging/logger' +require 'elasticsearch' + +logger = EcsLogging::Logger.new($stdout) +client = Elasticsearch::Client.new(logger: logger) +> client.info +{"@timestamp":"2022-07-12T05:31:18.590Z","log.level":"INFO","message":"GET http://localhost:9200/ [status:200, request:0.009s, query:n/a]","ecs.version":"1.4.0"}... +``` + +See [ECS Logging Ruby Reference](ecs-logging-ruby://docs/reference/index.md) for more information on how to configure the logger. + diff --git a/docs/helpers/esql.asciidoc b/docs/reference/esql.md similarity index 72% rename from docs/helpers/esql.asciidoc rename to docs/reference/esql.md index 9a310911b5..6fea4bcdd9 100644 --- a/docs/helpers/esql.asciidoc +++ b/docs/reference/esql.md @@ -1,36 +1,29 @@ -[[esql]] -=== ES|QL in the Ruby client -++++ -ES|QL -++++ +--- +navigation_title: "ES|QL" +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/esql.html +--- -This page helps you understand and use {ref}/esql.html[ES|QL] in the -Ruby client. +# ES|QL in the Ruby client [esql] + + +This page helps you understand and use [ES|QL](docs-content://explore-analyze/query-filter/languages/esql.md) in the Ruby client. There are two ways to use ES|QL in the Ruby client: -* Use the Elasticsearch {es-docs}/esql-apis.html[ES|QL API] directly: This -is the most flexible approach, but it's also the most complex because you must handle -results in their raw form. You can choose the precise format of results, -such as JSON, CSV, or text. -* Use the Ruby ES|QL helper: The helper maps the raw response to an object that's -more readily usable by your application. +* Use the Elasticsearch [ES|QL API](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-esql) directly: This is the most flexible approach, but it’s also the most complex because you must handle results in their raw form. You can choose the precise format of results, such as JSON, CSV, or text. +* Use the Ruby ES|QL helper: The helper maps the raw response to an object that’s more readily usable by your application. -[discrete] -[[esql-how-to]] -==== ES|QL API +## ES|QL API [esql-how-to] -The {es-docs}/esql-query-api.html[ES|QL query API] allows you to specify how -results should be returned. You can choose a -{es-docs}/esql-rest.html#esql-rest-format[response format] such as CSV, text, or -JSON, then fine-tune it with parameters like column separators and locale. +The [ES|QL query API](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-esql) allows you to specify how results should be returned. You can choose a [response format](docs-content://explore-analyze/query-filter/languages/esql-rest.md#esql-rest-format) such as CSV, text, or JSON, then fine-tune it with parameters like column separators and locale. By default, the `query` API returns a Hash response with `columns` and `values`: -[[esql-query]] -[source,ruby] ----- +$$$esql-query$$$ + +```ruby query = <>, the helper returns -the following: +The helper returns an array of hashes with the columns as keys and the respective values. Using the [preceding example](#esql-query), the helper returns the following: -[source,ruby] ----- +```ruby response = Elasticsearch::Helpers::ESQLHelper.query(client, query) puts response @@ -87,15 +73,11 @@ puts response {"duration_ms"=>1.2, "message"=>"Disconnected", "event.duration"=>1232382, "client.ip"=>"172.21.0.5", "@timestamp"=>"2023-10-23T13:33:34.937Z"} {"duration_ms"=>0.7, "message"=>"Connection error", "event.duration"=>725448, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:51:54.732Z"} {"duration_ms"=>8.3, "message"=>"Connection error", "event.duration"=>8268153, "client.ip"=>"172.21.3.15", "@timestamp"=>"2023-10-23T13:52:55.015Z"} ----- +``` -Additionally, you can transform the data in the response by passing in a Hash -of `column => Proc` values. You could use this for example to convert -'@timestamp' into a DateTime object. Pass in a Hash to `query` as a `parser` -defining a `Proc` for each value you'd like to parse: +Additionally, you can transform the data in the response by passing in a Hash of `column => Proc` values. You could use this for example to convert *@timestamp* into a DateTime object. Pass in a Hash to `query` as a `parser` defining a `Proc` for each value you’d like to parse: -[source,ruby] ----- +```ruby require 'elasticsearch/helpers/esql_helper' parser = { @@ -104,12 +86,11 @@ parser = { response = Elasticsearch::Helpers::ESQLHelper.query(client, query, parser: parser) response.first['@timestamp'] # ----- +``` You can pass in as many Procs as there are columns in the response. For example: -[source,ruby] ----- +```ruby parser = { '@timestamp' => Proc.new { |t| DateTime.parse(t) }, 'client.ip' => Proc.new { |i| IPAddr.new(i) }, @@ -125,4 +106,5 @@ puts response {"duration_ms"=>1.2, "message"=>"Disconnected", "event.duration"=>"1232382", "client.ip"=>#, "@timestamp"=>#} {"duration_ms"=>0.7, "message"=>"Connection error", "event.duration"=>"725448", "client.ip"=>#, "@timestamp"=>#} {"duration_ms"=>8.3, "message"=>"Connection error", "event.duration"=>"8268153", "client.ip"=>#, "@timestamp"=>#} ----- +``` + diff --git a/docs/examples.asciidoc b/docs/reference/examples.md similarity index 82% rename from docs/examples.asciidoc rename to docs/reference/examples.md index 22e9619505..75e850cfbc 100644 --- a/docs/examples.asciidoc +++ b/docs/reference/examples.md @@ -1,26 +1,26 @@ -[[examples]] -== Examples +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/examples.html +--- -Below you can find examples of how to use the most frequently called APIs with -the Ruby client. +# Examples [examples] -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> +Below you can find examples of how to use the most frequently called APIs with the Ruby client. +* [Indexing a document](#ex-index) +* [Getting a document](#ex-get) +* [Updating a document](#ex-update) +* [Deleting a document](#ex-delete) +* [Bulk requests](#ex-bulk) +* [Searching for a document](#ex-search) +* [Multi search](#ex-multisearch) +* [Scrolling](#ex-scroll) +* [Reindexing](#ex-reindex) -[discrete] -[[ex-index]] -=== Indexing a document -Let's index a document with the following fields: `name`, `author`, -`release_date`, and `page_count`: +## Indexing a document [ex-index] + +Let’s index a document with the following fields: `name`, `author`, `release_date`, and `page_count`: ```ruby body = { @@ -34,9 +34,7 @@ client.index(index: 'books', body: body) ``` -[discrete] -[[ex-get]] -=== Getting a document +## Getting a document [ex-get] You can get a document by ID: @@ -46,9 +44,7 @@ client.get(index: 'books', id: id) ``` -[discrete] -[[ex-update]] -=== Updating a document +## Updating a document [ex-update] Assume you have the following document: @@ -65,9 +61,7 @@ client.update(index: 'books', id: id, body: { doc: { page_count: 225 } }) ``` -[discrete] -[[ex-delete]] -=== Deleting a document +## Deleting a document [ex-delete] You can delete a document by ID: @@ -77,13 +71,9 @@ client.delete(index: 'books', id: id) ``` -[discrete] -[[ex-bulk]] -=== Bulk requests +## Bulk requests [ex-bulk] -The `bulk` operation of the client supports various different formats of the -payload: array of strings, header/data pairs, or the combined format where data -is passed along with the header in a single item in a custom `:data` key. +The `bulk` operation of the client supports various different formats of the payload: array of strings, header/data pairs, or the combined format where data is passed along with the header in a single item in a custom `:data` key. Index several documents in one request: @@ -109,8 +99,7 @@ body = [ client.bulk(body: body) ``` -As mentioned, you can perform several operations in a single request with the -combined format passing data in the `:data` option: +As mentioned, you can perform several operations in a single request with the combined format passing data in the `:data` option: ```ruby body = [ @@ -122,17 +111,13 @@ client.bulk(body: body) ``` -[discrete] -[[ex-search]] -=== Searching for a document +## Searching for a document [ex-search] -This example uses the same data that is used in the -https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html#find-structure-example-nld-json[Find structure API documentation]. +This example uses the same data that is used in the [Find structure API documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-find-structure). First, bulk index it: -[source,ruby] ----- +```ruby body = [ { index: { _index: 'books', data: { name: 'Leviathan Wakes', author: 'James S.A. Corey', release_date: '2011-06-02', page_count: 561 } } }, { index: { _index: 'books', data: { name: 'Hyperion', author: 'Dan Simmons', release_date: '1989-05-26', page_count: 482 } } }, @@ -160,10 +145,9 @@ body = [ { index: { _index: 'books', data: { name: 'The Moon is a Harsh Mistress', author: 'Robert A. Heinlein', release_date: '1966-04-01', page_count: 288 } } } ] client.bulk(body: body) ----- +``` -The `field` parameter is a common parameter, so it can be passed in directly in -the following way: +The `field` parameter is a common parameter, so it can be passed in directly in the following way: ```ruby client.search(index: 'books', q: 'dune') @@ -178,10 +162,10 @@ response['hits']['hits'].count # => 15 ``` -[discrete] -[[ex-multisearch]] -=== Multi search +## Multi search [ex-multisearch] + The following example shows how to perform a multisearch API call on `books` index: + ```ruby body = [ {}, @@ -192,12 +176,10 @@ body = [ client.msearch(index:'books', body: body) ``` -[discrete] -[[ex-scroll]] -=== Scrolling -Submit a search API request that includes an argument for the scroll query -parameter, save the search ID, then print out the book names you found: +## Scrolling [ex-scroll] + +Submit a search API request that includes an argument for the scroll query parameter, save the search ID, then print out the book names you found: ```ruby # Search request with a scroll argument: @@ -214,13 +196,11 @@ end ``` -[discrete] -[[ex-reindex]] -=== Reindexing +## Reindexing [ex-reindex] -The following example shows how to reindex the `books` index into a new index -called `books-reindexed`: +The following example shows how to reindex the `books` index into a new index called `books-reindexed`: ```ruby client.reindex(body: {source: { index: 'books'}, dest: {index: 'books-reindexed' } }) ``` + diff --git a/docs/reference/getting-started.md b/docs/reference/getting-started.md new file mode 100644 index 0000000000..41920656aa --- /dev/null +++ b/docs/reference/getting-started.md @@ -0,0 +1,125 @@ +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/getting-started-ruby.html + - https://www.elastic.co/guide/en/serverless/current/elasticsearch-ruby-client-getting-started.html +--- + +# Getting started [getting-started-ruby] + +This page guides you through the installation process of the Ruby client, shows you how to instantiate the client, and how to perform basic Elasticsearch operations with it. + + +### Requirements [_requirements] + +A currently maintained version of Ruby (3.0+) or JRuby (9.3+). + + +### Installation [_installation] + +To install the latest version of the client, run the following command: + +```shell +gem install elasticsearch +``` + +Refer to the [*Installation*](/reference/installation.md) page to learn more. + + +### Connecting [_connecting] + +You can connect to the Elastic Cloud using an API key and the Elasticsearch endpoint. + +```rb +client = Elasticsearch::Client.new( + cloud_id: '', + api_key: '' +) +``` + +Your Elasticsearch endpoint can be found on the **My deployment** page of your deployment: + +:::{image} ../images/es_endpoint.jpg +:alt: Finding Elasticsearch endpoint +::: + +You can generate an API key on the **Management** page under Security. + +:::{image} ../images/create_api_key.png +:alt: Create API key +::: + +For other connection options, refer to the [*Connecting*](/reference/connecting.md) section. + + +### Operations [_operations] + +Time to use Elasticsearch! This section walks you through the basic, and most important, operations of Elasticsearch. For more operations and more advanced examples, refer to the [*Examples*](/reference/examples.md) page. + + +#### Creating an index [_creating_an_index] + +This is how you create the `my_index` index: + +```rb +client.indices.create(index: 'my_index') +``` + + +#### Indexing documents [_indexing_documents] + +This is a simple way of indexing a document: + +```rb +document = { name: 'elasticsearch-ruby' } +response = client.index(index: 'my_index', body: document) +# You can get the indexed document id with: +response['_id'] +=> "PlgIDYkBWS9Ngdx5IMy-" +id = response['_id'] +``` + + +#### Getting documents [_getting_documents] + +You can get documents by using the following code: + +```rb +client.get(index: 'my_index', id: id) +``` + + +#### Searching documents [_searching_documents] + +This is how you can create a single match query with the Ruby client: + +```rb +client.search(index: 'my_index', body: { query: { match_all: {} } }) +``` + + +#### Updating documents [_updating_documents] + +This is how you can update a document, for example to add a new field: + +```rb +client.update(index: 'my_index', id: id, body: { doc: { language: 'Ruby' } }) +``` + + +#### Deleting documents [_deleting_documents] + +```rb +client.delete(index: 'my_index', id: id) +``` + + +#### Deleting an index [_deleting_an_index] + +```rb +client.indices.delete(index: 'my_index') +``` + + +## Further reading [_further_reading] + +* Use [Bulk and Scroll helpers](/reference/Helpers.md) for a more confortable experience with the APIs. diff --git a/docs/reference/index.md b/docs/reference/index.md new file mode 100644 index 0000000000..088cd04b9b --- /dev/null +++ b/docs/reference/index.md @@ -0,0 +1,40 @@ +--- +mapped_pages: + https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/ruby_client.html +--- + +# Ruby [ruby_client] + +The `elasticsearch` [Rubygem](http://rubygems.org/gems/elasticsearch) provides a low-level client for communicating with an {{es}} cluster, fully compatible with other official clients. + +More documentation is hosted in [Github](https://github.com/elastic/elasticsearch-ruby) and [RubyDoc](http://rubydoc.info/gems/elasticsearch). + +Refer to the [*Getting started*](/reference/getting-started.md) page for a step-by-step quick start with the Ruby client. + + +## Features [_features] + +* Pluggable logging and tracing +* Pluggable connection selection strategies (round-robin, random, custom) +* Pluggable transport implementation, customizable and extendable +* Pluggable serializer implementation +* Request retries and dead connections handling +* Node reloading (based on cluster state) on errors or on demand +* Modular API implementation +* 100% REST API coverage + + +## Transport and API [transport-api] + +The `elasticsearch` gem combines two separate Rubygems: + +* [`elastic-transport`](https://github.com/elastic/elastic-transport-ruby/) - provides an HTTP Ruby client for connecting to the {{es}} cluster. Refer to the documentation: [Transport](/reference/transport.md) +* [`elasticsearch-api`](https://github.com/elastic/elasticsearch-ruby/tree/main/elasticsearch-api) - provides a Ruby API for the {{es}} RESTful API. + +Please consult their respective documentation for configuration options and technical details. + +Notably, the documentation and comprehensive examples for all the API methods are contained in the source, and available online at [Rubydoc](http://rubydoc.info/gems/elasticsearch-api/Elasticsearch/API/Actions). + +Keep in mind, that for optimal performance, you should use an HTTP library which supports persistent ("keep-alive") HTTP connections. + diff --git a/docs/reference/installation.md b/docs/reference/installation.md new file mode 100644 index 0000000000..73048cfa0d --- /dev/null +++ b/docs/reference/installation.md @@ -0,0 +1,44 @@ +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/ruby-install.html +--- + +# Installation [ruby-install] + +Install the Rubygem for the latest {{es}} version by using the following command: + +```sh +gem install elasticsearch +``` + +Or add the `elasticsearch` Ruby gem to your Gemfile: + +```ruby +gem 'elasticsearch' +``` + +You can install the Ruby gem for a specific {{es}} version by using the following command: + +```sh +gem install elasticsearch -v 7.0.0 +``` + +Or you can add a specific version of {{es}} to your Gemfile: + +```ruby +gem 'elasticsearch', '~> 7.0' +``` + + +## {{es}} and Ruby version compatibility [_es_and_ruby_version_compatibility] + +The {{es}} client is compatible with currently maintained Ruby versions. We follow Ruby’s own maintenance policy and officially support all currently maintained versions per [Ruby Maintenance Branches](https://www.ruby-lang.org/en/downloads/branches/). + +Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of {{es}} without breaking. It does not mean that the client automatically supports new features of newer {{es}} versions; it is only possible after a release of a new client version. For example, a 8.12 client version won’t automatically support the new features of the 8.13 version of {{es}}, the 8.13 client version is required for that. {{es}} language clients are only backwards compatible with default distributions and without guarantees made. + +| Gem Version | | {{es}} Version | Supported | +| --- | --- | --- | --- | +| 7.x | → | 7.x | 7.17 | +| 8.x | → | 8.x | 8.x | +| main | → | main | | + diff --git a/docs/reference/integrations.md b/docs/reference/integrations.md new file mode 100644 index 0000000000..2b54bab453 --- /dev/null +++ b/docs/reference/integrations.md @@ -0,0 +1,26 @@ +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/integrations.html +--- + +# Integrations [integrations] + +The Rubygems listed on this page make it easier to operate with {{es}} by using the Ruby client. + +* [Transport](/reference/transport.md) +* [Elasticsearch API](/reference/api.md) +* [Using OpenTelemetry](/reference/opentelemetry.md) +* [Elastic Common Schema (ECS)](/reference/ecs.md) +* [ActiveModel / ActiveRecord](/reference/activemodel_activerecord.md) +* [Ruby On Rails](/reference/ruby_on_rails.md) +* [Persistence](/reference/persistence.md) +* [Elasticsearch DSL](/reference/dsl.md) + + + + + + + + + diff --git a/docs/reference/opentelemetry.md b/docs/reference/opentelemetry.md new file mode 100644 index 0000000000..ccc4863a8c --- /dev/null +++ b/docs/reference/opentelemetry.md @@ -0,0 +1,97 @@ +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/opentelemetry.html +--- + +# Using OpenTelemetry [opentelemetry] + +You can use [OpenTelemetry](https://opentelemetry.io/) to monitor the performance and behavior of your {{es}} requests through the Ruby Client. The Ruby Client comes with built-in OpenTelemetry instrumentation that emits [distributed tracing spans](docs-content://solutions/observability/apps/traces-2.md) by default. With that, applications [instrumented with OpenTelemetry](https://opentelemetry.io/docs/instrumentation/ruby/manual/) or using the [OpenTelemetry Ruby SDK](https://opentelemetry.io/docs/instrumentation/ruby/automatic/) are inherently enriched with additional spans that contain insightful information about the execution of the {{es}} requests. + +The native instrumentation in the Ruby Client follows the [OpenTelemetry Semantic Conventions for {{es}}](https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/). In particular, the instrumentation in the client covers the logical layer of {{es}} requests. A single span per request is created that is processed by the service through the Ruby Client. The following image shows a trace that records the handling of two different {{es}} requests: a `ping` request and a `search` request. + +:::{image} ../images/otel-waterfall-without-http.png +:alt: Distributed trace with Elasticsearch spans +:class: screenshot +::: + +Usually, OpenTelemetry auto-instrumentation modules come with instrumentation support for HTTP-level communication. In this case, in addition to the logical {{es}} client requests, spans will be captured for the physical HTTP requests emitted by the client. The following image shows a trace with both, {{es}} spans (in blue) and the corresponding HTTP-level spans (in red): + +:::{image} ../images/otel-waterfall-with-http.png +:alt: Distributed trace with Elasticsearch spans +:class: screenshot +::: + +Advanced Ruby Client behavior such as nodes round-robin and request retries are revealed through the combination of logical {{es}} spans and the physical HTTP spans. The following example shows a `search` request in a scenario with two nodes: + +:::{image} ../images/otel-waterfall-retry.png +:alt: Distributed trace with Elasticsearch spans +:class: screenshot +::: + +The first node is unavailable and results in an HTTP error, while the retry to the second node succeeds. Both HTTP requests are subsumed by the logical {{es}} request span (in blue). + + +## Setup the OpenTelemetry instrumentation [_setup_the_opentelemetry_instrumentation] + +When using the [OpenTelemetry Ruby SDK manually](https://opentelemetry.io/docs/instrumentation/ruby/manual) or using the [OpenTelemetry Ruby Auto-Instrumentations](https://opentelemetry.io/docs/instrumentation/ruby/automatic/), the Ruby Client’s OpenTelemetry instrumentation is enabled by default and uses the global OpenTelemetry SDK with the global tracer provider. You can provide a tracer provider via the Ruby Client configuration option `opentelemetry_tracer_provider` when instantiating the client. This is sometimes useful for testing or other specific use cases. + +```ruby +client = Elasticsearch::Client.new( + cloud_id: '', + api_key: '', + opentelemetry_tracer_provider: tracer_provider +) +``` + + +## Configuring the OpenTelemetry instrumentation [_configuring_the_opentelemetry_instrumentation] + +You can configure the OpenTelemetry instrumentation through Environment Variables. The following configuration options are available. + + +### Enable / Disable the OpenTelemetry instrumentation [opentelemetry-config-enable] + +With this configuration option you can enable (default) or disable the built-in OpenTelemetry instrumentation. + +**Default:** `true` + +| | | +| --- | --- | +| Environment Variable | `OTEL_RUBY_INSTRUMENTATION_ELASTICSEARCH_ENABLED` | + + +### Capture search request bodies [_capture_search_request_bodies] + +Per default, the built-in OpenTelemetry instrumentation does not capture request bodies due to data privacy considerations. You can use this option to enable capturing of search queries from the request bodies of {{es}} search requests in case you wish to gather this information regardless. The options are to capture the raw search query, sanitize the query with a default list of sensitive keys, or not capture it at all. + +**Default:** `omit` + +**Valid Options:** `omit`, `sanitize`, `raw` + +| | | +| --- | --- | +| Environment Variable | `OTEL_RUBY_INSTRUMENTATION_ELASTICSEARCH_CAPTURE_SEARCH_QUERY` | + + +### Sanitize the {{es}} search request body [_sanitize_the_es_search_request_body] + +You can configure the list of keys whose values are redacted when the search query is captured. Values must be comma-separated. Note in v8.3.0 and v8.3.1, the environment variable `OTEL_INSTRUMENTATION_ELASTICSEARCH_CAPTURE_SEARCH_QUERY` was available but is now deprecated in favor of the environment variable including `RUBY`. + +**Default:** `nil` + +| | | +| --- | --- | +| Environment Variable | `OTEL_RUBY_INSTRUMENTATION_ELASTICSEARCH_SEARCH_QUERY_SANITIZE_KEYS` | + +Example: + +```bash +OTEL_RUBY_INSTRUMENTATION_ELASTICSEARCH_SEARCH_QUERY_SANITIZE_KEYS='sensitive-key,other-sensitive-key' +``` + + +## Overhead [_overhead] + +The OpenTelemetry instrumentation (as any other monitoring approach) may come with a slight overhead on CPU, memory, and/or latency. The overhead may only occur when the instrumentation is enabled (default) and an OpenTelemetry SDK is active in the target application. When the instrumentation is disabled or no OpenTelemetry SDK is active within the target application, monitoring overhead is not expected when using the client. + +Even in cases where the instrumentation is enabled and is actively used (by an OpenTelemetry SDK), the overhead is minimal and negligible in the vast majority of cases. In edge cases where there is a noticeable overhead, the [instrumentation can be explicitly disabled](#opentelemetry-config-enable) to eliminate any potential impact on performance. diff --git a/docs/persistence.asciidoc b/docs/reference/persistence.md similarity index 56% rename from docs/persistence.asciidoc rename to docs/reference/persistence.md index 8567a723cf..2bb497a96b 100644 --- a/docs/persistence.asciidoc +++ b/docs/reference/persistence.md @@ -1,42 +1,37 @@ -[[persistence]] -=== Persistence +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/persistence.html +--- -The `elasticsearch-persistence` -http://rubygems.org/gems/elasticsearch-persistence[Rubygem] provides persistence -layer for Ruby domain objects. +# Persistence [persistence] -It supports the repository design patterns. Versions before 6.0 also supported -the _active record_ design pattern. +The `elasticsearch-persistence` [Rubygem](http://rubygems.org/gems/elasticsearch-persistence) provides persistence layer for Ruby domain objects. +It supports the repository design patterns. Versions before 6.0 also supported the *active record* design pattern. -[discrete] -==== Repository -The `Elasticsearch::Persistence::Repository` module provides an implementation -of the repository pattern and allows to save, delete, find and search objects -stored in {es}, as well as configure mappings and settings for the index. +## Repository [_repository] +The `Elasticsearch::Persistence::Repository` module provides an implementation of the repository pattern and allows to save, delete, find and search objects stored in {{es}}, as well as configure mappings and settings for the index. -[discrete] -===== Features -* Access to the {es} client +### Features [_features_4] + +* Access to the {{es}} client * Setting the index name, document type, and object class for deserialization * Composing mappings and settings for the index * Creating, deleting or refreshing the index * Finding or searching for documents * Providing access both to domain objects and hits for search results -* Providing access to the {es} response for search results +* Providing access to the {{es}} response for search results * Defining the methods for serialization and deserialization -[discrete] -===== Usage +### Usage [_usage_2] -Let's have a simple plain old Ruby object (PORO): +Let’s have a simple plain old Ruby object (PORO): -[source,ruby] ------------------------------------- +```ruby class Note attr_reader :attributes @@ -48,69 +43,58 @@ class Note @attributes end end ------------------------------------- +``` Create a default, "dumb" repository, as a first step: -[source,ruby] ------------------------------------- +```ruby require 'elasticsearch/persistence' class MyRepository; include Elasticsearch::Persistence::Repository; end repository = MyRepository.new ------------------------------------- +``` Save a `Note` instance into the repository: -[source,ruby] ------------------------------------- +```ruby note = Note.new id: 1, text: 'Test' repository.save(note) # PUT http://localhost:9200/repository/_doc/1 [status:201, request:0.210s, query:n/a] # > {"id":1,"text":"Test"} # < {"_index":"repository","_type":"note","_id":"1","_version":1,"created":true} ------------------------------------- +``` Find it: -[source,ruby] ------------------------------------- +```ruby n = repository.find(1) # GET http://localhost:9200/repository/_doc/1 [status:200, request:0.003s, query:n/a] # < {"_index":"repository","_type":"note","_id":"1","_version":2,"found":true, "_source" : {"id":1,"text":"Test"}} => 1, "text"=>"Test"}> ------------------------------------- +``` Search for it: -[source,ruby] ------------------------------------- +```ruby repository.search(query: { match: { text: 'test' } }).first # GET http://localhost:9200/repository/_search [status:200, request:0.005s, query:0.002s] # > {"query":{"match":{"text":"test"}}} # < {"took":2, ... "hits":{"total":1, ... "hits":[{ ... "_source" : {"id":1,"text":"Test"}}]}} => 1, "text"=>"Test"}> ------------------------------------- +``` Delete it: -[source,ruby] ------------------------------------- +```ruby repository.delete(note) # DELETE http://localhost:9200/repository/_doc/1 [status:200, request:0.014s, query:n/a] # < {"found":true,"_index":"repository","_type":"note","_id":"1","_version":3} => {"found"=>true, "_index"=>"repository", "_type"=>"note", "_id"=>"1", "_version"=>2} ------------------------------------- +``` + +The repository module provides a number of features and facilities to configure and customize the behaviour, as well as support for extending your own, custom repository class. -The repository module provides a number of features and facilities to configure -and customize the behaviour, as well as support for extending your own, custom -repository class. +Please refer to the [documentation](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-persistence#the-repository-pattern) for more information. -Please refer to the -https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-persistence#the-repository-pattern[documentation] -for more information. +Also, check out the [example application](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-persistence#example-application) which demonstrates the usage patterns of the *repository* approach to persistence. -Also, check out the -https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-persistence#example-application[example application] -which demonstrates the usage patterns of the _repository_ approach to -persistence. diff --git a/docs/reference/ruby_on_rails.md b/docs/reference/ruby_on_rails.md new file mode 100644 index 0000000000..500fcbb762 --- /dev/null +++ b/docs/reference/ruby_on_rails.md @@ -0,0 +1,23 @@ +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/ruby_on_rails.html +--- + +# Ruby On Rails [ruby_on_rails] + +The `elasticsearch-rails` [Rubygem](http://rubygems.org/gems/elasticsearch-rails) provides features suitable for Ruby on Rails applications. + + +## Features [_features_3] + +* Rake tasks for importing data from application models +* Integration with Rails' instrumentation framework +* Templates for generating example Rails application + + +## Example applications [_example_applications] + +You can generate a fully working example Ruby on Rails application with templates provides. + +Please refer to the [documentation](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-rails) for more information. + diff --git a/docs/reference/toc.yml b/docs/reference/toc.yml new file mode 100644 index 0000000000..be3fc7f854 --- /dev/null +++ b/docs/reference/toc.yml @@ -0,0 +1,24 @@ +toc: + - file: index.md + - file: getting-started.md + - file: installation.md + - file: connecting.md + - file: configuration.md + children: + - file: basic-config.md + - file: advanced-config.md + - file: integrations.md + children: + - file: transport.md + - file: api.md + - file: opentelemetry.md + - file: ecs.md + - file: activemodel_activerecord.md + - file: ruby_on_rails.md + - file: persistence.md + - file: dsl.md + - file: examples.md + - file: client-helpers.md + children: + - file: Helpers.md + - file: esql.md \ No newline at end of file diff --git a/docs/transport.asciidoc b/docs/reference/transport.md similarity index 57% rename from docs/transport.asciidoc rename to docs/reference/transport.md index b9199b19ed..fa38c71f2d 100644 --- a/docs/transport.asciidoc +++ b/docs/reference/transport.md @@ -1,26 +1,33 @@ -[[transport]] -=== Transport +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/transport.html +--- -The `elastic-transport` library provides a low-level Ruby client for connecting to an {es} cluster. It currently powers the https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html[Elasticsearch Ruby] and the https://www.elastic.co/guide/en/enterprise-search-clients/ruby/current/index.html[Enterprise Search Ruby] clients. +# Transport [transport] + +The `elastic-transport` library provides a low-level Ruby client for connecting to an {{es}} cluster. It powers the [Elasticsearch Ruby](/reference/index.md) client. When available, it handles connecting to multiple nodes in the cluster, rotating across connections, logging and tracing requests and responses, maintaining failed connections, discovering nodes in the cluster, and provides an abstraction for data serialization and transport. -It does not handle calling the {es} or Enterprise Search APIs. +It does not handle calling the {{es}} APIs. -This library uses https://github.com/lostisland/faraday[Faraday] by default as the HTTP transport implementation. We test it with Faraday versions 1.x and 2.x. +This library uses [Faraday](https://github.com/lostisland/faraday) by default as the HTTP transport implementation. We test it with Faraday versions 1.x and 2.x. -For optimal performance, use a HTTP library which supports persistent ("keep-alive") connections, such as https://github.com/toland/patron[patron] or https://github.com/typhoeus/typhoeus[Typhoeus]. Require the library (`require 'patron'`) in your code for Faraday 1.x or the adapter (`require 'faraday/patron'`) for Faraday 2.x, and it will be automatically used. +For optimal performance, use a HTTP library which supports persistent ("keep-alive") connections, such as [patron](https://github.com/toland/patron) or [Typhoeus](https://github.com/typhoeus/typhoeus). Require the library (`require 'patron'`) in your code for Faraday 1.x or the adapter (`require 'faraday/patron'`) for Faraday 2.x, and it will be automatically used. Currently these libraries are supported: -* https://github.com/toland/patron[Patron] -* https://github.com/typhoeus/typhoeus[Typhoeus] -* https://rubygems.org/gems/httpclient[HTTPClient] -* https://rubygems.org/gems/net-http-persistent[Net::HTTP::Persistent] +* [Patron](https://github.com/toland/patron) +* [Typhoeus](https://github.com/typhoeus/typhoeus) +* [HTTPClient](https://rubygems.org/gems/httpclient) +* [Net::HTTP::Persistent](https://rubygems.org/gems/net-http-persistent) + +::::{note} +Use [Typhoeus](https://github.com/typhoeus/typhoeus) v1.4.0 or up since older versions are not compatible with Faraday 1.0. +:::: -NOTE: Use https://github.com/typhoeus/typhoeus[Typhoeus] v1.4.0 or up since older versions are not compatible with Faraday 1.0. -You can customize Faraday and implement your own HTTP transport. For detailed information, see the example configurations and more information <>. +You can customize Faraday and implement your own HTTP transport. For detailed information, see the example configurations and more information [below](#transport-implementations). Features overview: @@ -31,87 +38,74 @@ Features overview: * Request retries and dead connections handling * Node reloading (based on cluster state) on errors or on demand -Refer to <> to read about more configuration options. +Refer to [Advanced Configuration](/reference/advanced-config.md) to read about more configuration options. + -[discrete] -[[transport-install]] -==== Installation +## Installation [transport-install] -Install the package from https://rubygems.org/[Rubygems]: +Install the package from [Rubygems](https://rubygems.org/): -[source,bash] ----------------------------- +```bash gem install elastic-transport ----------------------------- +``` -To use an unreleased version, either add it to your `Gemfile` for -http://gembundler.com/[Bundler]: +To use an unreleased version, either add it to your `Gemfile` for [Bundler](http://gembundler.com/): -[source,bash] ----------------------------- +```bash gem 'elastic-transport', git: 'git@github.com:elastic/elastic-transport-ruby.git' ----------------------------- +``` or install it from a source code checkout: -[source,bash] ----------------------------- +```bash git clone https://github.com/elastic/elastic-transport-ruby.git cd elastic-transport bundle install rake install ----------------------------- +``` -[discrete] -[[transport-example-usage]] -==== Example usage -In the simplest form, connect to {es} running on http://localhost:9200 without any configuration: +## Example usage [transport-example-usage] -[source,rb] ----------------------------- +In the simplest form, connect to {{es}} running on [http://localhost:9200](http://localhost:9200) without any configuration: + +```rb require 'elastic/transport' client = Elastic::Transport::Client.new response = client.perform_request('GET', '_cluster/health') # => # ----------------------------- +``` -Documentation is included as RDoc annotations in the source code and available online at http://rubydoc.info/gems/elastic-transport[RubyDoc]. +Documentation is included as RDoc annotations in the source code and available online at [RubyDoc](http://rubydoc.info/gems/elastic-transport). -[discrete] -[[transport-implementations]] -==== Transport implementations -By default, the client uses the https://rubygems.org/gems/faraday[Faraday] HTTP library as a transport implementation. +## Transport implementations [transport-implementations] -The Client auto-detects and uses an _adapter_ for _Faraday_ based on gems loaded in your code, preferring HTTP clients with support for persistent connections. Faraday 2 changed the way adapters are used (https://github.com/lostisland/faraday/blob/main/UPGRADING.md#adapters-have-moved[read more here]). If you're using Faraday 1.x, you can require the HTTP library. To use the https://github.com/toland/patron[_Patron_] HTTP, for example, require it: +By default, the client uses the [Faraday](https://rubygems.org/gems/faraday) HTTP library as a transport implementation. +The Client auto-detects and uses an *adapter* for *Faraday* based on gems loaded in your code, preferring HTTP clients with support for persistent connections. Faraday 2 changed the way adapters are used ([read more here](https://github.com/lostisland/faraday/blob/main/UPGRADING.md#adapters-have-moved)). If you’re using Faraday 1.x, you can require the HTTP library. To use the [*Patron*](https://github.com/toland/patron) HTTP, for example, require it: -To use the https://github.com/toland/patron[Patron] HTTP, for example, require it: +To use the [Patron](https://github.com/toland/patron) HTTP, for example, require it: -[source,rb] ----------------------------- +```rb require 'patron' ----------------------------- +``` -If you're using Faraday 2.x, you need to add the corresponding adapter gem to your Gemfile and require it after you require `faraday`: +If you’re using Faraday 2.x, you need to add the corresponding adapter gem to your Gemfile and require it after you require `faraday`: -[source,rb] ----------------------------- +```rb # Gemfile gem 'faraday-patron' # Code require 'faraday' require 'faraday/patron' ----------------------------- - +``` Then, create a new client, and the Patron gem will be used as the "driver": -[source,rb] ----------------------------- +```rb client = Elastic::Transport::Client.new client.transport.connections.first.connection.builder.adapter @@ -127,43 +121,39 @@ end # => Stiletoo : 24 # => Stiletoo : 24 # => ... ----------------------------- +``` To use a specific adapter for Faraday, pass it as the `adapter` argument: -[source,rb] ----------------------------- +```rb client = Elastic::Client.new(adapter: :net_http_persistent) client.transport.connections.first.connection.builder.handlers # => [Faraday::Adapter::NetHttpPersistent] ----------------------------- +``` If you see this error: -[source,rb] ----------------------------- +```rb Faraday::Error: :net_http_persistent is not registered on Faraday::Adapter ----------------------------- -When you're using Faraday 2, you need to require the adapter before instantiating the client: +``` -[source,rb] ----------------------------- +When you’re using Faraday 2, you need to require the adapter before instantiating the client: + +```rb > client = Elasticsearch::Client.new(adapter: :net_http_persistent) Faraday::Error: :net_http_persistent is not registered on Faraday::Adapter > require 'faraday/net_http_persistent' => true > client = Elasticsearch::Client.new(adapter: :net_http_persistent) => # # ----------------------------- +``` -It's possible to customize the Curb instance by passing a block to the constructor as well (in this case, as an inline block): +It’s possible to customize the Curb instance by passing a block to the constructor as well (in this case, as an inline block): -[source,rb] ----------------------------- +```rb transport = Elastic::Transport::Transport::HTTP::Curb.new( hosts: [ { host: 'localhost', port: '9200' } ], & lambda { |c| c.verbose = true } ) client = Elastic::Client.new(transport: transport) ----------------------------- +``` You can write your own transport implementation by including the {Elastic::Transport::Transport::Base} module, implementing the required contract, and passing it to the client as the `transport_class` parameter – or by injecting it directly. -[discrete] -[[transport-architecture]] -==== Transport architecture + +## Transport architecture [transport-architecture] * `Elastic::Transport::Client` is composed of `Elastic::Transport::Transport`. * `Elastic::Transport::Transport` is composed of `Elastic::Transport::Transport::Connections`, and an instance of logger, tracer, serializer and sniffer. -* Logger and tracer can be any object conforming to Ruby logging interface, for example, an instance of https://ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html[`Logger`], https://rubygems.org/gems/log4r[log4r], https://github.com/TwP/logging/[logging], and so on. -* The `Elastic::Transport::Transport::Serializer::Base` implementations handle converting data for {es} (for example, to JSON). You can implement your own serializer. +* Logger and tracer can be any object conforming to Ruby logging interface, for example, an instance of [`Logger`](https://ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.md), [log4r](https://rubygems.org/gems/log4r), [logging](https://github.com/TwP/logging/), and so on. +* The `Elastic::Transport::Transport::Serializer::Base` implementations handle converting data for {{es}} (for example, to JSON). You can implement your own serializer. * `Elastic::Transport::Transport::Sniffer` allows to discover nodes in the cluster and use them as connections. * `Elastic::Transport::Transport::Connections::Collection` is composed of `Elastic::Transport::Transport::Connections::Connection` instances and a selector instance. * `Elastic::Transport::Transport::Connections::Connection` contains the connection attributes such as hostname and port, as well as the concrete persistent "session" connected to a specific node. * The `Elastic::Transport::Transport::Connections::Selector::Base` implementations allow to choose connections from the pool, for example, in a round-robin or random fashion. You can implement your own selector strategy. * The `Elastic::Transport::Transport::Response` object wraps the Elasticsearch JSON response. It provides `body`, `status`, and `headers` methods but you can treat it as a hash and access the keys directly. + diff --git a/docs/release-notes/breaking-changes.md b/docs/release-notes/breaking-changes.md new file mode 100644 index 0000000000..fba96055e4 --- /dev/null +++ b/docs/release-notes/breaking-changes.md @@ -0,0 +1,28 @@ +--- +navigation_title: "Elasticsearch Ruby Client" +--- + +# Elasticsearch Ruby Client breaking changes [elasticsearch-ruby-client-breaking-changes] +Before you upgrade, carefully review the Elasticsearch Ruby Client breaking changes and take the necessary steps to mitigate any issues. + +To learn how to upgrade, check out . + +% ## Next version [elasticsearch-ruby-client-nextversion-breaking-changes] +% **Release date:** Month day, year + +% ::::{dropdown} Title of breaking change +% Description of the breaking change. +% For more information, check [PR #](PR link). +% **Impact**
Impact of the breaking change. +% **Action**
Steps for mitigating deprecation impact. +% :::: + +% ## 9.0.0 [elasticsearch-ruby-client-900-breaking-changes] +% **Release date:** March 25, 2025 + +% ::::{dropdown} Title of breaking change +% Description of the breaking change. +% For more information, check [PR #](PR link). +% **Impact**
Impact of the breaking change. +% **Action**
Steps for mitigating deprecation impact. +% :::: \ No newline at end of file diff --git a/docs/release-notes/deprecations.md b/docs/release-notes/deprecations.md new file mode 100644 index 0000000000..4c27fcb8bd --- /dev/null +++ b/docs/release-notes/deprecations.md @@ -0,0 +1,28 @@ +--- +navigation_title: "Elasticsearch Ruby Client" +--- + +# Elasticsearch Ruby Client deprecations [elasticsearch-ruby-client-deprecations] +Review the deprecated functionality for your Elasticsearch Ruby Client version. While deprecations have no immediate impact, we strongly encourage you update your implementation after you upgrade. + +To learn how to upgrade, check out . + +% ## Next version [elasticsearch-ruby-client-versionnext-deprecations] +% **Release date:** Month day, year + +% ::::{dropdown} Deprecation title +% Description of the deprecation. +% For more information, check [PR #](PR link). +% **Impact**
Impact of deprecation. +% **Action**
Steps for mitigating deprecation impact. +% :::: + +% ## 9.0.0 [elasticsearch-ruby-client-900-deprecations] +% **Release date:** March 25, 2025 + +% ::::{dropdown} Deprecation title +% Description of the deprecation. +% For more information, check [PR #](PR link). +% **Impact**
Impact of deprecation. +% **Action**
Steps for mitigating deprecation impact. +% :::: \ No newline at end of file diff --git a/docs/release-notes/index.md b/docs/release-notes/index.md new file mode 100644 index 0000000000..c2d13a705e --- /dev/null +++ b/docs/release-notes/index.md @@ -0,0 +1,27 @@ +--- +navigation_title: "Elasticsearch Ruby Client" +--- + +# Elasticsearch Ruby Client release notes [elasticsearch-ruby-client-release-notes] + +Review the changes, fixes, and more in each version of Elasticsearch Ruby Client. + +To check for security updates, go to [Security announcements for the Elastic stack](https://discuss.elastic.co/c/announcements/security-announcements/31). + +% Release notes include only features, enhancements, and fixes. Add breaking changes, deprecations, and known issues to the applicable release notes sections. + +% ## version.next [elasticsearch-ruby-client-next-release-notes] +% **Release date:** Month day, year + +% ### Features and enhancements [elasticsearch-ruby-client-next-features-enhancements] +% * + +% ### Fixes [elasticsearch-ruby-client-next-fixes] +% * + +## 9.0.0 [elasticsearch-ruby-client-900-release-notes] +**Release date:** March 25, 2025 + +### Features and enhancements [elasticsearch-ruby-client-900-features-enhancements] + +### Fixes [elasticsearch-ruby-client-900-fixes] \ No newline at end of file diff --git a/docs/release-notes/known-issues.md b/docs/release-notes/known-issues.md new file mode 100644 index 0000000000..91ff1765df --- /dev/null +++ b/docs/release-notes/known-issues.md @@ -0,0 +1,20 @@ +--- +navigation_title: "Elasticsearch Ruby Client" + +--- + +# Elasticsearch Ruby Client known issues [elasticsearch-ruby-client-known-issues] + +% Use the following template to add entries to this page. + +% :::{dropdown} Title of known issue +% **Details** +% On [Month/Day/Year], a known issue was discovered that [description of known issue]. + +% **Workaround** +% Workaround description. + +% **Resolved** +% On [Month/Day/Year], this issue was resolved. + +::: \ No newline at end of file diff --git a/docs/release-notes/toc.yml b/docs/release-notes/toc.yml new file mode 100644 index 0000000000..a410067947 --- /dev/null +++ b/docs/release-notes/toc.yml @@ -0,0 +1,5 @@ +toc: + - file: index.md + - file: known-issues.md + - file: breaking-changes.md + - file: deprecations.md \ No newline at end of file diff --git a/docs/release_notes/70.asciidoc b/docs/release_notes/70.asciidoc deleted file mode 100644 index d620366ed9..0000000000 --- a/docs/release_notes/70.asciidoc +++ /dev/null @@ -1,195 +0,0 @@ -[[release_notes_70]] -=== 7.0 Release notes - -This version contains the following changes: - -* Added `elastic_ruby_console` executable. It opens a console with the elasticsearch gems you have installed required. -* Added macro benchmarking framework, available when developing. Use `rake -T` to view all available benchmarking tasks. - - -[discrete] -==== Client - -* Fixed failing integration test -* Updated the Manticore development dependency -* Fixed a failing Manticore unit test -* Removed "turn" and switched the tests to Minitest -* Fixed integration tests for Patron -* Allow passing request headers in `perform_request` -* Added integration test for passing request headers in `perform_request` -* Added, that request headers are printed in trace output, if set -* Fix typos in elasticsearch-transport/README.md -* Assert that connection count is at least previous count when reloaded -* Adjust test for change in default number of shards on ES 7 -* Abstract logging functionality into a Loggable Module (#556) -* Convert client integration tests to rspec -* Add flexible configuration in spec helper -* Use helper methods in spec_helper -* Remove minitest client integration tests in favor of rspec test -* Convert tests to rspec and refactor client -* minor changes to the client specs -* Use pry-nav in development for JRuby -* Keep arguments variable name for now -* Skip round-robin test for now -* Mark test as pending until there is a better way to detect rotating nodes -* Remove client unit test in favor of rspec test -* Comment-out round-robin test as it occasionally passes and pending is ineffective -* Document the default host and port constant -* Add documentation to spec_helper methods -* Redacted password if host info is printed in error message -* Adds tests for not including password in logged error message -* The redacted string change will be in 6.1.1 -* Add more tests for different ways to specify client host argument -* Do not duplicate connections in connection pool after rebuild (#591) -* Ensure that the spec rake task is run as part of integration tests -* Use constant to define Elasticsearch hosts and avoid yellow status when number of nodes is 1 -* Update handling of publish_address in _nodes/http response -* Add another test for hostname/ipv6:port format - - -[discrete] -==== API - -* Added the `wait_for_active_shards` parameter to the "Indices Open" API -* Added the "Indices Split" API -* Added the `wait_for_no_initializing_shards` argument to the "Cluster Health" API -* Added the "Cluster Remote Info" API -* Remove the dependency on "turn" -* Clear cluster transient settings in test setups -* Use `YAML.load_documents` in the REST tests runner -* Removed pinning dependency for Minitest -* Replaced the testing framework from Test::Unit to Minites and improved test output -* Added, that trace logs are printed when the `TRACE` environment variable is set -* Removed the "turn" dependency from generated test_helper.rb -* Update the "Delete By Query" API to support :slices -* Speed up `Elasticsearch::API::Utils.__listify` -* Speed up `Elasticsearch::API::Utils.__pathify` -* Use "String#strip" and "String.empty?" in `Utils.__pathify` -* Updated the inline documentation for using scripts in the "Update" API -* Updated the "Scroll" API inline example with passing the scroll ID in the body -* Marked the `percolate` method as deprecated and added an example for current percolator -* Fixed, that `Utils.__report_unsupported_parameters` and `Utils.__report_unsupported_method` use `Kernel.warn` so they can be suppressed -* Fixed the "greedy" regex in the `Utils.__rescue_from_not_found` method -* Fixed the incorrect `create` method -* Allow passing headers in `perform_request` -* Set application/x-ndjson content type on Bulk and Msearch requests -* Update the Reindex API to support :slices -* Fixed and improved the YAML tests runner -* Added the `include_type_name` parameter to APIs -* Fixed the helper for unit tests -* Removed the requirement for passing the `type` parameter to APIs -* Removed dead code from the YAML tests runner -* Fixed the `api:code:generate` Thor task -* Add copy_settings as valid param to split API -* Port api/actions tests to rspec (#543) -* Update tests to not require type -* Account for escape_utils not being available for JRuby -* Add nodes/reload_secure_settings endpoint support (#546) -* Add new params for search and msearch API -* Retrieve stashed variable if referenced in test -* Convert cat API tests to rspec -* Convert cluster API tests to rspec -* Convert indices tests to rspec -* Fix documentation of #indices.analyze -* Avoid instantiating an array of valid params for each request, each time it is called (#550) -* Add headers to custom client documentation (#527) -* Fix typos in README -* Minor update to scroll documentation example -* Convert snapshot, ingest, tasks, nodes api tests to rspec -* Update source_includes and source_excludes params names for mget -* Update source_includes and source_excludes params names for get, search, bulk, explain -* Update source_includes and source_excludes params names for get_source -* Mark _search endpoint as deprecated -* Link to 6.0 documentation explicitly for _suggest deprecation -* Update documentation for msearch -* Update documentation for scroll_id to be in body of scroll endpoint -* Remove reference to deprecated format option for _analyze endpoint -* Correct endpoints used for get and put search template -* Fix minor typo -* Note that a non-empty body argument is required for the bulk api -* Add note about empty body in yard documentation -* Support if_primary_term param on index API -* Delete test2 template in between tests in case a test is not cleanup up properly -* Support ignore_throttled option on search API -* Updates for types removal changes -* Add missing update param -* Add missing params to methods -* Support if_primary_term param for delete -* Delete an index and index template not cleaned up after in rest api tests -* Update supported params for cat API endpoints -* Update supported params for cluster API endpoints -* Update supported params for indices API endpoints -* Update supported params for ingest API endpoints -* Update supported params for nodes API endpoints -* Update supported params for snapshot API endpoints -* Update missed node API endpoints -* Update missed tasks API endpoints -* Update top-level api endpoints -* Adjust specs and code after test failures -* Fix accidental overwrite of index code -* Add missing param in cat/thread_pool -* The type argument is not required in the index method -* Delete 'nomatch' template to account for lack of test cleanup -* Ensure that the :index param is supported for cat.segments -* Ensure that the :name param is passed to the templates API - -[discrete] -==== DSL - -* Add inner_hits option support for has_parent query -* Add inner_hits option support for has_child query -* Add inner_hits option support for has_parent filter -* Add inner_hits option support for has_child filter -* adds query support for nested queries in filter context (#531) -* Convert aggregations/pipeline tests to rspec (#564) -* Convert aggregations tests to rspec (#566) -* Convert filters tests to rspec (#567) -* Fix bug in applying no_match_filter to indices filter -* Update test for current elasticsearch version -* Fix integration tests for join field syntax -* Update agg scripted metric test for deprecation in ES issue #29328 -* Fix script in update for #29328 -* minor: fix spacing -* Convert queries tests to rspec (#569) -* Add inner_hits test after cherry-picking rspec conversion -* Remove tests already converted to rspec -* spec directory structure should mirror code directory structure -* Support query_string type option -* Ensure that filters are registered when called on bool queries (#609) -* Don't specify a type when creating mappings in tests - - -[discrete] -==== X-Pack - -* Embedded the source code for the `elasticsearch-xpack` Rubygem -* Fixed the `setup` for YAML integration tests -* Added missing X-Pack APIs -* Improved the YAML integration test runner -* Updated the Rakefile for running integration tests -* Added, that password for Elasticsearch is generated -* Fixed the Watcher example -* Updated the README -* Added gitignore for the `elasticsearch-xpack` Rubygem -* Add ruby-prof as a development dependency -* Handle multiple roles passed to get_role_mapping -* Minor updates to xpack api methods (#586) -* Support freeze and unfreeze APIs -* Rewrite xpack rest api yaml test handler (#585) -* Updates to take into account SSL settings -* Fix mistake in testing version range so test can be skipped -* Support set_upgrade_mode machine learning API -* Support typed_keys and rest_total_hits_as_int params for rollup_search -* Improve string output for xpack rest api tests -* Fix logic in version checking -* Support if_seq_no and if_primary_term in put_watch -* Don't test execute_watch/60_http_input because of possible Docker issue -* Support api key methods -* Fix minor typo in test description -* Fix issue with replacing argument value with an Integer value -* Support transform_and_set in yaml tests -* Skip two more tests -* Run security tests against elasticsearch 7.0.0-rc2 -* Account for error when forecast_id is not provided and legacy path is used -* Blacklist specific tests, not the whole file -* Fix version check for skipping test \ No newline at end of file diff --git a/docs/release_notes/710.asciidoc b/docs/release_notes/710.asciidoc deleted file mode 100644 index 9751bf2026..0000000000 --- a/docs/release_notes/710.asciidoc +++ /dev/null @@ -1,62 +0,0 @@ -[[release_notes_710]] -=== 7.10 Release notes - -[discrete] -[[release_notes_7101]] -=== 7.10.1 Release notes -[discrete] -==== Client - -- Updates for connecting with Cloud. - -[discrete] -[[release_notes_7100]] -=== 7.10 Release notes - -[discrete] -==== Client - -- Support for Elasticsearch version `7.10.0`. -- Fixes a bug when building the complete endpoint URL could end with duplicate slashes `//`. -- Fixes a bug when building the complete endpoint URL with cloud id could end with duplicate ports https://github.com/elastic/elasticsearch-ruby/issues/1081[#1081]. - -[discrete] -==== API - -- Fix in RubyDoc comments, some parameters were being duplicated. -- Deprecation notice: Synced flush (`indices.flush_synced`) is deprecated and will be removed in 8.0. Use flush instead. - -[discrete] -===== New API Endpoints - -- `snapshot.clone` - - -[discrete] -===== API Changes - -- `bulk`, `index`, `update`: new parameter `require_alias` (boolean): When true, requires destination to be an alias (default: false) for `index` and `update`. For `bulk` it sets `require_alias` for all incoming documents. Defaults to unset (false). - - -[discrete] -==== X-Pack - -Deprecation notice: `searchable_snapshots.repository_stats` is deprecated and is replaced by the Repositories Metering API. - -[discrete] -===== New API Endpoints - -- `close_point_in_time` -- `open_point_in_time` -- `security.clear_api_key_cache` -- `security.grant_api_key` - -[discrete] -===== API Changes - -- `cat.ml_datafeeds`, `cat.ml_jobs`, `machine_learning.close_job`, `machine_learning.get_datafeed_stats`, `machine_learning.get_datafeeds`, `machine_learning.get_job_stats`, `machine_learning.get_jobs`, `machine_learning.get_overall_buckets`, `machine_learning.stop_datafeed`: new parameter `allow_no_match` (boolean): Whether to ignore if a wildcard expression matches no datafeeds (this includes `_all` string or when no datafeeds have been specified). --`machine_learning.get_data_frame_analytics`: new parameter `verbose` (boolean), whether the stats response should be verbose. -- `machine_learning.get_trained_models`: new parameter `include` (string), a comma-separate list of fields to optionally include. Valid options are 'definition' and 'total_feature_importance'. Default is none. -- `machine_learning.stop_datafeed`: endpoint now accepts a `body`: the URL params optionally sent in the body. -- `security.get_role`, `security/get_role_mapping`: The name parameter is now a comma-separated list of role-mapping names. -- `machine_learning.delete_trained_model`, `machine_learning.get_trained_models`, `machine_learning.get_trained_models_stats`, `machine_learning.put_trained_model`: Internal change, url changed from `_ml/inference` to `_ml/trained_models`. diff --git a/docs/release_notes/711.asciidoc b/docs/release_notes/711.asciidoc deleted file mode 100644 index 9df6f1ba1f..0000000000 --- a/docs/release_notes/711.asciidoc +++ /dev/null @@ -1,49 +0,0 @@ -[[release_notes_711]] -=== 7.11 Release notes - -[discrete] -[[release_notes_7112]] -=== 7.11.2 Release notes - -[discrete] -==== Client - -* Bug fix in meta header, fixes fail when http adapter library hasn't been loaded yet: https://github.com/elastic/elasticsearch-ruby/issues/1224[Issue]. - -[discrete] -[[release_notes_7111]] -=== 7.11.1 Release notes - -[discrete] -==== Client - -* Bug fix in meta header, adds support for unknown Faraday adapters. https://github.com/elastic/elasticsearch-ruby/pull/1204[Pull Request]. - -[discrete] -[[release_notes_7110]] -=== 7.11.0 Release notes - -[discrete] -==== Client - -- Support for Elasticsearch version `7.11.0`. -- Fixes a bug with headers in our default Faraday class. https://github.com/elastic/elasticsearch-ruby/commit/9c4afc452467cc6344359b54b98bbe5af1469219[Commit]. -- Adds the `X-Elastic-Client-Meta` HTTP header which is used by Elastic Cloud and can be disabled with the `enable_meta_header` parameter set to `false`. - - -[discrete] -==== API - -- `cat.tasks` - Parameter `node_id` changes name to `nodes`, a comma-separated list of node IDS or names. Parameter `parent_task` changes name to `parent_task_id`. -- APIs that are no longer experimental: `cluster.delete_component_template`, `cluster.exists_component_template`, `cluster.get_component_template`, `cluster.put_component_template`, `indices.delete_index_template`, `indices.exists_index_template`, `indices.get_index_template`, `indices.put_index_template`, `indices.simulate_index_template`, `indices.simulate_template`. -- Deprecation notice: The _upgrade API is no longer useful and will be removed. Instead, see `_reindex API`. Deprecated since version 8.0.0. Endpoints: `indices.get_upgrade`, `indices.upgrade` - -[discrete] -==== X-Pack - -- New endpoints:`async_search.status`, `autoscaling.get_autoscaling_capacity` (experimental), `indices.migrate_to_data_stream`, `indices.promote_data_stream`, `machine_learning.upgrade_job_snapshot`, `rollup.rollup`, `watcher.query_watches`. -- APIs that are no longer experimental: `eql.delete`, `eql.get`, `eql.search`, -- APIs promoted from experimental to beta: `machine_learning.delete_data_frame_analytics`, `ml.delete_trained_model`, `machine_learning.evaluate_data_frame`, `machine_learning.explain_data_frame_analytics`, `machine_learning.get_data_frame_analytics`, `machine_learning.get_datafeed_stats`, `machine_learning.get_trained_models`, `machine_learning.get_trained_models_stats`, `machine_learning.put_data_frame_analytics`, `machine_learning.put_trained_model`, `machine_learning.start_data_frame_analytics`, `machine_learning.stop_data_frame_analytics`, `machine_learning.update_data_frame_analytics` -- `indices.delete_data_stream`, `indices.get_data_stream` add parameter `expand_wildcards`, wether wildcard expressions should get expanded to open or closed indices (default: open). Options: open, closed, hidden, none, all. -- `machine_learning.get_data_frame_analytics`, `machine_learning.get_datafeeds`, `machine_learning.get_jobs`, `machine_learning.get_trained_models`, `transform.get_transform` add parameter `exclude_generated` - omits fields that are illegal to set on PUT. -- `data_frame_transform_deprecated.get_transform` (_data_frame/transforms/ is deprecated, use _transform/ in the future) adds parameter `exclude_generated` - omits generated files. diff --git a/docs/release_notes/712.asciidoc b/docs/release_notes/712.asciidoc deleted file mode 100644 index c23f8c560c..0000000000 --- a/docs/release_notes/712.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[[release_notes_712]] -=== 7.12 Release notes - -[discrete] -==== Client - -- Support for Elasticsearch version 7.12.0 -- Ruby 3 is now tested, it was added to the entire test suite. -- New official documentation pages for configuration: https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/basic-config.html[Basic Configuration] and https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/advanced-config.html[Advanced Configuration]. -- Integration tests runner refactored to keep skipped tests in a yaml file. - -[discrete] -==== API - -- New API namespace: `features` and endpoints `features.get_features` and `snapshot.get_features`. -- `cat.plugins` adds parameter `include_bootstrap`: Include bootstrap plugins in the response. -- Update in `indices.close` parameter `wait_for_active_shards`: Sets the number of active shards to wait for before the operation returns. Set to `index-setting` to wait according to the index setting `index.write.wait_for_active_shards`, or `all` to wait for all shards, or an integer. Defaults to `0`. -- `actions.search` adds parameter `min_compatible_shard_node`: The minimum compatible version that all shards involved in search should have for this request to be successful. - -[discrete] -==== X-Pack - -- New API namespace: `text_structure` and endpoints `text_structure.find_structure`. -- New API namespace: `logstash` and endpoints `logstash.delete_pipeline`, `logstash.get_pipeline`, `logstash.put_pipeline`. -- New API: `eql.get_status`. -- APIs migrated from experimental to stable: `autoscaling.delete_autoscaling_policy`, `autoscaling.get_autoscaling_capacity`, `autoscaling.get_autoscaling_policy`, `autoscaling.put_autoscaling_policy`. -- `searchable_snapshots.mount` adds parameter `storage`: Selects the kind of local storage used to accelerate searches. Experimental, and defaults to `full_copy`. -- `searchable_snapshots.stats` adds parameter `level`: Return stats aggregated at cluster, index or shard level (options: cluster, indices, shards). diff --git a/docs/release_notes/713.asciidoc b/docs/release_notes/713.asciidoc deleted file mode 100644 index 47594bdd12..0000000000 --- a/docs/release_notes/713.asciidoc +++ /dev/null @@ -1,53 +0,0 @@ -[[release_notes_713]] -=== 7.13 Release notes - -[discrete] -[[release_notes_7133]] -=== 7.13.3 Release notes - -- API Support for Elasticsearch version 7.13.3 - -[discrete] -[[release_notes_7132]] -=== 7.13.2 Release notes - -- Mute release, yanked from RubyGems. - -[discrete] -[[release_notes_7131]] -=== 7.13.1 Release notes - -[discrete] -==== Client -- Fixes thread safety issue in `get_connection` - https://github.com/elastic/elasticsearch-ruby/pull/1325[Pull Request]. - -[discrete] -[[release_notes_7130]] -=== 7.13.0 Release notes - -[discrete] -==== Client - -- Support for Elasticsearch version 7.13.0 -- Adds support for compatibility header for Elasticsearch. If the environment variable 'ELASTIC_CLIENT_APIVERSIONING' is set to `true` or `1`, the client will send the headers `Accept` and `Content-Type` with the following value: `application/vnd.elasticsearch+json;compatible-with=7`. -- Better detection of Elasticsearch and Enterprise Search clients in the meta header used by cloud. - -[discrete] -==== API - -- The REST API tests now use an artifact downloaded from the Elastic servers instead of depending of cloning `elasticsearch` locally. Check the README for more information. -- New parameter `include_unloaded_segments` in `cat.nodes`, `nodes.stats`: If set to true segment stats will include stats for segments that are not currently loaded into memory -- New parameter `summary` in `ingest.get_pipeline`: Return pipelines without their definitions (default: false) -- New parameter `index_details` in `snapshot.get`: Whether to include details of each index in the snapshot, if those details are available. Defaults to false. -- New endpoint `features.reset_features`, `ingest/geo_ip_stats` -- New experimental endpoints: `shutdown.delete_node`, `shutdown.get_node`, `shutdown.put_node`. - -[discrete] -==== X-Pack - -- Refactored test tasks, made it easier to run the tests by default. -- New experimental endpoints: `fleet.global_checkpoints`, `searchable_snapshots.cache_stats`. -- New beta endpoints: `security.clear_cached_service_tokens`, `security.create_service_token`, `security.delete_service_token`, `security.get_service_accounts`, `security.get_service_credentials` -- New endpoints: `machine_learning.delete_trained_model_alias`, `machine_learning.preview_data_frame_analytics`, `machine_learning.put_trained_model_alias`. -- APIs migrated from experimental or beta to stable: `machine_learning.delete_data_frame_analytics`, `machine_learning.delete_trained_model`, `machine_learning.estimate_model_memory`, `machine_learning.explain_data_frame_analytics`, `machine_learning.get_data_frame_analytics`, `machine_learning.get_data_frame_analytics_stats`, `machine_learning.get_trained_models`, `machine_learning.get_trained_models_stats`, `machine_learning.put_data_frame_analytics`, `machine_learning.put_trained_model`, `machine_learning.start_data_frame_analytics`, `machine_learning.stop_data_frame_analytics`, `machine_learning.update_data_frame_analytics` -- New parameter `body` in `machine_learning.preview_datafeed`: The datafeed config and job config with which to execute the preview. diff --git a/docs/release_notes/714.asciidoc b/docs/release_notes/714.asciidoc deleted file mode 100644 index 5cdf6092cd..0000000000 --- a/docs/release_notes/714.asciidoc +++ /dev/null @@ -1,93 +0,0 @@ -[[release_notes_714]] -=== 7.14 Release notes - -[discrete] -[[release_notes_7141]] -=== 7.14.1 Release notes - -[discrete] -==== Client - - - Fixes for Manticore Implementation: Addresses custom headers on initialization (https://github.com/elastic/elasticsearch-ruby/commit/3732dd4f6de75365460fa99c1cd89668b107ef1c[3732dd4]) and fixes tracing (https://github.com/elastic/elasticsearch-ruby/commit/3c48ebd9a783988d1f71bfb9940459832ccd63e4[3c48ebd]). Related to https://github.com/elastic/elasticsearch-ruby/issues/1426[#1426] and https://github.com/elastic/elasticsearch-ruby/issues/1428[#1428]. - -[discrete] -[[release_notes_7140]] -=== 7.14.0 Release notes - -[discrete] -==== Client - -Added check that client is connected to an Elasticsearch cluster. If the client isn't connected to a supported Elasticsearch cluster the `UnsupportedProductError` exception will be raised. - -This release changes the way in which the transport layer and the client interact. Previously, when using `elasticsearch-transport`, `Elasticsearch::Transport::Client` had a convenient wrapper, so it could be used as `Elasticsearch::Client`. Now, we are decoupling the transport layer from the Elasticsearch client. If you're using the `elasticsearch` gem, not much will change. It will instantiate a new `Elasticsearch::Transport::Client` when you instantiate `Elasticsearch::Client` and the endpoints from `elasticsearch-api` will be available. - -`Elasticsearch::Client` has an `attr_accessor` for the transport instance: - -[source,ruby] ------------------------------------- -> client = Elasticsearch::Client.new -> client.transport.class -=> Elasticsearch::Transport::Client -> client.transport.transport.class -=> Elasticsearch::Transport::Transport::HTTP::Faraday ------------------------------------- - -The interaction with `elasticsearch-api` remains unchanged. You can use the API endpoints just like before: - -[source,ruby] ------------------------------------- -> client.info -=> {"name"=>"instance", - "cluster_name"=>"elasticsearch", - "cluster_uuid"=>"id", - "version"=> - {"number"=>"7.14.0", - ... -}, - "tagline"=>"You Know, for Search"} ------------------------------------- - -Or perform request directly from the client which will return an `Elasticsearch::Transport::Response` object: - -[source,ruby] ------------------------------------- -> client.perform_request('GET', '/') -# This is the same as doing client.transport.perform_request('GET', '/') -=> #"instance", - "cluster_name"=>"elasticsearch", - "cluster_uuid"=>"id", - "version"=> - {"number"=>"7.14.0-SNAPSHOT", - ... - }, - "tagline"=>"You Know, for Search"}, - @headers= - {"content-type"=>"application/json; charset=UTF-8", - "content-length"=>"571", - ... - }, - @status=200> ------------------------------------- - -If you have any problems, please report them in https://github.com/elastic/elasticsearch-ruby/issues/1344[this issue]. - -[discrete] -==== API - -Code is now generated from Elastic artifacts instead of checked out code of Elasticsearch. See https://github.com/elastic/elasticsearch-ruby/blob/7.14/elasticsearch-api/utils/README.md#generate[the Generator README] for more info. - -- Endpoints `msearch`, `msearch_template` and `search_template` remove `query_and_fetch` and `dfs_query_and_fetch` options from the `search_type` parameter. -- New parameter `include_repository` in `snapshot.get`: (boolean) Whether to include the repository name in the snapshot info. Defaults to true. - -[discrete] -==== X-Pack - -X-Pack is being deprecated. The first time using `xpack` on the client, a warning will be triggered. Please check https://github.com/elastic/elasticsearch-ruby/issues/1274[this issue] for more information. - - -- New endpoints: `index_lifecycle_management.migrate_to_data_tiers`, `machine_learning.reset_job`, `security.saml_authenticate`, `security.saml_complete_logout`, `security.saml_invalidate`, `security.saml_logout`, `security.saml_prepare_authentication`, `security.saml_service_provider_metadata`, `sql.delete_async`, `sql.get_async`, `sql.get_async_status`, `terms_enum`. -- New experimental endpoints: `machine_learning.infer_trained_model_deployment`, `machine_learning.start_trained_model_deployment`, `machine_learning.stop_trained_model_deployment`. -- Deprecation: `indices.freeze` and `indices.unfreeze`: Frozen indices are deprecated because they provide no benefit given improvements in heap memory utilization. They will be removed in a future release. - diff --git a/docs/release_notes/715.asciidoc b/docs/release_notes/715.asciidoc deleted file mode 100644 index 5962394afe..0000000000 --- a/docs/release_notes/715.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[[release_notes_715]] -=== 7.15 Release notes - -[discrete] -==== Client - -- Support for Elasticsearch v7.15.0 APIs. -- We've tested and added documentation on best practices for leveraging the client in a Function-as-a-Service (FaaS) environment to the https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/connecting.html#client-faas[official docs]. - -[discrete] -==== API -- New experimental endpoints: `indices.disk_usage`. `indices.field_usage_stats`, `nodes.clear_repositories_metering_archive`, `get_repositories_metering_info`, https://www.elastic.co/guide/en/elasticsearch/reference/7.15/search-vector-tile-api.html[`search_mvt`] -- The `index` parameter is now required for `open_point_in_time`. -- The `index_metric` parameter in `nodes.stats` adds the `shards` option. - -[discrete] -==== X-Pack - -- New parameters for `ml.put_job`: `ignore_unavailable`, `allow_no_indices`, `ignore_throttled`, `expand_wildcards`. -- New endpoint: https://www.elastic.co/guide/en/elasticsearch/reference/7.15/security-api-query-api-key.html[`security.query_api_keys`]. diff --git a/docs/release_notes/716.asciidoc b/docs/release_notes/716.asciidoc deleted file mode 100644 index 11c1b68ad7..0000000000 --- a/docs/release_notes/716.asciidoc +++ /dev/null @@ -1,96 +0,0 @@ -[[release_notes_716]] -=== 7.16 Release notes - -[discrete] -[[release_notes_7163]] -=== 7.16.3 Release notes - -==== API - -Bugfix for https://github.com/elastic/elasticsearch-ruby/issues/1475[#1475], an issue where if you indexed a document with an id such as `an id`, it would get escaped to `an+id` instead of `an%20id` when using `index` or `create`. This would result in the document id being `an+id` instead of the intended value `an id`. - -[discrete] -[[release_notes_7162]] -=== 7.16.2 Release notes - -No release. - -[discrete] -[[release_notes_7161]] -=== 7.16.1 Release notes - -Patch release corresponding with Elastic Stack version 7.16.1 that addresses the Apache Log4j2 vulnerability, https://discuss.elastic.co/t/apache-log4j2-remote-code-execution-rce-vulnerability-cve-2021-44228-esa-2021-31/291476[more information]. - -==== Client - -The only changes in the client since 7.16.0 are a few minor updates for the https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/connecting.html#client-comp[Compatibility mode with 8.0]. We added the compatibility header in `7.13.0`, but now we have integration tests and compatibility tests for version `7.x` of the client with Elasticsearch `8.0`. - -[discrete] -[[release_notes_7160]] -=== 7.16.0 Release notes - -[discrete] -==== Client - -- Adds the `delay_on_retry` parameter, a value in milliseconds to wait between each failed connection, thanks https://github.com/DinoPullerUqido[DinoPullerUqido]! https://github.com/elastic/elasticsearch-ruby/pull/1521[Pull Request] and https://github.com/elastic/elasticsearch-ruby/pull/1523[backport]. -- Adds *CA fingerprinting*. You can configure the client to only trust certificates that are signed by a specific CA certificate (CA certificate pinning) by providing a `ca_fingerprint` option. This will verify that the fingerprint of the CA certificate that has signed the certificate of the server matches the supplied value. The verification will be run once per connection. Code example: - -[source,ruby] ------------------------------------- -ca_fingerprint = '64F2593F...' -client = Elasticsearch::Client.new( - host: 'https://elastic:changeme@localhost:9200', - transport_options: { ssl: { verify: false } }, - ca_fingerprint: ca_fingerprint -) ------------------------------------- - -- Fixes compression. When `compression` is set to `true`, the client will now gzip the request body properly and use the appropiate headers. Thanks https://github.com/johnnyshields[johnnyshields]! https://github.com/elastic/elasticsearch-ruby/pull/1478[Pull Request] and https://github.com/elastic/elasticsearch-ruby/pull/1526[backport]. -- Warnings emitted by Elasticsearch are now logged via `log_warn` through the Loggable interface in the client, instead of using `Kernel.warn`. https://github.com/elastic/elasticsearch-ruby/pull/1517[Pull Request]. - -[discrete] -==== API - -- Cleaned up some deprecated code. -- `count` - The API is documented as using `GET`, but it supports both GET and POST on the Elasticsearch side. So it was updated to only use `POST` when there's a body present, or else use `GET`. Elasticsearch would still accept a body with `GET`, but to be more semantically correct in the clients we use `POST` when there's a body. -- `delete_index_template` was updated to support the `ignore_404` parameter to ignore 404 errors when attempting to delete a non-existing template. -- `ingest.put_pipeline` adds new parameter `if_version`: Required version for optimistic concurrency control for pipeline updates. -- `ml.put_trained_model`: adds new parameter `defer_definition_decompression`: If set to `true` and a `compressed_definition` is provided, the request defers definition decompression and skips relevant validations. -- `nodes.hot_threads` adds new parameter `sort`: The sort order for 'cpu' type (default: total) (options: cpu, total). -- `open_point_in_time`: `keep_alive` is now a required parameter. -- `search_mvt`: adds new parameter `track_total_hits`: Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number. -- `transform.preview_transform`: adds new parameter `transform_id`. Body is now optional and the API will use `GET` or `POST` depending on the presence of a body. - -*APIs promoted from experimental to stable since last version:* - -- `fleet.global_checkpoints` -- `get_script_context` -- `get_script_language` -- `indices.resolve_index` -- `monitoring.bulk` -- `rank_eval` -- `searchable_snapshots.mount` -- `searchable_snapshots.stats` -- `security.clear_cached_service_tokens` -- `security.create_service_token` -- `security.delete_service_token` -- `security.get_service_accounts` -- `security.get_service_credentials` -- `shutdown.delete_node` -- `shutdown.get_node` -- `shutdown.put_node` -- `terms_enum` - -*New APIs* - -- `fleet.mseach` -- `fleet.search` -- `indices.modify_data_stream` -- `ml.infer_trained_model_deployment` -- `ml.start_trained_model_deployment` -- `ml.stop_trained_model_deployment` -- `migration.get_feature_upgrade_status` -- `migration.post_feature_upgrade_status` -- `security.enroll_kibana` -- `security.enroll_node` -- `transform.updgrade_transforms` diff --git a/docs/release_notes/717.asciidoc b/docs/release_notes/717.asciidoc deleted file mode 100644 index 4413dd225a..0000000000 --- a/docs/release_notes/717.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[[release_notes_717]] -=== 7.17 Release notes - -[discrete] -[[release_notes_7177]] -=== 7.17.7 Release notes - -- Compatibility with Elasticsearch v7.17.7 APIs. -- Tested versions of Ruby for 7.17.7: Ruby (MRI) 2.6, 2.7, 3.0 and 3.1, JRuby 9.3. - -[discrete] -[[release_notes_7172]] -=== 7.17.2, 7.17.3, 7.17.4, 7.17.5, 7.17.6 Release notes - -No release. - -[discrete] -[[release_notes_7171]] -=== 7.17.1 Release notes - -- Improves handling of YAML parsing, uses `safe_load` instead of `load` when doing the product verification (should only affect Ruby < 3.0). -- Updates headers setup when using the Manticore adapter. This fixes an issue where the user-agent header was being foverridden even when it was being set on initialization via the transport options. https://github.com/elastic/elasticsearch-ruby/pull/1685[Pull Request], https://github.com/elastic/elasticsearch-ruby/issues/1684[issue]. - -[discrete] -[[release_notes_7170]] -=== 7.17.0 Release notes - -- Drops Ruby 2.5 from the test matrix. Support for Ruby 2.5 was dropped March 2021. -- Updates the product verification when the response is a `413` error. diff --git a/docs/release_notes/75.asciidoc b/docs/release_notes/75.asciidoc deleted file mode 100644 index ac874d0cfb..0000000000 --- a/docs/release_notes/75.asciidoc +++ /dev/null @@ -1,59 +0,0 @@ -[[release_notes_75]] -=== 7.5 Release notes - -- Support for Elasticsearch 7.5. -- Update API spec generator: The code for Elasticsearch OSS and X-Pack APIs is being generated from the rest api spec. -- Specs have been updated to address new/deprecated parameters. -- Ruby versions tested: 2.3.8, 2.4.9, 2.5.7, 2.6.5 and 2.7.0 (new). - - -[discrete] -==== API - -Endpoints that changed: - -- `_bulk`: body is now required as an argument. -- `cat`: `local` and `master_timeout` parameters are gone. - - `health`: New parameter `health`. - - `indices`: Adds `time` and `include_unload_segments` parameters. - - `nodes`: Adds `bytes`, `time` parameters. - - `pending_tasks`: Adds `time` parameter. - - `recovery`: Adds `active_only`, `detailed`, `index`, `time` parameters. - - `segments`: Removes `index` parameter and it's now a url part. - - `shards`: Adds `time` parameter. - - `snapshots`: Adds `time` parameter. - - `tasks`: Adds `time` parameter. - - `templates`: The `name` parameter is now passed in as a part but not a parameter. - - `thread_pool`: The `thread_pool_patterns` parameter is now passed in as a part but not as a parameter. -- `cluster` - - `put_settings`: body is required. - - `state`: `index_templates` is gone. - - `node_id` is now a url part. -- `delete` - `parent` parameter is gone. -- `delete_by_query`: `analyzer` parameters are gone, `max_docs` is a new parameter, `body` is now a required parameter. -- `delete_by_query_rethrottle` new endpoint. -- `delete_by_rethrottle` - uses `delete_by_query_rethrottle` and hasn't changed. -- `exists`, `exists_source`, `explain`: `parent` parameter is gone. -- `field_caps`: `fields` param is no longer required. -- `get`: `parent` parameter is gone -- `get_source`: `parent` parameter is gone -- `index`: `body` parameter is required, `wait_for_shard` is a new parameter, `consistency`, `include_type_name`, `parent`, `percolate`, `replication`, `timestamp`, `ttl` parameters are gone -- `indices` - - `get`: `feature` paramatere was deprecated and is gone. - - `delete_aliases`, `put_alias`: URL changed internally to 'aliases' instead of 'alias' but shouldn't affect the client's API. -- `render_search_template`: `id` is now a part not a parameter -- `search`: `fielddata_fields`, `include_type_name`, `fields`, `ignore_indices`, `lowercase_expanded_terms`, `query_cache`, `source` parameters are gone, `ccs_minimize_roundtrips`, `track_scores` are new parameters. -- `tasks` - `list`: task_id is not supported anymore, it's in get now. -- `termvectors`: `parent` parameter is gone. -- `update`: `version` parameter is not supported anymore. - - -[discrete] -==== X-Pack - -Some urls changed internally to remove `_xpack`, but it shouldn't affect the client's API. - -- `explore`: `index` is now required. -- `info`: `human` parameter is gone. -- `migration`: some endpoints are gone: `get_assistance`, `get_assistance_test` and `upgrade_test`. -- `watcher`: `restart` endpoint is gone. diff --git a/docs/release_notes/76.asciidoc b/docs/release_notes/76.asciidoc deleted file mode 100644 index bd546df82f..0000000000 --- a/docs/release_notes/76.asciidoc +++ /dev/null @@ -1,86 +0,0 @@ -[[release_notes_76]] -=== 7.6 Release notes - - -[discrete] -==== Client - -* Support for Elasticsearch version 7.6. -* Last release supporting Ruby 2.4. Ruby 2.4 has reached it's end of life and no more security updates will be provided, users are suggested to update to a newer version of Ruby. - - -[discrete] -===== API Key Support - -The client now supports API Key Authentication, check "Authentication" on the https://github.com/elastic/elasticsearch-ruby/tree/7.x/elasticsearch-transport#authentication[transport README] for information on how to use it. - - -[discrete] -===== X-Opaque-Id Support - -The client now supports identifying running tasks with X-Opaque-Id. Check https://github.com/elastic/elasticsearch-ruby/tree/7.x/elasticsearch-transport#identifying-running-tasks-with-x-opaque-id[transport README] for information on how to use X-Opaque-Id. - - -[discrete] -===== Faraday migrated to 1.0 - -We're now using version 1.0 of Faraday: - -* The client initializer was modified but this should not disrupt final users at all, check this commit for more information. -* Migrated error checking to remove the deprecated Faraday::Error namespace. -* *This change is not compatible with https://github.com/typhoeus/typhoeus[Typhoeus]*. The latest release is 1.3.1, but it's https://github.com/typhoeus/typhoeus/blob/v1.3.1/lib/typhoeus/adapters/faraday.rb#L100[still using the deprecated `Faraday::Error` namespace]. This has been fixed on master, but the last release was November 6, 2018. Version 1.4.0 should be ok once it's released. -* Note: Faraday 1.0 drops official support for JRuby. It installs fine on the tests we run with JRuby in this repo, but it's something we should pay attention to. - -Reference: https://github.com/lostisland/faraday/blob/master/UPGRADING.md[Upgrading - Faraday 1.0] - -https://github.com/elastic/elasticsearch-ruby/pull/808[Pull Request] - - -[discrete] -==== API - - -[discrete] -===== API Changes: - -- `cat.indices`: argument `bytes` options were: `b,k,m,g` and are now `b,k,kb,m,mb,g,gb,t,tb,p,pb`. -- `delete_by_query`: New parameter `analyzer` - The analyzer to use for the query string. -- `indices.put_template`: Removed parameters: `timeout`, `flat_settings`. -- `msearch_template`: New Parameter `ccs_minimize_roundtrips` - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution. -- `rank_eval`: New parameter `search_type` - Search operation type (options: `query_then_fetch,dfs_query_then_fetch`). -- `search_template`: New parameter `ccs_minimize_roundtrips` - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution. - - -[discrete] -===== New API endpoints: - -- `get_script_context` -- `get_script_languages` - - -[discrete] -===== Warnings: - -Synced flush is deprecated and will be removed in 8.0. - - -[discrete] -==== X-Pack - - -[discrete] -===== New API endpoints: - -- `ml/delete_trained_model` -- `ml/explain_data_frame_analytics` -- `ml/get_trained_models` -- `ml/get_trained_models_stats` -- `ml/put_trained_model` - - -[discrete] -===== API changes: - -- `license/get`: Added parameter `accept_enterprise`. -- `ml/delete_data_frame_analytics` Added parameter `force`. -- `monitoring/bulk` - Removed parameter `system_version`. \ No newline at end of file diff --git a/docs/release_notes/77.asciidoc b/docs/release_notes/77.asciidoc deleted file mode 100644 index 87f5e1bdbb..0000000000 --- a/docs/release_notes/77.asciidoc +++ /dev/null @@ -1,77 +0,0 @@ -[[release_notes_77]] -=== 7.7 Release notes - -This version drops support for Ruby 2.4 since it's reached it's end of life. - - -[discrete] -==== Client - -- Support for Elasticsearch version `7.7` - - -[discrete] -===== Custom Headers - -You can set custom HTTP headers on the client's initializer or pass them as a parameter to any API endpoint. https://github.com/elastic/elasticsearch-ruby/tree/7.x/elasticsearch-transport#custom-http-headers[More info and code examples]. - - -[discrete] -==== API - - -[discrete] -===== API Changes - -- Clean: Removes up some deprecated endpoints: `abort_benchmark`, `benchmark`, `delete_by_rethrottle`, `nodes.shutdown`, `remote.info`. -- `expand_wildcards` Whether to expand wildcard expressions to concrete indices that are open, closed or both. Options: open, closed, hidden, none, all. `hidden` option is new. It was also added to the following endpoints: `cat.aliases`, `cat.indices`. -- `delete_by_query`: Parameter `slices` can now be set to `auto`. -- `reindex`: Parameter `slices` can now be set to `auto`. -- `update_by_query`: Parameter `slices` can now be set to `auto`. -- `snapshot.cleanup_repository`: Parameter `body` is removed. - - -[discrete] -===== New API Endpoints - -- `cluster.delete_component_template` -- `cluster.get_component_template` -- `cluster.put_component_template` -- `indices.create_data_stream` (experimental) -- `indices.delete_data_stream` (experimental) -- `indices.get_data_stream` (experimental) - - -[discrete] -==== X-Pack - - -[discrete] -===== API Changes - -- `machine_learing.get_trained_models`: New parameter `tags` -- `machine_learning.put_datafeed`, `machine_learning.update_datafeed`: Added parameters `ignore_unavailable`, `allow_no_indices`, `ignore_throttled`, `expand_wildcards` -- `reload_secure_settings`: New parameter `body`, an object containing the password for the keystore. - - -[discrete] -===== New API Endpoints - -- `async_search.delete` -- `async_search.get` -- `async_search.submit` -- `cat.ml_data_frame_analytics` -- `cat.ml_datafeeds` -- `cat.ml_jobs` -- `cat.ml_trained_models` -- `cat.transform` -- `cat.transforms` -- `machine_learning.estimate_model_memory` -- `transform.delete_transform` -- `transform.get_transform` -- `transform.get_transform_stats` -- `transform.preview_transform` -- `transform.put_transform` -- `transform.start_transform` -- `transform.stop_transform` -- `transform.update_transform` \ No newline at end of file diff --git a/docs/release_notes/78.asciidoc b/docs/release_notes/78.asciidoc deleted file mode 100644 index a5d59e985e..0000000000 --- a/docs/release_notes/78.asciidoc +++ /dev/null @@ -1,103 +0,0 @@ -[[release_notes_78]] -=== 7.8 Release notes - -[discrete] -[[release_notes_781]] -=== 7.8.1 Release notes - -[discrete] -==== Client - -- Support for Elasticsearch version `7.8.1`. -- Bug fix: Fixed a bug on the API endpoints documentation for RubyDocs: there was an unnecessary empty new line in the documentation for parameters that have options. So the parameters before that empty newline were not being documented in RubyDocs. - - -[discrete] -==== X-Pack - - -[discrete] -===== API Changes - -- Update to `info` endpoint. New parameter `accept_enterprise` (boolean): If an enterprise license is installed, return the type and mode as 'enterprise' (default: false). - - -[discrete] -[[release_notes_780]] -=== 7.8.0 Release notes - -[discrete] -==== Client - -- Support for Elasticsearch version `7.8`. -- Surface deprecation headers from Elasticsearch. When there's a `warning` response header in Elasticsearch's response, the client will emit a warning with `warn`. -- Typhoeus is supported again, version 1.4+ and has been added back to the docs. -- Adds documentation and example for integrating with Elastic APM. - - -[discrete] -==== API - - -[discrete] -===== New API Endpoints - -- `abort_benchmark` -- `benchmark` -- `cluster.delete_voting_config_exclusions` -- `cluster.post_voting_config_exclusions` -- `delete_by_rethrottle` -- `nodes.shutdown` -- `remote.info` - -Experimental endpoints: - -- `cluster.delete_component_template` -- `cluster.exists_component_template` -- `cluster.get_component_template` -- `cluster.put_component_template` - -- `indices.delete_index_template` -- `indices.exists_index_template` -- `indices.get_index_template` -- `indices.put_index_template` -- `indices.simulate_index_template` - - -[discrete] -===== API Changes - -- `cat/thread_pool`: `size` is deprecated. -- `indices.get_data_streams`: `name` is now a string instead of list, the name or wildcard expression of the requested data streams. -- `indices.put_index_template`: new parameter: `cause` (string), user defined reason for creating/updating the index template. -- `indices.simulate_index_template`: Two new parameters: `create`, whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one. `cause` User defined reason for dry-run creating the new template for simulation purposes. -- `snapshot.delete_repository`: New parameter `repository`, name of the snapshot repository, wildcard (`*`) patterns are now supported. -- `task.cancel`: new parameter `wait_for_completion` (boolean) Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false. - - -[discrete] -==== X-Pack - - -[discrete] -===== New API Endpoints - -New namespace: `indices` - -- `indices.freeze` -- `indices.reload_search_analyzers` -- `indices.unfreeze` - -New namespace: `searchable_snapshots` - -- `clear_cache` -- `mount` -- `repository_stats` -- `stats` - - -[discrete] -===== API Changes - -- `machine_learning.delete_expired_data` new param `body`: deleting expired data parameters. -- `machine_learning.delete_data_frame_analytics` new param `timeout`: controls the time to wait until a job is deleted. Defaults to 1 minute. diff --git a/docs/release_notes/79.asciidoc b/docs/release_notes/79.asciidoc deleted file mode 100644 index cd780239fb..0000000000 --- a/docs/release_notes/79.asciidoc +++ /dev/null @@ -1,60 +0,0 @@ -[[release_notes_79]] -=== 7.9 Release notes - -[discrete] -==== Client - -- Support for Elasticsearch version `7.9.0`. -- Transport/Connection: Considers attributes values for equality - https://github.com/elastic/elasticsearch-ruby/commit/06ffd03bf51f5f33a0d87e9914e66b39357d40af[Commit]. -- When an API endpoint accepts both `GET` and `POST`, the client will always use `POST` when a request body is present. - -[discrete] -==== API - -- Documentation for API endpoints will point out when an API is experimental, beta or unstable. - -[discrete] -===== New API Endpoints - -- New namespace: `dangling_indices` -- `dangling_indices.delete_dangling_index` -- `dangling_indices.import_dangling_index` -- `dangling_indices.list_dangling_indices` -- `indices.add_block` - -Experimental endpoints: -- `indices.resolve_index` -- `simulate_template` - -[discrete] -===== API Changes - -- `field_caps`: adds body parameter allowing to filter indices if `index_filter` is provided. -- `eql.search`: new parameters `wait_for_completion`, `keep_on_completion` and `keep_alive`. -- `info`: New parameter `accept_enterprise`: If an enterprise license is installed, return the type and mode as 'enterprise' (default: false). -- `indices.put_mapping`: new parameter `write_index_only`. - -[discrete] -==== X-Pack - -[discrete] -===== New API Endpoints - -The Ruby client now supports all the X-Pack API endpoints. - -- New namespace `autoscaling`: `autoscaling.delete_autoscaling_policy`, `autoscaling.get_autoscaling_decision`, `autoscaling.get_autoscaling_policy`, `autoscaling.put_autoscaling_policy` -- New namespace `enrich`: `enrich.delete_policy`, `enrich.execute_policy`, `enrich.get_policy`, `enrich.put_policy`, `enrich.stats` -- New namespace `eql`: `eql.delete`, `eql.get`, `eql.search` -- New namespace `cross_cluster_replication`: `cross_cluster_replication.delete_auto_follow_pattern`, `cross_cluster_replication.follow`, `cross_cluster_replication.follow_info`, `cross_cluster_replication.follow_stats`, `cross_cluster_replication.forget_follower`, `cross_cluster_replication.get_auto_follow_pattern`, `cross_cluster_replication.pause_auto_follow_pattern`, `cross_cluster_replication.pause_follow`, `cross_cluster_replication.put_auto_follow_pattern`, `cross_cluster_replication.resume_auto_follow_pattern`, `cross_cluster_replication.resume_follow`, `cross_cluster_replication.stats`, `cross_cluster_replication.unfollow` -- New namespace `snapshot_lifecycle_management`: `snapshot_lifecycle_management.delete_lifecycle`, `snapshot_lifecycle_management.execute_lifecycle`, `snapshot_lifecycle_management.execute_retention`, `snapshot_lifecycle_management.get_lifecycle`, `snapshot_lifecycle_management.get_stats`, `snapshot_lifecycle_management.get_status`, `snapshot_lifecycle_management.put_lifecycle`, `snapshot_lifecycle_management.start`, `snapshot_lifecycle_management.stop` -- `indices.create_data_stream` -- `indices.data_streams_stats` -- `indices.delete_data_stream` -- `indices.get_data_stream` -- `security.clear_cached_privileges` -- `machine_learning.update_data_frame_analytics` - -[discrete] -===== API Changes - -- `machine_learning.delete_expired_data`: new parameters `job_id`, `requests_per_second` and `timeout` \ No newline at end of file diff --git a/docs/release_notes/80.asciidoc b/docs/release_notes/80.asciidoc deleted file mode 100644 index c97e91cc7b..0000000000 --- a/docs/release_notes/80.asciidoc +++ /dev/null @@ -1,74 +0,0 @@ -[[release_notes_80]] -=== 8.0 Release notes - -[discrete] -[[release_notes_801]] -=== 8.0.1 Release notes - -- Fixes an issue with the generated API code. When updating the code generator for 8.x, the order of `arguments.clone` in the generated code was changed. This would make it so that we would modify the parameters passed in before cloning them, which is undesired. Issue: https://github.com/elastic/elasticsearch-ruby/issues/1727[#1727]. - -[discrete] -[[release_notes_800]] -=== 8.0.0 Release notes - -First release for the 8.x branch with a few major changes. - -- Tested versions of Ruby for 8.0.0: Ruby (MRI) 2.6, 2.7, 3.0 and 3.1, JRuby 9.3. - -[discrete] -==== Client - -The code for the dependency `elasticsearch-transport` has been promoted to https://github.com/elastic/elastic-transport-ruby[its own repository] and the project and gem have been renamed to https://rubygems.org/gems/elastic-transport[`elastic-transport`]. This gem now powers https://rubygems.org/gems/elasticsearch[`elasticsearch`] and https://rubygems.org/gems/elastic-enterprise-search[`elastic-enterprise-search`]. The `elasticsearch-transport` gem won't be maintained after the last release in the `7.x` branch, in favour of `elastic-transport`. - -This will allow us to better address maintainance in both clients and the library itself. - -[discrete] -==== API - -The `elasticsearch-api` library has been generated based on the {es} 8.0.0 REST specification. - -#### X-Pack Deprecation - -X-Pack has been deprecated. The `elasticsearch-xpack` gem will no longer be maintained after the last release in the `7.x` branch. The "X-Pack" integration library codebase was merged into `elasticsearch-api`. All the functionality is available from `elasticsearch-api`. The `xpack` namespace was removed for accessing any APIs other than `_xpack` (`client.xpack.info`) and `_xpack/usage` (`client.xpack.usage`). But APIs which were previously available through the `xpack` namespace e.g.: `client.xpack.machine_learning` are now only available directly: `client.machine_learning`. - -#### Parameter checking was removed - -The code in `elasticsearch-api` will no longer validate all the parameters sent. It will only validate the required parameters such as those needed to build the path for the request. But other API parameters are going to be validated by {es}. This provides better forwards and backwards compatibility in the client. - -#### Response object - -In previous versions of the client, calling an API endpoint would return the JSON body of the response. With `8.0`, we are returning a new Response object `Elasticsearch::API::Response`. It still behaves like a Hash to maintain backwards compatibility, but adds the `status` and `headers` methods from the `Elastic::Transport:Transport::Response` object: - -```ruby -elastic_ruby(main)> response = client.info -=> #"instance", - "cluster_name"=>"elasticsearch-8-0-0-SNAPSHOT-rest-test", - "cluster_uuid"=>"oIfRARuYRGuVYybjxQJ87w", - "version"=> - {"number"=>"8.0.0-SNAPSHOT", - "build_flavor"=>"default", - "build_type"=>"docker", - "build_hash"=>"7e23c54eb31cc101d1a4811b9ab9c4fd33ed6a8d", - "build_date"=>"2021-11-04T00:21:32.464485627Z", - "build_snapshot"=>true, - "lucene_version"=>"9.0.0", - "minimum_wire_compatibility_version"=>"7.16.0", - "minimum_index_compatibility_version"=>"7.0.0"}, - "tagline"=>"You Know, for Search"}, - @headers={"X-elastic-product"=>"Elasticsearch", "content-type"=>"application/json", "content-length"=>"567"}, - @status=200>> -elastic_ruby(main)> response.status -=> 200 -elastic_ruby(main)> response.headers -=> {"X-elastic-product"=>"Elasticsearch", "content-type"=>"application/json", "content-length"=>"567"} -elastic_ruby(main)> response['name'] -=> "instance" -elastic_ruby(main)> response['tagline'] -=> "You Know, for Search" -``` - -Please https://github.com/elastic/elasticsearch-ruby/issues[let us know if you find any issues]. diff --git a/docs/release_notes/81.asciidoc b/docs/release_notes/81.asciidoc deleted file mode 100644 index 871486ead8..0000000000 --- a/docs/release_notes/81.asciidoc +++ /dev/null @@ -1,55 +0,0 @@ -[[release_notes_81]] -=== 8.1 Release notes - -[discrete] -[[release_notes_812]] -=== 8.1.2 Release notes - -[discrete] -==== API - -- Fixes an issue with the generated API code. When updating the code generator for 8.x, the order of `arguments.clone` in the generated code was changed. This would make it so that we would modify the parameters passed in before cloning them, which is undesired. Issue: https://github.com/elastic/elasticsearch-ruby/issues/1727[#1727]. - -[discrete] -[[release_notes_811]] -=== 8.1.1 Release notes - -No release, no changes on the client. - -[discrete] -[[release_notes_810]] -=== 8.1.0 Release notes - -- Tested versions of Ruby for 8.1.0: Ruby (MRI) 2.6, 2.7, 3.0 and 3.1, JRuby 9.3. - -[discrete] -==== API - -Updated for compatibility with Elasticsearch 8.1's API. - -[discrete] -===== New parameters: -- `indices.forcemerge` - `wait_for_completion` Should the request wait until the force merge is completed. -- `indices.get` - `features` Return only information on specified index features (options: aliases, mappings, settings). -- `ingest.put_pipeline` `if_version` (Integer), required version for optimistic concurrency control for pipeline updates. -- `ml.delete_trained_model` - `timeout` controls the amount of time to wait for the model to be deleted. `force` (Boolean) true if the model should be forcefully deleted. -- `ml.stop_trained_model_deployment` - `allow_no_match` whether to ignore if a wildcard expression matches no deployments. (This includes `_all` string or when no deployments have been specified). `force` true if the deployment should be forcefully stopped. Adds `body` parameter, the stop deployment parameters. -- `nodes.hot_threads` - `sort` the sort order for 'cpu' type (default: total) (options: cpu, total) - -[discrete] -===== Updated parameters: -- `indices.get_index_template` - `name` is now a String, a pattern that returned template names must match. -- `knn_search` - `index` removes option to use empty string to perform the operation on all indices. -- `ml.close_job`, `ml.get_job_stats`, `ml.get_jobs`, `ml.get_overall_buckets` - Remove `allow_no_jobs` parameter. -- `ml.get_datafeed_stats`, `ml.get_datafeeds` - Remove `allow_no_datafeeds` parameter. -- `nodes.hot_threads` - `type` parameter adds `mem` option. -- `nodes.info` - `metric` updated to use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics. (options: settings, os, process, jvm, thread_pool, transport, http, plugins, ingest, indices, aggregations, _all, _none). `index_metric` option `shards` changes to `shard_stats`. -- `open_point_in_time` - `keep_alive` is now a required parameter. -- `search_mvt` - `grid_type` parameter adds `centroid` option in addition to `grid` and `point`. - -- New experimental APIs, designed for internal use by the fleet server project: `fleet.search`, `fleet.msearch`. - -[discrete] -===== New APIs -- OpenID Connect Authentication: `security.oidc_authenticate`, `security.oidc_logout`, `security.oidc_prepare_authentication`. -- `transform.reset_transform`. diff --git a/docs/release_notes/810.asciidoc b/docs/release_notes/810.asciidoc deleted file mode 100644 index c58f777d8e..0000000000 --- a/docs/release_notes/810.asciidoc +++ /dev/null @@ -1,51 +0,0 @@ -[[release_notes_8100]] -=== 8.10 Release notes - -[discrete] -[[release_notes_810_0]] -=== 8.10.0 Release notes - -[discrete] -=== Client -* Tested versions of Ruby for 8.10.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4. - -[discrete] -=== API - -[discrete] -==== New Experimental APIs, for internal use: -- `fleet.delete_secret` -- `fleet.get_secret` -- `fleet.post_secret` - -[discrete] -==== New stable APIs: -- `security.get_settings` - Retrieve settings for the security system indices -- `security.update_settings` - Update settings for the security system indices - -[discrete] -==== New Experimental API: -- `query_ruleset.list` List query rulesets. - -[discrete] -==== API Changes: -- `indices.reload_search_analyzers` - Adds parameter `resource` changed resource to reload analyzers from if applicable - -Promoted from Experimental to Beta: - -- `security.create_cross_cluster_api_key` -- `security.update_cross_cluster_api_key` - -[discrete] -==== Synonyms namespace update: - -All synonym related APIs have been moved to the `synonyms` namespace and some of the endpoints have been renamed, as well as their parameters: - -- `synonyms.delete` => `synonyms.delete_synonym` - requires `id`, the id of the synonyms set to be deleted. -- `synonyms.get` => `synonyms.get_synonym` - requires `id`, the name of the synonyms set to be retrieved. -- `synonyms_set.get_synonyms_sets` => `synonyms.get_synonyms_sets` -- `synonyms.put` => `synonyms.put_synonym` - requires `id` of the synonyms set to be created or updated. -- `synonym_rule.put` => `synonyms.put_synonym_rule` - Parameters changed to `set_id` (the id of the synonym set to be updated with the synonym rule) and `rule_id` (the id of the synonym rule to be updated or created). -- New Experimental API `synonyms.delete_synonym_rule` - Deletes a synonym rule in a synonym set -- New Experimental API `synonyms.get_synonym_rule` - Retrieves a synonym rule from a synonym set - diff --git a/docs/release_notes/811.asciidoc b/docs/release_notes/811.asciidoc deleted file mode 100644 index 43c43427de..0000000000 --- a/docs/release_notes/811.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[[release_notes_8110]] -=== 8.11 Release notes - -[discrete] -[[release_notes_811_0]] -=== 8.11.0 Release notes - -[discrete] -=== Client - -* Tested versions of Ruby for 8.11.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4. -* Adds native support for *Open Telemetry*. See <> for documentation. -* Improved documentation, now you can find more examples in Ruby in the https://www.elastic.co/guide/en/elasticsearch/reference/8.11/rest-apis.html[REST API reference]. - -[discrete] -=== API - -New Experimental APIs: - -* `esql.query` - Executes an ESQL request. -* `inference.delete_model` - Delete model in the Inference API -* `inference.get_model` - Get a model in the Inference API -* `inference.inference` - Perform inference on a model -* `inference.put_model` - Configure a model for use in the Inference API diff --git a/docs/release_notes/812.asciidoc b/docs/release_notes/812.asciidoc deleted file mode 100644 index 7fb1c52f6e..0000000000 --- a/docs/release_notes/812.asciidoc +++ /dev/null @@ -1,65 +0,0 @@ -[[release_notes_8_12]] -=== 8.12 Release notes - -[discrete] -[[release_notes_8_12_0]] -=== 8.12.0 Release notes - -[discrete] -==== Client -* Tested versions of Ruby for 8.12.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. - -[discrete] -==== API - -API Changes: - -* `bulk` - Adds boolean `:list_executed_pipelines` parameter: Sets `list_executed_pipelines` for all incoming documents. Defaults to unset (false). -* `indices.put_settings` - Adds boolean `:reopen` parameter: Whether to close and reopen the index to apply non-dynamic settings. If set to `true` the indices to which the settings are being applied will be closed temporarily and then reopened in order to apply the changes. The default is `false`. -* `open_point_in_time` - Adds Hash `:body` parameter: an index_filter specified with the Query DSL. -* `security.get_api_key` - Adds boolean `:active_only` parameter: flag to limit response to only active (not invalidated or expired) API keys. - -[discrete] -===== Connectors - -Version 8.12 introduces the experimental https://www.elastic.co/guide/en/elasticsearch/reference/8.12/connector-apis.html[Connectors API]. - -Use the following APIs to manage connectors: - -* `connector.post` - Creates a connector. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/create-connector-api.html[documentation]. -* `connector.put` - Creates or updates a connector. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/create-connector-api.html[documentation]. -* `connector.delete` - Deletes a connector. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-connector-api.html[documentation]. -* `connector.get` - Returns the details about a connector. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/get-connector-api.html[documentation]. -* `connector.list` - Lists all connectors. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/list-connector-api.html[documentation]. -* `connector.check_in` - Updates the last_seen timestamp in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/check-in-connector-api.html[documentation]. -* `connector.update_configuration` - Updates the connector configuration. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-configuration-api.html[documentation]. -* `connector.update_error` - Updates the error field in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-error-api.html[documentation]. -* `connector.update_filtering` - Updates the filtering field in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-filtering-api.html[documentation]. -* `connector.last_sync` - Updates the stats of last sync in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-last-sync-api.html[documentation]. -* `connector.update_name` - Updates the name and/or description fields in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-name-description-api.html[documentation]. -* `connector.update_pipeline` - Updates the pipeline field in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-pipeline-api.html[documentation]. -* `connector.update_scheduling` - Updates the scheduling field in the connector document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-scheduling-api.html[documentation]. - -Use the following APIs to manage sync jobs: - -* `connector_sync_job.cancel` - Cancels a connector sync job. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cancel-connector-sync-job-api.html[documentation]. -* `connector_sync_job.check_in` - Checks in a connector sync job (refreshes 'last_seen'). See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/check-in-connector-sync-job-api.html[documentation]. -* `connector_sync_job.delete` - Deletes a connector sync job. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-connector-sync-job-api.html[documentation]. -* `connector_sync_job.error` - Sets an error for a connector sync job. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/set-connector-sync-job-error-api.html[documentation]. -* `connector_sync_job.get` - Returns the details about a connector sync job. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/get-connector-sync-job-api.html[documentation]. -* `connector_sync_job.list` - Lists all connector sync jobs. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/list-connector-sync-jobs-api.html[documentation]. -* `connector_sync_job.post` - Creates a connector sync job. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/create-connector-sync-job-api.html[documentation]. -* `connector_sync_job.update_stats` - Updates the stats fields in the connector sync job document. See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/set-connector-sync-job-stats-api.html[documentation]. - -[discrete] -===== Profiling -New API for https://www.elastic.co/guide/en/observability/8.12/universal-profiling.html[Universal profiling]. - -* `profiling.status` - Returns basic information about the status of Universal Profiling. - - -[discrete] -===== Simulate -New experimental API: - -* `simulate.ingest` - Simulates running ingest with example documents. See: https://www.elastic.co/guide/en/elasticsearch/reference/8.12/simulate-ingest-api.html diff --git a/docs/release_notes/813.asciidoc b/docs/release_notes/813.asciidoc deleted file mode 100644 index 0c3066d3e4..0000000000 --- a/docs/release_notes/813.asciidoc +++ /dev/null @@ -1,76 +0,0 @@ -[[release_notes_8_13]] -=== 8.13 Release notes - -[discrete] -[[release_notes_8_13_0]] -=== 8.13.0 Release notes - -[discrete] -==== Client -* Tested versions of Ruby for 8.13.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. - -[discrete] -==== Experimental ES|QL Helper - -This version provides a new experimental Helper for the ES|QL `query` API. Please check out https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/8.13/Helpers.html#esql-helper[the documentation] and https://github.com/elastic/elasticsearch-ruby/issues/new/choose[open an issue] if you encounter any problems or have any feedback. - -[discrete] -==== API - -API Changes: - -* `async_search.status` - adds Time `:keep_alive` parameter: Specify the time interval in which the results (partial or final) for this search will be available. -* `bulk` - adds boolean `:require_data_stream` parameter: When true, requires the destination to be a data stream (existing or to-be-created). Default is false. -* `connector.list` - Adds the following parameters: - * `:index_name` (List): A comma-separated list of connector index names to fetch connector documents for. - * `:connector_name` (List): A comma-separated list of connector names to fetch connector documents for. - * `:service_type` (List): A comma-separated list of connector service types to fetch connector documents for. - * `:query` (String): A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names. -* `esql.query` - adds boolean `:drop_null_columns` parameter: Should entirely null columns be removed from the results? Their name and type will be returning in a new `all_columns` section. -* `field_caps` - Adds `:include_empty_fields` boolean parameter: Include empty fields in result. -* `index` - adds boolean `:require_data_stream` parameter: When true, requires the destination to be a data stream (existing or to-be-created). Default is false. -* `indices.rollover` - adds boolean `:lazy` parameter: If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams. -* connector_sync_job.list - adds List `:job_type` parameter: A comma-separated list of job types. -* `inference.delete_model`, `inference.get_model`, `inference.inference`, `inference.put_model`: renames `:model_id` parameter to `:inference_id`. -* `termvector` will show a warning since it's been deprecated. Please use the plural version, `termvectors`. - -New APIs: - -* `indices.resolve_cluster` - Resolves the specified index expressions to return information about each cluster, including the local cluster, if included. -* `profiling.flamegraph` - Extracts a UI-optimized structure to render flamegraphs from Universal Profiling. -* `profiling.stacktraces` - Extracts raw stacktrace information from Universal Profiling. -* `security.query_user` - Retrieves information for Users using a subset of query DSL -* `text_structure.test_grok_pattern` - Tests a Grok pattern on some text. - -APIs Migrated from experimental to stable: - -* `synonyms.delete_synonym` -* `synonyms.delete_synonym_rule` -* `synonyms.get_synonym` -* `synonyms.get_synonym_rule` -* `synonyms.get_synonyms_sets` -* `synonyms.put_synonym` -* `synonyms.put_synonym_rule` - -New Experimental APIs - -* `connector.update_api_key_id` - Updates the API key id and/or API key secret id fields in the connector document. -* `connector.update_index_name` - Updates the index name of the connector. -* `connector.update_native` - Updates the is_native flag of the connector. -* `connector.update_service_type` - Updates the service type of the connector. -* `connector.update_status` - Updates the status of the connector. -* `esql.async_query` - Executes an ESQL request asynchronously -* `esql.async_query_get` - Retrieves the results of a previously submitted async query request given its ID. - -New Experimental namespace `connector_secret`: - -* `connector_secret.delete` - Deletes a connector secret. -* `connector_secret.get` - Retrieves a secret stored by Connectors. -* `connector_secret.post` - Creates a secret for a Connector. -* `connector_secret.put` - Creates or updates a secret for a Connector. - -[discrete] -==== Development - -* Migrated from `byebug` to `debug`. -* Added extra testing for OpenTelemetry. diff --git a/docs/release_notes/814.asciidoc b/docs/release_notes/814.asciidoc deleted file mode 100644 index 6bb42142f9..0000000000 --- a/docs/release_notes/814.asciidoc +++ /dev/null @@ -1,52 +0,0 @@ -[[release_notes_8_14]] -=== 8.14 Release notes - -[discrete] -[[release_notes_8_14_0]] -=== 8.14.0 Release notes - -[discrete] -==== Client -* Tested versions of Ruby for 8.14.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. - -[discrete] -==== API - -API changes: - -* All Connector APIs have been migrated to one common namespace `connector`: -** `connector_secret.delete` -> `connector.secret_delete` -** `connector_secret.get` -> `connector.secret_get` -** `connector_secret.post` -> `connector.secret_post` -** `connector_secret.put` -> `connector.secret_put` -** `connector_sync_job.cancel` -> `connector.sync_job_cancel` -** `connector_sync_job.check_in` -> `connector.sync_job_check_in` -** `connector_sync_job.delete` -> `connector.sync_job_delete` -** `connector_sync_job.error` -> `connector.sync_job_error` -** `connector_sync_job.get` -> `connector.sync_job_get` -** `connector_sync_job.post` -> `connector.sync_job_post` -** `connector_sync_job.update_stats` -> `connector.sync_job_update_stats` - -* `connector.delete` - Adds Boolean parameter `:delete_sync_jobs`: Determines whether associated sync jobs are also deleted. -* `cross_cluster_replication.delete_auto_follow_pattern`, `cross_cluster_replication.follow`, `cross_cluster_replication.follow_info`, `cross_cluster_replication.get_auto_follow_pattern`, `cross_cluster_replication.pause_auto_follow_pattern`, `cross_cluster_replication.pause_follow`, `cross_cluster_replication.put_auto_follow_pattern`, `cross_cluster_replication.resume_auto_follow_pattern`, `cross_cluster_replication.resume_follow`, `cross_cluster_replication.stats`, `cross_cluster_replication.unfollow` - Add Time parameter `:master_timeout`: Explicit operation timeout for connection to master node. -* `cross_cluster_replication.follow_stats`, `cross_cluster_replication.forget_follower`, `cross_cluster_replication.stats` - Add Time parameter `:timeout`: Explicit operation timeout. -* `indices/rollover` - Adds Boolean parameter `:target_failure` If set to true, the rollover action will be applied on the failure store of the data stream. -* `inference.get_model` - Parameter `inference_id` no longer required. -* `search_application.search` - Adds Boolean parameter `:typed_keys`: Specify whether aggregation and suggester names should be prefixed by their respective types in the response. -* `security.get_api_key`, `security.query_api_keys` - Add Boolean parameter `:with_profile_uid`: flag to also retrieve the API Key's owner profile uid, if it exists. - -New APIs: - -- `profiling.topn_functions` - Extracts a list of topN functions from Universal Profiling. -- `text_structure.find_field_structure` - Finds the structure of a text field in an index. -- `text_structure/find_message_structure`- Finds the structure of a list of messages. The messages must contain data that is suitable to be ingested into Elasticsearch. - -APIs Migrated from experimental to stable: - -- `esql.async_query` -- `esql.query` - -New Experimental APIs: - -- `connector.update_active_filtering` - Activates the draft filtering rules if they are in a validated state. -- `connector.update_filtering_validation` - Updates the validation info of the draft filtering rules. diff --git a/docs/release_notes/815.asciidoc b/docs/release_notes/815.asciidoc deleted file mode 100644 index 38312a5922..0000000000 --- a/docs/release_notes/815.asciidoc +++ /dev/null @@ -1,99 +0,0 @@ -[[release_notes_8_15]] -=== 8.15 Release notes - -[discrete] -[[release_notes_8_15_0]] -=== 8.15.0 Release notes - -[discrete] -==== Client -* Tested versions of Ruby for 8.15.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. - -[discrete] -==== API - -[discrete] -===== API changes - -* `cluster.allocation_explain` - `body` is no longer a required parameter. -* `connector.put` - (experimental API) `body` and `connector_id` are no longer required parameters. -* `machine_learning.update_trained_model_deployment` has been promoted to stable from Beta. Adds Integer parameter `number_of_allocations`, updates the model deployment to this number of allocations. -* `snapshot.delete` - Adds `wait_for_completion` Boolean parameter, should this request wait until the operation has completed before returning. - -[discrete] -====== `master_timeout` and `timeout` parameters - -These parameters have been added to several APIs: - -* `master_timeout` timeout for processing on master node. -* `timeout` timeout for acknowledgement of update from all nodes in cluster parameters. - -The APIs: - -* `autoscaling.delete_autoscaling_policy` - both. -* `autoscaling.get_autoscaling_capacity`- `master_timeout`. -* `get_autoscaling_policy` - `master_timeout`. -* `put_autoscaling_policy` - both. -* `enrich.delete_policy` - `master_timeout`. -* `enrich.execute_policy` - `master_timeout`. -* `enrich.get_policy` - `master_timeout`. -* `enrich.put_policy` - `master_timeout`. -* `enrich.stats` - `master_timeout`. -* `features.reset_features` - `master_timeout`. -* `license.delete` - both. -* `license.post` - both. -* `license.post_start_basic` - both. -* `license.post_start_trial` - both. -* `security.get_settings` - `master_timeout`. -* `security.update_settings` - both. -* `shutdown.get_node` - `master_timeout`. -* `snapshot_lifecycle_management.start` - both. -* `snapshot_lifecycle_management.stop` - both. -* `watcher.get_settings` - `master_timeout`. -* `watcher.start` - `master_timeout`. -* `watcher.stop` - `master_timeout`. -* `watcher.update_settings` - both. - -[discrete] -====== Inference APIs have been renamed: - -* `inference.delete_model` => `inference.delete`. Also adds two new parameters: -** `dry_run` (Boolean), if true the endpoint will not be deleted and a list of ingest processors which reference this endpoint will be returned. -** `force` (Boolean), if true the endpoint will be forcefully stopped (regardless of whether or not it is referenced by any ingest processors or semantic text fields). -* `inference.get_model` => `inference.get` -* `inference.put_model` => `inference.put` - -[discrete] -====== Query Rules parameters consolidated - -Changes in `query_ruleset` and `query_rules` APIs, These have been combined into the `query_rules` namespace: - -* `query_rules.delete_ruleset` - Renamed from `query_ruleset.delete`, promoted from experimental to stable. -* `query_rules.delete_rule` - Deletes an individual query rule within a ruleset. -* `query_rules.get_rule` - Returns the details about an individual query rule within a ruleset. -* `query_rules.get_ruleset` - Renamed from `query_ruleset.get`, promoted from experimental to stable. -* `query_rules.list_rulesets` - Renamed from `query_ruleset.list`, promoted from experimental to stable. -* `query_rules.put_rule` - Creates or updates a query rule within a ruleset. -* `query_rules.put_ruleset` - Renamed from `query_ruleset.put_ruleset`, promoted from experimental to stable. - -[discrete] -===== New APIs: - -* `ingest.delete_geoip_database` - Deletes a geoip database configuration. -* `ingest.get_geoip_database` - Returns geoip database configuration. -* `ingest.put_geoip_database` - Puts the configuration for a geoip database to be downloaded. -* `security.bulk_delete_role` - Bulk delete roles in the native realm. -* `security.bulk_put_role` - Bulk adds and updates roles in the native realm. -* `security.query_role` - Retrieves information for Roles using a subset of query DSL. -* `transform.get_node_stats` - Retrieves transform usage information for transform nodes. - -[discrete] -===== New Experimental APIs: - -* `connector.sync_job_claim` - Claims a connector sync job. -* `connector.update_features` - Updates the connector features in the connector document. - -[discrete] -==== Development - -- Added a build using https://github.com/elastic/es-test-runner-ruby[es-test-runner-ruby] and https://github.com/elastic/elasticsearch-clients-tests[Elasticsearch Clients Tests] which will replace the Elasticsearch YAML test runner. diff --git a/docs/release_notes/816.asciidoc b/docs/release_notes/816.asciidoc deleted file mode 100644 index c32e719f57..0000000000 --- a/docs/release_notes/816.asciidoc +++ /dev/null @@ -1,57 +0,0 @@ -[[release_notes_8_16]] -=== 8.16 Release notes - -[discrete] -[[release_notes_8_16_0]] -=== 8.16.0 Release notes - -[discrete] -==== Client -* Tested versions of Ruby for 8.16.0: Ruby (MRI) 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. - -[discrete] -==== API - -[discrete] -===== API changes - -* `capabilities` - Adds `local_only` boolean parameter: True if only the node being called should be considered. -* `cluster.stats`- Removes `flat_settings` parameter, adds `include_remotes` boolean parameter: Include remote cluster data into the response (default: false). -* `indices.get_data_stream` - Adds `verbose` boolean parameter: Whether the maximum timestamp for each data stream should be calculated and returned (default: false). Adds `master_timeout` (see below). -* `query_rules.delete_ruleset` - Accepts `ignore: 404` common parameter. - -These parameters have been added to several APIs: - -* `master_timeout` timeout for processing on master node. -* `timeout` timeout for acknowledgement of update from all nodes in cluster parameters. - -Added in: - -* `indices.create_data_stream` - both. -* `indices.delete_data_stream` - `master_timeout`. -* `indices.get_data_lifecycle` - `master_timeout`. -* `indices.get_data_stream` - `master_timeout`. -* `indices.migrate_to_data_stream` - both. -* `indices.promote_data_stream` - `master_timeout`. -* `search_shards` - `master_timeout`. - -**APIs Promoted from Experimental to Stable:** - -* `indices.delete_data_lifecycle` -* `indices.explain_data_lifecycle` -* `indices.get_data_lifecycle` -* `indices.put_data_lifecycle` -* `security.create_cross_cluster_api_key` -* `security.update_cross_cluster_api_key` - -**New APIs** - -* `ingest.delete_ip_location_database` - Deletes an ip location database configuration. -* `ingest.get_ip_location_database` - Returns the specified ip location database configuration. -* `ingest.put_ip_location_database` - Puts the configuration for a ip location database to be downloaded. - - -**New Experimental APIs** - -* `inference.stream_inference` - Perform streaming inference. -* `query_rules.test` - Tests a query ruleset to identify the rules that would match input criteria. diff --git a/docs/release_notes/817.asciidoc b/docs/release_notes/817.asciidoc deleted file mode 100644 index 2963eeb0d1..0000000000 --- a/docs/release_notes/817.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[[release_notes_8_17]] -=== 8.17 Release notes - -[discrete] -[[release_notes_8_17_0]] -=== 8.17.0 Release notes - -[discrete] -==== Client -* Tested versions of Ruby for 8.17.0: Ruby (MRI) 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. - -[discrete] -==== API - -[discrete] -===== API changes -* `async_search.submit` - Removes `keep_alive` parameter. Adds: -** `ccs_minimize_roundtrips` (Boolean): When doing a cross-cluster search, setting it to true may improve overall search latency, particularly when searching clusters with a large number of shards. However, when set to true, the progress of searches on the remote clusters will not be received until the search finishes on all clusters. -** `rest_total_hits_as_int` (Boolean): Indicates whether hits.total should be rendered as an integer or an object in the rest search response. -* `open_point_in_time` - Adds `allow_partial_search_results` (Boolean) parameter: Specify whether to tolerate shards missing when creating the point-in-time, or otherwise throw an exception (default: false). diff --git a/docs/release_notes/82.asciidoc b/docs/release_notes/82.asciidoc deleted file mode 100644 index 401958b6c7..0000000000 --- a/docs/release_notes/82.asciidoc +++ /dev/null @@ -1,49 +0,0 @@ -[[release_notes_82]] -=== 8.2 Release notes - -[discrete] -[[release_notes_822]] -=== 8.2.2 Release notes - -- Updates dependency on `elastic-transport` to `~> 8.0` - - -[discrete] -[[release_notes_821]] -=== 8.2.1 Release notes - -No release, no changes on the client. - -[discrete] -[[release_notes_820]] -=== 8.2.0 Release notes - - -- Tested versions of Ruby for 8.2.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3. - -[discrete] -==== API - -Updated for compatibility with Elasticsearch 8.2's API. - -[discrete] -===== New parameters: - -* `field_caps` -** `filters` An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent -** `types` Only return results for fields that have one of the types in the list - -[discrete] -===== New APIs - -- `cat.component_templates` - Returns information about existing component_templates templates. -- `ml.get_memory_stats` - Returns information on how ML is using memory. - -[discrete] -===== New Experimental APIs -- `security.activate_user_profile` - Creates or updates the user profile on behalf of another user. -- `security.disable_user_profile` - Disables a user profile so it's not visible in user profile searches. -- `security.enable_user_profile` - Enables a user profile so it's visible in user profile searches. -- `security.get_user_profile` - Retrieves a user profile for the given unique ID. -- `security.suggest_user_profiles` - Get suggestions for user profiles that match specified search criteria. -- `security.update_user_profile_data` - Update application specific data for the user profile of the given unique ID. diff --git a/docs/release_notes/83.asciidoc b/docs/release_notes/83.asciidoc deleted file mode 100644 index aa0b2d8d53..0000000000 --- a/docs/release_notes/83.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[[release_notes_83]] -=== 8.3 Release notes - -[discrete] -[[release_notes_830]] -=== 8.3.0 Release notes - -- Tested versions of Ruby for 8.3.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3. - -[discrete] -==== API - -- Added build hash to auto generated code. The code generator obtains the git hash from the Elasticsearch specification and adds it as a comment in the code. This allows us to track the version for each generated class. -- Updated for compatibility with Elasticsearch 8.3's API. - -[discrete] -===== API Changes - -* `cluster.delete_voting_config_exclusions`, `cluster.post_voting_config_exclusions` - Add new parameter `master_timeout` (Time) Timeout for submitting request to master. -* `machine_learning.infer_trained_model_deployment` is renamed to `machine_learning.infer_trained_model`. The url `/_ml/trained_models/{model_id}/deployment/_infer` is deprecated since 8.3, use `/_ml/trained_models/{model_id}/_infer` instead. -* `machine_learning.preview_datafeed` - Adds new parameters: -** `start` (String) The start time from where the datafeed preview should begin -** `end` (String) The end time when the datafeed preview should stop -* `machine_learning.start_trained_model_deployment` - Adds new parameters: -** `number_of_allocations` (Integer) The number of model allocations on each node where the model is deployed. -** `threads_per_allocation` (Integer) The number of threads used by each model allocation during inference. -** `queue_capacity` (Integer) Controls how many inference requests are allowed in the queue at a time. -* `search_mvt` - Adds new parameter: `with_labels` (Boolean) If true, the hits and aggs layers will contain additional point features with suggested label positions for the original features -* `snapshot.get` - Adds new parameter: `index_names` (Boolean) Whether to include the name of each index in the snapshot. Defaults to true. - -[discrete] -===== New Experimental APIs -* `security.has_privileges_user_profile` Determines whether the users associated with the specified profile IDs have all the requested privileges diff --git a/docs/release_notes/84.asciidoc b/docs/release_notes/84.asciidoc deleted file mode 100644 index 19901f675e..0000000000 --- a/docs/release_notes/84.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[[release_notes_84]] -=== 8.4 Release notes - -[discrete] -[[release_notes_840]] -=== 8.4.0 Release notes - -- Tested versions of Ruby for 8.4.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3. - -[discrete] -==== API - -[discrete] -===== New APIs - -* `security.update_api_key` - Updates attributes of an existing API key. https://www.elastic.co/guide/en/elasticsearch/reference/8.4/security-api-update-api-key.html[Documentation]. - -[discrete] -===== API Changes -* `get` - Adds new parameter `force_synthetic_source` (Boolean) Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. -* `machine_learning.start_trained_model_deployment` - Adds new parameter `cache_size` (String) A byte-size value for configuring the inference cache size. For example, 20mb. -* `mget` - Adds new parameter `force_synthetic_source` (Boolean) Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. -* `search` - Adds new parameter `force_synthetic_source` (Boolean) Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. -* `snapshot.get` - Adds new parameters: -** `sort` (String) Allows setting a sort order for the result. Defaults to start_time (options: start_time, duration, name, repository, index_count, shard_count, failed_shard_count). -** `size` (Integer) Maximum number of snapshots to return. Defaults to 0 which means return all that match without limit. -** `order` (String) Sort order (options: asc, desc). -** `from_sort_value` (String) Value of the current sort column at which to start retrieval. -** `after` (String) Offset identifier to start pagination from as returned by the 'next' field in the response body. -** `offset` (Integer) Numeric offset to start pagination based on the snapshots matching the request. Defaults to 0. -** `slm_policy_filter` (String) Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Accepts wildcards. Use the special pattern '_none' to match snapshots without an SLM policy. diff --git a/docs/release_notes/85.asciidoc b/docs/release_notes/85.asciidoc deleted file mode 100644 index 4ba0e56497..0000000000 --- a/docs/release_notes/85.asciidoc +++ /dev/null @@ -1,105 +0,0 @@ -[[release_notes_85]] -=== 8.5 Release notes - -[discrete] -[[release_notes_852]] -=== 8.5.2 Release notes - -[discrete] -==== API Bugfix - -Fixes `security.create_service_token` API, uses `POST` when token name isn't present. -Thanks https://github.com/carlosdelest[@carlosdelest] for reporting in https://github.com/elastic/elasticsearch-ruby/pull/1961[#1961]. - -[discrete] -[[release_notes_851]] -=== 8.5.1 Release notes - -[discrete] -==== Bugfixes - -Fixes bug when instantiating client with `api_key`: When passing in `api_key` and `transport_options` that don't include headers to the client, the `api_key` code would overwrite the arguments passed in for `transport_options`. This was fixed in https://github.com/elastic/elasticsearch-ruby/pull/1941/files[this Pull Request]. -Thanks @svdasein for reporting in https://github.com/elastic/elasticsearch-ruby/issues/1940[#1940]. - -[discrete] -[[release_notes_850]] -=== 8.5.0 Release notes - -- Tested versions of Ruby for 8.5.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3. - -[discrete] -==== Client - -With the latest release of `elastic-transport` - `v8.1.0` - this gem now supports Faraday v2. Elasticsearch Ruby has an open dependency on `elastic-transport` (`'elastic-transport', '~> 8'`), so when you upgrade your gems, `8.1.0` will be installed. This supports both Faraday v1 and Faraday v2. The main change on dependencies when using Faraday v2 is all adapters, except for the default `net_http` one, have been moved out of Faraday into separate gems. This means if you're not using the default adapter and you migrate to Faraday v2, you'll need to add the adapter gems to your Gemfile. - -These are the gems required for the different adapters with Faraday 2, instead of the libraries on which they were based: - -[source,ruby] ------------------------------------- -# HTTPCLient -gem 'faraday-httpclient' - -# NetHTTPPersistent -gem 'faraday-net_http_persistent' - -# Patron -gem 'faraday-patron' - -# Typhoeus -gem 'faraday-typhoeus' ------------------------------------- - -Things should work fine if you migrate to Faraday 2 as long as you include the adapter (unless you're using the default one `net-http`), but worst case scenario, you can always lock the version of Faraday in your project to 1.x: -gem 'faraday', '~> 1' - -Be aware if migrating to Faraday v2 that it requires at least Ruby `2.6`, unlike Faraday v1 which requires `2.4`. - -*Troubleshooting* - -If you see a message like: - -[source,ruby] ------------------------------------- -:adapter is not registered on Faraday::Adapter (Faraday::Error) ------------------------------------- -Then you probably need to include the adapter library in your gemfile and require it. - -Please https://github.com/elastic/elasticsearch-ruby/issues[submit an issue] if you encounter any problems. - -[discrete] -==== API - -[discrete] -===== New APIs - -- `machine_learning.clear_trained_model_deployment_cache` - Clear the cached results from a trained model deployment (Beta). -- `security.bulk_update_api_keys` - Updates the attributes of multiple existing API keys. - -[discrete] -===== API Changes - -- `rollup.rollup` renamed to `indices.downsample`. The method now receives the `index` to downsample (Required) and instead of `rollup_index`, use target_index as the index to store downsampled data. - -- `security.get_api_key` and `security.query_api_keys` add `:with_limited_by` flag to show the limited-by role descriptors of API Keys. -- `security.get_user` adds `:with_profile_uid` flag to retrieve profile uid (if exists) associated to the user. -- `security.get_user_profile` now retrieves user profiles for given unique ID(s). `:uid` is now a list of comma-separated list of unique identifier for user profiles. -- `text_structure.find_structure` adds `:ecs_compatibility`, optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled'. - -Machine learning APIs promoted from *Experimental* to *Beta*: - -- `machine_learning.clear_trained_model_deployment_cache.rb` -- `machine_learning.infer_trained_model.rb` -- `machine_learning.put_trained_model_definition_part.rb` -- `machine_learning.put_trained_model_vocabulary.rb` -- `machine_learning.start_trained_model_deployment.rb` -- `machine_learning.stop_trained_model_deployment.rb` - -Security usef profile APIs promoted from *Experimental* to *Stable*: - -- `security/activate_user_profile` -- `security/disable_user_profile` -- `security/enable_user_profile` -- `security/get_user_profile` -- `security/has_privileges_user_profile` -- `security/suggest_user_profile` -- `security/update_user_profile_data` diff --git a/docs/release_notes/86.asciidoc b/docs/release_notes/86.asciidoc deleted file mode 100644 index 88a7ad47d2..0000000000 --- a/docs/release_notes/86.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[[release_notes_86]] -=== 8.6 Release notes - -[discrete] -[[release_notes_860]] -=== 8.6.0 Release notes - -- Tested versions of Ruby for 8.6.0: Ruby (MRI) 2.7, 3.0, 3.1 and **3.2**. JRuby 9.3 and **JRuby 9.4**. - -[discrete] -==== API - -[discrete] -===== New APIs - -- `update_trained_model_deployment` - Updates certain properties of trained model deployment (This functionality is in Beta and is subject to change). - -[discrete] -===== API Changes - -- `cluster.reroute` - `:metric` parameter adds `none` as an option. -- `ml.start_trained_model_deployment` - New parameter `:priority` (String), the deployment priority - diff --git a/docs/release_notes/87.asciidoc b/docs/release_notes/87.asciidoc deleted file mode 100644 index f58e0856c6..0000000000 --- a/docs/release_notes/87.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[[release_notes_87]] -=== 8.7 Release notes - -[discrete] -[[release_notes_871]] -=== 8.7.1 Release notes - -[discrete] -==== API Bugfix - -- Updates `logstash.get_pipeline`, fixed in the specification `id` is not a required parameter, so removes raising `ArgumentError` when id is not present. - - -[discrete] -[[release_notes_870]] -=== 8.7.0 Release notes - -- Tested versions of Ruby for 8.7.0: Ruby (MRI) 2.7, 3.0, 3.1 and **3.2**. JRuby 9.3 and JRuby 9.4. Ruby 2.7's end of life is coming in a few days, so this'll probably be the last release to test for Ruby 2.7. - -[discrete] -==== API - -[discrete] -===== New APIs - -- `health_report` - Returns the health of the cluster. -- `transform.schedule_now_transform` - Schedules now a transform. - -[discrete] -===== API Changes - -- `transform.get_transform_stats` - Adds `timeout` (Time) parameter. Controls the time to wait for the stats. -- `transform.start_transform` - Adds `from` (String) parameter. Restricts the set of transformed entities to those changed after this time. -- `ml.delete_job`, `ml.reset_job` - Add `delete_user_annotations` (Boolean) parameter. Should annotations added by the user be deleted. -- `ml.clear_trained_model_deployment_cache`, `ml.infer_trained_model`, `ml.put_trained_model_definition_part`, `ml.put_trained_model_vocabulary`, `ml.start_trained_model_deployment`, `ml.stop_trained_model_deployment` - These APIs are no longer in Beta. diff --git a/docs/release_notes/88.asciidoc b/docs/release_notes/88.asciidoc deleted file mode 100644 index 13f093fd07..0000000000 --- a/docs/release_notes/88.asciidoc +++ /dev/null @@ -1,47 +0,0 @@ -[[release_notes_88]] -=== 8.8 Release notes - -[discrete] -[[release_notes_880]] -=== 8.8.0 Release notes - -- Tested versions of Ruby for 8.8.0: Ruby (MRI) 3.0, 3.1 and **3.2**. JRuby 9.3 and JRuby 9.4. - -[discrete] -==== API - -- Updates development dependency `minitest-reporters` to `>= 1.6` to include showing failures at the end of the test run. - -[discrete] -===== New APIs - -- `watcher.get_settings` - Retrieve settings for the watcher system index. -- `watcher.update_settings` - Update settings for the watcher system index. - -[discrete] -===== New Experimental APIs - -- `indices.delete_data_lifecycle`- Deletes the data lifecycle of the selected data streams -- `indices.explain_data_lifecycle` - Retrieves information about the index's current DLM lifecycle, such as any potential encountered error, time since creation etc. -- `indices.get_data_lifecycle` - Returns the data lifecycle of the selected data streams. -- `indices.put_data_lifecycle` - Updates the data lifecycle of the selected data streams. -- `search_application.delete` - Deletes a search application. -- `search_application.delete_behavioral_analytics` - Delete a behavioral analytics collection. -- `search_application.get` - Returns the details about a search application. -- `search_application.get_behavioral_analytics` - Returns the existing behavioral analytics collections. -- `search_application.list` - Returns the existing search applications. -- `search_application.post_behavioral_analytics_event` - Creates a behavioral analytics event for existing collection. -- `search_application.put` - Creates or updates a search application. -- `search_application.put_behavioral_analytics` - Creates a behavioral analytics collection. -- `search_application.search` - Perform a search against a search application. - -[discrete] -===== API Changes - -- `clear_scroll` now works with the argument `ignore: 404`. https://github.com/elastic/elasticsearch-ruby/issues/2067[Issue on GitHub]. -- The code generator was updated to fix a bug for `ignore: 404`. APIs that were supposed to support this wouldn't parse the parameters correctly. The support it now: `security.get_role`, `watcher.delete_watch` -- `cluster.get_component_template`, `indices.get_data_stream`, `indices.get_index_template`, `indices.simulate_index_template`, `indices.simulate_template` - Add `include_defaults` (Boolean) parameter: Return all default configurations for the component template (default: false). -- `machine_learning.put_trained_model` - Adds `wait_for_completion` (Boolean) parameter: Whether to wait for all child operations(e.g. model download) to complete, before returning or not (default: false). -- `machine_learning.start_trained_model_deployment` - Adds `deployiment_id` (String) parameter: The Id of the new deployment. Defaults to the model_id if not set. -- `search` - Adds `include_named_queries_score` (Boolean) parameter: Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false). -- `transform.delete_transform` - Adds `delete_dest_index` (Boolean) parameter: When `true`, the destination index is deleted together with the transform. The default value is `false`, meaning that the destination index will not be deleted. diff --git a/docs/release_notes/89.asciidoc b/docs/release_notes/89.asciidoc deleted file mode 100644 index de0f431856..0000000000 --- a/docs/release_notes/89.asciidoc +++ /dev/null @@ -1,54 +0,0 @@ -[[release_notes_89]] -=== 8.9 Release notes - -[discrete] -[[release_notes_890]] -=== 8.9.0 Release notes - -[discrete] -=== Client -* Tested versions of Ruby for 8.9.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4. -* Updated product validation. The code for the product validation was refactored in a few ways: -** Just check header, does not check the version of the server. -** Warns only once when there's a general server error. -** Removes the call to '/' (client.info) when doing the first request, checking on the first actual request from the client. -* Fixes User-Agent code. In the migration to 8.x, the user agent code was extracted into transport, since we're now using that library in other projects. So for the Elasticsearch Client, the user-agent would be reported as the one defined in elastic-transport. This release fixes the issue and brings back the user agent in the format that was being used in 7.x - -[discrete] -=== Helpers -This release introduces two new Helpers in the client: - -* BulkHelper - This helper provides a better developer experience when using the Bulk API. At its simplest, you can send it a collection of hashes in an array, and it will bulk ingest them into {es}. -* ScrollHelper - This helper provides an easy way to get results from a Scroll. - -See <> to read more about them. - -[discrete] -=== API - -[discrete] -==== New APIs - -* `cluster.info` - Returns different information about the cluster. - -[discrete] -==== New Experimental APIs and namespaces: - -This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. - -* New namespace: `query_ruleset` -** `query_ruleset.delete` - Deletes a query ruleset. -** `query_ruleset.get` - Returns the details about a query ruleset. -** `query_ruleset.put` - Creates or updates a query ruleset. -* New API: `search_application.render_query` Renders a query for given search application search parameters. -* New API: `security.create_cross_cluster_api_key` - Creates a cross-cluster API key for API key based remote cluster access. -* New API: `security.upate_cross_cluster_api_key` - Updates attributes of an existing cross-cluster API key. -* New namespace: `synonyms` -** `synonyms.delete`- Deletes a synonym set -** `synonyms.get` - Retrieves a synonym set -** `synonyms.put` - Creates or updates a synonyms set -* New namespace: `synonym_rule` -** `synonym_rule.put` - Creates or updates a synonym rule in a synonym set -* New namespace: `synonyms` -** `synonyms_set.get` - Retrieves a summary of all defined synonym sets - diff --git a/docs/release_notes/index.asciidoc b/docs/release_notes/index.asciidoc deleted file mode 100644 index 3b2ef35788..0000000000 --- a/docs/release_notes/index.asciidoc +++ /dev/null @@ -1,74 +0,0 @@ -[[release_notes]] -== Release Notes - -[discrete] -=== 8.x - -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> - -[discrete] -=== 7.x -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> - -include::817.asciidoc[] -include::816.asciidoc[] -include::815.asciidoc[] -include::814.asciidoc[] -include::813.asciidoc[] -include::812.asciidoc[] -include::811.asciidoc[] -include::810.asciidoc[] -include::89.asciidoc[] -include::88.asciidoc[] -include::87.asciidoc[] -include::86.asciidoc[] -include::85.asciidoc[] -include::84.asciidoc[] -include::83.asciidoc[] -include::82.asciidoc[] -include::81.asciidoc[] -include::80.asciidoc[] -include::717.asciidoc[] -include::716.asciidoc[] -include::715.asciidoc[] -include::714.asciidoc[] -include::713.asciidoc[] -include::712.asciidoc[] -include::711.asciidoc[] -include::710.asciidoc[] -include::79.asciidoc[] -include::78.asciidoc[] -include::77.asciidoc[] -include::76.asciidoc[] -include::75.asciidoc[] -include::70.asciidoc[] diff --git a/docs/troubleshooting.asciidoc b/docs/troubleshooting.asciidoc deleted file mode 100644 index a2e6a19e05..0000000000 --- a/docs/troubleshooting.asciidoc +++ /dev/null @@ -1,97 +0,0 @@ -[[troubleshooting]] -== Troubleshooting - -Use the information in this section to troubleshoot common problems and find -answers for frequently asked questions. - - -[discrete] -[[ruby-ts-logging]] -=== Logging - -The client provides several options for logging that can help when things go -wrong. Check out the extensive documentation on <>. - -If you are having trouble sending a request to {es} with the client, we suggest -enabling `tracing` on the client and testing the cURL command that appears in -your terminal: - -[source,rb] ----------------------------- -client = Elasticsearch::Client.new(trace: true) -client.info -curl -X GET -H 'x-elastic-client-meta: es=8.9.0,rb=3.2.2,t=8.2.1,fd=2.7.4,nh=0.3.2, User-Agent: elastic-t -ransport-ruby/8.2.1 (RUBY_VERSION: 3.2.2; linux x86_64; Faraday v2.7.4), Content-Type: application/json' 'http://localhost:9200//?pretty' ----------------------------- - -Testing the cURL command can help find out if there's a connection issue or if -the issue is in the client code. - - -[discrete] -[[ruby-ts-connection]] -=== Troubleshooting connection issues - -When working with multiple hosts, you might want to enable the -`retry_on_failure` or `retry_on_status` options to perform a failed request on -another node (refer to <>). - -For optimal performance, use a HTTP library which supports persistent -("keep-alive") connections, such as https://github.com/toland/patron[patron] or -https://github.com/typhoeus/typhoeus[Typhoeus]. Require the library -(`require 'patron'`) in your code for Faraday 1.x or the adapter -(`require 'faraday/patron'`) for Faraday 2.x, and it will be automatically used. - - -[discrete] -[[ruby-ts-adapter]] -=== Adapter is not registered on Faraday - -If you see a message like: -``` -:adapter is not registered on Faraday::Adapter (Faraday::Error) -``` - -Then you might need to include the adapter library in your Gemfile and require -it. You might get this error when migrating from Faraday v1 to Faraday v2. The -main change when using Faraday v2 is all adapters, except for the default -`net_http` one, have been moved out into separate gems. This means if you're not -using the default adapter and you migrate to Faraday v2, you'll need to add the -adapter gems to your Gemfile. - -These are the gems required for the different adapters with Faraday 2, instead -of the libraries on which they were based: - -[source,ruby] ------------------------------------- -# HTTPCLient -gem 'faraday-httpclient' - -# NetHTTPPersistent -gem 'faraday-net_http_persistent' - -# Patron -gem 'faraday-patron' - -# Typhoeus -gem 'faraday-typhoeus' ------------------------------------- - -Migrating to Faraday 2 solves the issue as long as the adapter is included -(unless you're using the default one `net-http`). Alternatively, you can lock -the version of Faraday in your project to 1.x: -`gem 'faraday', '~> 1'` - -IMPORTANT: Migrating to Faraday v2 requires at least Ruby `2.6`. Faraday v1 -requires `2.4`. - -[discrete] -=== More Help - -If you need more help, visit the -https://discuss.elastic.co/[Elastic community forums] and get answers from the -experts in the community, including people from Elastic. - -If you find a bug, have feedback, or find any other issue using the client, -https://github.com/elastic/elasticsearch-ruby/issues/new/choose[submit an issue] -on GitHub. \ No newline at end of file From bace3f410f6200da45ca654be84e59cc8769cc53 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 26 Feb 2025 15:52:52 +0000 Subject: [PATCH 475/540] [API] Updates ml.infer_trained_model to the elasticsearch-specification --- .../machine_learning/infer_trained_model.rb | 15 ++++++++------- .../infer_trained_model_deployment_spec.rb | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb index 59dbc17156..22631f81f9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb @@ -15,8 +15,8 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API @@ -25,22 +25,23 @@ module Actions # Evaluate a trained model. # # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*) - # @option arguments [Time] :timeout Controls the amount of time to wait for inference results. + # @option arguments [Time] :timeout Controls the amount of time to wait for inference results. Server default: 10s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The docs to apply inference on and inference configuration overrides (*Required*) + # @option arguments [Hash] :body request body # # *Deprecation notice*: # /_ml/trained_models/{model_id}/deployment/_infer is deprecated. Use /_ml/trained_models/{model_id}/_infer instead # Deprecated since version 8.3.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-trained-model.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-infer-trained-model # def infer_trained_model(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.infer_trained_model' } - defined_params = [:model_id].each_with_object({}) do |variable, set_variables| + defined_params = [:model_id].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -55,7 +56,7 @@ def infer_trained_model(arguments = {}) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_POST - path = ("_ml/trained_models/#{Utils.__listify(_model_id)}/deployment/_infer" if _model_id) + path = "_ml/trained_models/#{Utils.__listify(_model_id)}/_infer" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/spec/unit/actions/machine_learning/infer_trained_model_deployment_spec.rb b/elasticsearch-api/spec/unit/actions/machine_learning/infer_trained_model_deployment_spec.rb index fccbe878bd..77964040e4 100644 --- a/elasticsearch-api/spec/unit/actions/machine_learning/infer_trained_model_deployment_spec.rb +++ b/elasticsearch-api/spec/unit/actions/machine_learning/infer_trained_model_deployment_spec.rb @@ -21,7 +21,7 @@ let(:expected_args) do [ 'POST', - '_ml/trained_models/foo/deployment/_infer', + '_ml/trained_models/foo/_infer', {}, {}, {}, From 418aa27218ce6de2cac58d33d01462f8220e4306 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 26 Feb 2025 15:59:05 +0000 Subject: [PATCH 476/540] [API] Updates indices.simulate_index_template to elasticsearch-specification --- .../indices/simulate_index_template.rb | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb index 3817f9f5ca..a1f3f7ab50 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb @@ -15,30 +15,29 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Simulate matching the given index name against the index templates in the system + # Simulate an index. + # Get the index configuration that would be applied to the specified index from an existing index template. # - # @option arguments [String] :name The name of the index (it must be a concrete index name) - # @option arguments [Boolean] :create Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one - # @option arguments [String] :cause User defined reason for dry-run creating the new template for simulation purposes - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [Boolean] :include_defaults Return all relevant default configurations for this index template simulation (default: false) + # @option arguments [String] :name Name of the index to simulate (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body New index template definition, which will be included in the simulation, as if it already exists in the system # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-simulate-index.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template # def simulate_index_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.simulate_index_template' } - defined_params = [:name].each_with_object({}) do |variable, set_variables| + defined_params = [:name].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -47,7 +46,7 @@ def simulate_index_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = nil _name = arguments.delete(:name) From c62414e52604b56728ec2a468a28122b52821134 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 26 Feb 2025 17:40:37 +0000 Subject: [PATCH 477/540] [CI] Remove soft fail from Serverless tests --- .buildkite/pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 747be2b7ce..87b2017899 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -55,8 +55,8 @@ steps: key: run-serverless-tests depends_on: - step: create-serverless - soft_fail: - - exit_status: 1 + # soft_fail: + # - exit_status: 1 agents: provider: "gcp" env: From a9aba62ce5572c6f2a894c21f78ce9d1bf811f6d Mon Sep 17 00:00:00 2001 From: Colleen McGinnis Date: Fri, 28 Feb 2025 13:10:42 -0600 Subject: [PATCH 478/540] clean up cross-repo links (#2586) --- docs/reference/advanced-config.md | 2 +- docs/reference/ecs.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/advanced-config.md b/docs/reference/advanced-config.md index a05d51340c..c045a91d4b 100644 --- a/docs/reference/advanced-config.md +++ b/docs/reference/advanced-config.md @@ -71,7 +71,7 @@ To log requests and responses to standard output with the default logger (an ins Elasticsearch::Client.new(log: true) ``` -You can also use [`ecs-logging`](https://github.com/elastic/ecs-logging-ruby) which is a set of libraries that enables you to transform your application logs to structured logs that comply with the [Elastic Common Schema](ecs://docs/reference/index.md). See [Elastic Common Schema (ECS)](/reference/ecs.md). +You can also use [`ecs-logging`](https://github.com/elastic/ecs-logging-ruby) which is a set of libraries that enables you to transform your application logs to structured logs that comply with the [Elastic Common Schema](ecs://reference/index.md). See [Elastic Common Schema (ECS)](/reference/ecs.md). To trace requests and responses in the Curl format, set the `trace` argument: diff --git a/docs/reference/ecs.md b/docs/reference/ecs.md index 65100ebe4a..6fb1fc365f 100644 --- a/docs/reference/ecs.md +++ b/docs/reference/ecs.md @@ -5,7 +5,7 @@ mapped_pages: # Elastic Common Schema (ECS) [ecs] -The [Elastic Common Schema (ECS)][Elastic Common Schema (ECS)](ecs://docs/reference/index.md)) is an open source format that defines a common set of fields to be used when storing event data like logs in Elasticsearch. +The [Elastic Common Schema (ECS)][Elastic Common Schema (ECS)](ecs://reference/index.md)) is an open source format that defines a common set of fields to be used when storing event data like logs in Elasticsearch. You can use the library [ecs-logging](https://github.com/elastic/ecs-logging-ruby) which is a set of libraries that enables you to transform your application logs to structured logs that comply with the ECS format. @@ -33,5 +33,5 @@ client = Elasticsearch::Client.new(logger: logger) {"@timestamp":"2022-07-12T05:31:18.590Z","log.level":"INFO","message":"GET http://localhost:9200/ [status:200, request:0.009s, query:n/a]","ecs.version":"1.4.0"}... ``` -See [ECS Logging Ruby Reference](ecs-logging-ruby://docs/reference/index.md) for more information on how to configure the logger. +See [ECS Logging Ruby Reference](ecs-logging-ruby://reference/index.md) for more information on how to configure the logger. From d3614007adaecba6d18c2616080ebecc78a453c7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 3 Mar 2025 16:46:05 +0000 Subject: [PATCH 479/540] [API] Removes parameters from cat.help --- .../lib/elasticsearch/api/actions/cat/help.rb | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb index 0d9f22f752..8e0f1e26d6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb @@ -15,20 +15,19 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns help for the Cat APIs. + # Get CAT help. + # Get help for the CAT APIs. # - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cat # def help(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.help' } @@ -36,11 +35,11 @@ def help(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET - path = '_cat' - params = Utils.process_params(arguments) + path = "_cat" + params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From 60c5f83051b3b905928e50b74eb96179276c01f5 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 3 Mar 2025 16:51:09 +0000 Subject: [PATCH 480/540] [API] Updates ml.start_trained_model_deployment, adds body --- .../start_trained_model_deployment.rb | 42 +++++++++++++------ 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb index 9a63f004ab..ddb800d1d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb @@ -15,33 +15,49 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions # Start a trained model deployment. + # It allocates the model to every machine learning node. # - # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*) - # @option arguments [String] :cache_size A byte-size value for configuring the inference cache size. For example, 20mb. - # @option arguments [String] :deployment_id The Id of the new deployment. Defaults to the model_id if not set. - # @option arguments [Integer] :number_of_allocations The total number of allocations this model is assigned across machine learning nodes. - # @option arguments [Integer] :threads_per_allocation The number of threads used by each model allocation during inference. + # @option arguments [String] :model_id The unique identifier of the trained model. Currently, only PyTorch models are supported. (*Required*) + # @option arguments [Integer, String] :cache_size The inference cache size (in memory outside the JVM heap) per node for the model. + # The default value is the same size as the +model_size_bytes+. To disable the cache, + # +0b+ can be provided. + # @option arguments [String] :deployment_id A unique identifier for the deployment of the model. + # @option arguments [Integer] :number_of_allocations The number of model allocations on each node where the model is deployed. + # All allocations on a node share the same copy of the model in memory but use + # a separate set of threads to evaluate the model. + # Increasing this value generally increases the throughput. + # If this setting is greater than the number of hardware threads + # it will automatically be changed to a value less than the number of hardware threads. + # If adaptive_allocations is enabled, do not set this value, because it’s automatically set. Server default: 1. # @option arguments [String] :priority The deployment priority. - # @option arguments [Integer] :queue_capacity Controls how many inference requests are allowed in the queue at a time. - # @option arguments [Time] :timeout Controls the amount of time to wait for the model to deploy. - # @option arguments [String] :wait_for The allocation status for which to wait (options: starting, started, fully_allocated) + # @option arguments [Integer] :queue_capacity Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds + # this value, new requests are rejected with a 429 error. Server default: 1024. + # @option arguments [Integer] :threads_per_allocation Sets the number of threads used by each model allocation during inference. This generally increases + # the inference speed. The inference process is a compute-bound process; any number + # greater than the number of available hardware threads on the machine does not increase the + # inference speed. If this setting is greater than the number of hardware threads + # it will automatically be changed to a value less than the number of hardware threads. Server default: 1. + # @option arguments [Time] :timeout Specifies the amount of time to wait for the model to deploy. Server default: 20s. + # @option arguments [String] :wait_for Specifies the allocation status to wait for before returning. Server default: started. # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trained-model-deployment.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-trained-model-deployment # def start_trained_model_deployment(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.start_trained_model_deployment' } - defined_params = [:model_id].each_with_object({}) do |variable, set_variables| + defined_params = [:model_id].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -50,7 +66,7 @@ def start_trained_model_deployment(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = arguments.delete(:body) _model_id = arguments.delete(:model_id) From 123cd7c2360022ba9fe3712b6fd6146cec2c60c1 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 4 Mar 2025 14:38:31 +0000 Subject: [PATCH 481/540] [API] Updates esql.async_query_stop --- .../api/actions/esql/async_query_stop.rb | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb index 0897edd15a..b4520b20cf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb @@ -15,16 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Esql module Actions - # Stops a previously submitted async query request given its ID and collects the results. + # Stop async ES|QL query. + # This API interrupts the query execution and returns the results so far. + # If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can stop it. # - # @option arguments [String] :id The async query ID + # @option arguments [String] :id The unique identifier of the query. + # A query ID is provided in the ES|QL async query API response for a query that does not complete in the designated time. + # A query ID is also provided when the request was submitted with the +keep_on_completion+ parameter set to +true+. (*Required*) + # @option arguments [Boolean] :drop_null_columns Indicates whether columns that are entirely +null+ will be removed from the +columns+ and +values+ portion of the results. + # If +true+, the response will include an extra section under the name +all_columns+ which has the name of all the columns. # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-stop-api.html @@ -32,8 +38,9 @@ module Actions def async_query_stop(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_stop' } - defined_params = [:id].each_with_object({}) do |variable, set_variables| + defined_params = [:id].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -48,7 +55,7 @@ def async_query_stop(arguments = {}) method = Elasticsearch::API::HTTP_POST path = "_query/async/#{Utils.__listify(_id)}/stop" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) From bb50ec5c72d2049d522b83cf2e557f899d1d1ca4 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 5 Mar 2025 15:19:34 +0000 Subject: [PATCH 482/540] [CI] Updates transport version --- .buildkite/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 87b2017899..6752568c9c 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -12,7 +12,7 @@ steps: ruby_source: - "ruby" transport: - - "8.3" + - "8.4" adjustments: - with: # JRuby tests ruby: "9.4" From 42166f7fc7f56414df2af0d5edb6abc5f865bc3e Mon Sep 17 00:00:00 2001 From: Colleen McGinnis Date: Thu, 6 Mar 2025 11:10:44 -0600 Subject: [PATCH 483/540] fix external links (#2595) --- docs/reference/connecting.md | 2 +- docs/reference/dsl.md | 2 +- docs/reference/transport.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/connecting.md b/docs/reference/connecting.md index 8a75793639..3b83f27e15 100644 --- a/docs/reference/connecting.md +++ b/docs/reference/connecting.md @@ -309,7 +309,7 @@ end Resources used to assess these recommendations: * [GCP Cloud Functions: Tips & Tricks](https://cloud.google.com/functions/docs/bestpractices/tips#use_global_variables_to_reuse_objects_in_future_invocations) -* [Best practices for working with AWS Lambda functions](https://docs.aws.amazon.com/lambda/latest/dg/best-practices.md) +* [Best practices for working with AWS Lambda functions](https://docs.aws.amazon.com/lambda/latest/dg/best-practices.html) ## Enabling the Compatibility Mode [client-comp] diff --git a/docs/reference/dsl.md b/docs/reference/dsl.md index af686223d1..ae46890b8c 100644 --- a/docs/reference/dsl.md +++ b/docs/reference/dsl.md @@ -5,7 +5,7 @@ mapped_pages: # Elasticsearch DSL [dsl] -The [elasticsearch-dsl](https://github.com/elastic/elasticsearch-dsl-ruby) gem provides a Ruby API for the [Elasticsearch Query DSL](https://www.elasticsearch.com/guide/en/elasticsearch/reference/current/query-dsl.md). The library allows to programmatically build complex search definitions for {{es}} in Ruby, which are translated to Hashes, and ultimately, JSON, the language of {{es}}. +The [elasticsearch-dsl](https://github.com/elastic/elasticsearch-dsl-ruby) gem provides a Ruby API for the [Elasticsearch Query DSL](https://www.elasticsearch.com/guide/en/elasticsearch/reference/current/query-dsl.html). The library allows to programmatically build complex search definitions for {{es}} in Ruby, which are translated to Hashes, and ultimately, JSON, the language of {{es}}. See [the README](https://github.com/elastic/elasticsearch-dsl-ruby#elasticsearchdsl) for more information. diff --git a/docs/reference/transport.md b/docs/reference/transport.md index fa38c71f2d..74ec2c2ad2 100644 --- a/docs/reference/transport.md +++ b/docs/reference/transport.md @@ -259,7 +259,7 @@ You can write your own transport implementation by including the {Elastic::Trans * `Elastic::Transport::Client` is composed of `Elastic::Transport::Transport`. * `Elastic::Transport::Transport` is composed of `Elastic::Transport::Transport::Connections`, and an instance of logger, tracer, serializer and sniffer. -* Logger and tracer can be any object conforming to Ruby logging interface, for example, an instance of [`Logger`](https://ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.md), [log4r](https://rubygems.org/gems/log4r), [logging](https://github.com/TwP/logging/), and so on. +* Logger and tracer can be any object conforming to Ruby logging interface, for example, an instance of [`Logger`](https://ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html), [log4r](https://rubygems.org/gems/log4r), [logging](https://github.com/TwP/logging/), and so on. * The `Elastic::Transport::Transport::Serializer::Base` implementations handle converting data for {{es}} (for example, to JSON). You can implement your own serializer. * `Elastic::Transport::Transport::Sniffer` allows to discover nodes in the cluster and use them as connections. * `Elastic::Transport::Transport::Connections::Collection` is composed of `Elastic::Transport::Transport::Connections::Connection` instances and a selector instance. From f9fcc86c41ceea0531bea8e3ea85200ef42065d5 Mon Sep 17 00:00:00 2001 From: Marci W <333176+marciw@users.noreply.github.com> Date: Fri, 7 Mar 2025 08:44:25 -0500 Subject: [PATCH 484/540] Delete docs-preview.yml (#2597) --- .github/workflows/docs-preview.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .github/workflows/docs-preview.yml diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml deleted file mode 100644 index 5164d643bc..0000000000 --- a/.github/workflows/docs-preview.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: docs-preview - -on: - pull_request_target: - types: [opened] - -permissions: - pull-requests: write - -jobs: - doc-preview-pr: - runs-on: ubuntu-latest - steps: - - uses: elastic/docs/.github/actions/docs-preview@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - repo: ${{ github.event.repository.name }} - preview-path: 'guide/en/elasticsearch/client/ruby-api/index.html' - pr: ${{ github.event.pull_request.number }} From 7dac6bab80e676cdc68f5f9657d69e5e23f06e06 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 10 Mar 2025 15:21:44 +0000 Subject: [PATCH 485/540] [API] Updates inference APIs: * inference.update updates to elasticsearch-specification code and source code docs. * inference.get updates to elasticsearch-specification code and source code docs. * inference.put - :body is now a required argument * inference.update - :body is now a required argument * Removes inference.unified_inference * Adds inference.chat_completion_unified * Removes inference.inference * Adds inference.completion * Removes inference.stream_inference * Adds inference.stream_completion * Adds inference.put_watsonx * Adds inference.rerank * Adds inference.sparse_embedding * Adds inference.text_embedding --- ...nference.rb => chat_completion_unified.rb} | 31 ++++---- .../{stream_inference.rb => completion.rb} | 31 ++++---- .../api/actions/inference/delete.rb | 19 ++--- .../api/actions/inference/get.rb | 17 ++-- .../api/actions/inference/put.rb | 28 ++++--- .../api/actions/inference/put_watsonx.rb | 77 +++++++++++++++++++ .../api/actions/inference/rerank.rb | 63 +++++++++++++++ ...ified_inference.rb => sparse_embedding.rb} | 31 ++++---- .../actions/inference/stream_completion.rb | 66 ++++++++++++++++ .../api/actions/inference/text_embedding.rb | 63 +++++++++++++++ .../api/actions/inference/update.rb | 22 ++++-- ...pec.rb => chat_completion_unified_spec.rb} | 10 +-- .../{inference_spec.rb => completion_spec.rb} | 10 +-- .../spec/unit/actions/inference/put_spec.rb | 8 +- .../actions/inference/put_watsonx_spec.rb | 36 +++++++++ .../unit/actions/inference/rerank_spec.rb | 35 +++++++++ ...rence_spec.rb => sparse_embedding_spec.rb} | 8 +- .../inference/stream_completion_spec.rb | 35 +++++++++ .../actions/inference/text_embedding_spec.rb | 35 +++++++++ .../unit/actions/inference/update_spec.rb | 4 +- 20 files changed, 521 insertions(+), 108 deletions(-) rename elasticsearch-api/lib/elasticsearch/api/actions/inference/{inference.rb => chat_completion_unified.rb} (66%) rename elasticsearch-api/lib/elasticsearch/api/actions/inference/{stream_inference.rb => completion.rb} (65%) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb rename elasticsearch-api/lib/elasticsearch/api/actions/inference/{unified_inference.rb => sparse_embedding.rb} (64%) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb rename elasticsearch-api/spec/unit/actions/inference/{unified_inference_spec.rb => chat_completion_unified_spec.rb} (73%) rename elasticsearch-api/spec/unit/actions/inference/{inference_spec.rb => completion_spec.rb} (75%) create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_watsonx_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/rerank_spec.rb rename elasticsearch-api/spec/unit/actions/inference/{stream_inference_spec.rb => sparse_embedding_spec.rb} (85%) create mode 100644 elasticsearch-api/spec/unit/actions/inference/stream_completion_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/text_embedding_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb similarity index 66% rename from elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb index 1e7fd39d7c..003f1240ba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb @@ -15,27 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Inference module Actions - # Perform inference + # Perform chat completion inference # - # @option arguments [String] :inference_id The inference Id - # @option arguments [String] :task_type The task type + # @option arguments [String] :inference_id The inference Id (*Required*) + # @option arguments [Time] :timeout Specifies the amount of time to wait for the inference request to complete. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The inference payload + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/post-inference-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-unified-inference # - def inference(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'inference.inference' } + def chat_completion_unified(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.chat_completion_unified' } - defined_params = %i[inference_id task_type].each_with_object({}) do |variable, set_variables| + defined_params = [:inference_id].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -48,15 +49,9 @@ def inference(arguments = {}) _inference_id = arguments.delete(:inference_id) - _task_type = arguments.delete(:task_type) - method = Elasticsearch::API::HTTP_POST - path = if _task_type && _inference_id - "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}" - else - "_inference/#{Utils.__listify(_inference_id)}" - end - params = {} + path = "_inference/chat_completion/#{Utils.__listify(_inference_id)}/_stream" + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb similarity index 65% rename from elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb index 539b4922a1..d32172bcd4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb @@ -15,27 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Inference module Actions - # Perform streaming inference + # Perform completion inference on the service # - # @option arguments [String] :inference_id The inference Id - # @option arguments [String] :task_type The task type + # @option arguments [String] :inference_id The inference Id (*Required*) + # @option arguments [Time] :timeout Specifies the amount of time to wait for the inference request to complete. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The inference payload + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/post-stream-inference-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference # - def stream_inference(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'inference.stream_inference' } + def completion(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.completion' } - defined_params = %i[inference_id task_type].each_with_object({}) do |variable, set_variables| + defined_params = [:inference_id].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -48,15 +49,9 @@ def stream_inference(arguments = {}) _inference_id = arguments.delete(:inference_id) - _task_type = arguments.delete(:task_type) - method = Elasticsearch::API::HTTP_POST - path = if _task_type && _inference_id - "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}/_stream" - else - "_inference/#{Utils.__listify(_inference_id)}/_stream" - end - params = {} + path = "_inference/completion/#{Utils.__listify(_inference_id)}" + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb index 02d5f328cd..5e9e570d6e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb @@ -15,8 +15,8 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API @@ -24,19 +24,20 @@ module Inference module Actions # Delete an inference endpoint # - # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type - # @option arguments [Boolean] :dry_run If true the endpoint will not be deleted and a list of ingest processors which reference this endpoint will be returned. - # @option arguments [Boolean] :force If true the endpoint will be forcefully stopped (regardless of whether or not it is referenced by any ingest processors or semantic text fields). + # @option arguments [String] :inference_id The inference identifier. (*Required*) + # @option arguments [Boolean] :dry_run When true, the endpoint is not deleted and a list of ingest processors which reference this endpoint is returned. + # @option arguments [Boolean] :force When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-inference-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-delete # def delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.delete' } - defined_params = %i[inference_id task_type].each_with_object({}) do |variable, set_variables| + defined_params = [:inference_id, :task_type].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -47,10 +48,10 @@ def delete(arguments = {}) body = nil - _inference_id = arguments.delete(:inference_id) - _task_type = arguments.delete(:task_type) + _inference_id = arguments.delete(:inference_id) + method = Elasticsearch::API::HTTP_DELETE path = if _task_type && _inference_id "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb index a3fec86adb..8c419cb1c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb @@ -15,8 +15,8 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API @@ -24,17 +24,18 @@ module Inference module Actions # Get an inference endpoint # - # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type + # @option arguments [String] :inference_id The inference Id # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-get # def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.get' } - defined_params = %i[inference_id task_type].each_with_object({}) do |variable, set_variables| + defined_params = [:inference_id, :task_type].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -43,17 +44,17 @@ def get(arguments = {}) body = nil - _inference_id = arguments.delete(:inference_id) - _task_type = arguments.delete(:task_type) + _inference_id = arguments.delete(:inference_id) + method = Elasticsearch::API::HTTP_GET path = if _task_type && _inference_id "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}" elsif _inference_id "_inference/#{Utils.__listify(_inference_id)}" else - '_inference' + "_inference" end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb index aabcd25a4e..20a984dd46 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb @@ -15,30 +15,40 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Inference module Actions - # Configure an inference endpoint for use in the Inference API + # Create an inference endpoint. + # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. + # After creating the endpoint, wait for the model deployment to complete before using it. + # To verify the deployment status, use the get trained model statistics API. + # Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. + # For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. + # However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. # - # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type + # @option arguments [String] :inference_id The inference Id (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The inference endpoint's task and service settings + # @option arguments [Hash] :body inference_config # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-inference-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put # def put(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.put' } - defined_params = %i[inference_id task_type].each_with_object({}) do |variable, set_variables| + defined_params = [:inference_id, :task_type].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] arguments = arguments.clone @@ -46,10 +56,10 @@ def put(arguments = {}) body = arguments.delete(:body) - _inference_id = arguments.delete(:inference_id) - _task_type = arguments.delete(:task_type) + _inference_id = arguments.delete(:inference_id) + method = Elasticsearch::API::HTTP_PUT path = if _task_type && _inference_id "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb new file mode 100644 index 0000000000..255ff5de0a --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb @@ -0,0 +1,77 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create a Watsonx inference endpoint. + # Creates an inference endpoint to perform an inference task with the +watsonxai+ service. + # You need an IBM Cloud Databases for Elasticsearch deployment to use the +watsonxai+ inference service. + # You can provision one through the IBM catalog, the Cloud Databases CLI plug-in, the Cloud Databases API, or Terraform. + # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. + # After creating the endpoint, wait for the model deployment to complete before using it. + # To verify the deployment status, use the get trained model statistics API. + # Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # + # @option arguments [String] :task_type The task type. + # The only valid task type for the model to perform is +text_embedding+. (*Required*) + # @option arguments [String] :watsonx_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-watsonx-ai.html + # + def put_watsonx(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_watsonx' } + + defined_params = [:task_type, :watsonx_inference_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type] + + raise ArgumentError, + "Required argument 'watsonx_inference_id' missing" unless arguments[:watsonx_inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _watsonx_inference_id = arguments.delete(:watsonx_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_watsonx_inference_id)}" + params = {} + + 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/inference/rerank.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb new file mode 100644 index 0000000000..065fc63a49 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb @@ -0,0 +1,63 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Perform rereanking inference on the service + # + # @option arguments [String] :inference_id The unique identifier for the inference endpoint. (*Required*) + # @option arguments [Time] :timeout The amount of time to wait for the inference request to complete. Server default: 30s. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference + # + def rerank(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.rerank' } + + defined_params = [:inference_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _inference_id = arguments.delete(:inference_id) + + method = Elasticsearch::API::HTTP_POST + path = "_inference/rerank/#{Utils.__listify(_inference_id)}" + 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/inference/unified_inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb similarity index 64% rename from elasticsearch-api/lib/elasticsearch/api/actions/inference/unified_inference.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb index f06a42fbef..76acbf89e9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/unified_inference.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb @@ -15,27 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Inference module Actions - # Perform inference using the Unified Schema + # Perform sparse embedding inference on the service # - # @option arguments [String] :inference_id The inference Id - # @option arguments [String] :task_type The task type + # @option arguments [String] :inference_id The inference Id (*Required*) + # @option arguments [Time] :timeout Specifies the amount of time to wait for the inference request to complete. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The inference payload + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/unified-inference-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference # - def unified_inference(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'inference.unified_inference' } + def sparse_embedding(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.sparse_embedding' } - defined_params = %i[inference_id task_type].each_with_object({}) do |variable, set_variables| + defined_params = [:inference_id].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -48,15 +49,9 @@ def unified_inference(arguments = {}) _inference_id = arguments.delete(:inference_id) - _task_type = arguments.delete(:task_type) - method = Elasticsearch::API::HTTP_POST - path = if _task_type && _inference_id - "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}/_unified" - else - "_inference/#{Utils.__listify(_inference_id)}/_unified" - end - params = {} + path = "_inference/sparse_embedding/#{Utils.__listify(_inference_id)}" + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb new file mode 100644 index 0000000000..bd13f1624b --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb @@ -0,0 +1,66 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Perform streaming inference. + # Get real-time responses for completion tasks by delivering answers incrementally, reducing response times during computation. + # This API works only with the completion task type. + # IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. + # This API requires the +monitor_inference+ cluster privilege (the built-in +inference_admin+ and +inference_user+ roles grant this privilege). You must use a client that supports streaming. + # + # @option arguments [String] :inference_id The unique identifier for the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-stream-inference + # + def stream_completion(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.stream_completion' } + + defined_params = [:inference_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _inference_id = arguments.delete(:inference_id) + + method = Elasticsearch::API::HTTP_POST + path = "_inference/completion/#{Utils.__listify(_inference_id)}/_stream" + params = {} + + 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/inference/text_embedding.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb new file mode 100644 index 0000000000..6ad374db68 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb @@ -0,0 +1,63 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Perform text embedding inference on the service + # + # @option arguments [String] :inference_id The inference Id (*Required*) + # @option arguments [Time] :timeout Specifies the amount of time to wait for the inference request to complete. Server default: 30s. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference + # + def text_embedding(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.text_embedding' } + + defined_params = [:inference_id].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _inference_id = arguments.delete(:inference_id) + + method = Elasticsearch::API::HTTP_POST + path = "_inference/text_embedding/#{Utils.__listify(_inference_id)}" + 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/inference/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb index 00bb270ee5..19b82dedbb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb @@ -15,30 +15,36 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Inference module Actions - # Update inference + # Update an inference endpoint. + # Modify +task_settings+, secrets (within +service_settings+), or +num_allocations+ for an inference endpoint, depending on the specific endpoint service and +task_type+. + # IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. + # For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. + # However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. # - # @option arguments [String] :inference_id The inference Id - # @option arguments [String] :task_type The task type + # @option arguments [String] :inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [String] :task_type The type of inference task that the model performs. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The inference endpoint's task and service settings + # @option arguments [Hash] :body inference_config # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-inference-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-update # def update(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.update' } - defined_params = %i[inference_id task_type].each_with_object({}) do |variable, set_variables| + defined_params = [:inference_id, :task_type].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] arguments = arguments.clone diff --git a/elasticsearch-api/spec/unit/actions/inference/unified_inference_spec.rb b/elasticsearch-api/spec/unit/actions/inference/chat_completion_unified_spec.rb similarity index 73% rename from elasticsearch-api/spec/unit/actions/inference/unified_inference_spec.rb rename to elasticsearch-api/spec/unit/actions/inference/chat_completion_unified_spec.rb index daed8332d7..6abc29076e 100644 --- a/elasticsearch-api/spec/unit/actions/inference/unified_inference_spec.rb +++ b/elasticsearch-api/spec/unit/actions/inference/chat_completion_unified_spec.rb @@ -17,20 +17,20 @@ require 'spec_helper' -describe 'client#inference.unified_inference' do +describe 'client#inference.chat_completion_unified' do let(:expected_args) do [ 'POST', - '_inference/foo/bar/_unified', + '_inference/chat_completion/bar/_stream', {}, nil, {}, - { defined_params: { inference_id: 'bar', task_type: 'foo' }, - endpoint: 'inference.unified_inference' } + { defined_params: { inference_id: 'bar' }, + endpoint: 'inference.chat_completion_unified' } ] end it 'performs the request' do - expect(client_double.inference.unified_inference(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.chat_completion_unified(inference_id: 'bar')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/unit/actions/inference/inference_spec.rb b/elasticsearch-api/spec/unit/actions/inference/completion_spec.rb similarity index 75% rename from elasticsearch-api/spec/unit/actions/inference/inference_spec.rb rename to elasticsearch-api/spec/unit/actions/inference/completion_spec.rb index c87efa07b4..8817e72a32 100644 --- a/elasticsearch-api/spec/unit/actions/inference/inference_spec.rb +++ b/elasticsearch-api/spec/unit/actions/inference/completion_spec.rb @@ -17,20 +17,20 @@ require 'spec_helper' -describe 'client#inference.inference' do +describe 'client#inference.completion' do let(:expected_args) do [ 'POST', - '_inference/foo/bar', + '_inference/completion/bar', {}, nil, {}, - { defined_params: { inference_id: 'bar', task_type: 'foo' }, - endpoint: 'inference.inference' } + { defined_params: { inference_id: 'bar' }, + endpoint: 'inference.completion' } ] end it 'performs the request' do - expect(client_double.inference.inference(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.completion(inference_id: 'bar')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_spec.rb index e06f205437..bdd6393727 100644 --- a/elasticsearch-api/spec/unit/actions/inference/put_spec.rb +++ b/elasticsearch-api/spec/unit/actions/inference/put_spec.rb @@ -21,16 +21,16 @@ let(:expected_args) do [ 'PUT', - '_inference/foo/bar', + '_inference/bar', {}, - nil, {}, - { defined_params: { inference_id: 'bar', task_type: 'foo' }, + {}, + { defined_params: { inference_id: 'bar' }, endpoint: 'inference.put' } ] end it 'performs the request' do - expect(client_double.inference.put(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.put(body: {}, inference_id: 'bar')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_watsonx_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_watsonx_spec.rb new file mode 100644 index 0000000000..44245b8b02 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_watsonx_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_watsonx' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { watsonx_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_watsonx' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_watsonx(task_type: 'foo', watsonx_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/rerank_spec.rb b/elasticsearch-api/spec/unit/actions/inference/rerank_spec.rb new file mode 100644 index 0000000000..7417cd74fa --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/rerank_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.rerank' do + let(:expected_args) do + [ + 'POST', + '_inference/rerank/foo', + {}, + nil, + {}, + { defined_params: { inference_id: 'foo' }, endpoint: 'inference.rerank' } + ] + end + + it 'performs the request' do + expect(client_double.inference.rerank(inference_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/stream_inference_spec.rb b/elasticsearch-api/spec/unit/actions/inference/sparse_embedding_spec.rb similarity index 85% rename from elasticsearch-api/spec/unit/actions/inference/stream_inference_spec.rb rename to elasticsearch-api/spec/unit/actions/inference/sparse_embedding_spec.rb index 191ad643d5..856dface5a 100644 --- a/elasticsearch-api/spec/unit/actions/inference/stream_inference_spec.rb +++ b/elasticsearch-api/spec/unit/actions/inference/sparse_embedding_spec.rb @@ -17,19 +17,19 @@ require 'spec_helper' -describe 'client#inference.stream_inference' do +describe 'client#inference.sparse_embedding' do let(:expected_args) do [ 'POST', - '_inference/foo/_stream', + '_inference/sparse_embedding/foo', {}, nil, {}, - { defined_params: { inference_id: 'foo' }, endpoint: 'inference.stream_inference' } + { defined_params: { inference_id: 'foo' }, endpoint: 'inference.sparse_embedding' } ] end it 'performs the request' do - expect(client_double.inference.stream_inference(inference_id: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.inference.sparse_embedding(inference_id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/unit/actions/inference/stream_completion_spec.rb b/elasticsearch-api/spec/unit/actions/inference/stream_completion_spec.rb new file mode 100644 index 0000000000..542b1d9941 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/stream_completion_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.stream_completion' do + let(:expected_args) do + [ + 'POST', + '_inference/completion/foo/_stream', + {}, + nil, + {}, + { defined_params: { inference_id: 'foo' }, endpoint: 'inference.stream_completion' } + ] + end + + it 'performs the request' do + expect(client_double.inference.stream_completion(inference_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/text_embedding_spec.rb b/elasticsearch-api/spec/unit/actions/inference/text_embedding_spec.rb new file mode 100644 index 0000000000..e97fda5865 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/text_embedding_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.text_embedding' do + let(:expected_args) do + [ + 'POST', + '_inference/text_embedding/foo', + {}, + nil, + {}, + { defined_params: { inference_id: 'foo' }, endpoint: 'inference.text_embedding' } + ] + end + + it 'performs the request' do + expect(client_double.inference.text_embedding(inference_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/update_spec.rb b/elasticsearch-api/spec/unit/actions/inference/update_spec.rb index 6f29cd0b58..0ee998ee5b 100644 --- a/elasticsearch-api/spec/unit/actions/inference/update_spec.rb +++ b/elasticsearch-api/spec/unit/actions/inference/update_spec.rb @@ -23,7 +23,7 @@ 'PUT', '_inference/foo/bar/_update', {}, - nil, + {}, {}, { defined_params: { inference_id: 'bar', task_type: 'foo' }, endpoint: 'inference.update' } @@ -31,6 +31,6 @@ end it 'performs the request' do - expect(client_double.inference.update(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.update(task_type: 'foo', body: {}, inference_id: 'bar')).to be_a Elasticsearch::API::Response end end From a04c3f189ee398baba3d8c8b19799e75271f0efd Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 11 Mar 2025 10:08:18 +0000 Subject: [PATCH 486/540] [Tests] Skip inference tests --- elasticsearch-api/spec/yaml-test-runner/run.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index 701d26b801..9d39880517 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -86,4 +86,5 @@ def serverless? runner = Elasticsearch::Tests::TestRunner.new(CLIENT, tests_path, logger) runner.add_tests_to_skip('knn_search.yml') # TODO: Extract into file +runner.add_tests_to_skip('inference/10_basic.yml') runner.run(ENV['SINGLE_TEST'] || []) From 4084257b50421e125279a642f1e3bf67c2323a41 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 11 Mar 2025 10:35:11 +0000 Subject: [PATCH 487/540] [Test] Workaround for inference differences in spec sources --- elasticsearch-api/spec/unit/perform_request_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elasticsearch-api/spec/unit/perform_request_spec.rb b/elasticsearch-api/spec/unit/perform_request_spec.rb index 154e19bd90..6fb47ae02a 100644 --- a/elasticsearch-api/spec/unit/perform_request_spec.rb +++ b/elasticsearch-api/spec/unit/perform_request_spec.rb @@ -35,6 +35,8 @@ params.merge(part.to_sym => 'testing') end + required_params.merge!(body: {}) if ['inference.put', 'inference.update'].include? spec.endpoint_name + let(:client_double) do Class.new { include Elasticsearch::API }.new.tap do |client| expect(client).to receive(:perform_request) do |_, _, _, _, _, request_params| From 07681a29da9839953200a524e25c03e20db7a659 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 25 Feb 2025 16:49:45 +0000 Subject: [PATCH 488/540] [Generator] Updates automation rake task for code generation --- .github/make.sh | 1 + rake_tasks/automation.rake | 17 ++++++++++++----- rake_tasks/elasticsearch_tasks.rake | 3 ++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/make.sh b/.github/make.sh index a3ce02170d..b36c4cea5b 100755 --- a/.github/make.sh +++ b/.github/make.sh @@ -128,6 +128,7 @@ docker run \ -u "$(id -u)" \ --env "RUBY_VERSION=${RUBY_VERSION}" \ --env "WORKFLOW=${WORKFLOW}" \ + --env "CLIENTS_GITHUB_TOKEN=${CLIENTS_GITHUB_TOKEN}" \ --name test-runner \ --volume "${repo}:/usr/src/app" \ --rm \ diff --git a/rake_tasks/automation.rake b/rake_tasks/automation.rake index 7ccca18e40..8076005a60 100644 --- a/rake_tasks/automation.rake +++ b/rake_tasks/automation.rake @@ -38,12 +38,19 @@ namespace :automation do desc 'Generate API code' task :codegen do - version = YAML.load_file(File.expand_path("#{__dir__}/../.buildkite/pipeline.yml"))['steps'].first['env']['STACK_VERSION'] + path = File.expand_path('../elasticsearch-api/', __dir__) + branch = YAML.load_file(File.expand_path("#{__dir__}/../.buildkite/pipeline.yml"))['steps'].first['env']['ES_YAML_TESTS_BRANCH'] + unless File.exist?(File.expand_path('elastic-client-generator-ruby', __dir__)) + sh "git clone https://#{ENV['CLIENTS_GITHUB_TOKEN']}@github.com/elastic/elastic-client-generator-ruby.git " + end - Rake::Task['es:download_artifacts'].invoke(version) - sh "cd #{CURRENT_PATH.join('elasticsearch-api/utils')} \ - && BUNDLE_GEMFILE=`pwd`/Gemfile \ - && bundle exec thor code:generate" + sh "export ES_RUBY_CLIENT_PATH=#{path} " \ + ' && cd elastic-client-generator-ruby/elasticsearch ' \ + ' && sudo bundle install ' \ + " && bundle exec rake update[#{branch}]" \ + ' && bundle exec rake gen_es' \ + ' && cd ../../ ' \ + ' && rm -rf elastic-client-generator-ruby ' end desc <<-DESC diff --git a/rake_tasks/elasticsearch_tasks.rake b/rake_tasks/elasticsearch_tasks.rake index 9d7deb50a5..316cbb71ae 100644 --- a/rake_tasks/elasticsearch_tasks.rake +++ b/rake_tasks/elasticsearch_tasks.rake @@ -73,7 +73,8 @@ namespace :es do abort e.message end - desc 'Download artifacts (tests and REST spec) for currently running cluster' + # Deprecated + desc 'Download Elasticsearch artifacts (tests and REST spec) for currently running cluster' task :download_artifacts, :version do |_, args| json_filename = CURRENT_PATH.join('tmp/artifacts.json') From 78b0eb3ed98548cee03d97277f8a7649f4227f87 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 25 Feb 2025 17:02:37 +0000 Subject: [PATCH 489/540] Adds .env to gitignore --- elasticsearch-api/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/.gitignore b/elasticsearch-api/.gitignore index d87d4be66f..fc492d778b 100644 --- a/elasticsearch-api/.gitignore +++ b/elasticsearch-api/.gitignore @@ -2,6 +2,7 @@ *.rbc .bundle .config +.env .yardoc Gemfile.lock InstalledFiles From e30e1f04781f74b78677174b667718a39c2173c4 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 6 Mar 2025 09:11:55 +0000 Subject: [PATCH 490/540] [API] Removes rollup APIs The rollup feature was never GA-ed and is still tech preview. It has been deprecated since 8.11.0 in favor of downsampling. --- elasticsearch-api/lib/elasticsearch/api.rb | 1 - .../api/actions/rollup/delete_job.rb | 64 ----------------- .../api/actions/rollup/get_jobs.rb | 66 ------------------ .../api/actions/rollup/get_rollup_caps.rb | 66 ------------------ .../actions/rollup/get_rollup_index_caps.rb | 64 ----------------- .../api/actions/rollup/put_job.rb | 66 ------------------ .../api/actions/rollup/rollup_search.rb | 68 ------------------- .../api/actions/rollup/start_job.rb | 64 ----------------- .../api/actions/rollup/stop_job.rb | 66 ------------------ .../lib/elasticsearch/api/namespace/rollup.rb | 36 ---------- .../rollup/get_rollup_index_caps_spec.rb | 35 ---------- 11 files changed, 596 deletions(-) delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/rollup.rb delete mode 100644 elasticsearch-api/spec/unit/actions/rollup/get_rollup_index_caps_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index 1a8471002e..ae016a87c2 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -70,7 +70,6 @@ def self.included(base) Elasticsearch::API::Logstash, Elasticsearch::API::Migration, Elasticsearch::API::MachineLearning, - Elasticsearch::API::Rollup, Elasticsearch::API::SearchableSnapshots, Elasticsearch::API::Security, Elasticsearch::API::SnapshotLifecycleManagement, diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb deleted file mode 100644 index fe87cfa556..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb +++ /dev/null @@ -1,64 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Rollup - module Actions - # Deletes an existing rollup job. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :id The ID of the job to delete - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-delete-job.html - # - def delete_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'rollup.delete_job' } - - defined_params = [:id].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 'id' missing" unless arguments[:id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _id = arguments.delete(:id) - - method = Elasticsearch::API::HTTP_DELETE - path = "_rollup/job/#{Utils.__listify(_id)}" - params = {} - - 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/rollup/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb deleted file mode 100644 index 4344386526..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb +++ /dev/null @@ -1,66 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Rollup - module Actions - # Retrieves the configuration, stats, and status of rollup jobs. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :id The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-job.html - # - def get_jobs(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'rollup.get_jobs' } - - defined_params = [:id].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 - - _id = arguments.delete(:id) - - method = Elasticsearch::API::HTTP_GET - path = if _id - "_rollup/job/#{Utils.__listify(_id)}" - else - '_rollup/job' - end - params = {} - - 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/rollup/get_rollup_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb deleted file mode 100644 index 93ac86cec1..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb +++ /dev/null @@ -1,66 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Rollup - module Actions - # Returns the capabilities of any rollup jobs that have been configured for a specific index or index pattern. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :id The ID of the index to check rollup capabilities on, or left blank for all jobs - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-caps.html - # - def get_rollup_caps(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'rollup.get_rollup_caps' } - - defined_params = [:id].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 - - _id = arguments.delete(:id) - - method = Elasticsearch::API::HTTP_GET - path = if _id - "_rollup/data/#{Utils.__listify(_id)}" - else - '_rollup/data' - end - params = {} - - 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/rollup/get_rollup_index_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb deleted file mode 100644 index d530edc59f..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb +++ /dev/null @@ -1,64 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Rollup - module Actions - # Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the index where rollup data is stored). - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :index The rollup index or index pattern to obtain rollup capabilities from. - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-index-caps.html - # - def get_rollup_index_caps(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'rollup.get_rollup_index_caps' } - - defined_params = [:index].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 'index' missing" unless arguments[:index] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _index = arguments.delete(:index) - - method = Elasticsearch::API::HTTP_GET - path = "#{Utils.__listify(_index)}/_rollup/data" - params = {} - - 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/rollup/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb deleted file mode 100644 index 1286e65c2b..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb +++ /dev/null @@ -1,66 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Rollup - module Actions - # Creates a rollup job. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :id The ID of the job to create - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The job configuration (*Required*) - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-put-job.html - # - def put_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'rollup.put_job' } - - defined_params = [:id].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 'id' missing" unless arguments[:id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - _id = arguments.delete(:id) - - method = Elasticsearch::API::HTTP_PUT - path = "_rollup/job/#{Utils.__listify(_id)}" - params = {} - - 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/rollup/rollup_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb deleted file mode 100644 index 597524c347..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb +++ /dev/null @@ -1,68 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Rollup - module Actions - # Enables searching rolled-up data using the standard query DSL. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [List] :index The indices or index-pattern(s) (containing rollup or regular data) that should be searched - # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response - # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The search request body (*Required*) - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-search.html - # - def rollup_search(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'rollup.rollup_search' } - - defined_params = [:index].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 'index' missing" unless arguments[:index] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - _index = arguments.delete(:index) - - method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_rollup_search" - 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/rollup/start_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb deleted file mode 100644 index d1108d1ba3..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb +++ /dev/null @@ -1,64 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Rollup - module Actions - # Starts an existing, stopped rollup job. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :id The ID of the job to start - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-start-job.html - # - def start_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'rollup.start_job' } - - defined_params = [:id].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 'id' missing" unless arguments[:id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _id = arguments.delete(:id) - - method = Elasticsearch::API::HTTP_POST - path = "_rollup/job/#{Utils.__listify(_id)}/_start" - params = {} - - 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/rollup/stop_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb deleted file mode 100644 index f33070a4db..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb +++ /dev/null @@ -1,66 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Rollup - module Actions - # Stops an existing, started rollup job. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :id The ID of the job to stop - # @option arguments [Boolean] :wait_for_completion True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false. - # @option arguments [Time] :timeout Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s. - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-stop-job.html - # - def stop_job(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'rollup.stop_job' } - - defined_params = [:id].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 'id' missing" unless arguments[:id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _id = arguments.delete(:id) - - method = Elasticsearch::API::HTTP_POST - path = "_rollup/job/#{Utils.__listify(_id)}/_stop" - 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/namespace/rollup.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/rollup.rb deleted file mode 100644 index 1e0e4b1c8e..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/rollup.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Rollup - module Actions; end - - # Client for the "rollup" namespace (includes the {Rollup::Actions} methods) - # - class RollupClient - include Common::Client, Common::Client::Base, Rollup::Actions - end - - # Proxy method for {RollupClient}, available in the receiving object - # - def rollup - @rollup ||= RollupClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/spec/unit/actions/rollup/get_rollup_index_caps_spec.rb b/elasticsearch-api/spec/unit/actions/rollup/get_rollup_index_caps_spec.rb deleted file mode 100644 index 240a98be4b..0000000000 --- a/elasticsearch-api/spec/unit/actions/rollup/get_rollup_index_caps_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#rollup.get_rollup_index_caps' do - let(:expected_args) do - [ - 'GET', - 'foo/_rollup/data', - {}, - nil, - {}, - { endpoint: 'rollup.get_rollup_index_caps', defined_params: { index: 'foo' } } - ] - end - - it 'performs the request' do - expect(client_double.rollup.get_rollup_index_caps(index: 'foo')).to be_a Elasticsearch::API::Response - end -end From bbbcfbf8a3e80dbc734ff8431bd07df9ca75625f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 6 Mar 2025 09:39:20 +0000 Subject: [PATCH 491/540] [API] Refactors namespace and requiring API code Based on the code written in the Elasticsearch Serverless client, this change makes the creation of the namespace clients dynamic, removing all the files that were under `namespace` before. Some outdated and deprecated code was removed too, like unnecessary namespaces. --- elasticsearch-api/lib/elasticsearch/api.rb | 133 ++++++++++-------- .../api/namespace/async_search.rb | 36 ----- .../api/namespace/autoscaling.rb | 36 ----- .../lib/elasticsearch/api/namespace/cat.rb | 36 ----- .../elasticsearch/api/namespace/cluster.rb | 37 ----- .../lib/elasticsearch/api/namespace/common.rb | 42 ------ .../elasticsearch/api/namespace/connector.rb | 36 ----- .../namespace/cross_cluster_replication.rb | 38 ----- .../api/namespace/dangling_indices.rb | 35 ----- .../data_frame_transform_deprecated.rb | 36 ----- .../lib/elasticsearch/api/namespace/enrich.rb | 36 ----- .../lib/elasticsearch/api/namespace/eql.rb | 36 ----- .../lib/elasticsearch/api/namespace/esql.rb | 36 ----- .../elasticsearch/api/namespace/features.rb | 36 ----- .../lib/elasticsearch/api/namespace/fleet.rb | 36 ----- .../lib/elasticsearch/api/namespace/graph.rb | 36 ----- .../namespace/index_lifecycle_management.rb | 38 ----- .../elasticsearch/api/namespace/indices.rb | 37 ----- .../elasticsearch/api/namespace/inference.rb | 36 ----- .../lib/elasticsearch/api/namespace/ingest.rb | 36 ----- .../elasticsearch/api/namespace/license.rb | 36 ----- .../elasticsearch/api/namespace/logstash.rb | 36 ----- .../api/namespace/machine_learning.rb | 38 ----- .../elasticsearch/api/namespace/migration.rb | 36 ----- .../lib/elasticsearch/api/namespace/nodes.rb | 37 ----- .../api/namespace/query_rules.rb | 36 ----- .../api/namespace/query_ruleset.rb | 36 ----- .../lib/elasticsearch/api/namespace/remote.rb | 37 ----- .../api/namespace/search_application.rb | 36 ----- .../api/namespace/searchable_snapshots.rb | 36 ----- .../elasticsearch/api/namespace/security.rb | 36 ----- .../elasticsearch/api/namespace/simulate.rb | 36 ----- .../elasticsearch/api/namespace/snapshot.rb | 37 ----- .../snapshot_lifecycle_management.rb | 38 ----- .../lib/elasticsearch/api/namespace/sql.rb | 36 ----- .../lib/elasticsearch/api/namespace/ssl.rb | 36 ----- .../elasticsearch/api/namespace/synonyms.rb | 36 ----- .../lib/elasticsearch/api/namespace/tasks.rb | 37 ----- .../api/namespace/text_structure.rb | 36 ----- .../elasticsearch/api/namespace/transform.rb | 36 ----- .../elasticsearch/api/namespace/watcher.rb | 36 ----- .../lib/elasticsearch/api/namespace/xpack.rb | 36 ----- 42 files changed, 78 insertions(+), 1550 deletions(-) delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/async_search.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/autoscaling.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/cat.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/cluster.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/common.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/connector.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/cross_cluster_replication.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/dangling_indices.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/data_frame_transform_deprecated.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/enrich.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/eql.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/esql.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/features.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/fleet.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/graph.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/index_lifecycle_management.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/indices.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/inference.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/ingest.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/license.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/logstash.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/machine_learning.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/migration.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/nodes.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/query_rules.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/query_ruleset.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/remote.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/search_application.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/searchable_snapshots.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/security.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/simulate.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/snapshot.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/snapshot_lifecycle_management.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/sql.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/ssl.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/synonyms.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/tasks.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/text_structure.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/transform.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/watcher.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/namespace/xpack.rb diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index ae016a87c2..f187a05021 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -15,21 +15,19 @@ # specific language governing permissions and limitations # under the License. -require "cgi" -require "multi_json" - -require "elasticsearch/api/version" -require "elasticsearch/api/namespace/common" -require "elasticsearch/api/utils" +require 'cgi' +require 'multi_json' +require 'elasticsearch/api/version' +require 'elasticsearch/api/utils' require 'elasticsearch/api/response' -Dir[ File.expand_path('../api/actions/**/*.rb', __FILE__) ].each { |f| require f } -Dir[ File.expand_path('../api/namespace/**/*.rb', __FILE__) ].each { |f| require f } +Dir[File.expand_path('api/actions/**/*.rb', __dir__)].each { |f| require f } module Elasticsearch # This is the main module for including all API endpoint functions # It includes the namespace modules from ./api/actions module API + include Elasticsearch::API::Actions DEFAULT_SERIALIZER = MultiJson HTTP_GET = 'GET'.freeze @@ -37,57 +35,82 @@ module API HTTP_POST = 'POST'.freeze HTTP_PUT = 'PUT'.freeze HTTP_DELETE = 'DELETE'.freeze - UNDERSCORE_SEARCH = '_search'.freeze - UNDERSCORE_ALL = '_all'.freeze - DEFAULT_DOC = '_doc'.freeze - # Auto-include all namespaces in the receiver + module CommonClient + attr_reader :client + + def initialize(client) + @client = client + end + + def perform_request(method, path, params = {}, body = nil, headers = nil, request_opts = {}) + client.perform_request(method, path, params, body, headers, request_opts) + end + end + + # Add new namespaces to this constant # - def self.included(base) - base.send :include, - Elasticsearch::API::Common, - Elasticsearch::API::Actions, - Elasticsearch::API::Cluster, - Elasticsearch::API::Nodes, - Elasticsearch::API::Indices, - Elasticsearch::API::Ingest, - Elasticsearch::API::Snapshot, - Elasticsearch::API::Tasks, - Elasticsearch::API::Cat, - Elasticsearch::API::Remote, - Elasticsearch::API::DanglingIndices, - Elasticsearch::API::Features, - Elasticsearch::API::AsyncSearch, - Elasticsearch::API::Autoscaling, - Elasticsearch::API::CrossClusterReplication, - Elasticsearch::API::DataFrameTransformDeprecated, - Elasticsearch::API::Enrich, - Elasticsearch::API::Eql, - Elasticsearch::API::Fleet, - Elasticsearch::API::Graph, - Elasticsearch::API::IndexLifecycleManagement, - Elasticsearch::API::License, - Elasticsearch::API::Logstash, - Elasticsearch::API::Migration, - Elasticsearch::API::MachineLearning, - Elasticsearch::API::SearchableSnapshots, - Elasticsearch::API::Security, - Elasticsearch::API::SnapshotLifecycleManagement, - Elasticsearch::API::SQL, - Elasticsearch::API::SSL, - Elasticsearch::API::TextStructure, - Elasticsearch::API::Transform, - Elasticsearch::API::Watcher, - Elasticsearch::API::XPack, - Elasticsearch::API::SearchApplication, - Elasticsearch::API::Synonyms, - Elasticsearch::API::Esql, - Elasticsearch::API::Inference, - Elasticsearch::API::Simulate, - Elasticsearch::API::Connector, - Elasticsearch::API::QueryRules + API_NAMESPACES = [:async_search, + :cat, + :cross_cluster_replication, + :cluster, + :connector, + :dangling_indices, + :enrich, + :eql, + :esql, + :features, + :fleet, + :graph, + :index_lifecycle_management, + :indices, + :inference, + :ingest, + :license, + :logstash, + :migration, + :machine_learning, + :nodes, + :query_rules, + :search_application, + :searchable_snapshots, + :security, + :simulate, + :snapshot_lifecycle_management, + :snapshot, + :sql, + :ssl, + :synonyms, + :tasks, + :text_structure, + :transform, + :watcher, + :xpack].freeze + + UPPERCASE_APIS = ['sql', 'ssl'].freeze + API_NAMESPACES.each do |namespace| + name = namespace.to_s + module_name = if UPPERCASE_APIS.include?(name) + name.upcase + elsif name == 'xpack' + 'XPack' + else + name.split('_').map(&:capitalize).join + end + class_name = "#{module_name}Client" + + klass = Class.new(Object) do + include CommonClient, Object.const_get("Elasticsearch::API::#{module_name}::Actions") + end + Object.const_set(class_name, klass) + define_method(name) do + instance_variable_set("@#{name}", klass.new(self)) + end end + alias ml machine_learning + alias ilm index_lifecycle_management + # The serializer class # def self.serializer diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/async_search.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/async_search.rb deleted file mode 100644 index af5f5eafc6..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/async_search.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module AsyncSearch - module Actions; end - - # Client for the "async_search" namespace (includes the {AsyncSearch::Actions} methods) - # - class AsyncSearchClient - include Common::Client, Common::Client::Base, AsyncSearch::Actions - end - - # Proxy method for {AsyncSearchClient}, available in the receiving object - # - def async_search - @async_search ||= AsyncSearchClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/autoscaling.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/autoscaling.rb deleted file mode 100644 index 0ded4d5e42..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/autoscaling.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Autoscaling - module Actions; end - - # Client for the "autoscaling" namespace (includes the {Autoscaling::Actions} methods) - # - class AutoscalingClient - include Common::Client, Common::Client::Base, Autoscaling::Actions - end - - # Proxy method for {AutoscalingClient}, available in the receiving object - # - def autoscaling - @autoscaling ||= AutoscalingClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/cat.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/cat.rb deleted file mode 100644 index ba3952e3bd..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/cat.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Cat - module Actions; end - - # Client for the "cat" namespace (includes the {Cat::Actions} methods) - # - class CatClient - include Common::Client, Common::Client::Base, Cat::Actions - end - - # Proxy method for {CatClient}, available in the receiving object - # - def cat - @cat ||= CatClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/cluster.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/cluster.rb deleted file mode 100644 index e2eb15f707..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/cluster.rb +++ /dev/null @@ -1,37 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Cluster - module Actions; end - - # Client for the "cluster" namespace (includes the {Cluster::Actions} methods) - # - class ClusterClient - include Common::Client, Common::Client::Base, Cluster::Actions - end - - # Proxy method for {ClusterClient}, available in the receiving object - # - def cluster - @cluster ||= ClusterClient.new(self) - end - - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb deleted file mode 100644 index 789aca2514..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb +++ /dev/null @@ -1,42 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Common - module Actions; end - - module Client - # Base client wrapper - # - module Base - attr_reader :client - - def initialize(client) - @client = client - end - end - - # Delegates the `perform_request` method to the wrapped client - # - def perform_request(method, path, params={}, body=nil, headers=nil, request_opts={}) - client.perform_request method, path, params, body, headers, request_opts - end - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/connector.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/connector.rb deleted file mode 100644 index b9bed44085..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/connector.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Connector - module Actions; end - - # Client for the "connector" namespace (includes the {Connector::Actions} methods) - # - class ConnectorClient - include Common::Client, Common::Client::Base, Connector::Actions - end - - # Proxy method for {ConnectorClient}, available in the receiving object - # - def connector - @connector ||= ConnectorClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/cross_cluster_replication.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/cross_cluster_replication.rb deleted file mode 100644 index d9cb230653..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/cross_cluster_replication.rb +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - -module Elasticsearch - module API - module CrossClusterReplication - module Actions; end - - # Client for the "cross_cluster_replication" namespace (includes the {CrossClusterReplication::Actions} methods) - # - class CrossClusterReplicationClient - include Common::Client, Common::Client::Base, CrossClusterReplication::Actions - end - - # Proxy method for {CrossClusterReplicationClient}, available in the receiving object - # - def cross_cluster_replication - @cross_cluster_replication ||= CrossClusterReplicationClient.new(self) - end - - alias ccr cross_cluster_replication - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/dangling_indices.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/dangling_indices.rb deleted file mode 100644 index 76291aaede..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/dangling_indices.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -module Elasticsearch - module API - module DanglingIndices - module Actions; end - # Client for the "dangling_indices" namespace (includes the {DanglingIndices::Actions} methods) - # - class DanglingIndicesClient - include Common::Client, Common::Client::Base, DanglingIndices::Actions - end - - # Proxy method for {DanglingIndicesClient}, available in the receiving object - # - def dangling_indices - @dangling_indices ||= DanglingIndicesClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/data_frame_transform_deprecated.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/data_frame_transform_deprecated.rb deleted file mode 100644 index 8487199af4..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/data_frame_transform_deprecated.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module DataFrameTransformDeprecated - module Actions; end - - # Client for the "data_frame_transform_deprecated" namespace (includes the {DataFrameTransformDeprecated::Actions} methods) - # - class DataFrameTransformDeprecatedClient - include Common::Client, Common::Client::Base, DataFrameTransformDeprecated::Actions - end - - # Proxy method for {DataFrameTransformDeprecatedClient}, available in the receiving object - # - def data_frame_transform_deprecated - @data_frame_transform_deprecated ||= DataFrameTransformDeprecatedClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/enrich.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/enrich.rb deleted file mode 100644 index d591cc99ac..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/enrich.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Enrich - module Actions; end - - # Client for the "enrich" namespace (includes the {Enrich::Actions} methods) - # - class EnrichClient - include Common::Client, Common::Client::Base, Enrich::Actions - end - - # Proxy method for {EnrichClient}, available in the receiving object - # - def enrich - @enrich ||= EnrichClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/eql.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/eql.rb deleted file mode 100644 index 38c9f891e2..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/eql.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Eql - module Actions; end - - # Client for the "eql" namespace (includes the {Eql::Actions} methods) - # - class EqlClient - include Common::Client, Common::Client::Base, Eql::Actions - end - - # Proxy method for {EqlClient}, available in the receiving object - # - def eql - @eql ||= EqlClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/esql.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/esql.rb deleted file mode 100644 index e41c6c7128..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/esql.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Esql - module Actions; end - - # Client for the "esql" namespace (includes the {Esql::Actions} methods) - # - class EsqlClient - include Common::Client, Common::Client::Base, Esql::Actions - end - - # Proxy method for {EsqlClient}, available in the receiving object - # - def esql - @esql ||= EsqlClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/features.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/features.rb deleted file mode 100644 index 8b968f167e..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/features.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Features - module Actions; end - - # Client for the "features" namespace (includes the {Features::Actions} methods) - # - class FeaturesClient - include Common::Client, Common::Client::Base, Features::Actions - end - - # Proxy method for {FeaturesClient}, available in the receiving object - # - def features - @features ||= FeaturesClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/fleet.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/fleet.rb deleted file mode 100644 index 81f8cc369e..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/fleet.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Fleet - module Actions; end - - # Client for the "fleet" namespace (includes the {Fleet::Actions} methods) - # - class FleetClient - include Common::Client, Common::Client::Base, Fleet::Actions - end - - # Proxy method for {FleetClient}, available in the receiving object - # - def fleet - @fleet ||= FleetClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/graph.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/graph.rb deleted file mode 100644 index 04fd1d08a5..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/graph.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Graph - module Actions; end - - # Client for the "graph" namespace (includes the {Graph::Actions} methods) - # - class GraphClient - include Common::Client, Common::Client::Base, Graph::Actions - end - - # Proxy method for {GraphClient}, available in the receiving object - # - def graph - @graph ||= GraphClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/index_lifecycle_management.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/index_lifecycle_management.rb deleted file mode 100644 index 23077edeb3..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/index_lifecycle_management.rb +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - -module Elasticsearch - module API - module IndexLifecycleManagement - module Actions; end - - # Client for the "index_lifecycle_management" namespace (includes the {IndexLifecycleManagement::Actions} methods) - # - class IndexLifecycleManagementClient - include Common::Client, Common::Client::Base, IndexLifecycleManagement::Actions - end - - # Proxy method for {IndexLifecycleManagementClient}, available in the receiving object - # - def ilm - @ilm ||= IndexLifecycleManagementClient.new(self) - end - - alias index_lifecycle_management ilm - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/indices.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/indices.rb deleted file mode 100644 index 75a3c0f290..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/indices.rb +++ /dev/null @@ -1,37 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Indices - module Actions; end - - # Client for the "indices" namespace (includes the {Indices::Actions} methods) - # - class IndicesClient - include Common::Client, Common::Client::Base, Indices::Actions - end - - # Proxy method for {IndicesClient}, available in the receiving object - # - def indices - @indices ||= IndicesClient.new(self) - end - - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/inference.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/inference.rb deleted file mode 100644 index 84b3983649..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/inference.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Inference - module Actions; end - - # Client for the "inference" namespace (includes the {Inference::Actions} methods) - # - class InferenceClient - include Common::Client, Common::Client::Base, Inference::Actions - end - - # Proxy method for {InferenceClient}, available in the receiving object - # - def inference - @inference ||= InferenceClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/ingest.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/ingest.rb deleted file mode 100644 index 6e5e57af1f..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/ingest.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Ingest - module Actions; end - - # Client for the "ingest" namespace (includes the {Ingest::Actions} methods) - # - class IngestClient - include Common::Client, Common::Client::Base, Ingest::Actions - end - - # Proxy method for {IngestClient}, available in the receiving object - # - def ingest - @ingest ||= IngestClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/license.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/license.rb deleted file mode 100644 index e6fbd83676..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/license.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module License - module Actions; end - - # Client for the "license" namespace (includes the {License::Actions} methods) - # - class LicenseClient - include Common::Client, Common::Client::Base, License::Actions - end - - # Proxy method for {LicenseClient}, available in the receiving object - # - def license - @license ||= LicenseClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/logstash.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/logstash.rb deleted file mode 100644 index 2a0dd34871..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/logstash.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Logstash - module Actions; end - - # Client for the "logstash" namespace (includes the {Logstash::Actions} methods) - # - class LogstashClient - include Common::Client, Common::Client::Base, Logstash::Actions - end - - # Proxy method for {LogstashClient}, available in the receiving object - # - def logstash - @logstash ||= LogstashClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/machine_learning.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/machine_learning.rb deleted file mode 100644 index 63ada11f03..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/machine_learning.rb +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - -module Elasticsearch - module API - module MachineLearning - module Actions; end - - # Client for the "machine_learning" namespace (includes the {MachineLearning::Actions} methods) - # - class MachineLearningClient - include Common::Client, Common::Client::Base, MachineLearning::Actions - end - - # Proxy method for {MachineLearningClient}, available in the receiving object - # - def machine_learning - @machine_learning ||= MachineLearningClient.new(self) - end - - alias ml machine_learning - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/migration.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/migration.rb deleted file mode 100644 index 05685adf49..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/migration.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Migration - module Actions; end - - # Client for the "migration" namespace (includes the {Migration::Actions} methods) - # - class MigrationClient - include Common::Client, Common::Client::Base, Migration::Actions - end - - # Proxy method for {MigrationClient}, available in the receiving object - # - def migration - @migration ||= MigrationClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/nodes.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/nodes.rb deleted file mode 100644 index e717db05b2..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/nodes.rb +++ /dev/null @@ -1,37 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Nodes - module Actions; end - - # Client for the "nodes" namespace (includes the {Nodes::Actions} methods) - # - class NodesClient - include Common::Client, Common::Client::Base, Nodes::Actions - end - - # Proxy method for {NodesClient}, available in the receiving object - # - def nodes - @nodes ||= NodesClient.new(self) - end - - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/query_rules.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/query_rules.rb deleted file mode 100644 index efff86c635..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/query_rules.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module QueryRules - module Actions; end - - # Client for the "query_rules" namespace (includes the {QueryRules::Actions} methods) - # - class QueryRulesClient - include Common::Client, Common::Client::Base, QueryRules::Actions - end - - # Proxy method for {QueryRulesClient}, available in the receiving object - # - def query_rules - @query_rules ||= QueryRulesClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/query_ruleset.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/query_ruleset.rb deleted file mode 100644 index c77d50dbcc..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/query_ruleset.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module QueryRuleset - module Actions; end - - # Client for the "query_ruleset" namespace (includes the {QueryRuleset::Actions} methods) - # - class QueryRulesetClient - include Common::Client, Common::Client::Base, QueryRuleset::Actions - end - - # Proxy method for {QueryRulesetClient}, available in the receiving object - # - def query_ruleset - @query_ruleset ||= QueryRulesetClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/remote.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/remote.rb deleted file mode 100644 index bcf5e4265f..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/remote.rb +++ /dev/null @@ -1,37 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Remote - module Actions; end - - # Client for the "remote" namespace (includes the {Remote::Actions} methods) - # - class RemoteClient - include Common::Client, Common::Client::Base, Remote::Actions - end - - # Proxy method for {RemoteClient}, available in the receiving object - # - def remote - @remote ||= RemoteClient.new(self) - end - - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/search_application.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/search_application.rb deleted file mode 100644 index 962bf15b5e..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/search_application.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module SearchApplication - module Actions; end - - # Client for the "searchable_snapshots" namespace (includes the {SearchableSnapshots::Actions} methods) - # - class SearchApplicationClient - include Common::Client, Common::Client::Base, SearchApplication::Actions - end - - # Proxy method for {SearchApplicationClient}, available in the receiving object - # - def search_application - @search_application ||= SearchApplicationClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/searchable_snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/searchable_snapshots.rb deleted file mode 100644 index 0a2add26b5..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/searchable_snapshots.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module SearchableSnapshots - module Actions; end - - # Client for the "searchable_snapshots" namespace (includes the {SearchableSnapshots::Actions} methods) - # - class SearchableSnapshotsClient - include Common::Client, Common::Client::Base, SearchableSnapshots::Actions - end - - # Proxy method for {SearchableSnapshotsClient}, available in the receiving object - # - def searchable_snapshots - @searchable_snapshots ||= SearchableSnapshotsClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/security.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/security.rb deleted file mode 100644 index 61f9efba1f..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/security.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Security - module Actions; end - - # Client for the "security" namespace (includes the {Security::Actions} methods) - # - class SecurityClient - include Common::Client, Common::Client::Base, Security::Actions - end - - # Proxy method for {SecurityClient}, available in the receiving object - # - def security - @security ||= SecurityClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/simulate.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/simulate.rb deleted file mode 100644 index b5e6eb88e4..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/simulate.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Simulate - module Actions; end - - # Client for the "simulate" namespace (includes the {Simulate::Actions} methods) - # - class SimulateClient - include Common::Client, Common::Client::Base, Simulate::Actions - end - - # Proxy method for {SimulateClient}, available in the receiving object - # - def simulate - @simulate ||= SimulateClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/snapshot.rb deleted file mode 100644 index 35853de862..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/snapshot.rb +++ /dev/null @@ -1,37 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Snapshot - module Actions; end - - # Client for the "snapshot" namespace (includes the {Snapshot::Actions} methods) - # - class SnapshotClient - include Common::Client, Common::Client::Base, Snapshot::Actions - end - - # Proxy method for {SnapshotClient}, available in the receiving object - # - def snapshot - @snapshot ||= SnapshotClient.new(self) - end - - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/snapshot_lifecycle_management.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/snapshot_lifecycle_management.rb deleted file mode 100644 index 29b74ac932..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/snapshot_lifecycle_management.rb +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - -module Elasticsearch - module API - module SnapshotLifecycleManagement - module Actions; end - - # Client for the "snapshot_lifecycle_management" namespace (includes the {SnapshotLifecycleManagement::Actions} methods) - # - class SnapshotLifecycleManagementClient - include Common::Client, Common::Client::Base, SnapshotLifecycleManagement::Actions - end - - # Proxy method for {SnapshotLifecycleManagementClient}, available in the receiving object - # - def snapshot_lifecycle_management - @snapshot_lifecycle_management ||= SnapshotLifecycleManagementClient.new(self) - end - - alias slm snapshot_lifecycle_management - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/sql.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/sql.rb deleted file mode 100644 index f0a5c7939e..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/sql.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module SQL - module Actions; end - - # Client for the "sql" namespace (includes the {SQL::Actions} methods) - # - class SQLClient - include Common::Client, Common::Client::Base, SQL::Actions - end - - # Proxy method for {SQLClient}, available in the receiving object - # - def sql - @sql ||= SQLClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/ssl.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/ssl.rb deleted file mode 100644 index d298fce678..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/ssl.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module SSL - module Actions; end - - # Client for the "ssl" namespace (includes the {SSL::Actions} methods) - # - class SSLClient - include Common::Client, Common::Client::Base, SSL::Actions - end - - # Proxy method for {SSLClient}, available in the receiving object - # - def ssl - @ssl ||= SSLClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/synonyms.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/synonyms.rb deleted file mode 100644 index 083a215203..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/synonyms.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Synonyms - module Actions; end - - # Client for the "synonyms" namespace (includes the {Synonyms::Actions} methods) - # - class SynonymsClient - include Common::Client, Common::Client::Base, Synonyms::Actions - end - - # Proxy method for {SynonymsClient}, available in the receiving object - # - def synonyms - @synonyms ||= SynonymsClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/tasks.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/tasks.rb deleted file mode 100644 index 9c4809dce2..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/tasks.rb +++ /dev/null @@ -1,37 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Tasks - module Actions; end - - # Client for the "tasks" namespace (includes the {Tasks::Actions} methods) - # - class TasksClient - include Common::Client, Common::Client::Base, Tasks::Actions - end - - # Proxy method for {TasksClient}, available in the receiving object - # - def tasks - @tasks ||= TasksClient.new(self) - end - - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/text_structure.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/text_structure.rb deleted file mode 100644 index 0d1f5b7636..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/text_structure.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module TextStructure - module Actions; end - - # Client for the "text_structure" namespace (includes the {TextStructure::Actions} methods) - # - class TextStructureClient - include Common::Client, Common::Client::Base, TextStructure::Actions - end - - # Proxy method for {TextStructureClient}, available in the receiving object - # - def text_structure - @text_structure ||= TextStructureClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/transform.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/transform.rb deleted file mode 100644 index 0c9040adfb..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/transform.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Transform - module Actions; end - - # Client for the "transform" namespace (includes the {Transform::Actions} methods) - # - class TransformClient - include Common::Client, Common::Client::Base, Transform::Actions - end - - # Proxy method for {TransformClient}, available in the receiving object - # - def transform - @transform ||= TransformClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/watcher.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/watcher.rb deleted file mode 100644 index 554e401361..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/watcher.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module Watcher - module Actions; end - - # Client for the "watcher" namespace (includes the {Watcher::Actions} methods) - # - class WatcherClient - include Common::Client, Common::Client::Base, Watcher::Actions - end - - # Proxy method for {WatcherClient}, available in the receiving object - # - def watcher - @watcher ||= WatcherClient.new(self) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/xpack.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/xpack.rb deleted file mode 100644 index 74d8f9bb13..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/xpack.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -module Elasticsearch - module API - module XPack - module Actions; end - - # Client for the "xpack" namespace (includes the {XPack::Actions} methods) - # - class XPackClient - include Common::Client, Common::Client::Base, XPack::Actions - end - - # Proxy method for {XPackClient}, available in the receiving object - # - def xpack - @xpack ||= XPackClient.new(self) - end - end - end -end From 5193988e739fc1f0450927719099a6bbade0e63a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 11 Mar 2025 13:32:18 +0000 Subject: [PATCH 492/540] [API] Removes connector.last_sync endpoint --- .../api/actions/connector/last_sync.rb | 66 ------------------- .../unit/actions/connector/last_sync_spec.rb | 38 ----------- 2 files changed, 104 deletions(-) delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb delete mode 100644 elasticsearch-api/spec/unit/actions/connector/last_sync_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb deleted file mode 100644 index 1a342f408f..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/last_sync.rb +++ /dev/null @@ -1,66 +0,0 @@ -# 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. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module Connector - module Actions - # Updates the stats of last sync in the connector document. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Object with stats related to the last connector sync run. (*Required*) - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-last-sync-api.html - # - def last_sync(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'connector.last_sync' } - - defined_params = [:connector_id].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 'connector_id' missing" unless arguments[:connector_id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - _connector_id = arguments.delete(:connector_id) - - method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_last_sync" - params = {} - - Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, request_opts) - ) - end - end - end - end -end diff --git a/elasticsearch-api/spec/unit/actions/connector/last_sync_spec.rb b/elasticsearch-api/spec/unit/actions/connector/last_sync_spec.rb deleted file mode 100644 index 68cb2b635e..0000000000 --- a/elasticsearch-api/spec/unit/actions/connector/last_sync_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client.connector#last_sync' do - let(:expected_args) do - [ - 'PUT', - '_connector/foo/_last_sync', - {}, - {}, - {}, - { - :defined_params=>{ connector_id: 'foo' }, - endpoint: 'connector.last_sync' - } - ] - end - - it 'performs the request' do - expect(client_double.connector.last_sync(connector_id: 'foo', body: {})).to be_a Elasticsearch::API::Response - end -end From bdabb56be81804d7caa0915ab0ebf096f6298caf Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 12 Mar 2025 14:30:03 +0000 Subject: [PATCH 493/540] Adds generator to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index eda31fc818..b6ec5bd32e 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ profile/**/data/*.json parsed_alternative_report.json .byebug_history build/ -*.gem \ No newline at end of file +*.gem +elastic-client-generator-ruby \ No newline at end of file From 7029a09f95de1f0c49493f58437b94c7d507d833 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 12 Mar 2025 15:45:47 +0000 Subject: [PATCH 494/540] [API] Renames functions in utils.rb from __ names * Renames __bulkify to bulkify * Renames __escape to escape * Renames __listify to listify * Renames __pathify to pathify * Renames __extract_parts to extract_parts * Renames __rescue_from_not_found to rescue_from_not_found --- .../lib/elasticsearch/api/utils.rb | 62 +++---- elasticsearch-api/spec/unit/utils_spec.rb | 169 ++++-------------- .../utils/thor/endpoint_specifics.rb | 4 +- .../utils/thor/templates/_body.erb | 2 +- 4 files changed, 67 insertions(+), 170 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/utils.rb b/elasticsearch-api/lib/elasticsearch/api/utils.rb index fc53cb1d49..8959b3aa81 100644 --- a/elasticsearch-api/lib/elasticsearch/api/utils.rb +++ b/elasticsearch-api/lib/elasticsearch/api/utils.rb @@ -24,60 +24,62 @@ module Utils # URL-escape a string # # @example - # __escape('foo/bar') # => 'foo%2Fbar' - # __escape('bar^bam') # => 'bar%5Ebam' + # escape('foo/bar') # => 'foo%2Fbar' + # escape('bar^bam') # => 'bar%5Ebam' # # @api private - def __escape(string) + def escape(string) return string if string == '*' + ERB::Util.url_encode(string.to_s) end # Create a "list" of values from arguments, ignoring nil values and encoding special characters. # # @example Create a list from array - # __listify(['A','B']) # => 'A,B' + # listify(['A','B']) # => 'A,B' # # @example Create a list from arguments - # __listify('A','B') # => 'A,B' + # listify('A','B') # => 'A,B' # # @example Escape values - # __listify('foo','bar^bam') # => 'foo,bar%5Ebam' + # listify('foo','bar^bam') # => 'foo,bar%5Ebam' # # @example Do not escape the values - # __listify('foo','bar^bam', escape: false) # => 'foo,bar^bam' + # listify('foo','bar^bam', escape: false) # => 'foo,bar^bam' # # @api private - def __listify(*list) + def listify(*list) options = list.last.is_a?(Hash) ? list.pop : {} escape = options[:escape] - Array(list). - flat_map { |e| e.respond_to?(:split) ? e.split(',') : e }. - flatten. - compact. - map { |e| escape == false ? e : __escape(e) }. - join(',') + Array(list) + .flat_map { |e| e.respond_to?(:split) ? e.split(',') : e } + .flatten + .compact + .map { |e| escape == false ? e : escape(e) } + .join(',') end # Create a path (URL part) from arguments, ignoring nil values and empty strings. # # @example Create a path from array - # __pathify(['foo', '', nil, 'bar']) # => 'foo/bar' + # pathify(['foo', '', nil, 'bar']) # => 'foo/bar' # # @example Create a path from arguments - # __pathify('foo', '', nil, 'bar') # => 'foo/bar' + # pathify('foo', '', nil, 'bar') # => 'foo/bar' # # # @example Encode special characters - # __pathify(['foo', 'bar^bam']) # => 'foo/bar%5Ebam' + # pathify(['foo', 'bar^bam']) # => 'foo/bar%5Ebam' # # @api private - def __pathify(*segments) - Array(segments).flatten. - compact. - reject { |s| s.to_s.strip.empty? }. - join('/'). - squeeze('/') + def pathify(*segments) + Array(segments) + .flatten + .compact + .reject { |s| s.to_s.strip.empty? } + .join('/') + .squeeze('/') end # Convert an array of payloads into Elasticsearch `header\ndata` format @@ -86,7 +88,7 @@ def __pathify(*segments) # or the conveniency "combined" format where data is passed along with the header # in a single item. # - # Elasticsearch::API::Utils.__bulkify [ + # Elasticsearch::API::Utils.bulkify [ # { :index => { :_index => 'myindexA', :_type => 'mytype', :_id => '1', :data => { :title => 'Test' } } }, # { :update => { :_index => 'myindexB', :_type => 'mytype', :_id => '2', :data => { :doc => { :title => 'Update' } } } } # ] @@ -96,7 +98,7 @@ def __pathify(*segments) # # => {"update":{"_index":"myindexB","_type":"mytype","_id":"2"}} # # => {"doc":{"title":"Update"}} # - def __bulkify(payload) + def bulkify(payload) operations = %w[index create delete update] case @@ -131,7 +133,7 @@ def __bulkify(payload) def process_params(arguments) arguments = Hash[arguments] unless arguments.is_a?(Hash) - Hash[arguments.map { |k, v| v.is_a?(Array) ? [k, __listify(v, { escape: false })] : [k, v] }] # Listify Arrays + Hash[arguments.map { |k, v| v.is_a?(Array) ? [k, listify(v, { escape: false })] : [k, v] }] # Listify Arrays end # Extracts the valid parts of the URL from the arguments @@ -144,14 +146,14 @@ def process_params(arguments) # @return [Array] Valid parts of the URL as an array of strings # # @example Extract parts - # __extract_parts { :foo => true }, [:foo, :bar] + # extract_parts { :foo => true }, [:foo, :bar] # # => [:foo] # # # @api private # - def __extract_parts(arguments, valid_parts=[]) - Hash[arguments].reduce([]) { |sum, item| k, v = item; v.is_a?(TrueClass) ? sum << k.to_s : sum << v } + def extract_parts(arguments, _valid_parts = []) + Hash[arguments].reduce([]) { |sum, item| k, v = item; v.is_a?(TrueClass) ? sum << k.to_s : sum << v } end # Calls the given block, rescuing from `StandardError`. @@ -165,7 +167,7 @@ def __extract_parts(arguments, valid_parts=[]) # # @api private # - def __rescue_from_not_found(&block) + def rescue_from_not_found(&block) yield rescue StandardError => e if e.class.to_s =~ /NotFound/ || e.message =~ /Not\s*Found/i diff --git a/elasticsearch-api/spec/unit/utils_spec.rb b/elasticsearch-api/spec/unit/utils_spec.rb index 63eba22f13..93680796cb 100644 --- a/elasticsearch-api/spec/unit/utils_spec.rb +++ b/elasticsearch-api/spec/unit/utils_spec.rb @@ -22,72 +22,72 @@ Class.new { include Elasticsearch::API::Utils }.new end - describe '#__escape' do + describe '#escape' do it 'encodes Unicode characters' do - expect(utils.__escape('中文')).to eq('%E4%B8%AD%E6%96%87') + expect(utils.escape('中文')).to eq('%E4%B8%AD%E6%96%87') end it 'encodes special characters' do - expect(utils.__escape('foo bar')).to eq('foo%20bar') - expect(utils.__escape('foo/bar')).to eq('foo%2Fbar') - expect(utils.__escape('foo^bar')).to eq('foo%5Ebar') + expect(utils.escape('foo bar')).to eq('foo%20bar') + expect(utils.escape('foo/bar')).to eq('foo%2Fbar') + expect(utils.escape('foo^bar')).to eq('foo%5Ebar') end it 'does not encode asterisks' do - expect(utils.__escape('*')).to eq('*') + expect(utils.escape('*')).to eq('*') end end - describe '#__listify' do + describe '#listify' do it 'creates a list from a single value' do - expect(utils.__listify('foo')).to eq('foo') + expect(utils.listify('foo')).to eq('foo') end it 'creates a list from an array' do - expect(utils.__listify(['foo', 'bar'])).to eq('foo,bar') + expect(utils.listify(['foo', 'bar'])).to eq('foo,bar') end it 'creates a list from multiple arguments' do - expect(utils.__listify('foo', 'bar')).to eq('foo,bar') + expect(utils.listify('foo', 'bar')).to eq('foo,bar') end it 'ignores nil values' do - expect(utils.__listify(['foo', nil, 'bar'])).to eq('foo,bar') + expect(utils.listify(['foo', nil, 'bar'])).to eq('foo,bar') end it 'ignores special characters' do - expect(utils.__listify(['foo', 'bar^bam'])).to eq('foo,bar%5Ebam') + expect(utils.listify(['foo', 'bar^bam'])).to eq('foo,bar%5Ebam') end context 'when the escape option is set to false' do it 'does not escape the characters' do - expect(utils.__listify(['foo', 'bar^bam'], escape: false)).to eq('foo,bar^bam') + expect(utils.listify(['foo', 'bar^bam'], escape: false)).to eq('foo,bar^bam') end end end - describe '#__pathify' do + describe '#pathify' do it 'creates a path from a single value' do - expect(utils.__pathify('foo')).to eq('foo') + expect(utils.pathify('foo')).to eq('foo') end it 'creates a path from an array' do - expect(utils.__pathify(['foo', 'bar'])).to eq('foo/bar') + expect(utils.pathify(['foo', 'bar'])).to eq('foo/bar') end it 'ignores nil values' do - expect(utils.__pathify(['foo', nil, 'bar'])).to eq('foo/bar') + expect(utils.pathify(['foo', nil, 'bar'])).to eq('foo/bar') end it 'ignores empty string values' do - expect(utils.__pathify(['foo', '', 'bar'])).to eq('foo/bar') + expect(utils.pathify(['foo', '', 'bar'])).to eq('foo/bar') end end - describe '#__bulkify' do + describe '#bulkify' do context 'when the input is an array of hashes' do let(:result) do - utils.__bulkify [ + utils.bulkify [ { index: { _index: 'myindexA', _id: '1', data: { title: 'Test' } } }, { update: { _index: 'myindexB', _id: '2', data: { doc: { title: 'Update' } } } }, { delete: { _index: 'myindexC', _id: '3' } } @@ -112,7 +112,7 @@ context 'when the input is an array of strings' do let(:result) do - utils.__bulkify(['{"foo":"bar"}','{"moo":"bam"}']) + utils.bulkify(['{"foo":"bar"}','{"moo":"bam"}']) end let(:expected_string) do @@ -130,7 +130,7 @@ context 'when the input is an array of header/data pairs' do let(:result) do - utils.__bulkify([{ foo: 'bar' }, { moo: 'bam' },{ foo: 'baz' }]) + utils.bulkify([{ foo: 'bar' }, { moo: 'bam' },{ foo: 'baz' }]) end let(:expected_string) do @@ -153,7 +153,7 @@ end let(:result) do - utils.__bulkify([input]) + utils.bulkify([input]) end let(:expected_string) do @@ -178,7 +178,7 @@ end let(:result) do - utils.__bulkify([{ index: { foo: 'bar'} } , data]) + utils.bulkify([{ index: { foo: 'bar'} } , data]) end let(:lines) do @@ -221,135 +221,30 @@ end end - describe '#__extract_parts' do + describe '#extract_parts' do it 'extracts parts with true value from a Hash' do - expect(utils.__extract_parts({ foo: true, moo: 'blah' })).to eq(['foo', 'blah']) + expect(utils.extract_parts({ foo: true, moo: 'blah' })).to eq(['foo', 'blah']) end it 'extracts parts with string value from a Hash' do - expect(utils.__extract_parts({ foo: 'qux', moo: 'blah' })).to eq(['qux', 'blah']) + expect(utils.extract_parts({ foo: 'qux', moo: 'blah' })).to eq(['qux', 'blah']) end end - context '#__rescue_from_not_found' do - + context '#rescue_from_not_found' do it 'returns false if exception class name contains \'NotFound\'' do - expect(utils.__rescue_from_not_found { raise NotFound }).to be(false) + expect(utils.rescue_from_not_found { raise NotFound }).to be(false) end it 'returns false if exception message contains \'Not Found\'' do - expect(utils.__rescue_from_not_found { raise StandardError.new "Not Found" }).to be(false) - expect(utils.__rescue_from_not_found { raise StandardError.new "NotFound" }).to be(false) + expect(utils.rescue_from_not_found { raise StandardError.new "Not Found" }).to be(false) + expect(utils.rescue_from_not_found { raise StandardError.new "NotFound" }).to be(false) end it 'raises the exception if the class name and message do not include \'NotFound\'' do expect { - utils.__rescue_from_not_found { raise StandardError.new "Any other exception" } + utils.rescue_from_not_found { raise StandardError.new "Any other exception" } }.to raise_exception(StandardError) end end - - context '#__report_unsupported_parameters' do - - context 'when the parameters are passed as Symbols' do - - let(:arguments) do - { foo: 'bar', moo: 'bam', baz: 'qux' } - end - - let(:unsupported_params) do - [ :foo, :moo] - end - - let(:message) do - message = '' - expect(Kernel).to receive(:warn) { |msg| message = msg } - utils.__report_unsupported_parameters(arguments, unsupported_params) - message - end - - it 'prints the unsupported parameters' do - expect(message).to match(/You are using unsupported parameter \[\:foo\]/) - expect(message).to match(/You are using unsupported parameter \[\:moo\]/) - end - end - - context 'when the parameters are passed as Hashes' do - - let(:arguments) do - { foo: 'bar', moo: 'bam', baz: 'qux' } - end - - let(:unsupported_params) do - [ :foo, :moo] - end - - let(:message) do - message = '' - expect(Kernel).to receive(:warn) { |msg| message = msg } - utils.__report_unsupported_parameters(arguments, unsupported_params) - message - end - - it 'prints the unsupported parameters' do - expect(message).to match(/You are using unsupported parameter \[\:foo\]/) - expect(message).to match(/You are using unsupported parameter \[\:moo\]/) - end - end - - context 'when the parameters are passed as a mix of Hashes and Symbols' do - - let(:arguments) do - { foo: 'bar', moo: 'bam', baz: 'qux' } - end - - let(:unsupported_params) do - [ { foo: { explanation: 'NOT_SUPPORTED'} }, :moo ] - end - - - let(:message) do - message = '' - expect(Kernel).to receive(:warn) { |msg| message = msg } - utils.__report_unsupported_parameters(arguments, unsupported_params) - message - end - - it 'prints the unsupported parameters' do - expect(message).to match(/You are using unsupported parameter \[\:foo\]/) - expect(message).to match(/You are using unsupported parameter \[\:moo\]/) - expect(message).to match(/NOT_SUPPORTED/) - end - end - - context 'when unsupported parameters are unused' do - - let(:arguments) do - { moo: 'bam', baz: 'qux' } - end - - let(:unsupported_params) do - [ :foo ] - end - - it 'prints the unsupported parameters' do - expect(Kernel).not_to receive(:warn) - utils.__report_unsupported_parameters(arguments, unsupported_params) - end - end - end - - describe '#__report_unsupported_method' do - - let(:message) do - message = '' - expect(Kernel).to receive(:warn) { |msg| message = msg } - utils.__report_unsupported_method(:foo) - message - end - - it 'prints a warning' do - expect(message).to match(/foo/) - end - end end diff --git a/elasticsearch-api/utils/thor/endpoint_specifics.rb b/elasticsearch-api/utils/thor/endpoint_specifics.rb index eea5f46cdd..d521b5160b 100644 --- a/elasticsearch-api/utils/thor/endpoint_specifics.rb +++ b/elasticsearch-api/utils/thor/endpoint_specifics.rb @@ -136,7 +136,7 @@ def msearch_template_body_helper def bulk_body_helper <<~SRC payload = if body.is_a? Array - Elasticsearch::API::Utils.__bulkify(body) + Elasticsearch::API::Utils.bulkify(body) else body end @@ -150,7 +150,7 @@ def find_structure_body_helper def bulk_doc_helper(info) <<~SRC # @option arguments [String|Array] :body #{info}. Array of Strings, Header/Data pairs, - # or the conveniency "combined" format can be passed, refer to Elasticsearch::API::Utils.__bulkify documentation. + # or the conveniency "combined" format can be passed, refer to Elasticsearch::API::Utils.bulkify documentation. SRC end end diff --git a/elasticsearch-api/utils/thor/templates/_body.erb b/elasticsearch-api/utils/thor/templates/_body.erb index 6e8072b6be..458bebeae1 100644 --- a/elasticsearch-api/utils/thor/templates/_body.erb +++ b/elasticsearch-api/utils/thor/templates/_body.erb @@ -28,7 +28,7 @@ when 'mtermvectors' <%- when 'cluster.reroute', 'cluster.put_settings' %> body = arguments.delete(:body) || {} <%- when 'ml.find_file_structure' %> - body = Utils.__bulkify(arguments.delete(:body)) + body = Utils.bulkify(arguments.delete(:body)) <%- else -%> body = <%= @spec.body.nil? ? 'nil' : 'arguments.delete(:body)' %> <%- end -%> From 23d6b3dcbfeb6ec4ddd6e48a826aa157b164dcf3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 13 Mar 2025 10:54:16 +0000 Subject: [PATCH 495/540] [API] Removes old unused code from utils.rb --- .../lib/elasticsearch/api/utils.rb | 57 ------------------- 1 file changed, 57 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/utils.rb b/elasticsearch-api/lib/elasticsearch/api/utils.rb index 8959b3aa81..128281a611 100644 --- a/elasticsearch-api/lib/elasticsearch/api/utils.rb +++ b/elasticsearch-api/lib/elasticsearch/api/utils.rb @@ -177,63 +177,6 @@ def rescue_from_not_found(&block) end end - def __report_unsupported_parameters(arguments, params=[]) - messages = [] - unsupported_params = params.select {|d| d.is_a?(Hash) ? arguments.include?(d.keys.first) : arguments.include?(d) } - - unsupported_params.each do |param| - name = case param - when Symbol - param - when Hash - param.keys.first - else - raise ArgumentError, "The param must be a Symbol or a Hash" - end - - explanation = if param.is_a?(Hash) - ". #{param.values.first[:explanation]}." - else - ". This parameter is not supported in the version you're using: #{Elasticsearch::API::VERSION}, and will be removed in the next release." - end - - message = "[!] You are using unsupported parameter [:#{name}]" - - if source = caller && caller.last - message += " in `#{source}`" - end - - message += explanation - - messages << message - end - - unless messages.empty? - messages << "Suppress this warning by the `-WO` command line flag." - - if STDERR.tty? - Kernel.warn messages.map { |m| "\e[31;1m#{m}\e[0m" }.join("\n") - else - Kernel.warn messages.join("\n") - end - end - end - - def __report_unsupported_method(name) - message = "[!] You are using unsupported method [#{name}]" - if source = caller && caller.last - message += " in `#{source}`" - end - - message += ". This method is not supported in the version you're using: #{Elasticsearch::API::VERSION}, and will be removed in the next release. Suppress this warning by the `-WO` command line flag." - - if STDERR.tty? - Kernel.warn "\e[31;1m#{message}\e[0m" - else - Kernel.warn message - end - end - extend self end end From 037bd13b367c72ec83846b70bc0bc4e9e8ba9d31 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 13 Mar 2025 11:25:33 +0000 Subject: [PATCH 496/540] [API] Updates generated API code to 9.x --- .../api/actions/async_search/delete.rb | 15 +- .../api/actions/async_search/get.rb | 24 ++- .../api/actions/async_search/status.rb | 19 +- .../api/actions/async_search/submit.rb | 85 ++++---- .../lib/elasticsearch/api/actions/bulk.rb | 134 +++++++++++-- .../elasticsearch/api/actions/cat/aliases.rb | 39 ++-- .../api/actions/cat/allocation.rb | 39 ++-- .../api/actions/cat/component_templates.rb | 39 ++-- .../elasticsearch/api/actions/cat/count.rb | 36 ++-- .../api/actions/cat/fielddata.rb | 32 +-- .../elasticsearch/api/actions/cat/health.rb | 39 ++-- .../lib/elasticsearch/api/actions/cat/help.rb | 2 +- .../elasticsearch/api/actions/cat/indices.rb | 56 ++++-- .../elasticsearch/api/actions/cat/master.rb | 33 +-- .../actions/cat/ml_data_frame_analytics.rb | 33 +-- .../api/actions/cat/ml_datafeeds.rb | 41 ++-- .../elasticsearch/api/actions/cat/ml_jobs.rb | 43 ++-- .../api/actions/cat/ml_trained_models.rb | 40 ++-- .../api/actions/cat/nodeattrs.rb | 33 +-- .../elasticsearch/api/actions/cat/nodes.rb | 38 ++-- .../api/actions/cat/pending_tasks.rb | 37 ++-- .../elasticsearch/api/actions/cat/plugins.rb | 33 +-- .../elasticsearch/api/actions/cat/recovery.rb | 43 ++-- .../api/actions/cat/repositories.rb | 33 +-- .../elasticsearch/api/actions/cat/segments.rb | 42 ++-- .../elasticsearch/api/actions/cat/shards.rb | 41 ++-- .../api/actions/cat/snapshots.rb | 38 ++-- .../elasticsearch/api/actions/cat/tasks.rb | 41 ++-- .../api/actions/cat/templates.rb | 37 ++-- .../api/actions/cat/thread_pool.rb | 42 ++-- .../api/actions/cat/transforms.rb | 39 ++-- .../elasticsearch/api/actions/clear_scroll.rb | 28 +-- .../api/actions/close_point_in_time.rb | 16 +- .../api/actions/cluster/allocation_explain.rb | 24 ++- .../cluster/delete_component_template.rb | 19 +- .../delete_voting_config_exclusions.rb | 20 +- .../cluster/exists_component_template.rb | 21 +- .../actions/cluster/get_component_template.rb | 21 +- .../api/actions/cluster/get_settings.rb | 21 +- .../api/actions/cluster/health.rb | 43 ++-- .../elasticsearch/api/actions/cluster/info.rb | 13 +- .../api/actions/cluster/pending_tasks.rb | 21 +- .../cluster/post_voting_config_exclusions.rb | 37 +++- .../actions/cluster/put_component_template.rb | 37 +++- .../api/actions/cluster/put_settings.rb | 29 ++- .../api/actions/cluster/remote_info.rb | 12 +- .../api/actions/cluster/reroute.rb | 34 ++-- .../api/actions/cluster/state.rb | 43 ++-- .../api/actions/cluster/stats.rb | 19 +- .../api/actions/connector/check_in.rb | 13 +- .../api/actions/connector/delete.rb | 28 +-- .../api/actions/connector/get.rb | 23 ++- .../api/actions/connector/list.rb | 31 +-- .../api/actions/connector/post.rb | 23 ++- .../api/actions/connector/put.rb | 22 +- .../api/actions/connector/sync_job_cancel.rb | 22 +- .../actions/connector/sync_job_check_in.rb | 15 +- .../api/actions/connector/sync_job_claim.rb | 20 +- .../api/actions/connector/sync_job_delete.rb | 22 +- .../api/actions/connector/sync_job_error.rb | 17 +- .../api/actions/connector/sync_job_get.rb | 20 +- .../api/actions/connector/sync_job_list.rb | 27 +-- .../api/actions/connector/sync_job_post.rb | 21 +- .../connector/sync_job_update_stats.rb | 19 +- .../connector/update_active_filtering.rb | 13 +- .../actions/connector/update_api_key_id.rb | 26 ++- .../actions/connector/update_configuration.rb | 23 ++- .../api/actions/connector/update_error.rb | 17 +- .../api/actions/connector/update_features.rb | 24 ++- .../api/actions/connector/update_filtering.rb | 25 ++- .../connector/update_filtering_validation.rb | 15 +- .../actions/connector/update_index_name.rb | 23 ++- .../api/actions/connector/update_name.rb | 22 +- .../api/actions/connector/update_native.rb | 22 +- .../api/actions/connector/update_pipeline.rb | 23 ++- .../actions/connector/update_scheduling.rb | 22 +- .../actions/connector/update_service_type.rb | 22 +- .../api/actions/connector/update_status.rb | 14 +- .../lib/elasticsearch/api/actions/count.rb | 74 ++++--- .../lib/elasticsearch/api/actions/create.rb | 98 +++++++-- .../delete_auto_follow_pattern.rb | 17 +- .../cross_cluster_replication/follow.rb | 25 ++- .../cross_cluster_replication/follow_info.rb | 20 +- .../cross_cluster_replication/follow_stats.rb | 19 +- .../forget_follower.rb | 27 ++- .../get_auto_follow_pattern.rb | 18 +- .../pause_auto_follow_pattern.rb | 22 +- .../cross_cluster_replication/pause_follow.rb | 22 +- .../put_auto_follow_pattern.rb | 21 +- .../resume_auto_follow_pattern.rb | 19 +- .../resume_follow.rb | 22 +- .../cross_cluster_replication/stats.rb | 17 +- .../cross_cluster_replication/unfollow.rb | 21 +- .../dangling_indices/delete_dangling_index.rb | 18 +- .../dangling_indices/import_dangling_index.rb | 19 +- .../dangling_indices/list_dangling_indices.rb | 13 +- .../lib/elasticsearch/api/actions/delete.rb | 65 ++++-- .../api/actions/delete_by_query.rb | 156 +++++++++++---- .../api/actions/delete_by_query_rethrottle.rb | 17 +- .../api/actions/delete_script.rb | 21 +- .../api/actions/enrich/delete_policy.rb | 13 +- .../api/actions/enrich/execute_policy.rb | 17 +- .../api/actions/enrich/get_policy.rb | 16 +- .../api/actions/enrich/put_policy.rb | 17 +- .../elasticsearch/api/actions/enrich/stats.rb | 13 +- .../elasticsearch/api/actions/eql/delete.rb | 16 +- .../lib/elasticsearch/api/actions/eql/get.rb | 19 +- .../api/actions/eql/get_status.rb | 13 +- .../elasticsearch/api/actions/eql/search.rb | 32 +-- .../api/actions/esql/async_query.rb | 32 ++- .../api/actions/esql/async_query_delete.rb | 19 +- .../api/actions/esql/async_query_get.rb | 27 ++- .../api/actions/esql/async_query_stop.rb | 5 +- .../elasticsearch/api/actions/esql/query.rb | 23 ++- .../lib/elasticsearch/api/actions/exists.rb | 64 ++++-- .../api/actions/exists_source.rb | 44 ++-- .../lib/elasticsearch/api/actions/explain.rb | 56 ++++-- .../api/actions/features/get_features.rb | 19 +- .../api/actions/features/reset_features.rb | 22 +- .../elasticsearch/api/actions/field_caps.rb | 46 +++-- .../api/actions/fleet/global_checkpoints.rb | 28 ++- .../api/actions/fleet/msearch.rb | 40 +++- .../elasticsearch/api/actions/fleet/search.rb | 66 +++++- .../lib/elasticsearch/api/actions/get.rb | 96 +++++++-- .../elasticsearch/api/actions/get_script.rb | 17 +- .../api/actions/get_script_context.rb | 11 +- .../api/actions/get_script_languages.rb | 11 +- .../elasticsearch/api/actions/get_source.rb | 47 +++-- .../api/actions/graph/explore.rb | 25 ++- .../api/actions/health_report.rb | 30 ++- .../lib/elasticsearch/api/actions/index.rb | 146 +++++++++++--- .../delete_lifecycle.rb | 17 +- .../explain_lifecycle.rb | 24 ++- .../get_lifecycle.rb | 16 +- .../index_lifecycle_management/get_status.rb | 11 +- .../migrate_to_data_tiers.rb | 29 ++- .../move_to_step.rb | 26 ++- .../put_lifecycle.rb | 20 +- .../remove_policy.rb | 16 +- .../index_lifecycle_management/retry.rb | 17 +- .../index_lifecycle_management/start.rb | 17 +- .../index_lifecycle_management/stop.rb | 18 +- .../api/actions/indices/add_block.rb | 41 ++-- .../api/actions/indices/analyze.rb | 31 +-- .../actions/indices/cancel_migrate_reindex.rb | 7 +- .../api/actions/indices/clear_cache.rb | 40 ++-- .../api/actions/indices/clone.rb | 59 ++++-- .../api/actions/indices/close.rb | 46 +++-- .../api/actions/indices/create.rb | 40 +++- .../api/actions/indices/create_data_stream.rb | 22 +- .../api/actions/indices/create_from.rb | 7 +- .../api/actions/indices/data_streams_stats.rb | 19 +- .../api/actions/indices/delete.rb | 40 ++-- .../api/actions/indices/delete_alias.rb | 27 ++- .../actions/indices/delete_data_lifecycle.rb | 17 +- .../api/actions/indices/delete_data_stream.rb | 17 +- .../actions/indices/delete_index_template.rb | 19 +- .../api/actions/indices/delete_template.rb | 21 +- .../api/actions/indices/disk_usage.rb | 37 ++-- .../api/actions/indices/downsample.rb | 26 ++- .../api/actions/indices/exists.rb | 33 +-- .../api/actions/indices/exists_alias.rb | 35 ++-- .../actions/indices/exists_index_template.rb | 17 +- .../api/actions/indices/exists_template.rb | 26 ++- .../actions/indices/explain_data_lifecycle.rb | 15 +- .../api/actions/indices/field_usage_stats.rb | 33 ++- .../api/actions/indices/flush.rb | 39 ++-- .../api/actions/indices/forcemerge.rb | 58 +++++- .../elasticsearch/api/actions/indices/get.rb | 37 ++-- .../api/actions/indices/get_alias.rb | 38 ++-- .../api/actions/indices/get_data_lifecycle.rb | 23 ++- .../indices/get_data_lifecycle_stats.rb | 11 +- .../api/actions/indices/get_data_stream.rb | 23 ++- .../api/actions/indices/get_field_mapping.rb | 45 +++-- .../api/actions/indices/get_index_template.rb | 21 +- .../api/actions/indices/get_mapping.rb | 32 +-- .../indices/get_migrate_reindex_status.rb | 7 +- .../api/actions/indices/get_settings.rb | 49 +++-- .../api/actions/indices/get_template.rb | 23 ++- .../api/actions/indices/migrate_reindex.rb | 4 +- .../actions/indices/migrate_to_data_stream.rb | 26 ++- .../api/actions/indices/modify_data_stream.rb | 13 +- .../elasticsearch/api/actions/indices/open.rb | 53 +++-- .../actions/indices/promote_data_stream.rb | 22 +- .../api/actions/indices/put_alias.rb | 31 +-- .../api/actions/indices/put_data_lifecycle.rb | 28 ++- .../api/actions/indices/put_index_template.rb | 39 +++- .../api/actions/indices/put_mapping.rb | 53 +++-- .../api/actions/indices/put_settings.rb | 56 ++++-- .../api/actions/indices/put_template.rb | 38 +++- .../api/actions/indices/recovery.rb | 36 +++- .../api/actions/indices/refresh.rb | 35 +++- .../indices/reload_search_analyzers.rb | 29 ++- .../api/actions/indices/resolve_cluster.rb | 70 ++++++- .../api/actions/indices/resolve_index.rb | 26 ++- .../api/actions/indices/rollover.rb | 62 ++++-- .../api/actions/indices/segments.rb | 28 ++- .../api/actions/indices/shard_stores.rb | 33 ++- .../api/actions/indices/shrink.rb | 51 +++-- .../indices/simulate_index_template.rb | 5 +- .../api/actions/indices/simulate_template.rb | 23 ++- .../api/actions/indices/split.rb | 52 +++-- .../api/actions/indices/stats.rb | 47 +++-- .../api/actions/indices/update_aliases.rb | 19 +- .../api/actions/indices/validate_query.rb | 55 ++--- .../inference/chat_completion_unified.rb | 5 +- .../api/actions/inference/completion.rb | 5 +- .../api/actions/inference/delete.rb | 7 +- .../api/actions/inference/get.rb | 9 +- .../api/actions/inference/put.rb | 7 +- .../api/actions/inference/put_watsonx.rb | 15 +- .../api/actions/inference/rerank.rb | 5 +- .../api/actions/inference/sparse_embedding.rb | 5 +- .../actions/inference/stream_completion.rb | 5 +- .../api/actions/inference/text_embedding.rb | 5 +- .../api/actions/inference/update.rb | 7 +- .../lib/elasticsearch/api/actions/info.rb | 11 +- .../actions/ingest/delete_geoip_database.rb | 18 +- .../ingest/delete_ip_location_database.rb | 20 +- .../api/actions/ingest/delete_pipeline.rb | 20 +- .../api/actions/ingest/geo_ip_stats.rb | 11 +- .../api/actions/ingest/get_geoip_database.rb | 15 +- .../ingest/get_ip_location_database.rb | 19 +- .../api/actions/ingest/get_pipeline.rb | 19 +- .../api/actions/ingest/processor_grok.rb | 13 +- .../api/actions/ingest/put_geoip_database.rb | 20 +- .../ingest/put_ip_location_database.rb | 22 +- .../api/actions/ingest/put_pipeline.rb | 19 +- .../api/actions/ingest/simulate.rb | 19 +- .../elasticsearch/api/actions/knn_search.rb | 29 ++- .../api/actions/license/delete.rb | 16 +- .../elasticsearch/api/actions/license/get.rb | 16 +- .../api/actions/license/get_basic_status.rb | 10 +- .../api/actions/license/get_trial_status.rb | 10 +- .../elasticsearch/api/actions/license/post.rb | 24 ++- .../api/actions/license/post_start_basic.rb | 19 +- .../api/actions/license/post_start_trial.rb | 18 +- .../api/actions/logstash/delete_pipeline.rb | 14 +- .../api/actions/logstash/get_pipeline.rb | 13 +- .../api/actions/logstash/put_pipeline.rb | 16 +- .../clear_trained_model_deployment_cache.rb | 14 +- .../api/actions/machine_learning/close_job.rb | 26 ++- .../machine_learning/delete_calendar.rb | 13 +- .../machine_learning/delete_calendar_event.rb | 17 +- .../machine_learning/delete_calendar_job.rb | 17 +- .../delete_data_frame_analytics.rb | 16 +- .../machine_learning/delete_datafeed.rb | 18 +- .../machine_learning/delete_expired_data.rb | 28 ++- .../actions/machine_learning/delete_filter.rb | 14 +- .../machine_learning/delete_forecast.rb | 33 ++- .../actions/machine_learning/delete_job.rb | 28 ++- .../machine_learning/delete_model_snapshot.rb | 19 +- .../machine_learning/delete_trained_model.rb | 17 +- .../delete_trained_model_alias.rb | 19 +- .../machine_learning/estimate_model_memory.rb | 15 +- .../machine_learning/evaluate_data_frame.rb | 16 +- .../explain_data_frame_analytics.rb | 30 ++- .../api/actions/machine_learning/flush_job.rb | 37 ++-- .../api/actions/machine_learning/forecast.rb | 33 ++- .../actions/machine_learning/get_buckets.rb | 48 +++-- .../machine_learning/get_calendar_events.rb | 22 +- .../actions/machine_learning/get_calendars.rb | 26 +-- .../machine_learning/get_categories.rb | 36 ++-- .../get_data_frame_analytics.rb | 35 +++- .../get_data_frame_analytics_stats.rb | 30 ++- .../machine_learning/get_datafeed_stats.rb | 29 ++- .../actions/machine_learning/get_datafeeds.rb | 32 ++- .../actions/machine_learning/get_filters.rb | 17 +- .../machine_learning/get_influencers.rb | 39 ++-- .../actions/machine_learning/get_job_stats.rb | 24 ++- .../api/actions/machine_learning/get_jobs.rb | 31 ++- .../machine_learning/get_memory_stats.rb | 21 +- .../get_model_snapshot_upgrade_stats.rb | 26 ++- .../machine_learning/get_model_snapshots.rb | 41 ++-- .../machine_learning/get_overall_buckets.rb | 60 ++++-- .../actions/machine_learning/get_records.rb | 42 ++-- .../machine_learning/get_trained_models.rb | 40 ++-- .../get_trained_models_stats.rb | 26 ++- .../machine_learning/infer_trained_model.rb | 10 +- .../api/actions/machine_learning/info.rb | 17 +- .../api/actions/machine_learning/open_job.rb | 23 ++- .../machine_learning/post_calendar_events.rb | 14 +- .../api/actions/machine_learning/post_data.rb | 20 +- .../preview_data_frame_analytics.rb | 23 ++- .../machine_learning/preview_datafeed.rb | 37 ++-- .../actions/machine_learning/put_calendar.rb | 14 +- .../machine_learning/put_calendar_job.rb | 16 +- .../put_data_frame_analytics.rb | 21 +- .../actions/machine_learning/put_datafeed.rb | 36 +++- .../actions/machine_learning/put_filter.rb | 16 +- .../api/actions/machine_learning/put_job.rb | 31 ++- .../machine_learning/put_trained_model.rb | 22 +- .../put_trained_model_alias.rb | 36 +++- .../put_trained_model_definition_part.rb | 19 +- .../put_trained_model_vocabulary.rb | 16 +- .../api/actions/machine_learning/reset_job.rb | 23 ++- .../machine_learning/revert_model_snapshot.rb | 34 +++- .../machine_learning/set_upgrade_mode.rb | 28 ++- .../start_data_frame_analytics.rb | 31 ++- .../machine_learning/start_datafeed.rb | 43 +++- .../start_trained_model_deployment.rb | 5 +- .../stop_data_frame_analytics.rb | 34 +++- .../actions/machine_learning/stop_datafeed.rb | 31 ++- .../stop_trained_model_deployment.rb | 19 +- .../update_data_frame_analytics.rb | 16 +- .../machine_learning/update_datafeed.rb | 35 +++- .../actions/machine_learning/update_filter.rb | 15 +- .../actions/machine_learning/update_job.rb | 13 +- .../machine_learning/update_model_snapshot.rb | 17 +- .../update_trained_model_deployment.rb | 21 +- .../machine_learning/upgrade_job_snapshot.rb | 30 ++- .../lib/elasticsearch/api/actions/mget.rb | 50 +++-- .../api/actions/migration/deprecations.rb | 17 +- .../migration/get_feature_upgrade_status.rb | 14 +- .../actions/migration/post_feature_upgrade.rb | 14 +- .../lib/elasticsearch/api/actions/msearch.rb | 55 +++-- .../api/actions/msearch_template.rb | 40 ++-- .../elasticsearch/api/actions/mtermvectors.rb | 62 +++--- .../clear_repositories_metering_archive.rb | 23 ++- .../nodes/get_repositories_metering_info.rb | 16 +- .../api/actions/nodes/hot_threads.rb | 30 +-- .../elasticsearch/api/actions/nodes/info.rb | 25 +-- .../actions/nodes/reload_secure_settings.rb | 23 ++- .../elasticsearch/api/actions/nodes/stats.rb | 46 +++-- .../elasticsearch/api/actions/nodes/usage.rb | 24 ++- .../api/actions/open_point_in_time.rb | 58 ++++-- .../lib/elasticsearch/api/actions/ping.rb | 11 +- .../elasticsearch/api/actions/put_script.rb | 31 +-- .../api/actions/query_rules/delete_rule.rb | 18 +- .../api/actions/query_rules/delete_ruleset.rb | 30 ++- .../api/actions/query_rules/get_rule.rb | 17 +- .../api/actions/query_rules/get_ruleset.rb | 13 +- .../api/actions/query_rules/list_rulesets.rb | 15 +- .../api/actions/query_rules/put_rule.rb | 23 ++- .../api/actions/query_rules/put_ruleset.rb | 20 +- .../api/actions/query_rules/test.rb | 19 +- .../elasticsearch/api/actions/rank_eval.rb | 27 +-- .../lib/elasticsearch/api/actions/reindex.rb | 171 ++++++++++++++-- .../api/actions/reindex_rethrottle.rb | 23 ++- .../api/actions/render_search_template.rb | 24 ++- .../api/actions/scripts_painless_execute.rb | 17 +- .../lib/elasticsearch/api/actions/scroll.rb | 36 ++-- .../lib/elasticsearch/api/actions/search.rb | 189 +++++++++++++----- .../api/actions/search_application/delete.rb | 21 +- .../delete_behavioral_analytics.rb | 11 +- .../api/actions/search_application/get.rb | 20 +- .../get_behavioral_analytics.rb | 12 +- .../api/actions/search_application/list.rb | 25 +-- .../post_behavioral_analytics_event.rb | 20 +- .../api/actions/search_application/put.rb | 24 +-- .../put_behavioral_analytics.rb | 12 +- .../search_application/render_query.rb | 18 +- .../api/actions/search_application/search.rb | 26 +-- .../elasticsearch/api/actions/search_mvt.rb | 177 +++++++++++++--- .../api/actions/search_shards.rb | 42 ++-- .../api/actions/search_template.rb | 51 +++-- .../searchable_snapshots/cache_stats.rb | 16 +- .../searchable_snapshots/clear_cache.rb | 20 +- .../api/actions/searchable_snapshots/mount.rb | 29 +-- .../api/actions/searchable_snapshots/stats.rb | 16 +- .../actions/security/activate_user_profile.rb | 2 +- .../api/actions/security/authenticate.rb | 14 +- .../api/actions/security/bulk_delete_role.rb | 16 +- .../api/actions/security/bulk_put_role.rb | 16 +- .../actions/security/bulk_update_api_keys.rb | 21 +- .../api/actions/security/change_password.rb | 18 +- .../actions/security/clear_api_key_cache.rb | 18 +- .../security/clear_cached_privileges.rb | 16 +- .../actions/security/clear_cached_realms.rb | 22 +- .../actions/security/clear_cached_roles.rb | 15 +- .../security/clear_cached_service_tokens.rb | 25 ++- .../api/actions/security/create_api_key.rb | 22 +- .../security/create_cross_cluster_api_key.rb | 21 +- .../actions/security/create_service_token.rb | 28 ++- .../api/actions/security/delegate_pki.rb | 17 +- .../api/actions/security/delete_privileges.rb | 22 +- .../api/actions/security/delete_role.rb | 17 +- .../actions/security/delete_role_mapping.rb | 18 +- .../actions/security/delete_service_token.rb | 21 +- .../api/actions/security/delete_user.rb | 15 +- .../api/actions/security/disable_user.rb | 17 +- .../actions/security/disable_user_profile.rb | 5 +- .../api/actions/security/enable_user.rb | 16 +- .../actions/security/enable_user_profile.rb | 5 +- .../api/actions/security/enroll_kibana.rb | 13 +- .../api/actions/security/enroll_node.rb | 13 +- .../api/actions/security/get_api_key.rb | 36 ++-- .../security/get_builtin_privileges.rb | 11 +- .../api/actions/security/get_privileges.rb | 24 ++- .../api/actions/security/get_role.rb | 19 +- .../api/actions/security/get_role_mapping.rb | 15 +- .../actions/security/get_service_accounts.rb | 23 ++- .../security/get_service_credentials.rb | 20 +- .../api/actions/security/get_settings.rb | 18 +- .../api/actions/security/get_token.rb | 21 +- .../api/actions/security/get_user.rb | 17 +- .../actions/security/get_user_privileges.rb | 19 +- .../api/actions/security/get_user_profile.rb | 5 +- .../api/actions/security/grant_api_key.rb | 30 ++- .../api/actions/security/has_privileges.rb | 15 +- .../security/has_privileges_user_profile.rb | 2 +- .../actions/security/invalidate_api_key.rb | 22 +- .../api/actions/security/invalidate_token.rb | 21 +- .../api/actions/security/oidc_authenticate.rb | 15 +- .../api/actions/security/oidc_logout.rb | 16 +- .../security/oidc_prepare_authentication.rb | 16 +- .../api/actions/security/put_privileges.rb | 26 ++- .../api/actions/security/put_role.rb | 19 +- .../api/actions/security/put_role_mapping.rb | 34 +++- .../api/actions/security/put_user.rb | 22 +- .../api/actions/security/query_api_keys.rb | 28 ++- .../api/actions/security/query_role.rb | 19 +- .../api/actions/security/query_user.rb | 20 +- .../api/actions/security/saml_authenticate.rb | 21 +- .../actions/security/saml_complete_logout.rb | 20 +- .../api/actions/security/saml_invalidate.rb | 19 +- .../api/actions/security/saml_logout.rb | 17 +- .../security/saml_prepare_authentication.rb | 22 +- .../saml_service_provider_metadata.rb | 15 +- .../actions/security/suggest_user_profiles.rb | 2 +- .../api/actions/security/update_api_key.rb | 27 ++- .../security/update_cross_cluster_api_key.rb | 24 ++- .../api/actions/security/update_settings.rb | 22 +- .../security/update_user_profile_data.rb | 5 +- .../api/actions/simulate/ingest.rb | 33 ++- .../actions/snapshot/cleanup_repository.rb | 21 +- .../api/actions/snapshot/clone.rb | 27 ++- .../api/actions/snapshot/create.rb | 27 ++- .../api/actions/snapshot/create_repository.rb | 31 ++- .../api/actions/snapshot/delete.rb | 24 ++- .../api/actions/snapshot/delete_repository.rb | 25 ++- .../elasticsearch/api/actions/snapshot/get.rb | 62 ++++-- .../api/actions/snapshot/get_repository.rb | 22 +- .../actions/snapshot/repository_analyze.rb | 115 +++++++++-- .../api/actions/snapshot/restore.rb | 37 +++- .../api/actions/snapshot/status.rb | 41 ++-- .../api/actions/snapshot/verify_repository.rb | 21 +- .../delete_lifecycle.rb | 20 +- .../execute_lifecycle.rb | 20 +- .../execute_retention.rb | 18 +- .../get_lifecycle.rb | 19 +- .../get_stats.rb | 15 +- .../get_status.rb | 18 +- .../put_lifecycle.rb | 25 ++- .../snapshot_lifecycle_management/start.rb | 20 +- .../snapshot_lifecycle_management/stop.rb | 24 ++- .../api/actions/sql/clear_cursor.rb | 12 +- .../api/actions/sql/delete_async.rb | 17 +- .../api/actions/sql/get_async.rb | 27 ++- .../api/actions/sql/get_async_status.rb | 13 +- .../elasticsearch/api/actions/sql/query.rb | 17 +- .../api/actions/sql/translate.rb | 14 +- .../api/actions/ssl/certificates.rb | 20 +- .../api/actions/synonyms/delete_synonym.rb | 24 ++- .../actions/synonyms/delete_synonym_rule.rb | 17 +- .../api/actions/synonyms/get_synonym.rb | 16 +- .../api/actions/synonyms/get_synonym_rule.rb | 17 +- .../api/actions/synonyms/get_synonyms_sets.rb | 15 +- .../api/actions/synonyms/put_synonym.rb | 18 +- .../api/actions/synonyms/put_synonym_rule.rb | 21 +- .../elasticsearch/api/actions/tasks/cancel.rb | 28 ++- .../elasticsearch/api/actions/tasks/get.rb | 23 ++- .../elasticsearch/api/actions/tasks/list.rb | 82 ++++++-- .../elasticsearch/api/actions/terms_enum.rb | 18 +- .../elasticsearch/api/actions/termvectors.rb | 69 +++++-- .../text_structure/find_field_structure.rb | 101 ++++++++-- .../text_structure/find_message_structure.rb | 96 +++++++-- .../actions/text_structure/find_structure.rb | 116 +++++++++-- .../text_structure/test_grok_pattern.rb | 18 +- .../api/actions/transform/delete_transform.rb | 20 +- .../api/actions/transform/get_node_stats.rb | 13 +- .../api/actions/transform/get_transform.rb | 31 ++- .../actions/transform/get_transform_stats.rb | 27 ++- .../actions/transform/preview_transform.rb | 30 +-- .../api/actions/transform/put_transform.rb | 40 +++- .../api/actions/transform/reset_transform.rb | 20 +- .../transform/schedule_now_transform.rb | 19 +- .../api/actions/transform/start_transform.rb | 29 ++- .../api/actions/transform/stop_transform.rb | 29 ++- .../api/actions/transform/update_transform.rb | 25 ++- .../actions/transform/upgrade_transforms.rb | 26 ++- .../lib/elasticsearch/api/actions/update.rb | 66 +++--- .../api/actions/update_by_query.rb | 169 ++++++++++++---- .../api/actions/update_by_query_rethrottle.rb | 17 +- .../api/actions/watcher/ack_watch.rb | 25 ++- .../api/actions/watcher/activate_watch.rb | 13 +- .../api/actions/watcher/deactivate_watch.rb | 13 +- .../api/actions/watcher/delete_watch.rb | 19 +- .../api/actions/watcher/execute_watch.rb | 25 ++- .../api/actions/watcher/get_settings.rb | 15 +- .../api/actions/watcher/get_watch.rb | 12 +- .../api/actions/watcher/put_watch.rb | 31 ++- .../api/actions/watcher/query_watches.rb | 16 +- .../api/actions/watcher/start.rb | 13 +- .../api/actions/watcher/stats.rb | 16 +- .../elasticsearch/api/actions/watcher/stop.rb | 15 +- .../api/actions/watcher/update_settings.rb | 21 +- .../elasticsearch/api/actions/xpack/info.rb | 22 +- .../elasticsearch/api/actions/xpack/usage.rb | 16 +- 499 files changed, 9003 insertions(+), 4787 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb index 21fefe4527..abdd7009db 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module AsyncSearch module Actions - # Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. + # Delete an async search. + # If the asynchronous search is still running, it is cancelled. + # Otherwise, the saved search results are deleted. + # If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the +cancel_task+ cluster privilege. # - # @option arguments [String] :id The async search ID + # @option arguments [String] :id A unique identifier for the async search. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit # def delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'async_search.delete' } @@ -47,7 +50,7 @@ def delete(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE - path = "_async_search/#{Utils.__listify(_id)}" + path = "_async_search/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb index 92c26c5887..3fd8699a8f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb @@ -15,22 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module AsyncSearch module Actions - # Retrieves the results of a previously submitted async search request given its ID. + # Get async search results. + # Retrieve the results of a previously submitted asynchronous search request. + # If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it. # - # @option arguments [String] :id The async search ID - # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response - # @option arguments [Time] :keep_alive Specify the time interval in which the results (partial or final) for this search will be available + # @option arguments [String] :id A unique identifier for the async search. (*Required*) + # @option arguments [Time] :keep_alive The length of time that the async search should be available in the cluster. + # When not specified, the +keep_alive+ set with the corresponding submit async request will be used. + # Otherwise, it is possible to override the value and extend the validity of the request. + # When this period expires, the search, if still running, is cancelled. + # If the search is completed, its saved results are deleted. # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response + # @option arguments [Time] :wait_for_completion_timeout Specifies to wait for the search to be completed up until the provided timeout. + # Final results will be returned if available before the timeout expires, otherwise the currently available results will be returned once the timeout expires. + # By default no timeout is set meaning that the currently available results will be returned without any additional wait. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit # def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'async_search.get' } @@ -50,7 +58,7 @@ def get(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET - path = "_async_search/#{Utils.__listify(_id)}" + path = "_async_search/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb index 4b2008d03d..d59f34e8a2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb @@ -15,20 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module AsyncSearch module Actions - # Retrieves the status of a previously submitted async search request given its ID. + # Get the async search status. + # Get the status of a previously submitted async search request given its identifier, without retrieving search results. + # If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to: + # * The user or API key that submitted the original async search request. + # * Users that have the +monitor+ cluster privilege or greater privileges. # - # @option arguments [String] :id The async search ID - # @option arguments [Time] :keep_alive Specify the time interval in which the results (partial or final) for this search will be available + # @option arguments [String] :id A unique identifier for the async search. (*Required*) + # @option arguments [Time] :keep_alive The length of time that the async search needs to be available. + # Ongoing async searches and any saved search results are deleted after this period. Server default: 5d. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit # def status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'async_search.status' } @@ -48,7 +53,7 @@ def status(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET - path = "_async_search/status/#{Utils.__listify(_id)}" + path = "_async_search/status/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb index 34c9b80ae1..255122ffbc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb @@ -15,63 +15,70 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module AsyncSearch module Actions - # Executes a search request asynchronously. + # Run an async search. + # When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested. + # Warning: Asynchronous search does not support scroll or search requests that include only the suggest section. + # By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. + # The maximum allowed size for a stored async search response can be set by changing the +search.max_async_search_response_size+ cluster level setting. # - # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response - # @option arguments [Boolean] :keep_on_completion Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false) - # @option arguments [Time] :keep_alive Update the time interval in which the results (partial or final) for this search will be available - # @option arguments [Number] :batched_reduce_size The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available. - # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to true + # @option arguments [String, Array] :index A comma-separated list of index names to search; use +_all+ or empty string to perform the operation on all indices + # @option arguments [Time] :wait_for_completion_timeout Blocks and waits until the search is completed up to a certain timeout. + # When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster. Server default: 1s. + # @option arguments [Time] :keep_alive Specifies how long the async search needs to be available. + # Ongoing async searches and any saved search results are deleted after this period. Server default: 5d. + # @option arguments [Boolean] :keep_on_completion If +true+, results are stored for later retrieval when the search completes within the +wait_for_completion_timeout+. + # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes +_all+ string or when no indices have been specified) + # @option arguments [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout # @option arguments [String] :analyzer The analyzer to use for the query string # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false) - # @option arguments [Boolean] :ccs_minimize_roundtrips When doing a cross-cluster search, setting it to true may improve overall search latency, particularly when searching clusters with a large number of shards. However, when set to true, the progress of searches on the remote clusters will not be received until the search finishes on all clusters. - # @option arguments [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR) + # @option arguments [Integer] :batched_reduce_size Affects how often partial results become available, which happens whenever shard results are reduced. + # A partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default). Server default: 5. + # @option arguments [Boolean] :ccs_minimize_roundtrips The default value is the only supported value. + # @option arguments [String] :default_operator The default operator for query string query (AND or OR) # @option arguments [String] :df The field to use as default where no field prefix is given in the query string + # @option arguments [String, Array] :docvalue_fields A comma-separated list of fields to return as the docvalue representation of a field for each hit + # @option arguments [String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. # @option arguments [Boolean] :explain Specify whether to return detailed information about score computation as part of a hit - # @option arguments [List] :stored_fields A comma-separated list of stored fields to return as part of a hit - # @option arguments [List] :docvalue_fields A comma-separated list of fields to return as the docvalue representation of a field for each hit - # @option arguments [Number] :from Starting offset (default: 0) - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + # @option arguments [Integer] :max_concurrent_shard_requests The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response - # @option arguments [String] :q Query in the Lucene query string syntax - # @option arguments [List] :routing A comma-separated list of specific routing values - # @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch) - # @option arguments [Number] :size Number of hits to return (default: 10) - # @option arguments [List] :sort A comma-separated list of : pairs - # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return - # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field - # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field - # @option arguments [Number] :terminate_after The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. - # @option arguments [List] :stats Specific 'tag' of the request for logging and statistical purposes - # @option arguments [String] :suggest_field Specify which field to use for suggestions - # @option arguments [String] :suggest_mode Specify suggest mode (options: missing, popular, always) - # @option arguments [Number] :suggest_size How many suggestions to return in response - # @option arguments [String] :suggest_text The source text for which the suggestions should be returned + # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to true Server default: true. + # @option arguments [String] :routing A comma-separated list of specific routing values + # @option arguments [String] :search_type Search operation type + # @option arguments [Array] :stats Specific 'tag' of the request for logging and statistical purposes + # @option arguments [String, Array] :stored_fields A comma-separated list of stored fields to return as part of a hit + # @option arguments [String] :suggest_field Specifies which field to use for suggestions. + # @option arguments [String] :suggest_mode Specify suggest mode + # @option arguments [Integer] :suggest_size How many suggestions to return in response + # @option arguments [String] :suggest_text The source text for which the suggestions should be returned. + # @option arguments [Integer] :terminate_after The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [Boolean, Integer] :track_total_hits Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number. # @option arguments [Boolean] :track_scores Whether to calculate and return scores even if they are not used for sorting - # @option arguments [Boolean|long] :track_total_hits Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number. - # @option arguments [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response + # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response # @option arguments [Boolean] :version Specify whether to return document version as part of a hit + # @option arguments [Boolean, String, Array] :_source True or false to return the _source field or not, or a list of fields to return + # @option arguments [String, Array] :_source_excludes A list of fields to exclude from the returned _source field + # @option arguments [String, Array] :_source_includes A list of fields to extract and return from the _source field # @option arguments [Boolean] :seq_no_primary_term Specify whether to return sequence number and primary term of the last modification of each hit - # @option arguments [Number] :max_concurrent_shard_requests The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests + # @option arguments [String] :q Query in the Lucene query string syntax + # @option arguments [Integer] :size Number of hits to return (default: 10) + # @option arguments [Integer] :from Starting offset (default: 0) + # @option arguments [String] :sort A comma-separated list of : pairs # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The search definition using the Query DSL + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit # def submit(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'async_search.submit' } @@ -84,13 +91,13 @@ def submit(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "#{Utils.__listify(_index)}/_async_search" + "#{Utils.listify(_index)}/_async_search" else '_async_search' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index c1a0491414..7a66d6767d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -15,32 +15,122 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Allows to perform multiple index/update/delete operations in a single request. + # Bulk index or delete documents. + # Perform multiple +index+, +create+, +delete+, and +update+ actions in a single request. + # This reduces overhead and can greatly increase indexing speed. + # If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias: + # * To use the +create+ action, you must have the +create_doc+, +create+, +index+, or +write+ index privilege. Data streams support only the +create+ action. + # * To use the +index+ action, you must have the +create+, +index+, or +write+ index privilege. + # * To use the +delete+ action, you must have the +delete+ or +write+ index privilege. + # * To use the +update+ action, you must have the +index+ or +write+ index privilege. + # * To automatically create a data stream or index with a bulk API request, you must have the +auto_configure+, +create_index+, or +manage+ index privilege. + # * To make the result of a bulk operation visible to search using the +refresh+ parameter, you must have the +maintenance+ or +manage+ index privilege. + # Automatic data stream creation requires a matching index template with data stream enabled. + # The actions are specified in the request body using a newline delimited JSON (NDJSON) structure: + # + + # action_and_meta_data\n + # optional_source\n + # action_and_meta_data\n + # optional_source\n + # .... + # action_and_meta_data\n + # optional_source\n + # + + # The +index+ and +create+ actions expect a source on the next line and have the same semantics as the +op_type+ parameter in the standard index API. + # A +create+ action fails if a document with the same ID already exists in the target + # An +index+ action adds or replaces a document as necessary. + # NOTE: Data streams support only the +create+ action. + # To update or delete a document in a data stream, you must target the backing index containing the document. + # An +update+ action expects that the partial doc, upsert, and script and its options are specified on the next line. + # A +delete+ action does not expect a source on the next line and has the same semantics as the standard delete API. + # NOTE: The final line of data must end with a newline character (+\n+). + # Each newline character may be preceded by a carriage return (+\r+). + # When sending NDJSON data to the +_bulk+ endpoint, use a +Content-Type+ header of +application/json+ or +application/x-ndjson+. + # Because this format uses literal newline characters (+\n+) as delimiters, make sure that the JSON actions and sources are not pretty printed. + # If you provide a target in the request path, it is used for any actions that don't explicitly specify an +_index+ argument. + # A note on the format: the idea here is to make processing as fast as possible. + # As some of the actions are redirected to other shards on other nodes, only +action_meta_data+ is parsed on the receiving node side. + # Client libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible. + # There is no "correct" number of actions to perform in a single bulk request. + # Experiment with different settings to find the optimal size for your particular workload. + # Note that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size. + # It is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch. + # For instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch. + # **Client suppport for bulk requests** + # Some of the officially supported clients provide helpers to assist with bulk requests and reindexing: + # * Go: Check out +esutil.BulkIndexer+ + # * Perl: Check out +Search::Elasticsearch::Client::5_0::Bulk+ and +Search::Elasticsearch::Client::5_0::Scroll+ + # * Python: Check out +elasticsearch.helpers.*+ + # * JavaScript: Check out +client.helpers.*+ + # * .NET: Check out +BulkAllObservable+ + # * PHP: Check out bulk indexing. + # **Submitting bulk requests with cURL** + # If you're providing text file input to +curl+, you must use the +--data-binary+ flag instead of plain +-d+. + # The latter doesn't preserve newlines. For example: + # + + # $ cat requests + # { "index" : { "_index" : "test", "_id" : "1" } } + # { "field1" : "value1" } + # $ curl -s -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk --data-binary "@requests"; echo + # {"took":7, "errors": false, "items":[{"index":{"_index":"test","_id":"1","_version":1,"result":"created","forced_refresh":false}}]} + # + + # **Optimistic concurrency control** + # Each +index+ and +delete+ action within a bulk API call may include the +if_seq_no+ and +if_primary_term+ parameters in their respective action and meta data lines. + # The +if_seq_no+ and +if_primary_term+ parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details. + # **Versioning** + # Each bulk item can include the version value using the +version+ field. + # It automatically follows the behavior of the index or delete operation based on the +_version+ mapping. + # It also support the +version_type+. + # **Routing** + # Each bulk item can include the routing value using the +routing+ field. + # It automatically follows the behavior of the index or delete operation based on the +_routing+ mapping. + # NOTE: Data streams do not support custom routing unless they were created with the +allow_custom_routing+ setting enabled in the template. + # **Wait for active shards** + # When making bulk calls, you can set the +wait_for_active_shards+ parameter to require a minimum number of shard copies to be active before starting to process the bulk request. + # **Refresh** + # Control when the changes made by this request are visible to search. + # NOTE: Only the shards that receive the bulk request will be affected by refresh. + # Imagine a +_bulk?refresh=wait_for+ request with three documents in it that happen to be routed to different shards in an index with five shards. + # The request will only wait for those three shards to refresh. + # The other two shards that make up the index do not participate in the +_bulk+ request at all. # - # @option arguments [String] :index Default index for items which don't provide one - # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (options: true, false, wait_for) - # @option arguments [String] :routing Specific routing value - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [List] :_source True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request - # @option arguments [List] :_source_excludes Default list of fields to exclude from the returned _source field, can be overridden on each sub-request - # @option arguments [List] :_source_includes Default list of fields to extract and return from the _source field, can be overridden on each sub-request - # @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with - # @option arguments [Boolean] :require_alias If true, the request’s actions must target an index alias. Defaults to false. - # @option arguments [Boolean] :require_data_stream If true, the request's actions must target a data stream (existing or to-be-created). Default to false - # @option arguments [Boolean] :list_executed_pipelines Sets list_executed_pipelines for all incoming documents. Defaults to unset (false) - # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Defaults to true. + # @option arguments [String] :index The name of the data stream, index, or index alias to perform bulk actions on. + # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Server default: true. + # @option arguments [Boolean] :list_executed_pipelines If +true+, the response will include the ingest pipelines that were run for each index or create. + # @option arguments [String] :pipeline The pipeline identifier to use to preprocess incoming documents. + # If the index has a default ingest pipeline specified, setting the value to +_none+ turns off the default ingest pipeline for this request. + # If a final pipeline is configured, it will always run regardless of the value of this parameter. + # @option arguments [String] :refresh If +true+, Elasticsearch refreshes the affected shards to make this operation visible to search. + # If +wait_for+, wait for a refresh to make this operation visible to search. + # If +false+, do nothing with refreshes. + # Valid values: +true+, +false+, +wait_for+. Server default: false. + # @option arguments [String] :routing A custom value that is used to route operations to a specific shard. + # @option arguments [Boolean, String, Array] :_source Indicates whether to return the +_source+ field (+true+ or +false+) or contains a list of fields to return. + # @option arguments [String, Array] :_source_excludes A comma-separated list of source fields to exclude from the response. + # You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter. + # If the +_source+ parameter is +false+, this parameter is ignored. + # @option arguments [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # If this parameter is specified, only these source fields are returned. + # You can exclude fields from this subset using the +_source_excludes+ query parameter. + # If the +_source+ parameter is +false+, this parameter is ignored. + # @option arguments [Time] :timeout The period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards. + # The default is +1m+ (one minute), which guarantees Elasticsearch waits for at least the timeout before failing. + # The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). + # The default is +1+, which waits for each primary shard to be active. Server default: 1. + # @option arguments [Boolean] :require_alias If +true+, the request's actions must target an index alias. + # @option arguments [Boolean] :require_data_stream If +true+, the request's actions must target a data stream (existing or to be created). # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [String|Array] :body The operation definition and data (action-data pairs), separated by newlines. Array of Strings, Header/Data pairs, - # or the conveniency "combined" format can be passed, refer to Elasticsearch::API::Utils.__bulkify documentation. + # @option arguments [String|Array] :body operations. Array of Strings, Header/Data pairs, or the conveniency "combined" format can be passed, refer to Elasticsearch::API::Utils.bulkify documentation. # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk # def bulk(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'bulk' } @@ -55,20 +145,20 @@ def bulk(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "#{Utils.__listify(_index)}/_bulk" + "#{Utils.listify(_index)}/_bulk" else '_bulk' end params = Utils.process_params(arguments) payload = if body.is_a? Array - Elasticsearch::API::Utils.__bulkify(body) + Elasticsearch::API::Utils.bulkify(body) else body end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb index 8c13623618..0c48914fd7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb @@ -15,26 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Shows information about currently configured aliases to indices including filter and routing infos. + # Get aliases. + # Get the cluster's index aliases, including filter and routing information. + # This API does not return data stream aliases. + # IMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API. # - # @option arguments [List] :name A comma-separated list of alias names to return - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [Boolean] :v Verbose mode. Display column headers - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked + # @option arguments [String, Array] :name A comma-separated list of aliases to retrieve. Supports wildcards (+*+). To retrieve all aliases, omit this parameter or use +*+ or +_all+. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [String, Array] :expand_wildcards The type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # It supports comma-separated values, such as +open,hidden+. + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicated that the request should never timeout, you can set it to +-1+. Server default: 30s. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-alias.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-aliases # def aliases(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.aliases' } @@ -53,12 +64,12 @@ def aliases(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_cat/aliases/#{Utils.__listify(_name)}" + "_cat/aliases/#{Utils.listify(_name)}" else '_cat/aliases' end params = Utils.process_params(arguments) - params[:h] = Utils.__listify(params[:h]) if params[:h] + params[:h] = Utils.listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb index f37b53e12d..85c32ca565 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb @@ -15,27 +15,36 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using. + # Get shard allocation information. + # Get a snapshot of the number of shards allocated to each data node and their disk space. + # IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. # - # @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String, Array] :node_id A comma-separated list of node identifiers or names used to limit the returned information. + # @option arguments [String] :bytes The unit used to display byte values. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the + # local cluster state. If +false+ the list of selected nodes are computed + # from the cluster state of the master node. In both cases the coordinating + # node will send requests for further information to each selected node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-allocation.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-allocation # def allocation(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.allocation' } @@ -54,12 +63,12 @@ def allocation(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _node_id - "_cat/allocation/#{Utils.__listify(_node_id)}" + "_cat/allocation/#{Utils.listify(_node_id)}" else '_cat/allocation' end params = Utils.process_params(arguments) - params[:h] = Utils.__listify(params[:h]) if params[:h] + params[:h] = Utils.listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb index 0765a09a55..1e940e1c6a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb @@ -15,26 +15,39 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns information about existing component_templates templates. + # Get component templates. + # Get information about component templates in a cluster. + # Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. + # IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. + # They are not intended for use by applications. For application consumption, use the get component template API. # - # @option arguments [String] :name A pattern that returned component template names must match - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String] :name The name of the component template. + # It accepts wildcard expressions. + # If it is omitted, all component templates are returned. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the + # local cluster state. If +false+ the list of selected nodes are computed + # from the cluster state of the master node. In both cases the coordinating + # node will send requests for further information to each selected node. + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-component-templates.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-component-templates # def component_templates(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.component_templates' } @@ -53,7 +66,7 @@ def component_templates(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_cat/component_templates/#{Utils.__listify(_name)}" + "_cat/component_templates/#{Utils.listify(_name)}" else '_cat/component_templates' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb index 8afd4cade6..7f30de702f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb @@ -15,24 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Provides quick access to the document count of the entire cluster, or individual indices. + # Get a document count. + # Get quick access to a document count for a data stream, an index, or an entire cluster. + # The document count only includes live documents, not deleted documents which have not yet been removed by the merge process. + # IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. + # They are not intended for use by applications. For application consumption, use the count API. # - # @option arguments [List] :index A comma-separated list of index names to limit the returned information - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases used to limit the request. + # It supports wildcards (+*+). + # To target all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-count # def count(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.count' } @@ -45,18 +55,18 @@ def count(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index - "_cat/count/#{Utils.__listify(_index)}" + "_cat/count/#{Utils.listify(_index)}" else '_cat/count' end params = Utils.process_params(arguments) - params[:h] = Utils.__listify(params[:h]) if params[:h] + params[:h] = Utils.listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb index 592958c962..114ec4086d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb @@ -15,25 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Shows how much heap memory is currently being used by fielddata on every data node in the cluster. + # Get field data cache information. + # Get the amount of heap memory currently used by the field data cache on every data node in the cluster. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. + # They are not intended for use by applications. For application consumption, use the nodes stats API. # - # @option arguments [List] :fields A comma-separated list of fields to return the fielddata size - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String, Array] :fields Comma-separated list of fields used to limit returned information. + # To retrieve all fields, omit this parameter. + # @option arguments [String] :bytes The unit used to display byte values. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-fielddata # def fielddata(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.fielddata' } @@ -52,7 +60,7 @@ def fielddata(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _fields - "_cat/fielddata/#{Utils.__listify(_fields)}" + "_cat/fielddata/#{Utils.listify(_fields)}" else '_cat/fielddata' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb index 59309d5084..461cb1748a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb @@ -15,25 +15,38 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns a concise representation of the cluster health. + # Get the cluster health status. + # IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. + # They are not intended for use by applications. For application consumption, use the cluster health API. + # This API is often used to check malfunctioning clusters. + # To help you track cluster health alongside log files and alerting systems, the API returns timestamps in two formats: + # +HH:MM:SS+, which is human-readable but includes no date information; + # +Unix epoch time+, which is machine-sortable and includes date information. + # The latter format is useful for cluster recoveries that take multiple days. + # You can use the cat health API to verify cluster health across multiple nodes. + # You also can use the API to track the recovery of a large cluster over a longer period of time. # - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :ts Set to false to disable timestamping - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String] :time The unit used to display time values. + # @option arguments [Boolean] :ts If true, returns +HH:MM:SS+ and Unix epoch timestamps. Server default: true. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-health.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-health # def health(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.health' } @@ -41,12 +54,12 @@ def health(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_cat/health' params = Utils.process_params(arguments) - params[:h] = Utils.__listify(params[:h]) if params[:h] + params[:h] = Utils.listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb index 8e0f1e26d6..1746fba928 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb @@ -38,7 +38,7 @@ def help(arguments = {}) body = nil method = Elasticsearch::API::HTTP_GET - path = "_cat" + path = '_cat' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb index accc79e8cb..a11c143955 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb @@ -15,31 +15,47 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns information about indices: number of primaries and replicas, document counts, disk size, ... + # Get index information. + # Get high-level information about indices in a cluster, including backing indices for data streams. + # Use this request to get the following information for each index in a cluster: + # - shard count + # - document count + # - deleted document count + # - primary store size + # - total store size of all shards, including shard replicas + # These metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents. + # To get an accurate count of Elasticsearch documents, use the cat count or count APIs. + # CAT APIs are only intended for human consumption using the command line or Kibana console. + # They are not intended for use by applications. For application consumption, use an index endpoint. # - # @option arguments [List] :index A comma-separated list of index names to limit the returned information - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [String] :health A health status ("green", "yellow", or "red" to filter only indices matching the specified health status (options: green, yellow, red) - # @option arguments [Boolean] :help Return help information - # @option arguments [Boolean] :pri Set to true to return stats only for primary shards - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :v Verbose mode. Display column headers - # @option arguments [Boolean] :include_unloaded_segments If set to true segment stats will include stats for segments that are not currently loaded into memory - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. + # Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [String] :bytes The unit used to display byte values. + # @option arguments [String, Array] :expand_wildcards The type of index that wildcard patterns can match. + # @option arguments [String] :health The health status used to limit returned indices. By default, the response includes indices of any health status. + # @option arguments [Boolean] :include_unloaded_segments If true, the response includes information from segments that are not loaded into memory. + # @option arguments [Boolean] :pri If true, the response only includes information from primary shards. + # @option arguments [String] :time The unit used to display time values. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-indices # def indices(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.indices' } @@ -52,18 +68,18 @@ def indices(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index - "_cat/indices/#{Utils.__listify(_index)}" + "_cat/indices/#{Utils.listify(_index)}" else '_cat/indices' end params = Utils.process_params(arguments) - params[:h] = Utils.__listify(params[:h]) if params[:h] + params[:h] = Utils.listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb index f8512afd3b..2d18055c8c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb @@ -15,25 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns information about the master node. + # Get master node information. + # Get information about the master node, including the ID, bound IP address, and name. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API. # - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the + # local cluster state. If +false+ the list of selected nodes are computed + # from the cluster state of the master node. In both cases the coordinating + # node will send requests for further information to each selected node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-master.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-master # def master(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.master' } @@ -41,7 +50,7 @@ def master(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_cat/master' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb index 72e1f69773..4b6d793289 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb @@ -15,27 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Gets configuration and usage information about data frame analytics jobs. + # Get data frame analytics jobs. + # Get configuration and usage information about data frame analytics jobs. + # IMPORTANT: CAT APIs are only intended for human consumption using the Kibana + # console or command line. They are not intended for use by applications. For + # application consumption, use the get data frame analytics jobs statistics API. # # @option arguments [String] :id The ID of the data frame analytics to fetch - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified) - # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no configs. (This includes +_all+ string or when no configs have been specified) + # @option arguments [String] :bytes The unit in which to display byte values + # @option arguments [String, Array] :h Comma-separated list of column names to display. Server default: create_time,id,state,type. + # @option arguments [String, Array] :s Comma-separated list of column names or column aliases used to sort the + # response. + # @option arguments [String] :time Unit used to display time values. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-data-frame-analytics # def ml_data_frame_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_data_frame_analytics' } @@ -54,7 +61,7 @@ def ml_data_frame_analytics(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _id - "_cat/ml/data_frame/analytics/#{Utils.__listify(_id)}" + "_cat/ml/data_frame/analytics/#{Utils.listify(_id)}" else '_cat/ml/data_frame/analytics' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb index c00d25ba2c..1191978d36 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb @@ -15,26 +15,41 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Gets configuration and usage information about datafeeds. + # Get datafeeds. + # Get configuration and usage information about datafeeds. + # This API returns a maximum of 10,000 datafeeds. + # If the Elasticsearch security features are enabled, you must have +monitor_ml+, +monitor+, +manage_ml+, or +manage+ + # cluster privileges to use this API. + # IMPORTANT: CAT APIs are only intended for human consumption using the Kibana + # console or command line. They are not intended for use by applications. For + # application consumption, use the get datafeed statistics API. # - # @option arguments [String] :datafeed_id The ID of the datafeeds stats to fetch - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed. + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no datafeeds that match. + # - Contains the +_all+ string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # If +true+, the API returns an empty datafeeds array when there are no matches and the subset of results when + # there are partial matches. If +false+, the API returns a 404 status code when there are no matches or only + # partial matches. Server default: true. + # @option arguments [String, Array] :h Comma-separated list of column names to display. Server default: ['bc', 'id', 'sc', 's']. + # @option arguments [String, Array] :s Comma-separated list of column names or column aliases used to sort the response. + # @option arguments [String] :time The unit used to display time values. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-datafeeds # def ml_datafeeds(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_datafeeds' } @@ -53,7 +68,7 @@ def ml_datafeeds(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _datafeed_id - "_cat/ml/datafeeds/#{Utils.__listify(_datafeed_id)}" + "_cat/ml/datafeeds/#{Utils.listify(_datafeed_id)}" else '_cat/ml/datafeeds' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb index 0a9f41ff97..2dc94c4aee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb @@ -15,27 +15,42 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Gets configuration and usage information about anomaly detection jobs. + # Get anomaly detection jobs. + # Get configuration and usage information for anomaly detection jobs. + # This API returns a maximum of 10,000 jobs. + # If the Elasticsearch security features are enabled, you must have +monitor_ml+, + # +monitor+, +manage_ml+, or +manage+ cluster privileges to use this API. + # IMPORTANT: CAT APIs are only intended for human consumption using the Kibana + # console or command line. They are not intended for use by applications. For + # application consumption, use the get anomaly detection job statistics API. # - # @option arguments [String] :job_id The ID of the jobs stats to fetch - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) - # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String] :job_id Identifier for the anomaly detection job. + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no jobs that match. + # - Contains the +_all+ string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # If +true+, the API returns an empty jobs array when there are no matches and the subset of results when there + # are partial matches. If +false+, the API returns a 404 status code when there are no matches or only partial + # matches. Server default: true. + # @option arguments [String] :bytes The unit used to display byte values. + # @option arguments [String, Array] :h Comma-separated list of column names to display. Server default: buckets.count,data.processed_records,forecasts.total,id,model.bytes,model.memory_status,state. + # @option arguments [String, Array] :s Comma-separated list of column names or column aliases used to sort the response. + # @option arguments [String] :time The unit used to display time values. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-jobs # def ml_jobs(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_jobs' } @@ -54,7 +69,7 @@ def ml_jobs(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _job_id - "_cat/ml/anomaly_detectors/#{Utils.__listify(_job_id)}" + "_cat/ml/anomaly_detectors/#{Utils.listify(_job_id)}" else '_cat/ml/anomaly_detectors' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb index 3af9c15a30..db22906257 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb @@ -15,29 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Gets configuration and usage information about inference trained models. + # Get trained models. + # Get configuration and usage information about inference trained models. + # IMPORTANT: CAT APIs are only intended for human consumption using the Kibana + # console or command line. They are not intended for use by applications. For + # application consumption, use the get trained models statistics API. # - # @option arguments [String] :model_id The ID of the trained models stats to fetch - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) - # @option arguments [Integer] :from skips a number of trained models - # @option arguments [Integer] :size specifies a max number of trained models to get - # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String] :model_id A unique identifier for the trained model. + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: contains wildcard expressions and there are no models that match; contains the +_all+ string or no identifiers and there are no matches; contains wildcard expressions and there are only partial matches. + # If +true+, the API returns an empty array when there are no matches and the subset of results when there are partial matches. + # If +false+, the API returns a 404 status code when there are no matches or only partial matches. Server default: true. + # @option arguments [String] :bytes The unit used to display byte values. + # @option arguments [String, Array] :h A comma-separated list of column names to display. + # @option arguments [String, Array] :s A comma-separated list of column names or aliases used to sort the response. + # @option arguments [Integer] :from Skips the specified number of transforms. + # @option arguments [Integer] :size The maximum number of transforms to display. + # @option arguments [String] :time Unit used to display time values. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-ml-trained-models # def ml_trained_models(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_trained_models' } @@ -56,7 +64,7 @@ def ml_trained_models(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _model_id - "_cat/ml/trained_models/#{Utils.__listify(_model_id)}" + "_cat/ml/trained_models/#{Utils.listify(_model_id)}" else '_cat/ml/trained_models' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb index 54102162ef..5227a8a282 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb @@ -15,25 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns information about custom node attributes. + # Get node attribute information. + # Get information about custom node attributes. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API. # - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the + # local cluster state. If +false+ the list of selected nodes are computed + # from the cluster state of the master node. In both cases the coordinating + # node will send requests for further information to each selected node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodeattrs.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-nodeattrs # def nodeattrs(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.nodeattrs' } @@ -41,7 +50,7 @@ def nodeattrs(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_cat/nodeattrs' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb index 1411277c44..cf2f9c30f3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb @@ -15,28 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns basic statistics about performance of cluster nodes. + # Get node information. + # Get information about the nodes in a cluster. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API. # - # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [Boolean] :full_id Return the full node ID instead of the shortened version (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :v Verbose mode. Display column headers - # @option arguments [Boolean] :include_unloaded_segments If set to true segment stats will include stats for segments that are not currently loaded into memory + # @option arguments [String] :bytes The unit used to display byte values. + # @option arguments [Boolean, String] :full_id If +true+, return the full node ID. If +false+, return the shortened node ID. Server default: false. + # @option arguments [Boolean] :include_unloaded_segments If true, the response includes information from segments that are not loaded into memory. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String] :time Unit used to display time values. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-nodes # def nodes(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.nodes' } @@ -44,12 +50,12 @@ def nodes(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_cat/nodes' params = Utils.process_params(arguments) - params[:h] = Utils.__listify(params[:h], escape: false) if params[:h] + params[:h] = Utils.listify(params[:h], escape: false) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb index 67acfd7817..f2963038da 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb @@ -15,26 +15,35 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns a concise representation of the cluster pending tasks. + # Get pending task information. + # Get information about cluster-level changes that have not yet taken effect. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the pending cluster tasks API. # - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the + # local cluster state. If +false+ the list of selected nodes are computed + # from the cluster state of the master node. In both cases the coordinating + # node will send requests for further information to each selected node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String] :time Unit used to display time values. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-pending-tasks.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-pending-tasks # def pending_tasks(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.pending_tasks' } @@ -42,12 +51,12 @@ def pending_tasks(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_cat/pending_tasks' params = Utils.process_params(arguments) - params[:h] = Utils.__listify(params[:h]) if params[:h] + params[:h] = Utils.listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb index fbde5d60ed..dd8738f657 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb @@ -15,26 +15,35 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns information about installed plugins across nodes node. + # Get plugin information. + # Get a list of plugins running on each node of a cluster. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API. # - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. # @option arguments [Boolean] :include_bootstrap Include bootstrap plugins in the response - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the + # local cluster state. If +false+ the list of selected nodes are computed + # from the cluster state of the master node. In both cases the coordinating + # node will send requests for further information to each selected node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-plugins.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-plugins # def plugins(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.plugins' } @@ -42,7 +51,7 @@ def plugins(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_cat/plugins' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb index 5e6865e47d..ff1cf27100 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb @@ -15,28 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns information about index shard recoveries, both on-going completed. + # Get shard recovery information. + # Get information about ongoing and completed shard recoveries. + # Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or syncing a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing. + # For data streams, the API returns information about the stream’s backing indices. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index recovery API. # - # @option arguments [List] :index Comma-separated list or wildcard expression of index names to limit the returned information - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [Boolean] :active_only If `true`, the response only includes ongoing shard recoveries - # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) - # @option arguments [Boolean] :detailed If `true`, the response includes detailed information about shard recoveries - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases used to limit the request. + # Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :active_only If +true+, the response only includes ongoing shard recoveries. + # @option arguments [String] :bytes The unit used to display byte values. + # @option arguments [Boolean] :detailed If +true+, the response includes detailed information about shard recoveries. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [String] :time Unit used to display time values. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-recovery # def recovery(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.recovery' } @@ -49,18 +58,18 @@ def recovery(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index - "_cat/recovery/#{Utils.__listify(_index)}" + "_cat/recovery/#{Utils.listify(_index)}" else '_cat/recovery' end params = Utils.process_params(arguments) - params[:h] = Utils.__listify(params[:h]) if params[:h] + params[:h] = Utils.listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb index 482ceff4b3..55e24c7b03 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb @@ -15,25 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns information about snapshot repositories registered in the cluster. + # Get snapshot repository information. + # Get a list of snapshot repositories for a cluster. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot repository API. # - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the + # local cluster state. If +false+ the list of selected nodes are computed + # from the cluster state of the master node. In both cases the coordinating + # node will send requests for further information to each selected node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-repositories.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-repositories # def repositories(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.repositories' } @@ -41,7 +50,7 @@ def repositories(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_cat/repositories' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb index e9146b30c8..f8a9e8e548 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb @@ -15,27 +15,39 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Provides low-level information about the segments in the shards of an index. + # Get segment information. + # Get low-level information about the Lucene segments in index shards. + # For data streams, the API returns information about the backing indices. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index segments API. # - # @option arguments [List] :index A comma-separated list of index names to limit the returned information - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases used to limit the request. + # Supports wildcards (+*+). + # To target all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [String] :bytes The unit used to display byte values. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the + # local cluster state. If +false+ the list of selected nodes are computed + # from the cluster state of the master node. In both cases the coordinating + # node will send requests for further information to each selected node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-segments # def segments(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.segments' } @@ -48,13 +60,13 @@ def segments(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index - "_cat/segments/#{Utils.__listify(_index)}" + "_cat/segments/#{Utils.listify(_index)}" else '_cat/segments' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb index 4e4cae17d5..b8656b5236 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb @@ -15,27 +15,36 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Provides a detailed view of shard allocation on nodes. + # Get shard information. + # Get information about the shards in a cluster. + # For data streams, the API returns information about the backing indices. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. # - # @option arguments [List] :index A comma-separated list of index names to limit the returned information - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases used to limit the request. + # Supports wildcards (+*+). + # To target all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [String] :bytes The unit used to display byte values. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String] :time Unit used to display time values. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-shards # def shards(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.shards' } @@ -48,18 +57,18 @@ def shards(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index - "_cat/shards/#{Utils.__listify(_index)}" + "_cat/shards/#{Utils.listify(_index)}" else '_cat/shards' end params = Utils.process_params(arguments) - params[:h] = Utils.__listify(params[:h]) if params[:h] + params[:h] = Utils.listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb index 3ae1c00888..dd44f27274 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb @@ -15,27 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns all snapshots in a specific repository. + # Get snapshot information. + # Get information about the snapshots stored in one or more repositories. + # A snapshot is a backup of an index or running Elasticsearch cluster. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot API. # - # @option arguments [List] :repository Name of repository from which to fetch the snapshot information - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [Boolean] :ignore_unavailable Set to true to ignore unavailable snapshots - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String, Array] :repository A comma-separated list of snapshot repositories used to limit the request. + # Accepts wildcard expressions. + # +_all+ returns all repositories. + # If any repository fails during the request, Elasticsearch returns an error. + # @option arguments [Boolean] :ignore_unavailable If +true+, the response does not include information from unavailable snapshots. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String] :time Unit used to display time values. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-snapshots # def snapshots(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.snapshots' } @@ -54,7 +64,7 @@ def snapshots(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _repository - "_cat/snapshots/#{Utils.__listify(_repository)}" + "_cat/snapshots/#{Utils.listify(_repository)}" else '_cat/snapshots' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb index bbbb3bb6c7..601e73d2fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb @@ -15,34 +15,41 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns information about the tasks currently executing on one or more nodes in the cluster. + # Get task information. + # Get information about tasks currently running in the cluster. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [List] :nodes A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - # @option arguments [List] :actions A comma-separated list of actions that should be returned. Leave empty to return all. - # @option arguments [Boolean] :detailed Return detailed task information (default: false) - # @option arguments [String] :parent_task_id Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :v Verbose mode. Display column headers - # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - # @option arguments [Boolean] :wait_for_completion If `true`, the request blocks until the task has completed. + # @option arguments [Array] :actions The task action names, which are used to limit the response. + # @option arguments [Boolean] :detailed If +true+, the response includes detailed information about shard recoveries. + # @option arguments [Array] :nodes Unique node identifiers, which are used to limit the response. + # @option arguments [String] :parent_task_id The parent task identifier, which is used to limit the response. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [String] :time Unit used to display time values. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the task has completed. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-tasks # def tasks(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.tasks' } @@ -50,7 +57,7 @@ def tasks(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_cat/tasks' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb index 42423d5f2b..46c7784730 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb @@ -15,26 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns information about existing templates. + # Get index template information. + # Get information about the index templates in a cluster. + # You can use index templates to apply index settings and field mappings to new indices at creation. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get index template API. # - # @option arguments [String] :name A pattern that returned template names must match - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String] :name The name of the template to return. + # Accepts wildcard expressions. If omitted, all templates are returned. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the + # local cluster state. If +false+ the list of selected nodes are computed + # from the cluster state of the master node. In both cases the coordinating + # node will send requests for further information to each selected node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-templates # def templates(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.templates' } @@ -53,7 +64,7 @@ def templates(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_cat/templates/#{Utils.__listify(_name)}" + "_cat/templates/#{Utils.listify(_name)}" else '_cat/templates' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb index f3ffd705f2..65125ce46a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb @@ -15,28 +15,38 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Returns cluster-wide thread pool statistics per node. - # By default the active, queue and rejected statistics are returned for all thread pools. + # Get thread pool statistics. + # Get thread pool statistics for each node in a cluster. + # Returned information includes all built-in thread pools and custom thread pools. + # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API. # - # @option arguments [List] :thread_pool_patterns A comma-separated list of regular-expressions to filter the thread pools in the output - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String, Array] :thread_pool_patterns A comma-separated list of thread pool names used to limit the request. + # Accepts wildcard expressions. + # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. + # Sorting defaults to ascending and can be changed by setting +:asc+ + # or +:desc+ as a suffix to the column name. + # @option arguments [String] :time The unit used to display time values. + # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the + # local cluster state. If +false+ the list of selected nodes are computed + # from the cluster state of the master node. In both cases the coordinating + # node will send requests for further information to each selected node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-thread-pool # def thread_pool(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.thread_pool' } @@ -55,12 +65,12 @@ def thread_pool(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _thread_pool_patterns - "_cat/thread_pool/#{Utils.__listify(_thread_pool_patterns)}" + "_cat/thread_pool/#{Utils.listify(_thread_pool_patterns)}" else '_cat/thread_pool' end params = Utils.process_params(arguments) - params[:h] = Utils.__listify(params[:h]) if params[:h] + params[:h] = Utils.listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb index 172e7445ae..e94c7c2311 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb @@ -15,28 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cat module Actions - # Gets configuration and usage information about transforms. + # Get transform information. + # Get configuration and usage information about transforms. + # CAT APIs are only intended for human consumption using the Kibana + # console or command line. They are not intended for use by applications. For + # application consumption, use the get transform statistics API. # - # @option arguments [String] :transform_id The id of the transform for which to get stats. '_all' or '*' implies all transforms - # @option arguments [Integer] :from skips a number of transform configs, defaults to 0 - # @option arguments [Integer] :size specifies a max number of transforms to get, defaults to 100 - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [List] :h Comma-separated list of column names to display - # @option arguments [Boolean] :help Return help information - # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by - # @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) - # @option arguments [Boolean] :v Verbose mode. Display column headers + # @option arguments [String] :transform_id A transform identifier or a wildcard expression. + # If you do not specify one of these options, the API returns information for all transforms. + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: contains wildcard expressions and there are no transforms that match; contains the +_all+ string or no identifiers and there are no matches; contains wildcard expressions and there are only partial matches. + # If +true+, it returns an empty transforms array when there are no matches and the subset of results when there are partial matches. + # If +false+, the request returns a 404 status code when there are no matches or only partial matches. Server default: true. + # @option arguments [Integer] :from Skips the specified number of transforms. Server default: 0. + # @option arguments [String, Array] :h Comma-separated list of column names to display. Server default: changes_last_detection_time,checkpoint,checkpoint_progress,documents_processed,id,last_search_time,state. + # @option arguments [String, Array] :s Comma-separated list of column names or column aliases used to sort the response. + # @option arguments [String] :time The unit used to display time values. + # @option arguments [Integer] :size The maximum number of transforms to obtain. Server default: 100. + # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to + # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text. + # @option arguments [Boolean] :help When set to +true+ will output available columns. This option + # can't be combined with any other query string option. + # @option arguments [Boolean] :v When set to +true+ will enable verbose output. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-transforms # def transforms(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.transforms' } @@ -55,7 +64,7 @@ def transforms(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _transform_id - "_cat/transforms/#{Utils.__listify(_transform_id)}" + "_cat/transforms/#{Utils.listify(_transform_id)}" else '_cat/transforms' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb index 793bff1eab..2ada3e053f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb @@ -15,33 +15,31 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Explicitly clears the search context for a scroll. + # Clear a scrolling search. + # Clear the search context and results for a scrolling search. # - # @option arguments [List] :scroll_id A comma-separated list of scroll IDs to clear *Deprecated* + # @option arguments [String, Array] :scroll_id A comma-separated list of scroll IDs to clear. + # To clear all scroll IDs, use +_all+. + # IMPORTANT: Scroll IDs can be long. It is recommended to specify scroll IDs in the request body parameter. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter + # @option arguments [Hash] :body request body # # *Deprecation notice*: # A scroll id can be quite large and should be specified as part of the body # Deprecated since version 7.0.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll # def clear_scroll(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'clear_scroll' } - defined_params = [:scroll_id].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) || {} @@ -50,15 +48,11 @@ def clear_scroll(arguments = {}) _scroll_id = arguments.delete(:scroll_id) method = Elasticsearch::API::HTTP_DELETE - path = if _scroll_id - "_search/scroll/#{Utils.__listify(_scroll_id)}" - else - '_search/scroll' - end + path = '_search/scroll' params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb index 05b7b5935a..48387cd78c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb @@ -15,18 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Close a point in time + # Close a point in time. + # A point in time must be opened explicitly before being used in search requests. + # The +keep_alive+ parameter tells Elasticsearch how long it should persist. + # A point in time is automatically closed when the +keep_alive+ period has elapsed. + # However, keeping points in time has a cost; close them as soon as they are no longer required for search requests. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body a point-in-time id to close + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-open-point-in-time # def close_point_in_time(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'close_point_in_time' } @@ -34,7 +38,7 @@ def close_point_in_time(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_DELETE path = '_pit' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb index 08abe8949a..6913912d86 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb @@ -15,22 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Provides explanations for shard allocations in the cluster. + # Explain the shard allocations. + # Get explanations for shard allocations in the cluster. + # For unassigned shards, it provides an explanation for why the shard is unassigned. + # For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node. + # This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise. # - # @option arguments [Time] :master_timeout Timeout for connection to master node - # @option arguments [Boolean] :include_yes_decisions Return 'YES' decisions in explanation (default: false) - # @option arguments [Boolean] :include_disk_info Return information about disk usage and shard sizes (default: false) + # @option arguments [Boolean] :include_disk_info If true, returns information about disk usage and shard sizes. + # @option arguments [Boolean] :include_yes_decisions If true, returns YES decisions in explanation. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The index, shard, and primary flag to explain. Empty means 'explain a randomly-chosen unassigned shard' + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain # def allocation_explain(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.allocation_explain' } @@ -38,7 +42,7 @@ def allocation_explain(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = if body Elasticsearch::API::HTTP_POST @@ -46,7 +50,7 @@ def allocation_explain(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_cluster/allocation/explain' + path = '_cluster/allocation/explain' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb index a0a62dd669..7491f54b76 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb @@ -15,21 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Deletes a component template + # Delete component templates. + # Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. # - # @option arguments [String] :name The name of the template - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String, Array] :name Comma-separated list or wildcard expression of component template names used to limit the request. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template # def delete_component_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.delete_component_template' } @@ -49,7 +52,7 @@ def delete_component_template(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = "_component_template/#{Utils.__listify(_name)}" + path = "_component_template/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb index 4609b743de..a3084653c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb @@ -15,20 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Clears cluster voting config exclusions. + # Clear cluster voting config exclusions. + # Remove master-eligible nodes from the voting configuration exclusion list. # - # @option arguments [Boolean] :wait_for_removal Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. - # @option arguments [Time] :master_timeout Timeout for submitting request to master + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [Boolean] :wait_for_removal Specifies whether to wait for all excluded nodes to be removed from the + # cluster before clearing the voting configuration exclusions list. + # Defaults to true, meaning that all excluded nodes must be removed from + # the cluster before this API takes any action. If set to false then the + # voting configuration exclusions list is cleared even if some excluded + # nodes are still in the cluster. Server default: true. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/voting-config-exclusions.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions # def delete_voting_config_exclusions(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.delete_voting_config_exclusions' } @@ -36,7 +42,7 @@ def delete_voting_config_exclusions(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_DELETE path = '_cluster/voting_config_exclusions' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb index 505979897d..30006edb13 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb @@ -15,21 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Returns information about whether a particular component template exist + # Check component templates. + # Returns information about whether a particular component template exists. # - # @option arguments [String] :name The name of the template - # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated* + # @option arguments [String, Array] :name Comma-separated list of component template names used to limit the request. + # Wildcard (*) expressions are supported. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is + # received before the timeout expires, the request fails and returns an + # error. Server default: 30s. + # @option arguments [Boolean] :local If true, the request retrieves information from the local node only. + # Defaults to false, which means information is retrieved from the master node. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template # def exists_component_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.exists_component_template' } @@ -49,7 +54,7 @@ def exists_component_template(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_HEAD - path = "_component_template/#{Utils.__listify(_name)}" + path = "_component_template/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb index d4570f23aa..a75610fcaa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb @@ -15,22 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Returns one or more component templates + # Get component templates. + # Get information about component templates. # - # @option arguments [List] :name The comma separated names of the component templates - # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated* + # @option arguments [String] :name Comma-separated list of component template names used to limit the request. + # Wildcard (+*+) expressions are supported. + # @option arguments [Boolean] :flat_settings If +true+, returns settings in flat format. # @option arguments [Boolean] :include_defaults Return all default configurations for the component template (default: false) + # @option arguments [Boolean] :local If +true+, the request retrieves information from the local node only. + # If +false+, information is retrieved from the master node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template # def get_component_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.get_component_template' } @@ -49,7 +54,7 @@ def get_component_template(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_component_template/#{Utils.__listify(_name)}" + "_component_template/#{Utils.listify(_name)}" else '_component_template' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb index 12beaf9acc..7030619224 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb @@ -15,22 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Returns cluster settings. + # Get cluster-wide settings. + # By default, it returns only settings that have been explicitly defined. # - # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Boolean] :include_defaults Whether to return all default clusters setting. + # @option arguments [Boolean] :flat_settings If +true+, returns settings in flat format. + # @option arguments [Boolean] :include_defaults If +true+, returns default cluster settings from the local node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-get-settings.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-get-settings # def get_settings(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.get_settings' } @@ -38,7 +41,7 @@ def get_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_cluster/settings' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb index 3a585036b6..3774f7f961 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb @@ -15,30 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Returns basic information about the health of the cluster. + # Get the cluster health status. + # You can also use the API to get the health status of only specified data streams and indices. + # For data streams, the API retrieves the health status of the stream’s backing indices. + # The cluster health status is: green, yellow or red. + # On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. + # The index level status is controlled by the worst shard status. + # One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. + # The cluster status is controlled by the worst index status. # - # @option arguments [List] :index Limit the information returned to a specific index - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [String] :level Specify the level of detail for returned information (options: cluster, indices, shards) - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [String] :wait_for_active_shards Wait until the specified number of shards is active - # @option arguments [String] :wait_for_nodes Wait until the specified number of nodes is available - # @option arguments [String] :wait_for_events Wait until all currently queued events with the given priority are processed (options: immediate, urgent, high, normal, low, languid) - # @option arguments [Boolean] :wait_for_no_relocating_shards Whether to wait until there are no relocating shards in the cluster - # @option arguments [Boolean] :wait_for_no_initializing_shards Whether to wait until there are no initializing shards in the cluster - # @option arguments [String] :wait_for_status Wait until cluster is in a specific state (options: green, yellow, red) + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard expressions (+*+) are supported. To target all data streams and indices in a cluster, omit this parameter or use _all or +*+. + # @option arguments [String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. + # @option arguments [String] :level Can be one of cluster, indices or shards. Controls the details level of the health information returned. Server default: cluster. + # @option arguments [Boolean] :local If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Integer, String] :wait_for_active_shards A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait. Server default: 0. + # @option arguments [String] :wait_for_events Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed. + # @option arguments [String, Integer] :wait_for_nodes The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and yellow > red. By default, will not wait for any status. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-health # def health(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.health' } @@ -51,13 +58,13 @@ def health(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index - "_cluster/health/#{Utils.__listify(_index)}" + "_cluster/health/#{Utils.listify(_index)}" else '_cluster/health' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb index 83b2e81d83..a417c361a5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb @@ -15,19 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Returns different information about the cluster. + # Get cluster info. + # Returns basic information about the cluster. # - # @option arguments [List] :target Limit the information returned to the specified target. (options: _all, http, ingest, thread_pool, script) + # @option arguments [String, Array] :target Limits the information returned to the specific target. Supports a comma-separated list, such as http,ingest. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-info.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-info # def info(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.info' } @@ -47,7 +48,7 @@ def info(arguments = {}) _target = arguments.delete(:target) method = Elasticsearch::API::HTTP_GET - path = "_info/#{Utils.__listify(_target)}" + path = "_info/#{Utils.listify(_target)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb index 783626ef7d..294a609f3a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb @@ -15,21 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Returns a list of any cluster-level changes (e.g. create index, update mapping, - # allocate or fail shard) which have not yet been executed. + # Get the pending cluster tasks. + # Get information about cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet taken effect. + # NOTE: This API returns a list of any pending updates to the cluster state. + # These are distinct from the tasks reported by the task management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. + # However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API. # - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [Boolean] :local If +true+, the request retrieves information from the local node only. + # If +false+, information is retrieved from the master node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-pending.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-pending-tasks # def pending_tasks(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.pending_tasks' } @@ -37,7 +42,7 @@ def pending_tasks(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_cluster/pending_tasks' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb index dd9edf0cbe..6861312202 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb @@ -15,22 +15,41 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Updates the cluster voting config exclusions by node ids or node names. + # Update voting configuration exclusions. + # Update the cluster voting config exclusions by node IDs or node names. + # By default, if there are more than three master-eligible nodes in the cluster and you remove fewer than half of the master-eligible nodes in the cluster at once, the voting configuration automatically shrinks. + # If you want to shrink the voting configuration to contain fewer than three nodes or to remove half or more of the master-eligible nodes in the cluster at once, use this API to remove departing nodes from the voting configuration manually. + # The API adds an entry for each specified node to the cluster’s voting configuration exclusions list. + # It then waits until the cluster has reconfigured its voting configuration to exclude the specified nodes. + # Clusters should have no voting configuration exclusions in normal operation. + # Once the excluded nodes have stopped, clear the voting configuration exclusions with +DELETE /_cluster/voting_config_exclusions+. + # This API waits for the nodes to be fully removed from the cluster before it returns. + # If your cluster has voting configuration exclusions for nodes that you no longer intend to remove, use +DELETE /_cluster/voting_config_exclusions?wait_for_removal=false+ to clear the voting configuration exclusions without waiting for the nodes to leave the cluster. + # A response to +POST /_cluster/voting_config_exclusions+ with an HTTP status code of 200 OK guarantees that the node has been removed from the voting configuration and will not be reinstated until the voting configuration exclusions are cleared by calling +DELETE /_cluster/voting_config_exclusions+. + # If the call to +POST /_cluster/voting_config_exclusions+ fails or returns a response with an HTTP status code other than 200 OK then the node may not have been removed from the voting configuration. + # In that case, you may safely retry the call. + # NOTE: Voting exclusions are required only when you remove at least half of the master-eligible nodes from a cluster in a short time period. + # They are not required when removing master-ineligible nodes or when removing fewer than half of the master-eligible nodes. # - # @option arguments [String] :node_ids A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_names. - # @option arguments [String] :node_names A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_ids. - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Timeout for submitting request to master + # @option arguments [String, Array] :node_names A comma-separated list of the names of the nodes to exclude from the + # voting configuration. If specified, you may not also specify node_ids. + # @option arguments [String, Array] :node_ids A comma-separated list of the persistent ids of the nodes to exclude + # from the voting configuration. If specified, you may not also specify node_names. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [Time] :timeout When adding a voting configuration exclusion, the API waits for the + # specified nodes to be excluded from the voting configuration before + # returning. If the timeout expires before the appropriate condition + # is satisfied, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/voting-config-exclusions.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions # def post_voting_config_exclusions(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.post_voting_config_exclusions' } @@ -38,7 +57,7 @@ def post_voting_config_exclusions(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_cluster/voting_config_exclusions' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb index e6cf352034..f309773b17 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb @@ -15,23 +15,40 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Creates or updates a component template + # Create or update a component template. + # Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. + # An index template can be composed of multiple component templates. + # To use a component template, specify it in an index template’s +composed_of+ list. + # Component templates are only applied to new data streams and indices as part of a matching index template. + # Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template. + # Component templates are only used during index creation. + # For data streams, this includes data stream creation and the creation of a stream’s backing indices. + # Changes to component templates do not affect existing indices, including a stream’s backing indices. + # You can use C-style +/* *\/+ block comments in component templates. + # You can include comments anywhere in the request body except before the opening curly bracket. + # **Applying component templates** + # You cannot directly apply a component template to a data stream or index. + # To be applied, a component template must be included in an index template's +composed_of+ list. # - # @option arguments [String] :name The name of the template - # @option arguments [Boolean] :create Whether the index template should only be added if new or can also replace an existing one - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String] :name Name of the component template to create. + # Elasticsearch includes the following built-in component templates: +logs-mappings+; +logs-settings+; +metrics-mappings+; +metrics-settings+;+synthetics-mapping+; +synthetics-settings+. + # Elastic Agent uses these templates to configure backing indices for its data streams. + # If you use Elastic Agent and want to overwrite one of these templates, set the +version+ for your replacement template higher than the current version. + # If you don’t use Elastic Agent and want to disable all built-in component and index templates, set +stack.templates.enabled+ to +false+ using the cluster update settings API. (*Required*) + # @option arguments [Boolean] :create If +true+, this request cannot replace or update existing component templates. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The template definition (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template # def put_component_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.put_component_template' } @@ -52,7 +69,7 @@ def put_component_template(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = "_component_template/#{Utils.__listify(_name)}" + path = "_component_template/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb index 22854aaf9b..2c3a745523 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb @@ -15,22 +15,35 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Updates the cluster settings. + # Update the cluster settings. + # Configure and update dynamic settings on a running cluster. + # You can also configure dynamic settings locally on an unstarted or shut down node in +elasticsearch.yml+. + # Updates made with this API can be persistent, which apply across cluster restarts, or transient, which reset after a cluster restart. + # You can also reset transient or persistent settings by assigning them a null value. + # If you configure the same setting using multiple methods, Elasticsearch applies the settings in following order of precedence: 1) Transient setting; 2) Persistent setting; 3) +elasticsearch.yml+ setting; 4) Default setting value. + # For example, you can apply a transient setting to override a persistent setting or +elasticsearch.yml+ setting. + # However, a change to an +elasticsearch.yml+ setting will not override a defined transient or persistent setting. + # TIP: In Elastic Cloud, use the user settings feature to configure all cluster settings. This method automatically rejects unsafe settings that could break your cluster. + # If you run Elasticsearch on your own hardware, use this API to configure dynamic cluster settings. + # Only use +elasticsearch.yml+ for static cluster settings and node settings. + # The API doesn’t require a restart and ensures a setting’s value is the same on all nodes. + # WARNING: Transient cluster settings are no longer recommended. Use persistent cluster settings instead. + # If a cluster becomes unstable, transient settings can clear unexpectedly, resulting in a potentially undesired cluster configuration. # # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node Server default: 30s. + # @option arguments [Time] :timeout Explicit operation timeout Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings # def put_settings(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.put_settings' } @@ -40,7 +53,7 @@ def put_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) || {} + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT path = '_cluster/settings' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb index 63d1f824f7..209c445fbc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb @@ -15,18 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Returns the information about configured remote clusters. + # Get remote cluster information. + # Get information about configured remote clusters. + # The API returns connection and endpoint information keyed by the configured remote cluster alias. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-remote-info.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-remote-info # def remote_info(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.remote_info' } @@ -34,7 +36,7 @@ def remote_info(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_remote/info' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb index 450384932f..51bdfba321 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb @@ -15,25 +15,35 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Allows to manually change the allocation of individual shards in the cluster. + # Reroute the cluster. + # Manually change the allocation of individual shards in the cluster. + # For example, a shard can be moved from one node to another explicitly, an allocation can be canceled, and an unassigned shard can be explicitly allocated to a specific node. + # It is important to note that after processing any reroute commands Elasticsearch will perform rebalancing as normal (respecting the values of settings such as +cluster.routing.rebalance.enable+) in order to remain in a balanced state. + # For example, if the requested allocation includes moving a shard from node1 to node2 then this may cause a shard to be moved from node2 back to node1 to even things out. + # The cluster can be set to disable allocations using the +cluster.routing.allocation.enable+ setting. + # If allocations are disabled then the only allocations that will be performed are explicit ones given using the reroute command, and consequent allocations due to rebalancing. + # The cluster will attempt to allocate a shard a maximum of +index.allocation.max_retries+ times in a row (defaults to +5+), before giving up and leaving the shard unallocated. + # This scenario can be caused by structural problems such as having an analyzer which refers to a stopwords file which doesn’t exist on all nodes. + # Once the problem has been corrected, allocation can be manually retried by calling the reroute API with the +?retry_failed+ URI query parameter, which will attempt a single retry round for these shards. # - # @option arguments [Boolean] :dry_run Simulate the operation only and return the resulting state - # @option arguments [Boolean] :explain Return an explanation of why the commands can or cannot be executed - # @option arguments [Boolean] :retry_failed Retries allocation of shards that are blocked due to too many subsequent allocation failures - # @option arguments [List] :metric Limit the information returned to the specified metrics. Defaults to all but metadata (options: _all, blocks, metadata, nodes, none, routing_table, master_node, version) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [Boolean] :dry_run If true, then the request simulates the operation. + # It will calculate the result of applying the commands to the current cluster state and return the resulting cluster state after the commands (and rebalancing) have been applied; it will not actually perform the requested changes. + # @option arguments [Boolean] :explain If true, then the response contains an explanation of why the commands can or cannot run. + # @option arguments [String, Array] :metric Limits the information returned to the specified metrics. Server default: all. + # @option arguments [Boolean] :retry_failed If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The definition of `commands` to perform (`move`, `cancel`, `allocate`) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-reroute # def reroute(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.reroute' } @@ -41,7 +51,7 @@ def reroute(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) || {} + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_cluster/reroute' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb index 24d7eb487f..3a08d92ea6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb @@ -15,33 +15,46 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Returns a comprehensive information about the state of the cluster. + # Get the cluster state. + # Get comprehensive information about the state of the cluster. + # The cluster state is an internal data structure which keeps track of a variety of information needed by every node, including the identity and attributes of the other nodes in the cluster; cluster-wide settings; index metadata, including the mapping and settings for each index; the location and status of every shard copy in the cluster. + # The elected master node ensures that every node in the cluster has a copy of the same cluster state. + # This API lets you retrieve a representation of this internal state for debugging or diagnostic purposes. + # You may need to consult the Elasticsearch source code to determine the precise meaning of the response. + # By default the API will route requests to the elected master node since this node is the authoritative source of cluster states. + # You can also retrieve the cluster state held on the node handling the API request by adding the +?local=true+ query parameter. + # Elasticsearch may need to expend significant effort to compute a response to this API in larger clusters, and the response may comprise a very large quantity of data. + # If you use this API repeatedly, your cluster may become unstable. + # WARNING: The response is a representation of an internal data structure. + # Its format is not subject to the same compatibility guarantees as other more stable APIs and may change from version to version. + # Do not query this API using external monitoring tools. + # Instead, obtain the information you require using other more stable cluster APIs. # - # @option arguments [List] :metric Limit the information returned to the specified metrics (options: _all, blocks, metadata, nodes, routing_table, routing_nodes, master_node, version) - # @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String, Array] :metric Limit the information returned to the specified metrics + # @option arguments [String, Array] :index A comma-separated list of index names; use +_all+ or empty string to perform the operation on all indices + # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes +_all+ string or when no indices have been specified) Server default: true. + # @option arguments [String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Number] :wait_for_metadata_version Wait for the metadata version to be equal or greater than the specified metadata version - # @option arguments [Time] :wait_for_timeout The maximum time to wait for wait_for_metadata_version before timing out # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) + # @option arguments [Time] :master_timeout Specify timeout for connection to master Server default: 30s. + # @option arguments [Integer] :wait_for_metadata_version Wait for the metadata version to be equal or greater than the specified metadata version + # @option arguments [Time] :wait_for_timeout The maximum time to wait for wait_for_metadata_version before timing out # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-state # def state(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.state' } - defined_params = %i[metric index].each_with_object({}) do |variable, set_variables| + defined_params = [:metric, :index].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? @@ -57,9 +70,9 @@ def state(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _metric && _index - "_cluster/state/#{Utils.__listify(_metric)}/#{Utils.__listify(_index)}" + "_cluster/state/#{Utils.listify(_metric)}/#{Utils.listify(_index)}" elsif _metric - "_cluster/state/#{Utils.__listify(_metric)}" + "_cluster/state/#{Utils.listify(_metric)}" else '_cluster/state' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb index a960c912f6..894835ee47 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb @@ -15,21 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Cluster module Actions - # Returns high-level overview of cluster statistics. + # Get cluster statistics. + # Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins). # - # @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - # @option arguments [Boolean] :include_remotes Include remote cluster data into the response (default: false) - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String, Array] :node_id Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster. + # @option arguments [Boolean] :include_remotes Include remote cluster data into the response + # @option arguments [Time] :timeout Period to wait for each node to respond. + # If a node does not respond before its timeout expires, the response does not include its stats. + # However, timed out nodes are included in the response’s +_nodes.failed+ property. Defaults to no timeout. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-stats # def stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.stats' } @@ -48,7 +51,7 @@ def stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _node_id - "_cluster/stats/nodes/#{Utils.__listify(_node_id)}" + "_cluster/stats/nodes/#{Utils.listify(_node_id)}" else '_cluster/stats' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb index e2c46f6ffd..11ad544117 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb @@ -15,23 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the last_seen timestamp in the connector document. + # Check in a connector. + # Update the +last_seen+ field in the connector and set it to the current timestamp. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be checked in (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/check-in-connector-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-check-in # def check_in(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.check_in' } @@ -51,7 +52,7 @@ def check_in(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_check_in" + path = "_connector/#{Utils.listify(_connector_id)}/_check_in" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb index a10c9e3058..dd0ea85c7c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb @@ -15,25 +15,29 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Deletes a connector. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Delete a connector. + # Removes a connector and associated sync jobs. + # This is a destructive action that is not recoverable. + # NOTE: This action doesn’t delete any API keys, ingest pipelines, or data indices associated with the connector. + # These need to be removed manually. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be deleted. - # @option arguments [Boolean] :hard If true, the connector doc is deleted. If false, connector doc is marked as deleted (soft-deleted). - # @option arguments [Boolean] :delete_sync_jobs Determines whether associated sync jobs are also deleted. + # @option arguments [String] :connector_id The unique identifier of the connector to be deleted (*Required*) + # @option arguments [Boolean] :delete_sync_jobs A flag indicating if associated sync jobs should be also removed. Defaults to false. + # @option arguments [Boolean] :hard A flag indicating if the connector should be hard deleted. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-delete # def delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.delete' } @@ -53,7 +57,7 @@ def delete(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_DELETE - path = "_connector/#{Utils.__listify(_connector_id)}" + path = "_connector/#{Utils.listify(_connector_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb index 23b7109386..ec737228ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb @@ -15,24 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Returns the details about a connector. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Get a connector. + # Get the details about a connector. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be returned. - # @option arguments [Boolean] :include_deleted A flag indicating whether to return connectors that have been soft-deleted. + # @option arguments [String] :connector_id The unique identifier of the connector (*Required*) + # @option arguments [Boolean] :include_deleted A flag to indicate if the desired connector should be fetched, even if it was soft-deleted. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-get # def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.get' } @@ -52,7 +53,7 @@ def get(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_GET - path = "_connector/#{Utils.__listify(_connector_id)}" + path = "_connector/#{Utils.listify(_connector_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb index e79a2ca64e..88ba43c7a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb @@ -15,29 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Lists all connectors. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Get all connectors. + # Get information about all connectors. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # # @option arguments [Integer] :from Starting offset (default: 0) - # @option arguments [Integer] :size Specifies a max number of results to get (default: 100) - # @option arguments [List] :index_name A comma-separated list of connector index names to fetch connector documents for - # @option arguments [List] :connector_name A comma-separated list of connector names to fetch connector documents for - # @option arguments [List] :service_type A comma-separated list of connector service types to fetch connector documents for - # @option arguments [String] :query A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names - # @option arguments [Boolean] :include_deleted A flag indicating whether to return connectors that have been soft-deleted. + # @option arguments [Integer] :size Specifies a max number of results to get + # @option arguments [String, Array] :index_name A comma-separated list of connector index names to fetch connector documents for + # @option arguments [String, Array] :connector_name A comma-separated list of connector names to fetch connector documents for + # @option arguments [String, Array] :service_type A comma-separated list of connector service types to fetch connector documents for + # @option arguments [Boolean] :include_deleted A flag to indicate if the desired connector should be fetched, even if it was soft-deleted. + # @option arguments [String] :query A wildcard query string that filters connectors with matching name, description or index name # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-list # def list(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.list' } @@ -45,7 +46,7 @@ def list(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_connector' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb index 6e2c055541..391855f16b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb @@ -15,23 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Creates a connector. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Create a connector. + # Connectors are Elasticsearch integrations that bring content from third-party data sources, which can be deployed on Elastic Cloud or hosted on your own infrastructure. + # Elastic managed connectors (Native connectors) are a managed service on Elastic Cloud. + # Self-managed connectors (Connector clients) are self-managed on your infrastructure. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The connector configuration. + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-put # def post(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.post' } @@ -39,7 +42,7 @@ def post(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_connector' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb index 038f37ab3c..56d5d20def 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb @@ -15,24 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Creates or updates a connector. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Create or update a connector. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be created or updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be created or updated. ID is auto-generated if not provided. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The connector configuration. + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-put # def put(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.put' } @@ -51,7 +51,7 @@ def put(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = if _connector_id - "_connector/#{Utils.__listify(_connector_id)}" + "_connector/#{Utils.listify(_connector_id)}" else '_connector' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb index 3a6bcebf48..2fd2d78997 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb @@ -15,23 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Cancels a connector sync job. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Cancel a connector sync job. + # Cancel a connector sync job, which sets the status to cancelling and updates +cancellation_requested_at+ to the current time. + # The connector service is then responsible for setting the status of connector sync jobs to cancelled. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be canceled + # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cancel-connector-sync-job-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-cancel # def sync_job_cancel(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_cancel' } @@ -54,7 +56,7 @@ def sync_job_cancel(arguments = {}) _connector_sync_job_id = arguments.delete(:connector_sync_job_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_cancel" + path = "_connector/_sync_job/#{Utils.listify(_connector_sync_job_id)}/_cancel" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb index 90e935c527..c72c406f3b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb @@ -15,23 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Checks in a connector sync job (refreshes 'last_seen'). + # Check in a connector sync job. + # Check in a connector sync job and set the +last_seen+ field to the current time before updating it in the internal index. + # To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. + # This service runs automatically on Elastic Cloud for Elastic managed connectors. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be checked in + # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be checked in. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/check-in-connector-sync-job-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-check-in # def sync_job_check_in(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_check_in' } @@ -54,7 +57,7 @@ def sync_job_check_in(arguments = {}) _connector_sync_job_id = arguments.delete(:connector_sync_job_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_check_in" + path = "_connector/_sync_job/#{Utils.listify(_connector_sync_job_id)}/_check_in" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb index f524141fc3..7faa95495c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb @@ -15,24 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Claims a connector sync job. + # Claim a connector sync job. + # This action updates the job status to +in_progress+ and sets the +last_seen+ and +started_at+ timestamps to the current time. + # Additionally, it can set the +sync_cursor+ property for the sync job. + # This API is not intended for direct connector management by users. + # It supports the implementation of services that utilize the connector protocol to communicate with Elasticsearch. + # To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. + # This service runs automatically on Elastic Cloud for Elastic managed connectors. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be claimed. + # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Data to claim a sync job. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/claim-connector-sync-job-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-claim # def sync_job_claim(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_claim' } @@ -57,7 +63,7 @@ def sync_job_claim(arguments = {}) _connector_sync_job_id = arguments.delete(:connector_sync_job_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_claim" + path = "_connector/_sync_job/#{Utils.listify(_connector_sync_job_id)}/_claim" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb index 3a7ed141ca..84f9aa2811 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb @@ -15,23 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Deletes a connector sync job. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Delete a connector sync job. + # Remove a connector sync job and its associated data. + # This is a destructive action that is not recoverable. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be deleted. + # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be deleted (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-sync-job-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-delete # def sync_job_delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_delete' } @@ -54,7 +56,7 @@ def sync_job_delete(arguments = {}) _connector_sync_job_id = arguments.delete(:connector_sync_job_id) method = Elasticsearch::API::HTTP_DELETE - path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}" + path = "_connector/_sync_job/#{Utils.listify(_connector_sync_job_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb index 73ed91cbd3..ecf7511397 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb @@ -15,24 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Sets an error for a connector sync job. + # Set a connector sync job error. + # Set the +error+ field for a connector sync job and set its +status+ to +error+. + # To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. + # This service runs automatically on Elastic Cloud for Elastic managed connectors. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to set an error for. + # @option arguments [String] :connector_sync_job_id The unique identifier for the connector sync job. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The error to set in the connector sync job. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/set-connector-sync-job-error-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-error # def sync_job_error(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_error' } @@ -57,7 +60,7 @@ def sync_job_error(arguments = {}) _connector_sync_job_id = arguments.delete(:connector_sync_job_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_error" + path = "_connector/_sync_job/#{Utils.listify(_connector_sync_job_id)}/_error" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb index 22e7554776..43028fd07c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb @@ -15,23 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Returns the details about a connector sync job. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Get a connector sync job. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be returned. + # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-sync-job-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-get # def sync_job_get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_get' } @@ -54,7 +54,7 @@ def sync_job_get(arguments = {}) _connector_sync_job_id = arguments.delete(:connector_sync_job_id) method = Elasticsearch::API::HTTP_GET - path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}" + path = "_connector/_sync_job/#{Utils.listify(_connector_sync_job_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb index 222314a516..507d509fcf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb @@ -15,27 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Lists all connector sync jobs. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Get all connector sync jobs. + # Get information about all stored connector sync jobs listed by their creation date in ascending order. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # # @option arguments [Integer] :from Starting offset (default: 0) - # @option arguments [Integer] :size specifies a max number of results to get (default: 100) - # @option arguments [String] :status Sync job status, which sync jobs are fetched for - # @option arguments [String] :connector_id Id of the connector to fetch the sync jobs for - # @option arguments [List] :job_type A comma-separated list of job types + # @option arguments [Integer] :size Specifies a max number of results to get + # @option arguments [String] :status A sync job status to fetch connector sync jobs for + # @option arguments [String] :connector_id A connector id to fetch connector sync jobs for + # @option arguments [Syncjobtype] :job_type A comma-separated list of job types to fetch the sync jobs for # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-sync-jobs-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-list # def sync_job_list(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_list' } @@ -43,7 +44,7 @@ def sync_job_list(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_connector/_sync_job' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb index a455a80281..117c50cc15 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb @@ -15,23 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Creates a connector sync job. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Create a connector sync job. + # Create a connector sync job document in the internal index and initialize its counters and timestamps with default values. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The connector sync job data. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-sync-job-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-post # def sync_job_post(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_post' } @@ -41,7 +42,7 @@ def sync_job_post(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_connector/_sync_job' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb index 772a28cf31..ff1f9f8fe3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb @@ -15,24 +15,29 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the stats fields in the connector sync job document. + # Set the connector sync job stats. + # Stats include: +deleted_document_count+, +indexed_document_count+, +indexed_document_volume+, and +total_document_count+. + # You can also update +last_seen+. + # This API is mainly used by the connector service for updating sync job information. + # To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. + # This service runs automatically on Elastic Cloud for Elastic managed connectors. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be updated. + # @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The stats to update for the connector sync job. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/set-connector-sync-job-stats-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-update-stats # def sync_job_update_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_update_stats' } @@ -57,7 +62,7 @@ def sync_job_update_stats(arguments = {}) _connector_sync_job_id = arguments.delete(:connector_sync_job_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/_sync_job/#{Utils.__listify(_connector_sync_job_id)}/_stats" + path = "_connector/_sync_job/#{Utils.listify(_connector_sync_job_id)}/_stats" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb index 975c7aa3d7..f81d0dbf08 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb @@ -15,23 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Activates the draft filtering rules if they are in a validated state. + # Activate the connector draft filter. + # Activates the valid draft filtering for a connector. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering # def update_active_filtering(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_active_filtering' } @@ -51,7 +52,7 @@ def update_active_filtering(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_filtering/_activate" + path = "_connector/#{Utils.listify(_connector_id)}/_filtering/_activate" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb index a44130824e..f1ba538fa2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb @@ -15,24 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the API key id and/or API key secret id fields in the connector document. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Update the connector API key ID. + # Update the +api_key_id+ and +api_key_secret_id+ fields of a connector. + # You can specify the ID of the API key used for authorization and the ID of the connector secret where the API key is stored. + # The connector secret ID is required only for Elastic managed (native) connectors. + # Self-managed connectors (connector clients) do not use this field. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An object containing the connector's API key id and/or Connector Secret document id for that API key. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-api-key-id-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-api-key-id # def update_api_key_id(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_api_key_id' } @@ -53,7 +57,7 @@ def update_api_key_id(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_api_key_id" + path = "_connector/#{Utils.listify(_connector_id)}/_api_key_id" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb index fc51bd4315..8143806c0a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb @@ -15,24 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the connector configuration. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Update the connector configuration. + # Update the configuration field in the connector document. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Mapping between field names to configuration. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-configuration-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-configuration # def update_configuration(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_configuration' } @@ -53,7 +54,7 @@ def update_configuration(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_configuration" + path = "_connector/#{Utils.listify(_connector_id)}/_configuration" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb index eec511fc21..7a415e1650 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb @@ -15,24 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the error field in the connector document. + # Update the connector error field. + # Set the error field for the connector. + # If the error provided in the request body is non-null, the connector’s status is updated to error. + # Otherwise, if the error is reset to null, the connector status is updated to connected. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An object containing the connector's error. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-error-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-error # def update_error(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_error' } @@ -53,7 +56,7 @@ def update_error(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_error" + path = "_connector/#{Utils.listify(_connector_id)}/_error" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb index 531a7c2ad1..6187ba7c18 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb @@ -15,24 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the connector features in the connector document. + # Update the connector features. + # Update the connector features in the connector document. + # This API can be used to control the following aspects of a connector: + # * document-level security + # * incremental syncs + # * advanced sync rules + # * basic sync rules + # Normally, the running connector service automatically manages these features. + # However, you can use this API to override the default behavior. + # To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. + # This service runs automatically on Elastic Cloud for Elastic managed connectors. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An object containing the connector's features definition. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-features-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-features # def update_features(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_features' } @@ -53,7 +63,7 @@ def update_features(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_features" + path = "_connector/#{Utils.listify(_connector_id)}/_features" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb index 314a30e6d7..af27874e06 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb @@ -15,24 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the filtering field in the connector document. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Update the connector filtering. + # Update the draft filtering configuration of a connector and marks the draft validation state as edited. + # The filtering draft is activated once validated by the running Elastic connector service. + # The filtering property is used to configure sync rules (both basic and advanced) for a connector. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body A list of connector filtering configurations. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering # def update_filtering(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_filtering' } @@ -53,7 +56,7 @@ def update_filtering(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_filtering" + path = "_connector/#{Utils.listify(_connector_id)}/_filtering" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb index b42a75b4db..33dc67608d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb @@ -15,24 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the validation info of the draft filtering rules. + # Update the connector draft filtering validation. + # Update the draft filtering validation info for a connector. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Validation info for the draft filtering rules (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-validation-api.html # def update_filtering_validation(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_filtering_validation' } @@ -53,7 +54,7 @@ def update_filtering_validation(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_filtering/_validation" + path = "_connector/#{Utils.listify(_connector_id)}/_filtering/_validation" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb index ce76d01503..e97b28fa1d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb @@ -15,24 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the index name of the connector. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Update the connector index name. + # Update the +index_name+ field of a connector, specifying the index where the data ingested by the connector is stored. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An object containing the connector's index name. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-index-name-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-index-name # def update_index_name(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_index_name' } @@ -53,7 +54,7 @@ def update_index_name(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_index_name" + path = "_connector/#{Utils.listify(_connector_id)}/_index_name" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb index ecdac5b2a7..059e6b4c0c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb @@ -15,24 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the name and/or description fields in the connector document. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Update the connector name and description. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An object containing the connector's name and/or description. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-name-description-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-name # def update_name(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_name' } @@ -53,7 +53,7 @@ def update_name(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_name" + path = "_connector/#{Utils.listify(_connector_id)}/_name" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb index 81779e6e38..7ec801f72c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb @@ -15,24 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the is_native flag of the connector. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Update the connector is_native flag. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An object containing the connector's is_native flag (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/connector-apis.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-native-api.html # def update_native(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_native' } @@ -53,7 +53,7 @@ def update_native(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_native" + path = "_connector/#{Utils.listify(_connector_id)}/_native" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb index e5f7f6ee23..87c4b25c26 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb @@ -15,24 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the pipeline field in the connector document. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Update the connector pipeline. + # When you create a new connector, the configuration of an ingest pipeline is populated with default settings. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An object with connector ingest pipeline configuration. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-pipeline-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-pipeline # def update_pipeline(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_pipeline' } @@ -53,7 +54,7 @@ def update_pipeline(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_pipeline" + path = "_connector/#{Utils.listify(_connector_id)}/_pipeline" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb index 2c87061c26..b76fc77541 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb @@ -15,24 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the scheduling field in the connector document. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Update the connector scheduling. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An object containing the connector's scheduling configuration. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-scheduling-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-scheduling # def update_scheduling(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_scheduling' } @@ -53,7 +53,7 @@ def update_scheduling(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_scheduling" + path = "_connector/#{Utils.listify(_connector_id)}/_scheduling" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb index 757b43c8ec..2fc43dfca2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb @@ -15,24 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the service type of the connector. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Update the connector service type. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An object containing the connector's service type. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-service-type-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-service-type # def update_service_type(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_service_type' } @@ -53,7 +53,7 @@ def update_service_type(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_service_type" + path = "_connector/#{Utils.listify(_connector_id)}/_service_type" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb index 8b1ef81f37..d2ac66676f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb @@ -15,24 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Connector module Actions - # Updates the status of the connector. + # Update the connector status. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :connector_id The unique identifier of the connector to be updated. + # @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An object containing the connector's status. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-status-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-status # def update_status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_status' } @@ -53,7 +53,7 @@ def update_status(arguments = {}) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT - path = "_connector/#{Utils.__listify(_connector_id)}/_status" + path = "_connector/#{Utils.listify(_connector_id)}/_status" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb index 393bbb7fda..f6f975b110 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb @@ -15,33 +15,57 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns number of documents matching a query. + # Count search results. + # Get the number of documents matching a query. + # The query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body. + # The query is optional. When no query is provided, the API uses +match_all+ to count all the documents. + # The count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices. + # The operation is broadcast across all shards. + # For each shard ID group, a replica is chosen and the search is run against it. + # This means that replicas increase the scalability of the count. # - # @option arguments [List] :index A comma-separated list of indices to restrict the results - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Number] :min_score Include only documents with a specific `_score` value in the result - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [List] :routing A comma-separated list of specific routing values - # @option arguments [String] :q Query in the Lucene query string syntax - # @option arguments [String] :analyzer The analyzer to use for the query string - # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false) - # @option arguments [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR) - # @option arguments [String] :df The field to use as default where no field prefix is given in the query string - # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - # @option arguments [Number] :terminate_after The maximum count for each shard, upon reaching which the query execution will terminate early + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases to search. + # It supports wildcards (+*+). + # To search all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. + # For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true. + # @option arguments [String] :analyzer The analyzer to use for the query string. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+. + # This parameter can be used only when the +q+ query string parameter is specified. Server default: OR. + # @option arguments [String] :df The field to use as a default when no field prefix is given in the query string. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [String, Array] :expand_wildcards The type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # It supports comma-separated values, such as +open,hidden+. Server default: open. + # @option arguments [Boolean] :ignore_throttled If +true+, concrete, expanded, or aliased indices are ignored when frozen. Server default: true. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [Float] :min_score The minimum +_score+ value that documents must have to be included in the result. + # @option arguments [String] :preference The node or shard the operation should be performed on. + # By default, it is random. + # @option arguments [String] :routing A custom value used to route operations to a specific shard. + # @option arguments [Integer] :terminate_after The maximum number of documents to collect for each shard. + # If a query reaches this limit, Elasticsearch terminates the query early. + # Elasticsearch collects documents before sorting.IMPORTANT: Use with caution. + # Elasticsearch applies this parameter to each shard handling the request. + # When possible, let Elasticsearch perform early termination automatically. + # Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + # @option arguments [String] :q The query in Lucene query string syntax. This parameter cannot be used with a request body. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body A query to restrict the results specified with the Query DSL (optional) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-count # def count(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'count' } @@ -64,11 +88,11 @@ def count(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.__listify(_index)}/_count" - else - '_count' - end + path = if _index + "#{Utils.listify(_index)}/_count" + else + '_count' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb index cc1cc723a6..98c5805763 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb @@ -15,35 +15,97 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Creates a new document in the index. + # Create a new document in the index. + # You can index a new JSON document with the +//_doc/+ or +//_create/<_id>+ APIs + # Using +_create+ guarantees that the document is indexed only if it does not already exist. + # It returns a 409 response when a document with a same ID already exists in the index. + # To update an existing document, you must use the +//_doc/+ API. + # If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias: + # * To add a document using the +PUT //_create/<_id>+ or +POST //_create/<_id>+ request formats, you must have the +create_doc+, +create+, +index+, or +write+ index privilege. + # * To automatically create a data stream or index with this API request, you must have the +auto_configure+, +create_index+, or +manage+ index privilege. + # Automatic data stream creation requires a matching index template with data stream enabled. + # **Automatically create data streams and indices** + # If the request's target doesn't exist and matches an index template with a +data_stream+ definition, the index operation automatically creates the data stream. + # If the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates. + # NOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation. + # If no mapping exists, the index operation creates a dynamic mapping. + # By default, new fields and objects are automatically added to the mapping if needed. + # Automatic index creation is controlled by the +action.auto_create_index+ setting. + # If it is +true+, any index can be created automatically. + # You can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to +false+ to turn off automatic index creation entirely. + # Specify a comma-separated list of patterns you want to allow or prefix each pattern with +++ or +-+ to indicate whether it should be allowed or blocked. + # When a list is specified, the default behaviour is to disallow. + # NOTE: The +action.auto_create_index+ setting affects the automatic creation of indices only. + # It does not affect the creation of data streams. + # **Routing** + # By default, shard placement — or routing — is controlled by using a hash of the document's ID value. + # For more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the +routing+ parameter. + # When setting up explicit mapping, you can also use the +_routing+ field to direct the index operation to extract the routing value from the document itself. + # This does come at the (very minimal) cost of an additional document parsing pass. + # If the +_routing+ mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted. + # NOTE: Data streams do not support custom routing unless they were created with the +allow_custom_routing+ setting enabled in the template. + # **Distributed** + # The index operation is directed to the primary shard based on its route and performed on the actual node containing this shard. + # After the primary shard completes the operation, if needed, the update is distributed to applicable replicas. + # **Active shards** + # To improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation. + # If the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs. + # By default, write operations only wait for the primary shards to be active before proceeding (that is to say +wait_for_active_shards+ is +1+). + # This default can be overridden in the index settings dynamically by setting +index.write.wait_for_active_shards+. + # To alter this behavior per operation, use the +wait_for_active_shards request+ parameter. + # Valid values are all or any positive integer up to the total number of configured copies per shard in the index (which is +number_of_replicas++1). + # Specifying a negative value or a number greater than the number of shard copies will throw an error. + # For example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes). + # If you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding. + # This means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data. + # If +wait_for_active_shards+ is set on the request to +3+ (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding. + # This requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard. + # However, if you set +wait_for_active_shards+ to +all+ (or to +4+, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index. + # The operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard. + # It is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts. + # After the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary. + # The +_shards+ section of the API response reveals the number of shard copies on which replication succeeded and failed. # - # Returns a 409 response when a document with a same ID already exists in the index. - # - # @option arguments [String] :id Document ID - # @option arguments [String] :index The name of the index - # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (options: true, false, wait_for) - # @option arguments [String] :routing Specific routing value - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Number] :version Explicit version number for concurrency control - # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) - # @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with - # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Defaults to true. + # @option arguments [String] :id A unique identifier for the document. + # To automatically generate a document ID, use the +POST //_doc/+ request format. (*Required*) + # @option arguments [String] :index The name of the data stream or index to target. + # If the target doesn't exist and matches the name or wildcard (+*+) pattern of an index template with a +data_stream+ definition, this request creates the data stream. + # If the target doesn't exist and doesn’t match a data stream template, this request creates the index. (*Required*) + # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Server default: true. + # @option arguments [String] :pipeline The ID of the pipeline to use to preprocess incoming documents. + # If the index has a default ingest pipeline specified, setting the value to +_none+ turns off the default ingest pipeline for this request. + # If a final pipeline is configured, it will always run regardless of the value of this parameter. + # @option arguments [String] :refresh If +true+, Elasticsearch refreshes the affected shards to make this operation visible to search. + # If +wait_for+, it waits for a refresh to make this operation visible to search. + # If +false+, it does nothing with refreshes. Server default: false. + # @option arguments [String] :routing A custom value that is used to route operations to a specific shard. + # @option arguments [Time] :timeout The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. + # Elasticsearch waits for at least the specified timeout period before failing. + # The actual wait time could be longer, particularly when multiple waits occur.This parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs. + # Some reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation. + # By default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error. + # The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m. + # @option arguments [Integer] :version The explicit version number for concurrency control. + # It must be a non-negative long number. + # @option arguments [String] :version_type The version type. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # You can set it to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). + # The default value of +1+ means it waits for each primary shard to be active. Server default: 1. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The document (*Required*) + # @option arguments [Hash] :body document # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create # def create(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'create' } - defined_params = %i[index id].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :id].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? diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb index b3537c7ad1..8f3b605a18 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb @@ -15,20 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module CrossClusterReplication module Actions - # Deletes auto-follow patterns. + # Delete auto-follow patterns. + # Delete a collection of cross-cluster replication auto-follow patterns. # - # @option arguments [String] :name The name of the auto follow pattern. - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [String] :name The auto-follow pattern collection to delete. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-delete-auto-follow-pattern # def delete_auto_follow_pattern(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.delete_auto_follow_pattern' } @@ -48,7 +51,7 @@ def delete_auto_follow_pattern(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = "_ccr/auto_follow/#{Utils.__listify(_name)}" + path = "_ccr/auto_follow/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb index c1fffadc12..2dd331d743 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb @@ -15,22 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module CrossClusterReplication module Actions - # Creates a new follower index configured to follow the referenced leader index. + # Create a follower. + # Create a cross-cluster replication follower index that follows a specific leader index. + # When the API returns, the follower index exists and cross-cluster replication starts replicating operations from the leader index to the follower index. # - # @option arguments [String] :index The name of the follower index - # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [String] :index The name of the follower index. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [Integer, String] :wait_for_active_shards Specifies the number of shards to wait on being active before responding. This defaults to waiting on none of the shards to be + # active. + # A shard must be restored from the leader index before being active. Restoring a follower shard requires transferring all the + # remote Lucene segment files to the follower index. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The name of the leader index and other optional ccr related parameters (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow # def follow(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.follow' } @@ -46,12 +51,12 @@ def follow(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_PUT - path = "#{Utils.__listify(_index)}/_ccr/follow" + path = "#{Utils.listify(_index)}/_ccr/follow" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb index 7ba6a422b0..9aebeda6dd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb @@ -15,20 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module CrossClusterReplication module Actions - # Retrieves information about all follower indices, including parameters and status for each follower index + # Get follower information. + # Get information about all cross-cluster replication follower indices. + # For example, the results include follower index names, leader index names, replication options, and whether the follower indices are active or paused. # - # @option arguments [List] :index A comma-separated list of index patterns; use `_all` to perform the operation on all indices - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [String, Array] :index A comma-delimited list of follower index patterns. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow-info # def follow_info(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.follow_info' } @@ -43,12 +47,12 @@ def follow_info(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET - path = "#{Utils.__listify(_index)}/_ccr/info" + path = "#{Utils.listify(_index)}/_ccr/info" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb index 85e45f1259..b927c737a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb @@ -15,20 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module CrossClusterReplication module Actions - # Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices. + # Get follower stats. + # Get cross-cluster replication follower stats. + # The API returns shard-level stats about the "following tasks" associated with each shard for the specified indices. # - # @option arguments [List] :index A comma-separated list of index patterns; use `_all` to perform the operation on all indices - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String, Array] :index A comma-delimited list of index patterns. (*Required*) + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow-stats # def follow_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.follow_stats' } @@ -43,12 +46,12 @@ def follow_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET - path = "#{Utils.__listify(_index)}/_ccr/stats" + path = "#{Utils.listify(_index)}/_ccr/stats" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb index aa3726b0b6..d9089e2744 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb @@ -15,21 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module CrossClusterReplication module Actions - # Removes the follower retention leases from the leader. + # Forget a follower. + # Remove the cross-cluster replication follower retention leases from the leader. + # A following index takes out retention leases on its leader index. + # These leases are used to increase the likelihood that the shards of the leader index retain the history of operations that the shards of the following index need to run replication. + # When a follower index is converted to a regular index by the unfollow API (either by directly calling the API or by index lifecycle management tasks), these leases are removed. + # However, removal of the leases can fail, for example when the remote cluster containing the leader index is unavailable. + # While the leases will eventually expire on their own, their extended existence can cause the leader index to hold more history than necessary and prevent index lifecycle management from performing some operations on the leader index. + # This API exists to enable manually removing the leases when the unfollow API is unable to do so. + # NOTE: This API does not stop replication by a following index. If you use this API with a follower index that is still actively following, the following index will add back retention leases on the leader. + # The only purpose of this API is to handle the case of failure to remove the following retention leases after the unfollow API is invoked. # - # @option arguments [String] :index the name of the leader index for which specified follower retention leases should be removed - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :index the name of the leader index for which specified follower retention leases should be removed (*Required*) + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-forget-follower # def forget_follower(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.forget_follower' } @@ -45,12 +54,12 @@ def forget_follower(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_ccr/forget_follower" + path = "#{Utils.listify(_index)}/_ccr/forget_follower" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb index ea4f844ef9..55bbeabe8e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb @@ -15,20 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module CrossClusterReplication module Actions - # Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection. + # Get auto-follow patterns. + # Get cross-cluster replication auto-follow patterns. # - # @option arguments [String] :name The name of the auto follow pattern. - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [String] :name The auto-follow pattern collection that you want to retrieve. + # If you do not specify a name, the API returns information for all collections. + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-get-auto-follow-pattern-1 # def get_auto_follow_pattern(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.get_auto_follow_pattern' } @@ -47,7 +51,7 @@ def get_auto_follow_pattern(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_ccr/auto_follow/#{Utils.__listify(_name)}" + "_ccr/auto_follow/#{Utils.listify(_name)}" else '_ccr/auto_follow' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb index 573bd73ad4..8a216016fe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb @@ -15,20 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module CrossClusterReplication module Actions - # Pauses an auto-follow pattern + # Pause an auto-follow pattern. + # Pause a cross-cluster replication auto-follow pattern. + # When the API returns, the auto-follow pattern is inactive. + # New indices that are created on the remote cluster and match the auto-follow patterns are ignored. + # You can resume auto-following with the resume auto-follow pattern API. + # When it resumes, the auto-follow pattern is active again and automatically configures follower indices for newly created indices on the remote cluster that match its patterns. + # Remote indices that were created while the pattern was paused will also be followed, unless they have been deleted or closed in the interim. # - # @option arguments [String] :name The name of the auto follow pattern that should pause discovering new indices to follow. - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [String] :name The name of the auto-follow pattern to pause. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-pause-auto-follow-pattern # def pause_auto_follow_pattern(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.pause_auto_follow_pattern' } @@ -48,7 +56,7 @@ def pause_auto_follow_pattern(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST - path = "_ccr/auto_follow/#{Utils.__listify(_name)}/pause" + path = "_ccr/auto_follow/#{Utils.listify(_name)}/pause" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb index 275bd1675e..ded431f8cf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb @@ -15,20 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module CrossClusterReplication module Actions - # Pauses a follower index. The follower index will not fetch any additional operations from the leader index. + # Pause a follower. + # Pause a cross-cluster replication follower index. + # The follower index will not fetch any additional operations from the leader index. + # You can resume following with the resume follower API. + # You can pause and resume a follower index to change the configuration of the following task. # - # @option arguments [String] :index The name of the follower index that should pause following its leader index. - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [String] :index The name of the follower index. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-pause-follow # def pause_follow(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.pause_follow' } @@ -43,12 +49,12 @@ def pause_follow(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_ccr/pause_follow" + path = "#{Utils.listify(_index)}/_ccr/pause_follow" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb index 4ea1a7a754..a539d5d5b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb @@ -15,21 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module CrossClusterReplication module Actions - # Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices. + # Create or update auto-follow patterns. + # Create a collection of cross-cluster replication auto-follow patterns for a remote cluster. + # Newly created indices on the remote cluster that match any of the patterns are automatically configured as follower indices. + # Indices on the remote cluster that were created before the auto-follow pattern was created will not be auto-followed even if they match the pattern. + # This API can also be used to update auto-follow patterns. + # NOTE: Follower indices that were configured automatically before updating an auto-follow pattern will remain unchanged even if they do not match against the new patterns. # - # @option arguments [String] :name The name of the auto follow pattern. - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [String] :name The name of the collection of auto-follow patterns. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The specification of the auto follow pattern (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-put-auto-follow-pattern # def put_auto_follow_pattern(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.put_auto_follow_pattern' } @@ -50,7 +55,7 @@ def put_auto_follow_pattern(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = "_ccr/auto_follow/#{Utils.__listify(_name)}" + path = "_ccr/auto_follow/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb index 2a979f9add..03aece6b91 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb @@ -15,20 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module CrossClusterReplication module Actions - # Resumes an auto-follow pattern that has been paused + # Resume an auto-follow pattern. + # Resume a cross-cluster replication auto-follow pattern that was paused. + # The auto-follow pattern will resume configuring following indices for newly created indices that match its patterns on the remote cluster. + # Remote indices created while the pattern was paused will also be followed unless they have been deleted or closed in the interim. # - # @option arguments [String] :name The name of the auto follow pattern to resume discovering new indices to follow. - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [String] :name The name of the auto-follow pattern to resume. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-resume-auto-follow-pattern # def resume_auto_follow_pattern(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.resume_auto_follow_pattern' } @@ -48,7 +53,7 @@ def resume_auto_follow_pattern(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST - path = "_ccr/auto_follow/#{Utils.__listify(_name)}/resume" + path = "_ccr/auto_follow/#{Utils.listify(_name)}/resume" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb index f172d59a88..228c8b4767 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb @@ -15,21 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module CrossClusterReplication module Actions - # Resumes a follower index that has been paused + # Resume a follower. + # Resume a cross-cluster replication follower index that was paused. + # The follower index could have been paused with the pause follower API. + # Alternatively it could be paused due to replication that cannot be retried due to failures during following tasks. + # When this API returns, the follower index will resume fetching operations from the leader index. # - # @option arguments [String] :index The name of the follow index to resume following. - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [String] :index The name of the follow index to resume following. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The name of the leader index and other optional ccr related parameters + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-resume-follow # def resume_follow(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.resume_follow' } @@ -44,12 +48,12 @@ def resume_follow(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_ccr/resume_follow" + path = "#{Utils.listify(_index)}/_ccr/resume_follow" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb index 276ce44b34..b02efbb900 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb @@ -15,20 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module CrossClusterReplication module Actions - # Gets all stats related to cross-cluster replication. + # Get cross-cluster replication stats. + # This API returns stats about auto-following and the same shard-level stats as the get follower stats API. # - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-stats # def stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.stats' } @@ -36,7 +39,7 @@ def stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_ccr/stats' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb index 9719fd23a4..3329aa5553 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb @@ -15,20 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module CrossClusterReplication module Actions - # Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication. + # Unfollow an index. + # Convert a cross-cluster replication follower index to a regular index. + # The API stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication. + # The follower index must be paused and closed before you call the unfollow API. # - # @option arguments [String] :index The name of the follower index that should be turned into a regular index. - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [String] :index The name of the follower index. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-unfollow # def unfollow(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.unfollow' } @@ -43,12 +48,12 @@ def unfollow(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_ccr/unfollow" + path = "#{Utils.listify(_index)}/_ccr/unfollow" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb index 82810e3a02..e65a167c2c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb @@ -15,22 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module DanglingIndices module Actions - # Deletes the specified dangling index + # Delete a dangling index. + # If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling. + # For example, this can happen if you delete more than +cluster.indices.tombstones.size+ indices while an Elasticsearch node is offline. # - # @option arguments [String] :index_uuid The UUID of the dangling index - # @option arguments [Boolean] :accept_data_loss Must be set to true in order to delete the dangling index - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :index_uuid The UUID of the index to delete. Use the get dangling indices API to find the UUID. (*Required*) + # @option arguments [Boolean] :accept_data_loss This parameter must be set to true to acknowledge that it will no longer be possible to recove data from the dangling index. (*Required*) # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-delete-dangling-index # def delete_dangling_index(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'dangling_indices.delete_dangling_index' } @@ -50,7 +52,7 @@ def delete_dangling_index(arguments = {}) _index_uuid = arguments.delete(:index_uuid) method = Elasticsearch::API::HTTP_DELETE - path = "_dangling/#{Utils.__listify(_index_uuid)}" + path = "_dangling/#{Utils.listify(_index_uuid)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb index 3806639cb2..80a63c15c0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb @@ -15,22 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module DanglingIndices module Actions - # Imports the specified dangling index + # Import a dangling index. + # If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling. + # For example, this can happen if you delete more than +cluster.indices.tombstones.size+ indices while an Elasticsearch node is offline. # - # @option arguments [String] :index_uuid The UUID of the dangling index - # @option arguments [Boolean] :accept_data_loss Must be set to true in order to import the dangling index - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :index_uuid The UUID of the index to import. Use the get dangling indices API to locate the UUID. (*Required*) + # @option arguments [Boolean] :accept_data_loss This parameter must be set to true to import a dangling index. + # Because Elasticsearch cannot know where the dangling index data came from or determine which shard copies are fresh and which are stale, it cannot guarantee that the imported data represents the latest state of the index when it was last in the cluster. (*Required*) # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-import-dangling-index # def import_dangling_index(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'dangling_indices.import_dangling_index' } @@ -50,7 +53,7 @@ def import_dangling_index(arguments = {}) _index_uuid = arguments.delete(:index_uuid) method = Elasticsearch::API::HTTP_POST - path = "_dangling/#{Utils.__listify(_index_uuid)}" + path = "_dangling/#{Utils.listify(_index_uuid)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb index a46ca9851c..15b29475b0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb @@ -15,18 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module DanglingIndices module Actions - # Returns all dangling indices. + # Get the dangling indices. + # If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling. + # For example, this can happen if you delete more than +cluster.indices.tombstones.size+ indices while an Elasticsearch node is offline. + # Use this API to list dangling indices, which you can then import or delete. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-list-dangling-indices # def list_dangling_indices(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'dangling_indices.list_dangling_indices' } @@ -34,7 +37,7 @@ def list_dangling_indices(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_dangling' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb index 3d0505817f..bcea1d26e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb @@ -15,32 +15,63 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Removes a document from the index. + # Delete a document. + # Remove a JSON document from the specified index. + # NOTE: You cannot send deletion requests directly to a data stream. + # To delete a document in a data stream, you must target the backing index containing the document. + # **Optimistic concurrency control** + # Delete operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the +if_seq_no+ and +if_primary_term+ parameters. + # If a mismatch is detected, the operation will result in a +VersionConflictException+ and a status code of +409+. + # **Versioning** + # Each document indexed is versioned. + # When deleting a document, the version can be specified to make sure the relevant document you are trying to delete is actually being deleted and it has not changed in the meantime. + # Every write operation run on a document, deletes included, causes its version to be incremented. + # The version number of a deleted document remains available for a short time after deletion to allow for control of concurrent operations. + # The length of time for which a deleted document's version remains available is determined by the +index.gc_deletes+ index setting. + # **Routing** + # If routing is used during indexing, the routing value also needs to be specified to delete a document. + # If the +_routing+ mapping is set to +required+ and no routing value is specified, the delete API throws a +RoutingMissingException+ and rejects the request. + # For example: + # + + # DELETE /my-index-000001/_doc/1?routing=shard-1 + # + + # This request deletes the document with ID 1, but it is routed based on the user. + # The document is not deleted if the correct routing is not specified. + # **Distributed** + # The delete operation gets hashed into a specific shard ID. + # It then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group. # - # @option arguments [String] :id The document ID - # @option arguments [String] :index The name of the index - # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (options: true, false, wait_for) - # @option arguments [String] :routing Specific routing value - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Number] :if_seq_no only perform the delete operation if the last operation that has changed the document has the specified sequence number - # @option arguments [Number] :if_primary_term only perform the delete operation if the last operation that has changed the document has the specified primary term - # @option arguments [Number] :version Explicit version number for concurrency control - # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) + # @option arguments [String] :id A unique identifier for the document. (*Required*) + # @option arguments [String] :index The name of the target index. (*Required*) + # @option arguments [Integer] :if_primary_term Only perform the operation if the document has this primary term. + # @option arguments [Integer] :if_seq_no Only perform the operation if the document has this sequence number. + # @option arguments [String] :refresh If +true+, Elasticsearch refreshes the affected shards to make this operation visible to search. + # If +wait_for+, it waits for a refresh to make this operation visible to search. + # If +false+, it does nothing with refreshes. Server default: false. + # @option arguments [String] :routing A custom value used to route operations to a specific shard. + # @option arguments [Time] :timeout The period to wait for active shards.This parameter is useful for situations where the primary shard assigned to perform the delete operation might not be available when the delete operation runs. + # Some reasons for this might be that the primary shard is currently recovering from a store or undergoing relocation. + # By default, the delete operation will wait on the primary shard to become available for up to 1 minute before failing and responding with an error. Server default: 1m. + # @option arguments [Integer] :version An explicit version number for concurrency control. + # It must match the current version of the document for the request to succeed. + # @option arguments [String] :version_type The version type. + # @option arguments [Integer, String] :wait_for_active_shards The minimum number of shard copies that must be active before proceeding with the operation. + # You can set it to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). + # The default value of +1+ means it waits for each primary shard to be active. Server default: 1. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete # def delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'delete' } - defined_params = %i[index id].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :id].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? @@ -58,11 +89,11 @@ def delete(arguments = {}) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_DELETE - path = "#{Utils.__listify(_index)}/_doc/#{Utils.__listify(_id)}" + path = "#{Utils.listify(_index)}/_doc/#{Utils.listify(_id)}" params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb index 395cd50618..edc6d85cf8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb @@ -15,48 +15,130 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Deletes documents matching the provided query. + # Delete documents. + # Deletes documents that match the specified query. + # If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: + # * +read+ + # * +delete+ or +write+ + # You can specify the query criteria in the request URI or the request body using the same syntax as the search API. + # When you submit a delete by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and deletes matching documents using internal versioning. + # If a document changes between the time that the snapshot is taken and the delete operation is processed, it results in a version conflict and the delete operation fails. + # NOTE: Documents with a version equal to 0 cannot be deleted using delete by query because internal versioning does not support 0 as a valid version number. + # While processing a delete by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents to delete. + # A bulk delete request is performed for each batch of matching documents. + # If a search or bulk request is rejected, the requests are retried up to 10 times, with exponential back off. + # If the maximum retry limit is reached, processing halts and all failed requests are returned in the response. + # Any delete requests that completed successfully still stick, they are not rolled back. + # You can opt to count version conflicts instead of halting and returning by setting +conflicts+ to +proceed+. + # Note that if you opt to count version conflicts the operation could attempt to delete more documents from the source than +max_docs+ until it has successfully deleted +max_docs documents+, or it has gone through every document in the source query. + # **Throttling delete requests** + # To control the rate at which delete by query issues batches of delete operations, you can set +requests_per_second+ to any positive decimal number. + # This pads each batch with a wait time to throttle the rate. + # Set +requests_per_second+ to +-1+ to disable throttling. + # Throttling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account. + # The padding time is the difference between the batch size divided by the +requests_per_second+ and the time spent writing. + # By default the batch size is +1000+, so if +requests_per_second+ is set to +500+: + # + + # target_time = 1000 / 500 per second = 2 seconds + # wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds + # + + # Since the batch is issued as a single +_bulk+ request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set. + # This is "bursty" instead of "smooth". + # **Slicing** + # Delete by query supports sliced scroll to parallelize the delete process. + # This can improve efficiency and provide a convenient way to break the request down into smaller parts. + # Setting +slices+ to +auto+ lets Elasticsearch choose the number of slices to use. + # This setting will use one slice per shard, up to a certain limit. + # If there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards. + # Adding slices to the delete by query operation creates sub-requests which means it has some quirks: + # * You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices. + # * Fetching the status of the task for the request with slices only contains the status of completed slices. + # * These sub-requests are individually addressable for things like cancellation and rethrottling. + # * Rethrottling the request with +slices+ will rethrottle the unfinished sub-request proportionally. + # * Canceling the request with +slices+ will cancel each sub-request. + # * Due to the nature of +slices+ each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution. + # * Parameters like +requests_per_second+ and +max_docs+ on a request with +slices+ are distributed proportionally to each sub-request. Combine that with the earlier point about distribution being uneven and you should conclude that using +max_docs+ with +slices+ might not result in exactly +max_docs+ documents being deleted. + # * Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time. + # If you're slicing manually or otherwise tuning automatic slicing, keep in mind that: + # * Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many +slices+ hurts performance. Setting +slices+ higher than the number of shards generally does not improve efficiency and adds overhead. + # * Delete performance scales linearly across available resources with the number of slices. + # Whether query or delete performance dominates the runtime depends on the documents being reindexed and cluster resources. + # **Cancel a delete by query operation** + # Any delete by query can be canceled using the task cancel API. For example: + # + + # POST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel + # + + # The task ID can be found by using the get tasks API. + # Cancellation should happen quickly but might take a few seconds. + # The get task status API will continue to list the delete by query task until this task checks that it has been cancelled and terminates itself. # - # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - # @option arguments [String] :analyzer The analyzer to use for the query string - # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false) - # @option arguments [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR) - # @option arguments [String] :df The field to use as default where no field prefix is given in the query string - # @option arguments [Number] :from Starting offset (default: 0) - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :conflicts What to do when the delete by query hits version conflicts? (options: abort, proceed) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [String] :q Query in the Lucene query string syntax - # @option arguments [List] :routing A comma-separated list of specific routing values - # @option arguments [Time] :scroll Specify how long a consistent view of the index should be maintained for scrolled search - # @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch) - # @option arguments [Time] :search_timeout Explicit timeout for each search request. Defaults to no timeout. - # @option arguments [Number] :max_docs Maximum number of documents to process (default: all documents) - # @option arguments [List] :sort A comma-separated list of : pairs - # @option arguments [Number] :terminate_after The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. - # @option arguments [List] :stats Specific 'tag' of the request for logging and statistical purposes - # @option arguments [Boolean] :version Specify whether to return document version as part of a hit - # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to index level setting - # @option arguments [Boolean] :refresh Should the affected indexes be refreshed? - # @option arguments [Time] :timeout Time each individual bulk request should wait for shards that are unavailable. - # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - # @option arguments [Number] :scroll_size Size on the scroll request powering the delete by query - # @option arguments [Boolean] :wait_for_completion Should the request should block until the delete by query is complete. - # @option arguments [Number] :requests_per_second The throttle for this request in sub-requests per second. -1 means no throttle. - # @option arguments [Number|string] :slices The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`. + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases to search. + # It supports wildcards (+*+). + # To search all data streams or indices, omit this parameter or use +*+ or +_all+. (*Required*) + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. + # For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true. + # @option arguments [String] :analyzer Analyzer to use for the query string. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [String] :conflicts What to do if delete by query hits version conflicts: +abort+ or +proceed+. Server default: abort. + # @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+. + # This parameter can be used only when the +q+ query string parameter is specified. Server default: OR. + # @option arguments [String] :df The field to use as default where no field prefix is given in the query string. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [String, Array] :expand_wildcards The type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # It supports comma-separated values, such as +open,hidden+. Server default: open. + # @option arguments [Integer] :from Starting offset (default: 0) + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [Integer] :max_docs The maximum number of documents to process. + # Defaults to all documents. + # When set to a value less then or equal to +scroll_size+, a scroll will not be used to retrieve the results for the operation. + # @option arguments [String] :preference The node or shard the operation should be performed on. + # It is random by default. + # @option arguments [Boolean] :refresh If +true+, Elasticsearch refreshes all shards involved in the delete by query after the request completes. + # This is different than the delete API's +refresh+ parameter, which causes just the shard that received the delete request to be refreshed. + # Unlike the delete API, it does not support +wait_for+. + # @option arguments [Boolean] :request_cache If +true+, the request cache is used for this request. + # Defaults to the index-level setting. + # @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second. Server default: -1. + # @option arguments [String] :routing A custom value used to route operations to a specific shard. + # @option arguments [String] :q A query in the Lucene query string syntax. + # @option arguments [Time] :scroll The period to retain the search context for scrolling. + # @option arguments [Integer] :scroll_size The size of the scroll request that powers the operation. Server default: 1000. + # @option arguments [Time] :search_timeout The explicit timeout for each search request. + # It defaults to no timeout. + # @option arguments [String] :search_type The type of the search operation. + # Available options include +query_then_fetch+ and +dfs_query_then_fetch+. + # @option arguments [Integer, String] :slices The number of slices this task should be divided into. Server default: 1. + # @option arguments [Array] :sort A comma-separated list of +:+ pairs. + # @option arguments [Array] :stats The specific +tag+ of the request for logging and statistical purposes. + # @option arguments [Integer] :terminate_after The maximum number of documents to collect for each shard. + # If a query reaches this limit, Elasticsearch terminates the query early. + # Elasticsearch collects documents before sorting.Use with caution. + # Elasticsearch applies this parameter to each shard handling the request. + # When possible, let Elasticsearch perform early termination automatically. + # Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + # @option arguments [Time] :timeout The period each deletion request waits for active shards. Server default: 1m. + # @option arguments [Boolean] :version If +true+, returns the document version as part of a hit. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). + # The +timeout+ value controls how long each write request waits for unavailable shards to become available. Server default: 1. + # @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the operation is complete. + # If +false+, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to cancel or get the status of the task. Elasticsearch creates a record of this task as a document at +.tasks/task/${taskId}+. When you are done with a task, you should delete the task document so Elasticsearch can reclaim the space. Server default: true. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The search definition using the Query DSL (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-by-query # def delete_by_query(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'delete_by_query' } @@ -72,12 +154,12 @@ def delete_by_query(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_delete_by_query" + path = "#{Utils.listify(_index)}/_delete_by_query" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb index 081b6efc86..5c3629dd12 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Changes the number of requests per second for a particular Delete By Query operation. + # Throttle a delete by query operation. + # Change the number of requests per second for a particular delete by query operation. + # Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. # - # @option arguments [String] :task_id The task id to rethrottle - # @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (*Required*) + # @option arguments [String, Integer] :task_id The ID for the task. (*Required*) + # @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second. + # To disable throttling, set it to +-1+. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-by-query-rethrottle # def delete_by_query_rethrottle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'delete_by_query_rethrottle' } @@ -47,7 +50,7 @@ def delete_by_query_rethrottle(arguments = {}) _task_id = arguments.delete(:task_id) method = Elasticsearch::API::HTTP_POST - path = "_delete_by_query/#{Utils.__listify(_task_id)}/_rethrottle" + path = "_delete_by_query/#{Utils.listify(_task_id)}/_rethrottle" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb index 9f1d8be915..7d088f1dec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb @@ -15,20 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Deletes a script. + # Delete a script or search template. + # Deletes a stored script or search template. # - # @option arguments [String] :id Script ID - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String] :id The identifier for the stored script or search template. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-script # def delete_script(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'delete_script' } @@ -48,7 +53,7 @@ def delete_script(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE - path = "_scripts/#{Utils.__listify(_id)}" + path = "_scripts/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb index de116ae993..89f909e2b8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb @@ -15,20 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Enrich module Actions + # Delete an enrich policy. # Deletes an existing enrich policy and its enrich index. # - # @option arguments [String] :name The name of the enrich policy - # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [String] :name Enrich policy to delete. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-delete-policy # def delete_policy(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'enrich.delete_policy' } @@ -48,7 +49,7 @@ def delete_policy(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = "_enrich/policy/#{Utils.__listify(_name)}" + path = "_enrich/policy/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb index f30444fefe..4565fbc3c7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb @@ -15,21 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Enrich module Actions - # Creates the enrich index for an existing enrich policy. + # Run an enrich policy. + # Create the enrich index for an existing enrich policy. # - # @option arguments [String] :name The name of the enrich policy - # @option arguments [Boolean] :wait_for_completion Should the request should block until the execution is complete. - # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [String] :name Enrich policy to execute. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [Boolean] :wait_for_completion If +true+, the request blocks other enrich policy execution requests until complete. Server default: true. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-execute-policy # def execute_policy(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'enrich.execute_policy' } @@ -49,7 +50,7 @@ def execute_policy(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = "_enrich/policy/#{Utils.__listify(_name)}/_execute" + path = "_enrich/policy/#{Utils.listify(_name)}/_execute" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb index 76ef6e7367..334ead139b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb @@ -15,20 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Enrich module Actions - # Gets information about an enrich policy. + # Get an enrich policy. + # Returns information about an enrich policy. # - # @option arguments [List] :name A comma-separated list of enrich policy names - # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked + # @option arguments [String, Array] :name Comma-separated list of enrich policy names used to limit the request. + # To return information for all enrich policies, omit this parameter. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-get-policy # def get_policy(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'enrich.get_policy' } @@ -47,7 +49,7 @@ def get_policy(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_enrich/policy/#{Utils.__listify(_name)}" + "_enrich/policy/#{Utils.listify(_name)}" else '_enrich/policy' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb index b93de33b2c..571fe3827a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb @@ -15,21 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Enrich module Actions - # Creates a new enrich policy. + # Create an enrich policy. + # Creates an enrich policy. # - # @option arguments [String] :name The name of the enrich policy - # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [String] :name Name of the enrich policy 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 [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The enrich policy to register (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-put-policy # def put_policy(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'enrich.put_policy' } @@ -50,7 +51,7 @@ def put_policy(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = "_enrich/policy/#{Utils.__listify(_name)}" + path = "_enrich/policy/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb index d511f5f326..80bc7e23e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb @@ -15,19 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Enrich module Actions - # Gets enrich coordinator statistics and information about enrich policies that are currently executing. + # Get enrich stats. + # Returns enrich coordinator statistics and information about enrich policies that are currently executing. # - # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-stats # def stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'enrich.stats' } @@ -35,7 +36,7 @@ def stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_enrich/_stats' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb index d0a794a594..e265c77438 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb @@ -15,19 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Eql module Actions - # Deletes an async EQL search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. + # Delete an async EQL search. + # Delete an async EQL search or a stored synchronous EQL search. + # The API also deletes results for the search. # - # @option arguments [String] :id The async search ID + # @option arguments [String] :id Identifier for the search to delete. + # A search ID is provided in the EQL search API's response for an async search. + # A search ID is also provided if the request’s +keep_on_completion+ parameter is +true+. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-delete # def delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'eql.delete' } @@ -47,7 +51,7 @@ def delete(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE - path = "_eql/search/#{Utils.__listify(_id)}" + path = "_eql/search/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb index 87341090a1..94f647fb22 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb @@ -15,21 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Eql module Actions - # Returns async results from previously executed Event Query Language (EQL) search + # Get async EQL search results. + # Get the current status and available results for an async EQL search or a stored synchronous EQL search. # - # @option arguments [String] :id The async search ID - # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response - # @option arguments [Time] :keep_alive Update the time interval in which the results (partial or final) for this search will be available + # @option arguments [String] :id Identifier for the search. (*Required*) + # @option arguments [Time] :keep_alive Period for which the search and its results are stored on the cluster. + # Defaults to the keep_alive value set by the search’s EQL search API request. + # @option arguments [Time] :wait_for_completion_timeout Timeout duration to wait for the request to finish. + # Defaults to no timeout, meaning the request waits for complete search results. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get # def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'eql.get' } @@ -49,7 +52,7 @@ def get(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET - path = "_eql/search/#{Utils.__listify(_id)}" + path = "_eql/search/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb index 06e4d98460..2acf654641 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb @@ -15,19 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Eql module Actions - # Returns the status of a previously submitted async or stored Event Query Language (EQL) search + # Get the async EQL status. + # Get the current status for an async EQL search or a stored synchronous EQL search without returning results. # - # @option arguments [String] :id The async search ID + # @option arguments [String] :id Identifier for the search. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get-status # def get_status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'eql.get_status' } @@ -47,7 +48,7 @@ def get_status(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET - path = "_eql/search/status/#{Utils.__listify(_id)}" + path = "_eql/search/status/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb index 870291cd16..4f9242ed0c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb @@ -15,25 +15,31 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Eql module Actions - # Returns results matching a query expressed in Event Query Language (EQL) + # Get EQL search results. + # Returns search results for an Event Query Language (EQL) query. + # EQL assumes each document in a data stream or index corresponds to an event. # - # @option arguments [String] :index The name of the index to scope the operation - # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response - # @option arguments [Boolean] :keep_on_completion Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false) - # @option arguments [Time] :keep_alive Update the time interval in which the results (partial or final) for this search will be available - # @option arguments [Boolean] :allow_partial_search_results Control whether the query should keep running in case of shard failures, and return partial results - # @option arguments [Boolean] :allow_partial_sequence_results Control whether a sequence query should return partial results or no results at all in case of shard failures. This option has effect only if [allow_partial_search_results] is true. + # @option arguments [String, Array] :index The name of the index to scope the operation (*Required*) + # @option arguments [Boolean] :allow_no_indices [TODO] Server default: true. + # @option arguments [Boolean] :allow_partial_search_results If true, returns partial results if there are shard failures. If false, returns an error with no partial results. Server default: true. + # @option arguments [Boolean] :allow_partial_sequence_results If true, sequence queries will return partial results in case of shard failures. If false, they will return no results at all. + # This flag has effect only if allow_partial_search_results is true. + # @option arguments [String, Array] :expand_wildcards [TODO] Server default: open. + # @option arguments [Boolean] :ignore_unavailable If true, missing or closed indices are not included in the response. Server default: true. + # @option arguments [Time] :keep_alive Period for which the search and its results are stored on the cluster. Server default: 5d. + # @option arguments [Boolean] :keep_on_completion If true, the search and its results are stored on the cluster. + # @option arguments [Time] :wait_for_completion_timeout Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Eql request body. Use the `query` to limit the query scope. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-search # def search(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'eql.search' } @@ -49,12 +55,12 @@ def search(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_eql/search" + path = "#{Utils.listify(_index)}/_eql/search" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb index fadffc40ef..290a1632f2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb @@ -15,22 +15,36 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Esql module Actions - # Executes an ESQL request asynchronously + # Run an async ES|QL query. + # Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its progress, and retrieve results when they become available. + # The API accepts the same parameters and request body as the synchronous query API, along with additional async related properties. # - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the csv format. - # @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. + # @option arguments [String] :delimiter The character to use between values within a CSV row. + # It is valid only for the CSV format. + # @option arguments [Boolean] :drop_null_columns Indicates whether columns that are entirely +null+ will be removed from the +columns+ and +values+ portion of the results. + # If +true+, the response will include an extra section under the name +all_columns+ which has the name of all the columns. + # @option arguments [String] :format A short version of the Accept header, for example +json+ or +yaml+. + # @option arguments [Time] :keep_alive The period for which the query and its results are stored in the cluster. + # The default period is five days. + # When this period expires, the query and its results are deleted, even if the query is still ongoing. + # If the +keep_on_completion+ parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the +wait_for_completion_timeout+ parameter, regardless of this value. Server default: 5d. + # @option arguments [Boolean] :keep_on_completion Indicates whether the query and its results are stored in the cluster. + # If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the +wait_for_completion_timeout+ parameter. + # @option arguments [Time] :wait_for_completion_timeout The period to wait for the request to finish. + # By default, the request waits for 1 second for the query results. + # If the query completes during this period, results are returned + # Otherwise, a query ID is returned that can later be used to retrieve the results. Server default: 1s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Use the `query` element to start a query. Use `columnar` to format the answer. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query # def async_query(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query' } @@ -40,7 +54,7 @@ def async_query(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_query/async' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb index 647470b44a..3ea289b715 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb @@ -15,19 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Esql module Actions - # Delete an async query request given its ID. + # Delete an async ES|QL query. + # If the query is still running, it is cancelled. + # Otherwise, the stored results are deleted. + # If the Elasticsearch security features are enabled, only the following users can use this API to delete a query: + # * The authenticated user that submitted the original query request + # * Users with the +cancel_task+ cluster privilege # - # @option arguments [String] :id The async query ID + # @option arguments [String] :id The unique identifier of the query. + # A query ID is provided in the ES|QL async query API response for a query that does not complete in the designated time. + # A query ID is also provided when the request was submitted with the +keep_on_completion+ parameter set to +true+. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-delete-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-delete # def async_query_delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_delete' } @@ -47,7 +54,7 @@ def async_query_delete(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE - path = "_query/async/#{Utils.__listify(_id)}" + path = "_query/async/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb index 4d59504018..1f8f5f3d81 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb @@ -15,22 +15,31 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Esql module Actions - # Retrieves the results of a previously submitted async query request given its ID. + # Get async ES|QL query results. + # Get the current status and available results or stored results for an ES|QL asynchronous query. + # If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API. # - # @option arguments [String] :id The async query ID - # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response - # @option arguments [Time] :keep_alive Specify the time interval in which the results (partial or final) for this search will be available - # @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. + # @option arguments [String] :id The unique identifier of the query. + # A query ID is provided in the ES|QL async query API response for a query that does not complete in the designated time. + # A query ID is also provided when the request was submitted with the +keep_on_completion+ parameter set to +true+. (*Required*) + # @option arguments [Boolean] :drop_null_columns Indicates whether columns that are entirely +null+ will be removed from the +columns+ and +values+ portion of the results. + # If +true+, the response will include an extra section under the name +all_columns+ which has the name of all the columns. + # @option arguments [Time] :keep_alive The period for which the query and its results are stored in the cluster. + # When this period expires, the query and its results are deleted, even if the query is still ongoing. + # @option arguments [Time] :wait_for_completion_timeout The period to wait for the request to finish. + # By default, the request waits for complete query results. + # If the request completes during the period specified in this parameter, complete query results are returned. + # Otherwise, the response returns an +is_running+ value of +true+ and no results. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-get-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-get # def async_query_get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_get' } @@ -50,7 +59,7 @@ def async_query_get(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET - path = "_query/async/#{Utils.__listify(_id)}" + path = "_query/async/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb index b4520b20cf..143e27df36 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb @@ -38,9 +38,8 @@ module Actions def async_query_stop(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_stop' } - defined_params = [:id].inject({}) do |set_variables, variable| + defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,7 +53,7 @@ def async_query_stop(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_POST - path = "_query/async/#{Utils.__listify(_id)}/stop" + path = "_query/async/#{Utils.listify(_id)}/stop" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb index 0d722a7f72..cfda90c2a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb @@ -15,22 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Esql module Actions - # Executes an ESQL request + # Run an ES|QL query. + # Get search results for an ES|QL (Elasticsearch query language) query. + # This functionality is subject to potential breaking changes within a + # minor version, meaning that your referencing code may break when this + # library is upgraded. # - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml - # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the csv format. - # @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. + # @option arguments [String] :format A short version of the Accept header, e.g. json, yaml. + # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the CSV format. + # @option arguments [Boolean] :drop_null_columns Should columns that are entirely +null+ be removed from the +columns+ and +values+ portion of the results? + # Defaults to +false+. If +true+ then the response will include an extra section under the name +all_columns+ which has the name of all columns. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Use the `query` element to start a query. Use `columnar` to format the answer. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-rest.html # def query(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'esql.query' } @@ -40,7 +45,7 @@ def query(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_query' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb index aaf756abe1..31bfdb1d4f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb @@ -15,34 +15,60 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns information about whether a document exists in an index. + # Check a document. + # Verify that a document exists. + # For example, check to see if a document with the +_id+ 0 exists: + # + + # HEAD my-index-000001/_doc/0 + # + + # If the document exists, the API returns a status code of +200 - OK+. + # If the document doesn’t exist, the API returns +404 - Not Found+. + # **Versioning support** + # You can use the +version+ parameter to check the document only if its current version is equal to the specified one. + # Internally, Elasticsearch has marked the old document as deleted and added an entirely new document. + # The old version of the document doesn't disappear immediately, although you won't be able to access it. + # Elasticsearch cleans up deleted documents in the background as you continue to index more data. # - # @option arguments [String] :id The document ID - # @option arguments [String] :index The name of the index - # @option arguments [List] :stored_fields A comma-separated list of stored fields to return in the response - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [Boolean] :realtime Specify whether to perform the operation in realtime or search mode - # @option arguments [Boolean] :refresh Refresh the shard containing the document before performing the operation - # @option arguments [String] :routing Specific routing value - # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return - # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field - # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field - # @option arguments [Number] :version Explicit version number for concurrency control - # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) + # @option arguments [String] :id A unique document identifier. (*Required*) + # @option arguments [String] :index A comma-separated list of data streams, indices, and aliases. + # It supports wildcards (+*+). (*Required*) + # @option arguments [String] :preference The node or shard the operation should be performed on. + # By default, the operation is randomized between the shard replicas.If it is set to +_local+, the operation will prefer to be run on a local allocated shard when possible. + # If it is set to a custom value, the value is used to guarantee that the same shards will be used for the same custom value. + # This can help with "jumping values" when hitting different shards in different refresh states. + # A sample value can be something like the web session ID or the user name. + # @option arguments [Boolean] :realtime If +true+, the request is real-time as opposed to near-real-time. Server default: true. + # @option arguments [Boolean] :refresh If +true+, the request refreshes the relevant shards before retrieving the document. + # Setting it to +true+ should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing). + # @option arguments [String] :routing A custom value used to route operations to a specific shard. + # @option arguments [Boolean, String, Array] :_source Indicates whether to return the +_source+ field (+true+ or +false+) or lists the fields to return. + # @option arguments [String, Array] :_source_excludes A comma-separated list of source fields to exclude from the response. + # You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter. + # If the +_source+ parameter is +false+, this parameter is ignored. + # @option arguments [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # If this parameter is specified, only these source fields are returned. + # You can exclude fields from this subset using the +_source_excludes+ query parameter. + # If the +_source+ parameter is +false+, this parameter is ignored. + # @option arguments [String, Array] :stored_fields A comma-separated list of stored fields to return as part of a hit. + # If no fields are specified, no stored fields are included in the response. + # If this field is specified, the +_source+ parameter defaults to +false+. + # @option arguments [Integer] :version Explicit version number for concurrency control. + # The specified version must match the current version of the document for the request to succeed. + # @option arguments [String] :version_type The version type. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get # def exists(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'exists' } - defined_params = %i[index id].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :id].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? @@ -60,10 +86,10 @@ def exists(arguments = {}) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_HEAD - path = "#{Utils.__listify(_index)}/_doc/#{Utils.__listify(_id)}" + path = "#{Utils.listify(_index)}/_doc/#{Utils.listify(_id)}" params = Utils.process_params(arguments) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do perform_request(method, path, params, body, headers, request_opts).status == 200 end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb index ce01cb5e22..962649aedc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb @@ -15,33 +15,43 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns information about whether a document source exists in an index. + # Check for a document source. + # Check whether a document source exists in an index. + # For example: + # + + # HEAD my-index-000001/_source/1 + # + + # A document's source is not available if it is disabled in the mapping. # - # @option arguments [String] :id The document ID - # @option arguments [String] :index The name of the index - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [Boolean] :realtime Specify whether to perform the operation in realtime or search mode - # @option arguments [Boolean] :refresh Refresh the shard containing the document before performing the operation - # @option arguments [String] :routing Specific routing value - # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return - # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field - # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field - # @option arguments [Number] :version Explicit version number for concurrency control - # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) + # @option arguments [String] :id A unique identifier for the document. (*Required*) + # @option arguments [String] :index A comma-separated list of data streams, indices, and aliases. + # It supports wildcards (+*+). (*Required*) + # @option arguments [String] :preference The node or shard the operation should be performed on. + # By default, the operation is randomized between the shard replicas. + # @option arguments [Boolean] :realtime If +true+, the request is real-time as opposed to near-real-time. Server default: true. + # @option arguments [Boolean] :refresh If +true+, the request refreshes the relevant shards before retrieving the document. + # Setting it to +true+ should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing). + # @option arguments [String] :routing A custom value used to route operations to a specific shard. + # @option arguments [Boolean, String, Array] :_source Indicates whether to return the +_source+ field (+true+ or +false+) or lists the fields to return. + # @option arguments [String, Array] :_source_excludes A comma-separated list of source fields to exclude in the response. + # @option arguments [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # @option arguments [Integer] :version The version number for concurrency control. + # It must match the current version of the document for the request to succeed. + # @option arguments [String] :version_type The version type. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get # def exists_source(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'exists_source' } - defined_params = %i[index id].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :id].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? @@ -59,7 +69,7 @@ def exists_source(arguments = {}) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_HEAD - path = "#{Utils.__listify(_index)}/_source/#{Utils.__listify(_id)}" + path = "#{Utils.listify(_index)}/_source/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb index b78f9160a5..43248f1758 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb @@ -15,37 +15,51 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns information about why a specific matches (or doesn't match) a query. + # Explain a document match result. + # Get information about why a specific document matches, or doesn't match, a query. + # It computes a score explanation for a query and a specific document. # - # @option arguments [String] :id The document ID - # @option arguments [String] :index The name of the index - # @option arguments [Boolean] :analyze_wildcard Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false) - # @option arguments [String] :analyzer The analyzer for the query string query - # @option arguments [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR) - # @option arguments [String] :df The default field for query string query (default: _all) - # @option arguments [List] :stored_fields A comma-separated list of stored fields to return in the response - # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [String] :q Query in the Lucene query string syntax - # @option arguments [String] :routing Specific routing value - # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return - # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field - # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field + # @option arguments [String] :id The document identifier. (*Required*) + # @option arguments [String] :index Index names that are used to limit the request. + # Only a single index name can be provided to this parameter. (*Required*) + # @option arguments [String] :analyzer The analyzer to use for the query string. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+. + # This parameter can be used only when the +q+ query string parameter is specified. Server default: OR. + # @option arguments [String] :df The field to use as default where no field prefix is given in the query string. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [String] :preference The node or shard the operation should be performed on. + # It is random by default. + # @option arguments [String] :routing A custom value used to route operations to a specific shard. + # @option arguments [Boolean, String, Array] :_source +True+ or +false+ to return the +_source+ field or not or a list of fields to return. + # @option arguments [String, Array] :_source_excludes A comma-separated list of source fields to exclude from the response. + # You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter. + # If the +_source+ parameter is +false+, this parameter is ignored. + # @option arguments [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # If this parameter is specified, only these source fields are returned. + # You can exclude fields from this subset using the +_source_excludes+ query parameter. + # If the +_source+ parameter is +false+, this parameter is ignored. + # @option arguments [String, Array] :stored_fields A comma-separated list of stored fields to return in the response. + # @option arguments [String] :q The query in the Lucene query string syntax. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The query definition using the Query DSL + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-explain # def explain(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'explain' } - defined_params = %i[index id].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :id].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? @@ -68,7 +82,7 @@ def explain(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "#{Utils.__listify(_index)}/_explain/#{Utils.__listify(_id)}" + path = "#{Utils.listify(_index)}/_explain/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb index 65c71bc792..1586b6aa71 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb @@ -15,19 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Features module Actions - # Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot + # Get the features. + # Get a list of features that can be included in snapshots using the +feature_states+ field when creating a snapshot. + # You can use this API to determine which feature states to include when taking a snapshot. + # By default, all feature states are included in a snapshot if that snapshot includes the global state, or none if it does not. + # A feature state includes one or more system indices necessary for a given feature to function. + # In order to ensure data integrity, all system indices that comprise a feature state are snapshotted and restored together. + # The features listed by this API are a combination of built-in features and features defined by plugins. + # In order for a feature state to be listed in this API and recognized as a valid feature state by the create snapshot API, the plugin that defines that feature must be installed on the master node. # - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-features-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-features-get-features # def get_features(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'features.get_features' } @@ -35,7 +42,7 @@ def get_features(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_features' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb index 63ea0c5e85..752c44f899 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb @@ -15,23 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Features module Actions - # Resets the internal state of features, usually by deleting system indices + # Reset the features. + # Clear all of the state information stored in system indices by Elasticsearch features, including the security and machine learning indices. + # WARNING: Intended for development and testing use only. Do not reset features on a production cluster. + # Return a cluster to the same state as a new installation by resetting the feature state for all Elasticsearch features. + # This deletes all state information stored in system indices. + # The response code is HTTP 200 if the state is successfully reset for all features. + # It is HTTP 500 if the reset operation failed for any feature. + # Note that select features might provide a way to reset particular system indices. + # Using this API resets all features, both those that are built-in and implemented as plugins. + # To list the features that will be affected, use the get features API. + # IMPORTANT: The features installed on the node you submit this request to are the features that will be reset. Run on the master node if you have any doubts about which plugins are installed on individual nodes. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-features-reset-features # def reset_features(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'features.reset_features' } @@ -39,7 +49,7 @@ def reset_features(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_features/_reset' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb index 0ad6237bb3..31c5bf6379 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb @@ -15,27 +15,35 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns the information about the capabilities of fields among multiple indices. + # Get the field capabilities. + # Get information about the capabilities of fields among multiple indices. + # For data streams, the API returns field capabilities among the stream’s backing indices. + # It returns runtime fields like any other field. + # For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the +keyword+ family. # - # @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - # @option arguments [List] :fields A comma-separated list of field names - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :include_unmapped Indicates whether unmapped fields should be included in the response. - # @option arguments [List] :filters An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent - # @option arguments [List] :types Only return results for fields that have one of the types in the list - # @option arguments [Boolean] :include_empty_fields Include empty fields in result + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all. + # @option arguments [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias, + # or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request + # targeting +foo*,bar*+ returns an error if an index starts with foo but no index starts with bar. Server default: true. + # @option arguments [String, Array] :expand_wildcards The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as +open,hidden+. Server default: open. + # @option arguments [String, Array] :fields A comma-separated list of fields to retrieve capabilities for. Wildcard (+*+) expressions are supported. + # @option arguments [Boolean] :ignore_unavailable If +true+, missing or closed indices are not included in the response. + # @option arguments [Boolean] :include_unmapped If true, unmapped fields are included in the response. + # @option arguments [String] :filters A comma-separated list of filters to apply to the response. + # @option arguments [Array] :types A comma-separated list of field types to include. + # Any fields that do not match one of these types will be excluded from the results. + # It defaults to empty, meaning that all field types are returned. + # @option arguments [Boolean] :include_empty_fields If false, empty fields are not included in the response. Server default: true. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An index filter specified with the Query DSL + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-field-caps # def field_caps(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'field_caps' } @@ -58,11 +66,11 @@ def field_caps(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.__listify(_index)}/_field_caps" - else - '_field_caps' - end + path = if _index + "#{Utils.listify(_index)}/_field_caps" + else + '_field_caps' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb index 7768f2c53d..c0faf1dfe4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb @@ -15,23 +15,29 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Fleet module Actions - # Returns the current global checkpoints for an index. This API is design for internal use by the fleet server project. + # Get global checkpoints. + # Get the current global checkpoints for an index. + # This API is designed for internal use by the Fleet server project. # - # @option arguments [String] :index The name of the index. - # @option arguments [Boolean] :wait_for_advance Whether to wait for the global checkpoint to advance past the specified current checkpoints - # @option arguments [Boolean] :wait_for_index Whether to wait for the target index to exist and all primary shards be active - # @option arguments [List] :checkpoints Comma separated list of checkpoints - # @option arguments [Time] :timeout Timeout to wait for global checkpoint to advance + # @option arguments [Indexname, Indexalias] :index A single index or index alias that resolves to a single index. (*Required*) + # @option arguments [Boolean] :wait_for_advance A boolean value which controls whether to wait (until the timeout) for the global checkpoints + # to advance past the provided +checkpoints+. + # @option arguments [Boolean] :wait_for_index A boolean value which controls whether to wait (until the timeout) for the target index to exist + # and all primary shards be active. Can only be true when +wait_for_advance+ is true. + # @option arguments [Array] :checkpoints A comma separated list of previous global checkpoints. When used in combination with +wait_for_advance+, + # the API will only return once the global checkpoints advances past the checkpoints. Providing an empty list + # will cause Elasticsearch to immediately return the current global checkpoints. Server default: []. + # @option arguments [Time] :timeout Period to wait for a global checkpoints to advance past +checkpoints+. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-global-checkpoints.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-fleet # def global_checkpoints(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'fleet.global_checkpoints' } @@ -46,12 +52,12 @@ def global_checkpoints(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET - path = "#{Utils.__listify(_index)}/_fleet/global_checkpoints" + path = "#{Utils.listify(_index)}/_fleet/global_checkpoints" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb index d80bbed755..abdeb239d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb @@ -15,24 +15,44 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Fleet module Actions - # Multi Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. + # Run multiple Fleet searches. + # Run several Fleet searches with a single API request. + # The API follows the same structure as the multi search API. + # However, similar to the Fleet search API, it supports the +wait_for_checkpoints+ parameter. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :index The index name to use as the default + # @option arguments [Indexname, Indexalias] :index A single target to search. If the target is an index alias, it must resolve to a single index. + # @option arguments [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. + # @option arguments [Boolean] :ccs_minimize_roundtrips If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # @option arguments [Boolean] :ignore_throttled If true, concrete, expanded or aliased indices are ignored when frozen. + # @option arguments [Boolean] :ignore_unavailable If true, missing or closed indices are not included in the response. + # @option arguments [Integer] :max_concurrent_searches Maximum number of concurrent searches the multi search API can execute. + # @option arguments [Integer] :max_concurrent_shard_requests Maximum number of concurrent shard requests that each sub-search request executes per node. Server default: 5. + # @option arguments [Integer] :pre_filter_shard_size Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. + # @option arguments [String] :search_type Indicates whether global term and document frequencies should be used when scoring returned documents. + # @option arguments [Boolean] :rest_total_hits_as_int If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. + # @option arguments [Boolean] :typed_keys Specifies whether aggregation and suggester names should be prefixed by their respective types in the response. + # @option arguments [Array] :wait_for_checkpoints A comma separated list of checkpoints. When configured, the search API will only be executed on a shard + # after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause + # Elasticsearch to immediately execute the search. Server default: []. + # @option arguments [Boolean] :allow_partial_search_results If true, returns partial results if there are shard request timeouts or {https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures shard failures}. If false, returns + # an error with no partial results. Defaults to the configured cluster setting +search.default_allow_partial_results+ + # which is true by default. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The request definitions (metadata-fleet search request definition pairs), separated by newlines (*Required*) + # @option arguments [Hash] :body searches # - # @see [TODO] + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-fleet-msearch # def msearch(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'fleet.msearch' } @@ -47,19 +67,19 @@ def msearch(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "#{Utils.__listify(_index)}/_fleet/_fleet_msearch" + "#{Utils.listify(_index)}/_fleet/_fleet_msearch" else '_fleet/_fleet_msearch' end - params = {} + params = Utils.process_params(arguments) - if body.is_a?(Array) && body.any? { |d| d.has_key? :search } + if body.is_a?(Array) && body.any? { |d| d.key? :search } payload = body.each_with_object([]) do |item, sum| meta = item data = meta.delete(:search) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb index d3f67b21dc..531678706a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb @@ -15,27 +15,73 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Fleet module Actions - # Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. + # Run a Fleet search. + # The purpose of the Fleet search API is to provide an API where the search will be run only + # after the provided checkpoint has been processed and is visible for searches inside of Elasticsearch. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :index The index name to search. - # @option arguments [List] :wait_for_checkpoints Comma separated list of checkpoints, one per shard - # @option arguments [Time] :wait_for_checkpoints_timeout Explicit wait_for_checkpoints timeout - # @option arguments [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout + # @option arguments [Indexname, Indexalias] :index A single target to search. If the target is an index alias, it must resolve to a single index. (*Required*) + # @option arguments [Boolean] :allow_no_indices [TODO] + # @option arguments [String] :analyzer [TODO] + # @option arguments [Boolean] :analyze_wildcard [TODO] + # @option arguments [Integer] :batched_reduce_size [TODO] + # @option arguments [Boolean] :ccs_minimize_roundtrips [TODO] + # @option arguments [String] :default_operator [TODO] + # @option arguments [String] :df [TODO] + # @option arguments [String, Array] :docvalue_fields [TODO] + # @option arguments [String, Array] :expand_wildcards [TODO] + # @option arguments [Boolean] :explain [TODO] + # @option arguments [Boolean] :ignore_throttled [TODO] + # @option arguments [Boolean] :ignore_unavailable [TODO] + # @option arguments [Boolean] :lenient [TODO] + # @option arguments [Integer] :max_concurrent_shard_requests [TODO] + # @option arguments [String] :preference [TODO] + # @option arguments [Integer] :pre_filter_shard_size [TODO] + # @option arguments [Boolean] :request_cache [TODO] + # @option arguments [String] :routing [TODO] + # @option arguments [Time] :scroll [TODO] + # @option arguments [String] :search_type [TODO] + # @option arguments [Array] :stats [TODO] + # @option arguments [String, Array] :stored_fields [TODO] + # @option arguments [String] :suggest_field Specifies which field to use for suggestions. + # @option arguments [String] :suggest_mode [TODO] + # @option arguments [Integer] :suggest_size [TODO] + # @option arguments [String] :suggest_text The source text for which the suggestions should be returned. + # @option arguments [Integer] :terminate_after [TODO] + # @option arguments [Time] :timeout [TODO] + # @option arguments [Boolean, Integer] :track_total_hits [TODO] + # @option arguments [Boolean] :track_scores [TODO] + # @option arguments [Boolean] :typed_keys [TODO] + # @option arguments [Boolean] :rest_total_hits_as_int [TODO] + # @option arguments [Boolean] :version [TODO] + # @option arguments [Boolean, String, Array] :_source [TODO] + # @option arguments [String, Array] :_source_excludes [TODO] + # @option arguments [String, Array] :_source_includes [TODO] + # @option arguments [Boolean] :seq_no_primary_term [TODO] + # @option arguments [String] :q [TODO] + # @option arguments [Integer] :size [TODO] + # @option arguments [Integer] :from [TODO] + # @option arguments [String] :sort [TODO] + # @option arguments [Array] :wait_for_checkpoints A comma separated list of checkpoints. When configured, the search API will only be executed on a shard + # after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause + # Elasticsearch to immediately execute the search. Server default: []. + # @option arguments [Boolean] :allow_partial_search_results If true, returns partial results if there are shard request timeouts or {https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures shard failures}. If false, returns + # an error with no partial results. Defaults to the configured cluster setting +search.default_allow_partial_results+ + # which is true by default. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The search definition using the Query DSL + # @option arguments [Hash] :body request body # - # @see [TODO] + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-fleet-search # def search(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'fleet.search' } @@ -60,7 +106,7 @@ def search(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "#{Utils.__listify(_index)}/_fleet/_fleet_search" + path = "#{Utils.listify(_index)}/_fleet/_fleet_search" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb index 3b956abf07..736d367f98 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb @@ -15,35 +15,91 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns a document. + # Get a document by its ID. + # Get a document and its source or stored fields from an index. + # By default, this API is realtime and is not affected by the refresh rate of the index (when data will become visible for search). + # In the case where stored fields are requested with the +stored_fields+ parameter and the document has been updated but is not yet refreshed, the API will have to parse and analyze the source to extract the stored fields. + # To turn off realtime behavior, set the +realtime+ parameter to false. + # **Source filtering** + # By default, the API returns the contents of the +_source+ field unless you have used the +stored_fields+ parameter or the +_source+ field is turned off. + # You can turn off +_source+ retrieval by using the +_source+ parameter: + # + + # GET my-index-000001/_doc/0?_source=false + # + + # If you only need one or two fields from the +_source+, use the +_source_includes+ or +_source_excludes+ parameters to include or filter out particular fields. + # This can be helpful with large documents where partial retrieval can save on network overhead + # Both parameters take a comma separated list of fields or wildcard expressions. + # For example: + # + + # GET my-index-000001/_doc/0?_source_includes=*.id&_source_excludes=entities + # + + # If you only want to specify includes, you can use a shorter notation: + # + + # GET my-index-000001/_doc/0?_source=*.id + # + + # **Routing** + # If routing is used during indexing, the routing value also needs to be specified to retrieve a document. + # For example: + # + + # GET my-index-000001/_doc/2?routing=user1 + # + + # This request gets the document with ID 2, but it is routed based on the user. + # The document is not fetched if the correct routing is not specified. + # **Distributed** + # The GET operation is hashed into a specific shard ID. + # It is then redirected to one of the replicas within that shard ID and returns the result. + # The replicas are the primary shard and its replicas within that shard ID group. + # This means that the more replicas you have, the better your GET scaling will be. + # **Versioning support** + # You can use the +version+ parameter to retrieve the document only if its current version is equal to the specified one. + # Internally, Elasticsearch has marked the old document as deleted and added an entirely new document. + # The old version of the document doesn't disappear immediately, although you won't be able to access it. + # Elasticsearch cleans up deleted documents in the background as you continue to index more data. # - # @option arguments [String] :id The document ID - # @option arguments [String] :index The name of the index - # @option arguments [Boolean] :force_synthetic_source Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. - # @option arguments [List] :stored_fields A comma-separated list of stored fields to return in the response - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [Boolean] :realtime Specify whether to perform the operation in realtime or search mode - # @option arguments [Boolean] :refresh Refresh the shard containing the document before performing the operation - # @option arguments [String] :routing Specific routing value - # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return - # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field - # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field - # @option arguments [Number] :version Explicit version number for concurrency control - # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) + # @option arguments [String] :id A unique document identifier. (*Required*) + # @option arguments [String] :index The name of the index that contains the document. (*Required*) + # @option arguments [Boolean] :force_synthetic_source Indicates whether the request forces synthetic +_source+. + # Use this paramater to test if the mapping supports synthetic +_source+ and to get a sense of the worst case performance. + # Fetches with this parameter enabled will be slower than enabling synthetic source natively in the index. + # @option arguments [String] :preference The node or shard the operation should be performed on. + # By default, the operation is randomized between the shard replicas.If it is set to +_local+, the operation will prefer to be run on a local allocated shard when possible. + # If it is set to a custom value, the value is used to guarantee that the same shards will be used for the same custom value. + # This can help with "jumping values" when hitting different shards in different refresh states. + # A sample value can be something like the web session ID or the user name. + # @option arguments [Boolean] :realtime If +true+, the request is real-time as opposed to near-real-time. Server default: true. + # @option arguments [Boolean] :refresh If +true+, the request refreshes the relevant shards before retrieving the document. + # Setting it to +true+ should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing). + # @option arguments [String] :routing A custom value used to route operations to a specific shard. + # @option arguments [Boolean, String, Array] :_source Indicates whether to return the +_source+ field (+true+ or +false+) or lists the fields to return. + # @option arguments [String, Array] :_source_excludes A comma-separated list of source fields to exclude from the response. + # You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter. + # If the +_source+ parameter is +false+, this parameter is ignored. + # @option arguments [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # If this parameter is specified, only these source fields are returned. + # You can exclude fields from this subset using the +_source_excludes+ query parameter. + # If the +_source+ parameter is +false+, this parameter is ignored. + # @option arguments [String, Array] :stored_fields A comma-separated list of stored fields to return as part of a hit. + # If no fields are specified, no stored fields are included in the response. + # If this field is specified, the +_source+ parameter defaults to +false+. + # Only leaf fields can be retrieved with the +stored_field+ option. + # Object fields can't be returned;​if specified, the request fails. + # @option arguments [Integer] :version The version number for concurrency control. + # It must match the current version of the document for the request to succeed. + # @option arguments [String] :version_type The version type. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get # def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'get' } - defined_params = %i[index id].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :id].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? @@ -61,11 +117,11 @@ def get(arguments = {}) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET - path = "#{Utils.__listify(_index)}/_doc/#{Utils.__listify(_id)}" + path = "#{Utils.listify(_index)}/_doc/#{Utils.listify(_id)}" params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb index d1a4baf476..0f0a4ec19b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns a script. + # Get a script or search template. + # Retrieves a stored script or search template. # - # @option arguments [String] :id Script ID - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String] :id The identifier for the stored script or search template. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: . # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script # def get_script(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'get_script' } @@ -47,7 +50,7 @@ def get_script(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET - path = "_scripts/#{Utils.__listify(_id)}" + path = "_scripts/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb index 845762ab86..110b7d7279 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb @@ -15,17 +15,18 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns all script contexts. + # Get script contexts. + # Get a list of supported script contexts and their methods. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-contexts.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-context # def get_script_context(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'get_script_context' } @@ -33,7 +34,7 @@ def get_script_context(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_script_context' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb index d8f9d8d77b..5787944c94 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb @@ -15,17 +15,18 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns available script types, languages and contexts + # Get script languages. + # Get a list of available script types, languages, and contexts. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-languages # def get_script_languages(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'get_script_languages' } @@ -33,7 +34,7 @@ def get_script_languages(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_script_language' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb index e66b8c5e6c..94b4598110 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb @@ -15,33 +15,46 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns the source of a document. + # Get a document's source. + # Get the source of a document. + # For example: + # + + # GET my-index-000001/_source/1 + # + + # You can use the source filtering parameters to control which parts of the +_source+ are returned: + # + + # GET my-index-000001/_source/1/?_source_includes=*.id&_source_excludes=entities + # + # - # @option arguments [String] :id The document ID - # @option arguments [String] :index The name of the index - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [Boolean] :realtime Specify whether to perform the operation in realtime or search mode - # @option arguments [Boolean] :refresh Refresh the shard containing the document before performing the operation - # @option arguments [String] :routing Specific routing value - # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return - # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field - # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field - # @option arguments [Number] :version Explicit version number for concurrency control - # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) + # @option arguments [String] :id A unique document identifier. (*Required*) + # @option arguments [String] :index The name of the index that contains the document. (*Required*) + # @option arguments [String] :preference The node or shard the operation should be performed on. + # By default, the operation is randomized between the shard replicas. + # @option arguments [Boolean] :realtime If +true+, the request is real-time as opposed to near-real-time. Server default: true. + # @option arguments [Boolean] :refresh If +true+, the request refreshes the relevant shards before retrieving the document. + # Setting it to +true+ should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing). + # @option arguments [String] :routing A custom value used to route operations to a specific shard. + # @option arguments [Boolean, String, Array] :_source Indicates whether to return the +_source+ field (+true+ or +false+) or lists the fields to return. + # @option arguments [String, Array] :_source_excludes A comma-separated list of source fields to exclude in the response. + # @option arguments [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # @option arguments [String, Array] :stored_fields A comma-separated list of stored fields to return as part of a hit. + # @option arguments [Integer] :version The version number for concurrency control. + # It must match the current version of the document for the request to succeed. + # @option arguments [String] :version_type The version type. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get # def get_source(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'get_source' } - defined_params = %i[index id].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :id].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? @@ -59,7 +72,7 @@ def get_source(arguments = {}) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET - path = "#{Utils.__listify(_index)}/_source/#{Utils.__listify(_id)}" + path = "#{Utils.listify(_index)}/_source/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb index 64306ce433..26743e99f0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb @@ -15,22 +15,29 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Graph module Actions - # Explore extracted and summarized information about the documents and terms in an index. + # Explore graph analytics. + # Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. + # The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. + # An initial request to the +_explore+ API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. + # Subsequent requests enable you to spider out from one more vertices of interest. + # You can exclude vertices that have already been returned. # - # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - # @option arguments [String] :routing Specific routing value - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String, Array] :index Name of the index. (*Required*) + # @option arguments [String] :routing Custom value used to route operations to a specific shard. + # @option arguments [Time] :timeout Specifies the period of time to wait for a response from each shard. + # If no response is received before the timeout expires, the request fails and returns an error. + # Defaults to no timeout. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Graph Query DSL + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-graph # def explore(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'graph.explore' } @@ -55,7 +62,7 @@ def explore(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "#{Utils.__listify(_index)}/_graph/explore" + path = "#{Utils.listify(_index)}/_graph/explore" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb index 7849b26638..fd0c104e8a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb @@ -15,21 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns the health of the cluster. + # Get the cluster health. + # Get a report with the health status of an Elasticsearch cluster. + # The report contains a list of indicators that compose Elasticsearch functionality. + # Each indicator has a health status of: green, unknown, yellow or red. + # The indicator will provide an explanation and metadata describing the reason for its current health status. + # The cluster’s status is controlled by the worst indicator status. + # In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. + # Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + # Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. + # The root cause and remediation steps are encapsulated in a diagnosis. + # A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + # NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. + # When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. # - # @option arguments [String] :feature A feature of the cluster, as returned by the top-level health API - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Boolean] :verbose Opt in for more information about the health of the system - # @option arguments [Integer] :size Limit the number of affected resources the health API returns + # @option arguments [String] :feature A feature of the cluster, as returned by the top-level health report API. + # @option arguments [Time] :timeout Explicit operation timeout. + # @option arguments [Boolean] :verbose Opt-in for more information about the health of the system. Server default: true. + # @option arguments [Integer] :size Limit the number of affected resources the health report API returns. Server default: 1000. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-health-report # def health_report(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'health_report' } @@ -48,7 +60,7 @@ def health_report(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _feature - "_health_report/#{Utils.__listify(_feature)}" + "_health_report/#{Utils.listify(_feature)}" else '_health_report' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb index 311e3d1a3d..57456bf284 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb @@ -15,38 +15,138 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Creates or updates a document in an index. + # Create or update a document in an index. + # Add a JSON document to the specified data stream or index and make it searchable. + # If the target is an index and the document already exists, the request updates the document and increments its version. + # NOTE: You cannot use this API to send update requests for existing documents in a data stream. + # If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias: + # * To add or overwrite a document using the +PUT //_doc/<_id>+ request format, you must have the +create+, +index+, or +write+ index privilege. + # * To add a document using the +POST //_doc/+ request format, you must have the +create_doc+, +create+, +index+, or +write+ index privilege. + # * To automatically create a data stream or index with this API request, you must have the +auto_configure+, +create_index+, or +manage+ index privilege. + # Automatic data stream creation requires a matching index template with data stream enabled. + # NOTE: Replica shards might not all be started when an indexing operation returns successfully. + # By default, only the primary is required. Set +wait_for_active_shards+ to change this default behavior. + # **Automatically create data streams and indices** + # If the request's target doesn't exist and matches an index template with a +data_stream+ definition, the index operation automatically creates the data stream. + # If the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates. + # NOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation. + # If no mapping exists, the index operation creates a dynamic mapping. + # By default, new fields and objects are automatically added to the mapping if needed. + # Automatic index creation is controlled by the +action.auto_create_index+ setting. + # If it is +true+, any index can be created automatically. + # You can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to +false+ to turn off automatic index creation entirely. + # Specify a comma-separated list of patterns you want to allow or prefix each pattern with +++ or +-+ to indicate whether it should be allowed or blocked. + # When a list is specified, the default behaviour is to disallow. + # NOTE: The +action.auto_create_index+ setting affects the automatic creation of indices only. + # It does not affect the creation of data streams. + # **Optimistic concurrency control** + # Index operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the +if_seq_no+ and +if_primary_term+ parameters. + # If a mismatch is detected, the operation will result in a +VersionConflictException+ and a status code of +409+. + # **Routing** + # By default, shard placement — or routing — is controlled by using a hash of the document's ID value. + # For more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the +routing+ parameter. + # When setting up explicit mapping, you can also use the +_routing+ field to direct the index operation to extract the routing value from the document itself. + # This does come at the (very minimal) cost of an additional document parsing pass. + # If the +_routing+ mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted. + # NOTE: Data streams do not support custom routing unless they were created with the +allow_custom_routing+ setting enabled in the template. + # **Distributed** + # The index operation is directed to the primary shard based on its route and performed on the actual node containing this shard. + # After the primary shard completes the operation, if needed, the update is distributed to applicable replicas. + # **Active shards** + # To improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation. + # If the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs. + # By default, write operations only wait for the primary shards to be active before proceeding (that is to say +wait_for_active_shards+ is +1+). + # This default can be overridden in the index settings dynamically by setting +index.write.wait_for_active_shards+. + # To alter this behavior per operation, use the +wait_for_active_shards request+ parameter. + # Valid values are all or any positive integer up to the total number of configured copies per shard in the index (which is +number_of_replicas++1). + # Specifying a negative value or a number greater than the number of shard copies will throw an error. + # For example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes). + # If you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding. + # This means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data. + # If +wait_for_active_shards+ is set on the request to +3+ (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding. + # This requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard. + # However, if you set +wait_for_active_shards+ to +all+ (or to +4+, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index. + # The operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard. + # It is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts. + # After the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary. + # The +_shards+ section of the API response reveals the number of shard copies on which replication succeeded and failed. + # **No operation (noop) updates** + # When updating a document by using this API, a new version of the document is always created even if the document hasn't changed. + # If this isn't acceptable use the +_update+ API with +detect_noop+ set to +true+. + # The +detect_noop+ option isn't available on this API because it doesn’t fetch the old source and isn't able to compare it against the new source. + # There isn't a definitive rule for when noop updates aren't acceptable. + # It's a combination of lots of factors like how frequently your data source sends updates that are actually noops and how many queries per second Elasticsearch runs on the shard receiving the updates. + # **Versioning** + # Each indexed document is given a version number. + # By default, internal versioning is used that starts at 1 and increments with each update, deletes included. + # Optionally, the version number can be set to an external value (for example, if maintained in a database). + # To enable this functionality, +version_type+ should be set to +external+. + # The value provided must be a numeric, long value greater than or equal to 0, and less than around +9.2e+18+. + # NOTE: Versioning is completely real time, and is not affected by the near real time aspects of search operations. + # If no version is provided, the operation runs without any version checks. + # When using the external version type, the system checks to see if the version number passed to the index request is greater than the version of the currently stored document. + # If true, the document will be indexed and the new version number used. + # If the value provided is less than or equal to the stored document's version number, a version conflict will occur and the index operation will fail. For example: + # ``` + # PUT my-index-000001/_doc/1?version=2&version_type=external + # { + # "user": { + # "id": "elkbee" + # } + # } + # In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1. + # If the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code). + # A nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used. + # Even the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order. # - # @option arguments [String] :id Document ID - # @option arguments [String] :index The name of the index - # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - # @option arguments [String] :op_type Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID (options: index, create) - # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (options: true, false, wait_for) - # @option arguments [String] :routing Specific routing value - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Number] :version Explicit version number for concurrency control - # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) - # @option arguments [Number] :if_seq_no only perform the index operation if the last operation that has changed the document has the specified sequence number - # @option arguments [Number] :if_primary_term only perform the index operation if the last operation that has changed the document has the specified primary term - # @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with - # @option arguments [Boolean] :require_alias When true, requires destination to be an alias. Default is false - # @option arguments [Boolean] :require_data_stream When true, requires the destination to be a data stream (existing or to-be-created). Default is false - # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Defaults to true. + # @option arguments [String] :id A unique identifier for the document. + # To automatically generate a document ID, use the +POST //_doc/+ request format and omit this parameter. + # @option arguments [String] :index The name of the data stream or index to target. + # If the target doesn't exist and matches the name or wildcard (+*+) pattern of an index template with a +data_stream+ definition, this request creates the data stream. + # If the target doesn't exist and doesn't match a data stream template, this request creates the index. + # You can check for existing targets with the resolve index API. (*Required*) + # @option arguments [Integer] :if_primary_term Only perform the operation if the document has this primary term. + # @option arguments [Integer] :if_seq_no Only perform the operation if the document has this sequence number. + # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Server default: true. + # @option arguments [String] :op_type Set to +create+ to only index the document if it does not already exist (put if absent). + # If a document with the specified +_id+ already exists, the indexing operation will fail. + # The behavior is the same as using the +/_create+ endpoint. + # If a document ID is specified, this paramater defaults to +index+. + # Otherwise, it defaults to +create+. + # If the request targets a data stream, an +op_type+ of +create+ is required. + # @option arguments [String] :pipeline The ID of the pipeline to use to preprocess incoming documents. + # If the index has a default ingest pipeline specified, then setting the value to +_none+ disables the default ingest pipeline for this request. + # If a final pipeline is configured it will always run, regardless of the value of this parameter. + # @option arguments [String] :refresh If +true+, Elasticsearch refreshes the affected shards to make this operation visible to search. + # If +wait_for+, it waits for a refresh to make this operation visible to search. + # If +false+, it does nothing with refreshes. Server default: false. + # @option arguments [String] :routing A custom value that is used to route operations to a specific shard. + # @option arguments [Time] :timeout The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.This parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs. + # Some reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation. + # By default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error. + # The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m. + # @option arguments [Integer] :version An explicit version number for concurrency control. + # It must be a non-negative long number. + # @option arguments [String] :version_type The version type. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # You can set it to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). + # The default value of +1+ means it waits for each primary shard to be active. Server default: 1. + # @option arguments [Boolean] :require_alias If +true+, the destination must be an index alias. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The document (*Required*) + # @option arguments [Hash] :body document # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create # def index(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'index' } - defined_params = %i[index id].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :id].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? @@ -65,9 +165,9 @@ def index(arguments = {}) method = _id ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST path = if _index && _id - "#{Utils.__listify(_index)}/_doc/#{Utils.__listify(_id)}" + "#{Utils.listify(_index)}/_doc/#{Utils.listify(_id)}" else - "#{Utils.__listify(_index)}/_doc" + "#{Utils.listify(_index)}/_doc" end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb index a73ec735ae..e9723521a3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb @@ -15,21 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module IndexLifecycleManagement module Actions - # Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted. + # Delete a lifecycle policy. + # You cannot delete policies that are currently in use. If the policy is being used to manage any indices, the request fails and returns an error. # - # @option arguments [String] :policy The name of the index lifecycle policy - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :policy Identifier for the policy. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-delete-lifecycle # def delete_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ilm.delete_lifecycle' } @@ -49,7 +50,7 @@ def delete_lifecycle(arguments = {}) _policy = arguments.delete(:policy) method = Elasticsearch::API::HTTP_DELETE - path = "_ilm/policy/#{Utils.__listify(_policy)}" + path = "_ilm/policy/#{Utils.listify(_policy)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb index dc5f6b9dcf..57f4cc5f98 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb @@ -15,22 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module IndexLifecycleManagement module Actions - # Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step. + # Explain the lifecycle state. + # Get the current lifecycle status for one or more indices. + # For data streams, the API retrieves the current lifecycle status for the stream's backing indices. + # The response indicates when the index entered each lifecycle state, provides the definition of the running phase, and information about any failures. # - # @option arguments [String] :index The name of the index to explain - # @option arguments [Boolean] :only_managed filters the indices included in the response to ones managed by ILM - # @option arguments [Boolean] :only_errors filters the indices included in the response to ones in an ILM error state, implies only_managed - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [String] :index Comma-separated list of data streams, indices, and aliases to target. Supports wildcards (+*+). + # To target all data streams and indices, use +*+ or +_all+. (*Required*) + # @option arguments [Boolean] :only_errors Filters the returned indices to only indices that are managed by ILM and are in an error state, either due to an encountering an error while executing the policy, or attempting to use a policy that does not exist. + # @option arguments [Boolean] :only_managed Filters the returned indices to only indices that are managed by ILM. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-explain-lifecycle # def explain_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ilm.explain_lifecycle' } @@ -45,12 +49,12 @@ def explain_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET - path = "#{Utils.__listify(_index)}/_ilm/explain" + path = "#{Utils.listify(_index)}/_ilm/explain" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb index 92b8c607b3..beb6d2c6e7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb @@ -15,21 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module IndexLifecycleManagement module Actions - # Returns the specified policy definition. Includes the policy version and last modified date. + # Get lifecycle policies. # - # @option arguments [String] :policy The name of the index lifecycle policy - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :policy Identifier for the policy. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-lifecycle # def get_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ilm.get_lifecycle' } @@ -48,7 +48,7 @@ def get_lifecycle(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _policy - "_ilm/policy/#{Utils.__listify(_policy)}" + "_ilm/policy/#{Utils.listify(_policy)}" else '_ilm/policy' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb index 0cf68bc5c1..f7fcb8533a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb @@ -15,18 +15,19 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module IndexLifecycleManagement module Actions - # Retrieves the current index lifecycle management (ILM) status. + # Get the ILM status. + # Get the current index lifecycle management status. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-status # def get_status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ilm.get_status' } @@ -34,7 +35,7 @@ def get_status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_ilm/status' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb index f459f1115d..82e49b9fb5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb @@ -15,21 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module IndexLifecycleManagement module Actions - # Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing + # Migrate to data tiers routing. + # Switch the indices, ILM policies, and legacy, composable, and component templates from using custom node attributes and attribute-based allocation filters to using data tiers. + # Optionally, delete one legacy index template. + # Using node roles enables ILM to automatically move the indices between data tiers. + # Migrating away from custom node attributes routing can be manually performed. + # This API provides an automated way of performing three out of the four manual steps listed in the migration guide: + # 1. Stop setting the custom hot attribute on new indices. + # 1. Remove custom allocation settings from existing ILM policies. + # 1. Replace custom allocation settings from existing indices with the corresponding tier preference. + # ILM must be stopped before performing the migration. + # Use the stop ILM and get ILM status APIs to wait until the reported operation mode is +STOPPED+. # - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :dry_run If set to true it will simulate the migration, providing a way to retrieve the ILM policies and indices that need to be migrated. The default is false + # @option arguments [Boolean] :dry_run If true, simulates the migration from node attributes based allocation filters to data tiers, but does not perform the migration. + # This provides a way to retrieve the indices and ILM policies that need to be migrated. + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Optionally specify a legacy index template name to delete and optionally specify a node attribute name used for index shard routing (defaults to "data") + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-migrate-to-data-tiers # def migrate_to_data_tiers(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ilm.migrate_to_data_tiers' } @@ -37,7 +50,7 @@ def migrate_to_data_tiers(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_ilm/migrate_to_data_tiers' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb index 212cb8efc6..7d0865a81a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb @@ -15,20 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module IndexLifecycleManagement module Actions - # Manually moves an index into the specified step and executes that step. + # Move to a lifecycle step. + # Manually move an index into a specific step in the lifecycle policy and run that step. + # WARNING: This operation can result in the loss of data. Manually moving an index into a specific step runs that step even if it has already been performed. This is a potentially destructive action and this should be considered an expert level API. + # You must specify both the current step and the step to be executed in the body of the request. + # The request will fail if the current step does not match the step currently running for the index + # This is to prevent the index from being moved from an unexpected step into the next step. + # When specifying the target (+next_step+) to which the index will be moved, either the name or both the action and name fields are optional. + # If only the phase is specified, the index will move to the first step of the first action in the target phase. + # If the phase and action are specified, the index will move to the first step of the specified action in the specified phase. + # Only actions specified in the ILM policy are considered valid. + # An index cannot move to a step that is not part of its policy. # - # @option arguments [String] :index The name of the index whose lifecycle step is to change + # @option arguments [String] :index The name of the index whose lifecycle step is to change (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The new lifecycle step to move to + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-move-to-step # def move_to_step(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ilm.move_to_step' } @@ -43,12 +53,12 @@ def move_to_step(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "_ilm/move/#{Utils.__listify(_index)}" + path = "_ilm/move/#{Utils.listify(_index)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb index 9035c24731..f3d5b822f8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb @@ -15,22 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module IndexLifecycleManagement module Actions - # Creates a lifecycle policy + # Create or update a lifecycle policy. + # If the specified policy exists, it is replaced and the policy version is incremented. + # NOTE: Only the latest version of the policy is stored, you cannot revert to previous versions. # - # @option arguments [String] :policy The name of the index lifecycle policy - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :policy Identifier for the policy. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The lifecycle policy definition to register + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-put-lifecycle # def put_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ilm.put_lifecycle' } @@ -50,7 +52,7 @@ def put_lifecycle(arguments = {}) _policy = arguments.delete(:policy) method = Elasticsearch::API::HTTP_PUT - path = "_ilm/policy/#{Utils.__listify(_policy)}" + path = "_ilm/policy/#{Utils.listify(_policy)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb index 96eaed6977..d5a5d8cb60 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb @@ -15,19 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module IndexLifecycleManagement module Actions - # Removes the assigned lifecycle policy and stops managing the specified index + # Remove policies from an index. + # Remove the assigned lifecycle policies from an index or a data stream's backing indices. + # It also stops managing the indices. # - # @option arguments [String] :index The name of the index to remove policy on + # @option arguments [String] :index The name of the index to remove policy on (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-remove-policy # def remove_policy(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ilm.remove_policy' } @@ -42,12 +44,12 @@ def remove_policy(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_ilm/remove" + path = "#{Utils.listify(_index)}/_ilm/remove" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb index 61fbb1b173..64b423f5a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module IndexLifecycleManagement module Actions - # Retries executing the policy for an index that is in the ERROR step. + # Retry a policy. + # Retry running the lifecycle policy for an index that is in the ERROR step. + # The API sets the policy back to the step where the error occurred and runs the step. + # Use the explain lifecycle state API to determine whether an index is in the ERROR step. # - # @option arguments [String] :index The name of the indices (comma-separated) whose failed lifecycle step is to be retry + # @option arguments [String] :index The name of the indices (comma-separated) whose failed lifecycle step is to be retry (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-retry # def retry(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ilm.retry' } @@ -42,12 +45,12 @@ def retry(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_ilm/retry" + path = "#{Utils.listify(_index)}/_ilm/retry" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb index de72ec031f..7ef1629a94 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb @@ -15,20 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module IndexLifecycleManagement module Actions - # Start the index lifecycle management (ILM) plugin. + # Start the ILM plugin. + # Start the index lifecycle management plugin if it is currently stopped. + # ILM is started automatically when the cluster is formed. + # Restarting ILM is necessary only when it has been stopped using the stop ILM API. # - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-start # def start(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ilm.start' } @@ -36,7 +39,7 @@ def start(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_ilm/start' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb index 81009ecb9c..69c252164a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb @@ -15,20 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module IndexLifecycleManagement module Actions - # Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin + # Stop the ILM plugin. + # Halt all lifecycle management operations and stop the index lifecycle management plugin. + # This is useful when you are performing maintenance on the cluster and need to prevent ILM from performing any actions on your indices. + # The API returns as soon as the stop request has been acknowledged, but the plugin might continue to run until in-progress operations complete and the plugin can be safely stopped. + # Use the get ILM status API to check whether ILM is running. # - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-stop # def stop(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ilm.stop' } @@ -36,7 +40,7 @@ def stop(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_ilm/stop' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb index b04cfd2b68..6d19386592 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb @@ -15,30 +15,43 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Adds a block to an index. + # Add an index block. + # Add an index block to an index. + # Index blocks limit the operations allowed on an index by blocking specific operation types. # - # @option arguments [List] :index A comma separated list of indices to add a block to - # @option arguments [String] :block The block to add (one of read, write, read_only or metadata) - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [String] :index A comma-separated list or wildcard expression of index names used to limit the request. + # By default, you must explicitly name the indices you are adding blocks to. + # To allow the adding of blocks to indices with +_all+, +*+, or other wildcard expressions, change the +action.destructive_requires_name+ setting to +false+. + # You can update this setting in the +elasticsearch.yml+ file or by using the cluster update settings API. (*Required*) + # @option arguments [String] :block The block type to add to the index. (*Required*) + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. + # For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true. + # @option arguments [String, Array] :expand_wildcards The type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # It supports comma-separated values, such as +open,hidden+. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. + # If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-blocks.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-add-block # def add_block(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.add_block' } - defined_params = %i[index block].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :block].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? @@ -49,14 +62,14 @@ def add_block(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) _block = arguments.delete(:block) method = Elasticsearch::API::HTTP_PUT - path = "#{Utils.__listify(_index)}/_block/#{Utils.__listify(_block)}" + path = "#{Utils.listify(_index)}/_block/#{Utils.listify(_block)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb index 00e736136e..f6fb85a312 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb @@ -15,20 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Performs the analysis process on a text and return the tokens breakdown of the text. + # Get tokens from text analysis. + # The analyze API performs analysis on a text string and returns the resulting tokens. + # Generating excessive amount of tokens may cause a node to run out of memory. + # The +index.analyze.max_token_count+ setting enables you to limit the number of tokens that can be produced. + # If more than this limit of tokens gets generated, an error occurs. + # The +_analyze+ endpoint without a specified index will always use +10000+ as its limit. # - # @option arguments [String] :index The name of the index to scope the operation + # @option arguments [String] :index Index used to derive the analyzer. + # If specified, the +analyzer+ or field parameter overrides this value. + # If no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Define analyzer/tokenizer parameters and the text on which the analysis should be performed + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-analyze # def analyze(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.analyze' } @@ -51,12 +58,12 @@ def analyze(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.__listify(_index)}/_analyze" - else - '_analyze' - end - params = Utils.process_params(arguments) + path = if _index + "#{Utils.listify(_index)}/_analyze" + else + '_analyze' + end + params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb index 45cdae60ff..69e7d7fc40 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit dcb1c1df18a84a0182caa631b4577d89a4602cfe +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch @@ -37,9 +37,8 @@ module Actions def cancel_migrate_reindex(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.cancel_migrate_reindex' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def cancel_migrate_reindex(arguments = {}) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "_migration/reindex/#{Utils.__listify(_index)}/_cancel" + path = "_migration/reindex/#{Utils.listify(_index)}/_cancel" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb index 0e214b6e48..c09d9a1f83 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb @@ -15,26 +15,38 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Clears all or specific caches for one or more indices. + # Clear the cache. + # Clear the cache of one or more indices. + # For data streams, the API clears the caches of the stream's backing indices. + # By default, the clear cache API clears all caches. + # To clear only specific caches, use the +fielddata+, +query+, or +request+ parameters. + # To clear the cache only of specific fields, use the +fields+ parameter. # - # @option arguments [List] :index A comma-separated list of index name to limit the operation - # @option arguments [Boolean] :fielddata Clear field data - # @option arguments [List] :fields A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) - # @option arguments [Boolean] :query Clear query caches - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :request Clear request cache + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. + # Supports wildcards (+*+). + # To target all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :fielddata If +true+, clears the fields cache. + # Use the +fields+ parameter to clear the cache of specific fields only. + # @option arguments [String, Array] :fields Comma-separated list of field names used to limit the +fielddata+ parameter. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Boolean] :query If +true+, clears the query cache. + # @option arguments [Boolean] :request If +true+, clears the request cache. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-clear-cache # def clear_cache(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.clear_cache' } @@ -47,13 +59,13 @@ def clear_cache(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "#{Utils.__listify(_index)}/_cache/clear" + "#{Utils.listify(_index)}/_cache/clear" else '_cache/clear' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb index fd336f75ee..cbf8386bef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb @@ -15,29 +15,62 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Clones an index + # Clone an index. + # Clone an existing index into a new index. + # Each original primary shard is cloned into a new primary shard in the new index. + # IMPORTANT: Elasticsearch does not apply index templates to the resulting index. + # The API also does not copy index metadata from the original index. + # Index metadata includes aliases, index lifecycle management phase definitions, and cross-cluster replication (CCR) follower information. + # For example, if you clone a CCR follower index, the resulting clone will not be a follower index. + # The clone API copies most index settings from the source index to the resulting index, with the exception of +index.number_of_replicas+ and +index.auto_expand_replicas+. + # To set the number of replicas in the resulting index, configure these settings in the clone request. + # Cloning works as follows: + # * First, it creates a new target index with the same definition as the source index. + # * Then it hard-links segments from the source index into the target index. If the file system does not support hard-linking, all segments are copied into the new index, which is a much more time consuming process. + # * Finally, it recovers the target index as though it were a closed index which had just been re-opened. + # IMPORTANT: Indices can only be cloned if they meet the following requirements: + # * The index must be marked as read-only and have a cluster health status of green. + # * The target index must not exist. + # * The source index must have the same number of primary shards as the target index. + # * The node handling the clone process must have sufficient free disk space to accommodate a second copy of the existing index. + # The current write index on a data stream cannot be cloned. + # In order to clone the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be cloned. + # NOTE: Mappings cannot be specified in the +_clone+ request. The mappings of the source index will be used for the target index. + # **Monitor the cloning process** + # The cloning process can be monitored with the cat recovery API or the cluster health API can be used to wait until all primary shards have been allocated by setting the +wait_for_status+ parameter to +yellow+. + # The +_clone+ API returns as soon as the target index has been added to the cluster state, before any shards have been allocated. + # At this point, all shards are in the state unassigned. + # If, for any reason, the target index can't be allocated, its primary shard will remain unassigned until it can be allocated on that node. + # Once the primary shard is allocated, it moves to state initializing, and the clone process begins. + # When the clone operation completes, the shard will become active. + # At that point, Elasticsearch will try to allocate any replicas and may decide to relocate the primary shard to another node. + # **Wait for active shards** + # Because the clone operation creates a new index to clone the shards to, the wait for active shards setting on index creation applies to the clone index action as well. # - # @option arguments [String] :index The name of the source index to clone - # @option arguments [String] :target The name of the target index to clone into - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the cloned index before the operation returns. + # @option arguments [String] :index Name of the source index to clone. (*Required*) + # @option arguments [String] :target Name of the target index to create. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clone-index.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-clone # def clone(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.clone' } - defined_params = %i[index target].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :target].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? @@ -48,14 +81,14 @@ def clone(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) _target = arguments.delete(:target) method = Elasticsearch::API::HTTP_PUT - path = "#{Utils.__listify(_index)}/_clone/#{Utils.__listify(_target)}" + path = "#{Utils.listify(_index)}/_clone/#{Utils.listify(_target)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb index e3533f1a27..14590e6b72 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb @@ -15,25 +15,45 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Closes an index. + # Close an index. + # A closed index is blocked for read or write operations and does not allow all operations that opened indices allow. + # It is not possible to index documents or to search for documents in a closed index. + # Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster. + # When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index. + # The shards will then go through the normal recovery process. + # The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. + # You can open and close multiple indices. + # An error is thrown if the request explicitly refers to a missing index. + # This behaviour can be turned off using the +ignore_unavailable=true+ parameter. + # By default, you must explicitly name the indices you are opening or closing. + # To open or close indices with +_all+, +*+, or other wildcard expressions, change the+action.destructive_requires_name+ setting to +false+. This setting can also be changed with the cluster update settings API. + # Closed indices consume a significant amount of disk-space which can cause problems in managed environments. + # Closing indices can be turned off with the cluster settings API by setting +cluster.indices.close.enable+ to +false+. # - # @option arguments [List] :index A comma separated list of indices to close - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [String] :wait_for_active_shards Sets the number of active shards to wait for before the operation returns. + # @option arguments [String, Array] :index Comma-separated list or wildcard expression of index names used to limit the request. (*Required*) + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-close # def close(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.close' } @@ -48,12 +68,12 @@ def close(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_close" + path = "#{Utils.listify(_index)}/_close" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb index 0135beabd9..3fa8aff58e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb @@ -15,23 +15,41 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Creates an index with optional settings and mappings. + # Create an index. + # You can use the create index API to add a new index to an Elasticsearch cluster. + # When creating an index, you can specify the following: + # * Settings for the index. + # * Mappings for fields in the index. + # * Index aliases + # **Wait for active shards** + # By default, index creation will only return a response to the client when the primary copies of each shard have been started, or the request times out. + # The index creation response will indicate what happened. + # For example, +acknowledged+ indicates whether the index was successfully created in the cluster, +while shards_acknowledged+ indicates whether the requisite number of shard copies were started for each shard in the index before timing out. + # Note that it is still possible for either +acknowledged+ or +shards_acknowledged+ to be +false+, but for the index creation to be successful. + # These values simply indicate whether the operation completed before the timeout. + # If +acknowledged+ is false, the request timed out before the cluster state was updated with the newly created index, but it probably will be created sometime soon. + # If +shards_acknowledged+ is false, then the request timed out before the requisite number of shards were started (by default just the primaries), even if the cluster state was successfully updated to reflect the newly created index (that is to say, +acknowledged+ is +true+). + # You can change the default of only waiting for the primary shards to start through the index setting +index.write.wait_for_active_shards+. + # Note that changing this setting will also affect the +wait_for_active_shards+ value on all subsequent write operations. # - # @option arguments [String] :index The name of the index - # @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for before the operation returns. - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String] :index Name of the index you wish to create. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The configuration for the index (`settings` and `mappings`) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create # def create(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.create' } @@ -46,12 +64,12 @@ def create(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_PUT - path = "#{Utils.__listify(_index)}" + path = Utils.listify(_index).to_s params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb index 66da1e830c..7aad33de30 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb @@ -15,21 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Creates a data stream + # Create a data stream. + # You must have a matching index template with data stream enabled. # - # @option arguments [String] :name The name of the data stream - # @option arguments [Time] :timeout Specify timeout for acknowledging the cluster state update - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String] :name Name of the data stream, which must meet the following criteria: + # Lowercase only; + # Cannot include +\+, +/+, +*+, +?+, +"+, +<+, +>+, +|+, +,+, +#+, +:+, or a space character; + # Cannot start with +-+, +_+, +++, or +.ds-+; + # Cannot be +.+ or +..+; + # Cannot be longer than 255 bytes. Multi-byte characters count towards this limit faster. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-data-stream # def create_data_stream(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.create_data_stream' } @@ -49,7 +55,7 @@ def create_data_stream(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = "_data_stream/#{Utils.__listify(_name)}" + path = "_data_stream/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb index e3292b439e..d57741f8ae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit dcb1c1df18a84a0182caa631b4577d89a4602cfe +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch @@ -39,9 +39,8 @@ module Actions def create_from(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.create_from' } - defined_params = [:source, :dest].inject({}) do |set_variables, variable| + defined_params = [:source, :dest].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -59,7 +58,7 @@ def create_from(arguments = {}) _dest = arguments.delete(:dest) method = Elasticsearch::API::HTTP_PUT - path = "_create_from/#{Utils.__listify(_source)}/#{Utils.__listify(_dest)}" + path = "_create_from/#{Utils.listify(_source)}/#{Utils.listify(_dest)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb index 4d7087632d..6ccf444209 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb @@ -15,19 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Provides statistics on operations happening in a data stream. + # Get data stream stats. + # Get statistics for one or more data streams. # - # @option arguments [List] :name A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams + # @option arguments [String] :name Comma-separated list of data streams used to limit the request. + # Wildcard expressions (+*+) are supported. + # To target all data streams in a cluster, omit this parameter or use +*+. + # @option arguments [String, Array] :expand_wildcards Type of data stream that wildcard patterns can match. + # Supports comma-separated values, such as +open,hidden+. Server default: open. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-data-streams-stats-1 # def data_streams_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.data_streams_stats' } @@ -46,11 +51,11 @@ def data_streams_stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_data_stream/#{Utils.__listify(_name)}/_stats" + "_data_stream/#{Utils.listify(_name)}/_stats" else '_data_stream/_stats' end - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb index bb53aaa0cc..2337c57617 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb @@ -15,24 +15,38 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Deletes an index. + # Delete indices. + # Deleting an index deletes its documents, shards, and metadata. + # It does not delete related Kibana components, such as data views, visualizations, or dashboards. + # You cannot delete the current write index of a data stream. + # To delete the index, you must roll over the data stream so a new write index is created. + # You can then use the delete index API to delete the previous write index. # - # @option arguments [List] :index A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [Boolean] :ignore_unavailable Ignore unavailable indexes (default: false) - # @option arguments [Boolean] :allow_no_indices Ignore if a wildcard expression resolves to no concrete indices (default: false) - # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open, closed, or hidden indices (options: open, closed, hidden, none, all) + # @option arguments [String, Array] :index Comma-separated list of indices to delete. + # You cannot specify index aliases. + # By default, this parameter does not support wildcards (+*+) or +_all+. + # To use wildcards or +_all+, set the +action.destructive_requires_name+ cluster setting to +false+. (*Required*) + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete # def delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.delete' } @@ -47,16 +61,16 @@ def delete(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_DELETE - path = "#{Utils.__listify(_index)}" + path = Utils.listify(_index).to_s params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb index abfd6ebed6..7a38834602 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb @@ -15,27 +15,32 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Deletes an alias. + # Delete an alias. + # Removes a data stream or index from an alias. # - # @option arguments [List] :index A comma-separated list of index names (supports wildcards); use `_all` for all indices - # @option arguments [List] :name A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. - # @option arguments [Time] :timeout Explicit timestamp for the document - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String, Array] :index Comma-separated list of data streams or indices used to limit the request. + # Supports wildcards (+*+). (*Required*) + # @option arguments [String, Array] :name Comma-separated list of aliases to remove. + # Supports wildcards (+*+). To remove all aliases, use +*+ or +_all+. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-alias # def delete_alias(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.delete_alias' } - defined_params = %i[index name].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :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? @@ -46,14 +51,14 @@ def delete_alias(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = ("#{Utils.__listify(_index)}/_aliases/#{Utils.__listify(_name)}" if _index && _name) + path = ("#{Utils.listify(_index)}/_aliases/#{Utils.listify(_name)}" if _index && _name) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb index a3dd50251c..626e523705 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb @@ -15,22 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Deletes the data stream lifecycle of the selected data streams. + # Delete data stream lifecycles. + # Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle. # - # @option arguments [List] :name A comma-separated list of data streams of which the data stream lifecycle will be deleted; use `*` to get all data streams - # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) - # @option arguments [Time] :timeout Explicit timestamp for the document + # @option arguments [String, Array] :name A comma-separated list of data streams of which the data stream lifecycle will be deleted; use +*+ to get all data streams (*Required*) + # @option arguments [String, Array] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [Time] :timeout Explicit timestamp for the document # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-delete-lifecycle.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-lifecycle # def delete_data_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.delete_data_lifecycle' } @@ -50,7 +51,7 @@ def delete_data_lifecycle(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = "_data_stream/#{Utils.__listify(_name)}/_lifecycle" + path = "_data_stream/#{Utils.listify(_name)}/_lifecycle" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb index c773bbc37a..d92701514e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb @@ -15,21 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Deletes a data stream. + # Delete data streams. + # Deletes one or more data streams and their backing indices. # - # @option arguments [List] :name A comma-separated list of data streams to delete; use `*` to delete all data streams - # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String, Array] :name Comma-separated list of data streams to delete. Wildcard (+*+) expressions are supported. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [String, Array] :expand_wildcards Type of data stream that wildcard patterns can match. Supports comma-separated values,such as +open,hidden+. Server default: open. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream # def delete_data_stream(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.delete_data_stream' } @@ -49,7 +50,7 @@ def delete_data_stream(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = "_data_stream/#{Utils.__listify(_name)}" + path = "_data_stream/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb index e4e20fad6b..7a33af9e9f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb @@ -15,21 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Deletes an index template. + # Delete an index template. + # The provided may contain multiple template names separated by a comma. If multiple template + # names are specified then there is no wildcard support and the provided names should match completely with + # existing templates. # - # @option arguments [String] :name The name of the template - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String, Array] :name Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-template.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-index-template # def delete_index_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.delete_index_template' } @@ -49,7 +52,7 @@ def delete_index_template(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = "_index_template/#{Utils.__listify(_name)}" + path = "_index_template/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb index ec10ca44aa..e08e8914c1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb @@ -15,21 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Deletes an index template. + # Delete a legacy index template. # - # @option arguments [String] :name The name of the template - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String] :name The name of the legacy index template to delete. + # Wildcard (+*+) expressions are supported. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-template-v1.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-template # def delete_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.delete_template' } @@ -49,11 +52,11 @@ def delete_template(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = "_template/#{Utils.__listify(_name)}" + path = "_template/#{Utils.listify(_name)}" params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb index cd3308a1b5..2ed7eba8d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb @@ -15,28 +15,41 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Analyzes the disk usage of each field of an index or data stream + # Analyze the index disk usage. + # Analyze the disk usage of each field of an index or data stream. + # This API might not support indices created in previous Elasticsearch versions. + # The result of a small index can be inaccurate as some parts of an index might not be analyzed by the API. + # NOTE: The total size of fields of the analyzed shards of the index in the response is usually smaller than the index +store_size+ value because some small metadata files are ignored and some parts of data files might not be scanned by the API. + # Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate. + # The stored size of the +_id+ field is likely underestimated while the +_source+ field is overestimated. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :index Comma-separated list of indices or data streams to analyze the disk usage - # @option arguments [Boolean] :run_expensive_tasks Must be set to [true] in order for the task to be performed. Defaults to false. - # @option arguments [Boolean] :flush Whether flush or not before analyzing the index disk usage. Defaults to true - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. + # It’s recommended to execute this API with a single index (or the latest backing index of a data stream) as the API consumes resources significantly. (*Required*) + # @option arguments [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. + # For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. Server default: open. + # @option arguments [Boolean] :flush If +true+, the API performs a flush before analysis. + # If +false+, the response may not include uncommitted data. Server default: true. + # @option arguments [Boolean] :ignore_unavailable If +true+, missing or closed indices are not included in the response. + # @option arguments [Boolean] :run_expensive_tasks Analyzing field disk usage is resource-intensive. + # To use the API, this parameter must be set to +true+. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-disk-usage.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-disk-usage # def disk_usage(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.disk_usage' } @@ -51,12 +64,12 @@ def disk_usage(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_disk_usage" + path = "#{Utils.listify(_index)}/_disk_usage" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb index b08ac1ecee..035dddf8c9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb @@ -15,30 +15,36 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Downsample an index + # Downsample an index. + # Aggregate a time series (TSDS) index and store pre-computed statistical summaries (+min+, +max+, +sum+, +value_count+ and +avg+) for each metric field grouped by a configured time interval. + # For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index. + # All documents within an hour interval are summarized and stored as a single document in the downsample index. + # NOTE: Only indices in a time series data stream are supported. + # Neither field nor document level security can be defined on the source index. + # The source index must be read only (+index.blocks.write: true+). # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :index The index to downsample (*Required*) - # @option arguments [String] :target_index The name of the target index to store downsampled data (*Required*) + # @option arguments [String] :index Name of the time series index to downsample. (*Required*) + # @option arguments [String] :target_index Name of the index to create. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The downsampling configuration (*Required*) + # @option arguments [Hash] :body config # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample # def downsample(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.downsample' } - defined_params = %i[index target_index].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :target_index].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? @@ -50,14 +56,14 @@ def downsample(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) _target_index = arguments.delete(:target_index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_downsample/#{Utils.__listify(_target_index)}" + path = "#{Utils.listify(_index)}/_downsample/#{Utils.listify(_target_index)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb index 34e9b34a54..bde6bd1d11 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb @@ -15,25 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns information about whether a particular index exists. + # Check indices. + # Check if one or more indices, index aliases, or data streams exist. # - # @option arguments [List] :index A comma-separated list of index names - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Boolean] :ignore_unavailable Ignore unavailable indexes (default: false) - # @option arguments [Boolean] :allow_no_indices Ignore if a wildcard expression resolves to no concrete indices (default: false) - # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Boolean] :include_defaults Whether to return all default setting for each of the indices. + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases. Supports wildcards (+*+). (*Required*) + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :flat_settings If +true+, returns settings in flat format. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Boolean] :include_defaults If +true+, return all default settings in the response. + # @option arguments [Boolean] :local If +true+, the request retrieves information from the local node only. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists # def exists(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.exists' } @@ -48,15 +53,15 @@ def exists(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_HEAD - path = "#{Utils.__listify(_index)}" + path = Utils.listify(_index).to_s params = Utils.process_params(arguments) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do perform_request(method, path, params, body, headers, request_opts).status == 200 end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb index dc414c862e..283be91388 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb @@ -15,29 +15,36 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns information about whether a particular alias exists. + # Check aliases. + # Check if one or more data stream or index aliases exist. # - # @option arguments [List] :name A comma-separated list of alias names to return - # @option arguments [List] :index A comma-separated list of index names to filter aliases - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked + # @option arguments [String, Array] :name Comma-separated list of aliases to check. Supports wildcards (+*+). (*Required*) + # @option arguments [String, Array] :index Comma-separated list of data streams or indices used to limit the request. Supports wildcards (+*+). + # To target all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If +false+, requests that include a missing data stream or index in the target indices or data streams return an error. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-alias # def exists_alias(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.exists_alias' } - defined_params = %i[name index].each_with_object({}) do |variable, set_variables| + defined_params = [:name, :index].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? @@ -55,13 +62,13 @@ def exists_alias(arguments = {}) method = Elasticsearch::API::HTTP_HEAD path = if _index && _name - "#{Utils.__listify(_index)}/_alias/#{Utils.__listify(_name)}" + "#{Utils.listify(_index)}/_alias/#{Utils.listify(_name)}" else - "_alias/#{Utils.__listify(_name)}" + "_alias/#{Utils.listify(_name)}" end params = Utils.process_params(arguments) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do perform_request(method, path, params, body, headers, request_opts).status == 200 end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb index b7c2fbb12a..b2cbdf23ff 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb @@ -15,22 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns information about whether a particular index template exists. + # Check index templates. + # Check whether index templates exist. # - # @option arguments [String] :name The name of the template - # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) + # @option arguments [String] :name Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index-templates.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-index-template # def exists_index_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.exists_index_template' } @@ -50,7 +49,7 @@ def exists_index_template(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_HEAD - path = "_index_template/#{Utils.__listify(_name)}" + path = "_index_template/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb index 3593eed264..152fe44ddb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb @@ -15,22 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns information about whether a particular index template exists. + # Check existence of index templates. + # Get information about whether index templates exist. + # Index templates define settings, mappings, and aliases that can be applied automatically to new indices. + # IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8. # - # @option arguments [List] :name The comma separated names of the index templates - # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated* + # @option arguments [String, Array] :name A comma-separated list of index template names used to limit the request. + # Wildcard (+*+) expressions are supported. (*Required*) + # @option arguments [Boolean] :flat_settings Indicates whether to use a flat format for the response. + # @option arguments [Boolean] :local Indicates whether to get information from the local node only. + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-template-exists-v1.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-template # def exists_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.exists_template' } @@ -50,10 +56,10 @@ def exists_template(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_HEAD - path = "_template/#{Utils.__listify(_name)}" + path = "_template/#{Utils.listify(_name)}" params = Utils.process_params(arguments) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do perform_request(method, path, params, body, headers, request_opts).status == 200 end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb index 8e5ceca257..3a431f8728 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb @@ -15,21 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Retrieves information about the index's current data stream lifecycle, such as any potential encountered error, time since creation etc. + # Get the status for a data stream lifecycle. + # Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution. # - # @option arguments [String] :index The name of the index to explain + # @option arguments [String, Array] :index The name of the index to explain (*Required*) # @option arguments [Boolean] :include_defaults indicates if the API should return the default values the system uses for the index's lifecycle # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-explain-lifecycle.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-explain-data-lifecycle # def explain_data_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.explain_data_lifecycle' } @@ -44,12 +45,12 @@ def explain_data_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET - path = "#{Utils.__listify(_index)}/_lifecycle/explain" + path = "#{Utils.listify(_index)}/_lifecycle/explain" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb index aaac263510..f011c41b19 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb @@ -15,27 +15,38 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns the field usage stats for each field of an index + # Get field usage stats. + # Get field usage information for each shard and field of an index. + # Field usage statistics are automatically captured when queries are running on a cluster. + # A shard-level search request that accesses a given field, even if multiple times during that request, is counted as a single use. + # The response body reports the per-shard usage count of the data structures that back the fields in the index. + # A given request will increment each count by a maximum value of 1, even if the request accesses the same field multiple times. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - # @option arguments [List] :fields A comma-separated list of fields to include in the stats if only a subset of fields should be returned (supports wildcards) - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [String, Array] :index Comma-separated list or wildcard expression of index names used to limit the request. (*Required*) + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. + # For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # @option arguments [Boolean] :ignore_unavailable If +true+, missing or closed indices are not included in the response. + # @option arguments [String, Array] :fields Comma-separated list or wildcard expressions of fields to include in the statistics. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # Set to all or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/field-usage-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-field-usage-stats # def field_usage_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.field_usage_stats' } @@ -50,12 +61,12 @@ def field_usage_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET - path = "#{Utils.__listify(_index)}/_field_usage_stats" + path = "#{Utils.listify(_index)}/_field_usage_stats" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb index 0e92583735..6aded9150c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb @@ -15,24 +15,39 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Performs the flush operation on one or more indices. + # Flush data streams or indices. + # Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index. + # When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart. + # Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush. + # After each operation has been flushed it is permanently stored in the Lucene index. + # This may mean that there is no need to maintain an additional copy of it in the transaction log. + # The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space. + # It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly. + # If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called. # - # @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string for all indices - # @option arguments [Boolean] :force Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) - # @option arguments [Boolean] :wait_if_ongoing If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running. - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to flush. + # Supports wildcards (+*+). + # To flush all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :force If +true+, the request forces a flush even if there are no changes to commit to the index. Server default: true. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Boolean] :wait_if_ongoing If +true+, the flush operation blocks until execution when another flush operation is running. + # If +false+, Elasticsearch returns an error if you request a flush when another flush operation is running. Server default: true. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-flush # def flush(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.flush' } @@ -45,13 +60,13 @@ def flush(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "#{Utils.__listify(_index)}/_flush" + "#{Utils.listify(_index)}/_flush" else '_flush' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb index 6ea744edc3..43d5b01fb3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb @@ -15,26 +15,64 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Performs the force merge operation on one or more indices. + # Force a merge. + # Perform the force merge operation on the shards of one or more indices. + # For data streams, the API forces a merge on the shards of the stream's backing indices. + # Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents. + # Merging normally happens automatically, but sometimes it is useful to trigger a merge manually. + # WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes). + # When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone". + # These soft-deleted documents are automatically cleaned up during regular segment merges. + # But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges. + # So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance. + # If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally. + # **Blocks during a force merge** + # Calls to this API block until the merge is complete (unless request contains +wait_for_completion=false+). + # If the client connection is lost before completion then the force merge process will continue in the background. + # Any new requests to force merge the same indices will also block until the ongoing force merge is complete. + # **Running force merge asynchronously** + # If the request contains +wait_for_completion=false+, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to get the status of the task. + # However, you can not cancel this task as the force merge task is not cancelable. + # Elasticsearch creates a record of this task as a document at +_tasks/+. + # When you are done with a task, you should delete the task document so Elasticsearch can reclaim the space. + # **Force merging multiple indices** + # You can force merge multiple indices with a single request by targeting: + # * One or more data streams that contain multiple backing indices + # * Multiple indices + # * One or more aliases + # * All data streams and indices in a cluster + # Each targeted shard is force-merged separately using the force_merge threadpool. + # By default each node only has a single +force_merge+ thread which means that the shards on that node are force-merged one at a time. + # If you expand the +force_merge+ threadpool on a node then it will force merge its shards in parallel + # Force merge makes the storage for the shard being merged temporarily increase, as it may require free space up to triple its size in case +max_num_segments parameter+ is set to +1+, to rewrite all segments into a new one. + # **Data streams and time-based indices** + # Force-merging is useful for managing a data stream's older backing indices and other time-based indices, particularly after a rollover. + # In these cases, each index only receives indexing traffic for a certain period of time. + # Once an index receive no more writes, its shards can be force-merged to a single segment. + # This can be a good idea because single-segment shards can sometimes use simpler and more efficient data structures to perform searches. + # For example: + # + + # POST /.ds-my-data-stream-2099.03.07-000001/_forcemerge?max_num_segments=1 + # + # - # @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + # @option arguments [String, Array] :index A comma-separated list of index names; use +_all+ or empty string to perform the operation on all indices + # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes +_all+ string or when no indices have been specified) + # @option arguments [String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. # @option arguments [Boolean] :flush Specify whether the index should be flushed after performing the operation (default: true) # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Number] :max_num_segments The number of segments the index should be merged into (default: dynamic) + # @option arguments [Integer] :max_num_segments The number of segments the index should be merged into (default: dynamic) # @option arguments [Boolean] :only_expunge_deletes Specify whether the operation should only expunge deleted documents # @option arguments [Boolean] :wait_for_completion Should the request wait until the force merge is completed. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-forcemerge # def forcemerge(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.forcemerge' } @@ -47,13 +85,13 @@ def forcemerge(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "#{Utils.__listify(_index)}/_forcemerge" + "#{Utils.listify(_index)}/_forcemerge" else '_forcemerge' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb index 33836e4e6c..421e1fce0c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb @@ -15,27 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns information about one or more indices. + # Get index information. + # Get information about one or more indices. For data streams, the API returns information about the + # stream’s backing indices. # - # @option arguments [List] :index A comma-separated list of index names - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Boolean] :ignore_unavailable Ignore unavailable indexes (default: false) - # @option arguments [Boolean] :allow_no_indices Ignore if a wildcard expression resolves to no concrete indices (default: false) - # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) - # @option arguments [String] :features Return only information on specified index features (options: aliases, mappings, settings) - # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Boolean] :include_defaults Whether to return all default setting for each of the indices. - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and index aliases used to limit the request. + # Wildcard expressions (*) are supported. (*Required*) + # @option arguments [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias, or _all value targets only + # missing or closed indices. This behavior applies even if the request targets other open indices. For example, + # a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard expressions can match. If the request can target data streams, this argument + # determines whether wildcard expressions match hidden data streams. Supports comma-separated values, + # such as open,hidden. Server default: open. + # @option arguments [Boolean] :flat_settings If true, returns settings in flat format. + # @option arguments [Boolean] :ignore_unavailable If false, requests that target a missing index return an error. + # @option arguments [Boolean] :include_defaults If true, return all default settings in the response. + # @option arguments [Boolean] :local If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [String, Array] :features Return only information on specified index features Server default: ['aliases', 'mappings', 'settings']. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get # def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.get' } @@ -50,12 +57,12 @@ def get(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET - path = "#{Utils.__listify(_index)}" + path = Utils.listify(_index).to_s params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb index a216dd6c10..63aef0ac69 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb @@ -15,29 +15,39 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns an alias. + # Get aliases. + # Retrieves information for one or more data stream or index aliases. # - # @option arguments [List] :name A comma-separated list of alias names to return - # @option arguments [List] :index A comma-separated list of index names to filter aliases - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked + # @option arguments [String, Array] :name Comma-separated list of aliases to retrieve. + # Supports wildcards (+*+). + # To retrieve all aliases, omit this parameter or use +*+ or +_all+. + # @option arguments [String, Array] :index Comma-separated list of data streams or indices used to limit the request. + # Supports wildcards (+*+). + # To target all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias # def get_alias(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.get_alias' } - defined_params = %i[name index].each_with_object({}) do |variable, set_variables| + defined_params = [:name, :index].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? @@ -53,11 +63,11 @@ def get_alias(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _index && _name - "#{Utils.__listify(_index)}/_alias/#{Utils.__listify(_name)}" + "#{Utils.listify(_index)}/_alias/#{Utils.listify(_name)}" elsif _index - "#{Utils.__listify(_index)}/_alias" + "#{Utils.listify(_index)}/_alias" elsif _name - "_alias/#{Utils.__listify(_name)}" + "_alias/#{Utils.listify(_name)}" else '_alias' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb index a675850592..ac8b7fb06c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb @@ -15,22 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns the data stream lifecycle of the selected data streams. + # Get data stream lifecycles. + # Get the data stream lifecycle configuration of one or more data streams. # - # @option arguments [List] :name A comma-separated list of data streams to get; use `*` to get all data streams - # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :include_defaults Return all relevant default configurations for the data stream (default: false) - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String, Array] :name Comma-separated list of data streams to limit the request. + # Supports wildcards (+*+). + # To target all data streams, omit this parameter or use +*+ or +_all+. (*Required*) + # @option arguments [String, Array] :expand_wildcards Type of data stream that wildcard patterns can match. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :include_defaults If +true+, return all default settings in the response. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-get-lifecycle.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle # def get_data_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.get_data_lifecycle' } @@ -50,7 +55,7 @@ def get_data_lifecycle(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET - path = "_data_stream/#{Utils.__listify(_name)}/_lifecycle" + path = "_data_stream/#{Utils.listify(_name)}/_lifecycle" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb index 3446984630..e2ac57055a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb @@ -15,18 +15,19 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Get data stream lifecycle statistics. + # Get data stream lifecycle stats. + # Get statistics about the data streams that are managed by a data stream lifecycle. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-get-lifecycle-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle-stats # def get_data_lifecycle_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.get_data_lifecycle_stats' } @@ -34,7 +35,7 @@ def get_data_lifecycle_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_lifecycle/stats' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb index 5e1ff6ff08..9fef6445ec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb @@ -15,23 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns data streams. + # Get data streams. + # Get information about one or more data streams. # - # @option arguments [List] :name A comma-separated list of data streams to get; use `*` to get all data streams - # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :include_defaults Return all relevant default configurations for the data stream (default: false) - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [Boolean] :verbose Whether the maximum timestamp for each data stream should be calculated and returned (default: false) + # @option arguments [String, Array] :name Comma-separated list of data stream names used to limit the request. + # Wildcard (+*+) expressions are supported. If omitted, all data streams are returned. + # @option arguments [String, Array] :expand_wildcards Type of data stream that wildcard patterns can match. + # Supports comma-separated values, such as +open,hidden+. Server default: open. + # @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Boolean] :verbose Whether the maximum timestamp for each data stream should be calculated and returned. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream # def get_data_stream(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.get_data_stream' } @@ -50,7 +53,7 @@ def get_data_stream(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_data_stream/#{Utils.__listify(_name)}" + "_data_stream/#{Utils.listify(_name)}" else '_data_stream' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb index a28f41d72d..d9f2b8112c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb @@ -15,48 +15,59 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns mapping for one or more fields. + # Get mapping definitions. + # Retrieves mapping definitions for one or more fields. + # For data streams, the API retrieves field mappings for the stream’s backing indices. + # This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. # - # @option arguments [List] :fields A comma-separated list of fields - # @option arguments [List] :index A comma-separated list of index names - # @option arguments [Boolean] :include_defaults Whether the default mapping values should be returned as well - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [String, Array] :fields Comma-separated list or wildcard expression of fields used to limit returned information. + # Supports wildcards (+*+). (*Required*) + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. + # Supports wildcards (+*+). + # To target all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Boolean] :include_defaults If +true+, return all default settings in the response. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping # def get_field_mapping(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.get_field_mapping' } - defined_params = %i[fields index].each_with_object({}) do |variable, set_variables| + defined_params = [:fields, :index].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 - _fields = arguments.delete(:field) || arguments.delete(:fields) - raise ArgumentError, "Required argument 'field' missing" unless _fields + raise ArgumentError, "Required argument 'fields' missing" unless arguments[:fields] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil + + _fields = arguments.delete(:fields) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index && _fields - "#{Utils.__listify(_index)}/_mapping/field/#{Utils.__listify(_fields)}" + "#{Utils.listify(_index)}/_mapping/field/#{Utils.listify(_fields)}" else - "_mapping/field/#{Utils.__listify(_fields)}" + "_mapping/field/#{Utils.listify(_fields)}" end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb index a56bd60806..b4115a1ed6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb @@ -15,23 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns an index template. + # Get index templates. + # Get information about one or more index templates. # - # @option arguments [String] :name A pattern that returned template names must match - # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated* - # @option arguments [Boolean] :include_defaults Return all relevant default configurations for the index template (default: false) + # @option arguments [String] :name Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported. + # @option arguments [Boolean] :local If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. + # @option arguments [Boolean] :flat_settings If true, returns settings in flat format. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template # def get_index_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.get_index_template' } @@ -50,7 +51,7 @@ def get_index_template(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_index_template/#{Utils.__listify(_name)}" + "_index_template/#{Utils.listify(_name)}" else '_index_template' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb index 8160fd20b3..4191b1389f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb @@ -15,24 +15,32 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns mappings for one or more indices. + # Get mapping definitions. + # For data streams, the API retrieves mappings for the stream’s backing indices. # - # @option arguments [List] :index A comma-separated list of index names - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated* + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. + # Supports wildcards (+*+). + # To target all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Boolean] :local If +true+, the request retrieves information from the local node only. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping # def get_mapping(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.get_mapping' } @@ -45,13 +53,13 @@ def get_mapping(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index - "#{Utils.__listify(_index)}/_mapping" + "#{Utils.listify(_index)}/_mapping" else '_mapping' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb index de308edebc..60f6975b24 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit dcb1c1df18a84a0182caa631b4577d89a4602cfe +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch @@ -37,9 +37,8 @@ module Actions def get_migrate_reindex_status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.get_migrate_reindex_status' } - defined_params = [:index].inject({}) do |set_variables, variable| + defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def get_migrate_reindex_status(arguments = {}) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET - path = "_migration/reindex/#{Utils.__listify(_index)}/_status" + path = "_migration/reindex/#{Utils.listify(_index)}/_status" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb index a388991927..fa21b76401 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb @@ -15,32 +15,45 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns settings for one or more indices. + # Get index settings. + # Get setting information for one or more indices. + # For data streams, it returns setting information for the stream's backing indices. # - # @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - # @option arguments [List] :name The name of the settings that should be included - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Boolean] :include_defaults Whether to return all default setting for each of the indices. + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit + # the request. Supports wildcards (+*+). To target all data streams and + # indices, omit this parameter or use +*+ or +_all+. + # @option arguments [String, Array] :name Comma-separated list or wildcard expression of settings to retrieve. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index + # alias, or +_all+ value targets only missing or closed indices. This + # behavior applies even if the request targets other open indices. For + # example, a request targeting +foo*,bar*+ returns an error if an index + # starts with foo but no index starts with +bar+. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. Server default: open. + # @option arguments [Boolean] :flat_settings If +true+, returns settings in flat format. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Boolean] :include_defaults If +true+, return all default settings in the response. + # @option arguments [Boolean] :local If +true+, the request retrieves information from the local node only. If + # +false+, information is retrieved from the master node. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is + # received before the timeout expires, the request fails and returns an + # error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-settings # def get_settings(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.get_settings' } - defined_params = %i[index name].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :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? @@ -48,7 +61,7 @@ def get_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) @@ -56,11 +69,11 @@ def get_settings(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _index && _name - "#{Utils.__listify(_index)}/_settings/#{Utils.__listify(_name)}" + "#{Utils.listify(_index)}/_settings/#{Utils.listify(_name)}" elsif _index - "#{Utils.__listify(_index)}/_settings" + "#{Utils.listify(_index)}/_settings" elsif _name - "_settings/#{Utils.__listify(_name)}" + "_settings/#{Utils.listify(_name)}" else '_settings' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb index 8c15a38ae5..53a503cc30 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb @@ -15,22 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns an index template. + # Get index templates. + # Get information about one or more index templates. + # IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8. # - # @option arguments [List] :name The comma separated names of the index templates - # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Time] :master_timeout Timeout for waiting for new cluster state in case it is blocked - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated* + # @option arguments [String, Array] :name Comma-separated list of index template names used to limit the request. + # Wildcard (+*+) expressions are supported. + # To return all index templates, omit this parameter or use a value of +_all+ or +*+. + # @option arguments [Boolean] :flat_settings If +true+, returns settings in flat format. + # @option arguments [Boolean] :local If +true+, the request retrieves information from the local node only. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template-v1.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-template # def get_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.get_template' } @@ -49,7 +54,7 @@ def get_template(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_template/#{Utils.__listify(_name)}" + "_template/#{Utils.listify(_name)}" else '_template' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb index de5cc44e6a..3e4a7eb870 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit dcb1c1df18a84a0182caa631b4577d89a4602cfe +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch @@ -47,7 +47,7 @@ def migrate_reindex(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_migration/reindex" + path = '_migration/reindex' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb index 7b70036ced..0cd003cac5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb @@ -15,21 +15,31 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Migrates an alias to a data stream + # Convert an index alias to a data stream. + # Converts an index alias to a data stream. + # You must have a matching index template that is data stream enabled. + # The alias must meet the following criteria: + # The alias must have a write index; + # All indices for the alias must have a +@timestamp+ field mapping of a +date+ or +date_nanos+ field type; + # The alias must not have any filters; + # The alias must not use custom routing. + # If successful, the request removes the alias and creates a data stream with the same name. + # The indices for the alias become hidden backing indices for the stream. + # The write index for the alias becomes the write index for the stream. # - # @option arguments [String] :name The name of the alias to migrate - # @option arguments [Time] :timeout Specify timeout for acknowledging the cluster state update - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String] :name Name of the index alias to convert to a data stream. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-migrate-to-data-stream # def migrate_to_data_stream(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.migrate_to_data_stream' } @@ -49,7 +59,7 @@ def migrate_to_data_stream(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST - path = "_data_stream/_migrate/#{Utils.__listify(_name)}" + path = "_data_stream/_migrate/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb index eb8dedc08e..157e34c6bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb @@ -15,19 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Modifies a data stream + # Update data streams. + # Performs one or more data stream modification actions in a single atomic operation. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The data stream modifications (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-modify-data-stream # def modify_data_stream(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.modify_data_stream' } @@ -37,7 +38,7 @@ def modify_data_stream(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_data_stream/_modify' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb index b1b6844cc0..dca7644c6e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb @@ -15,25 +15,52 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Opens an index. + # Open a closed index. + # For data streams, the API opens any closed backing indices. + # A closed index is blocked for read/write operations and does not allow all operations that opened indices allow. + # It is not possible to index documents or to search for documents in a closed index. + # This allows closed indices to not have to maintain internal data structures for indexing or searching documents, resulting in a smaller overhead on the cluster. + # When opening or closing an index, the master is responsible for restarting the index shards to reflect the new state of the index. + # The shards will then go through the normal recovery process. + # The data of opened or closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times. + # You can open and close multiple indices. + # An error is thrown if the request explicitly refers to a missing index. + # This behavior can be turned off by using the +ignore_unavailable=true+ parameter. + # By default, you must explicitly name the indices you are opening or closing. + # To open or close indices with +_all+, +*+, or other wildcard expressions, change the +action.destructive_requires_name+ setting to +false+. + # This setting can also be changed with the cluster update settings API. + # Closed indices consume a significant amount of disk-space which can cause problems in managed environments. + # Closing indices can be turned off with the cluster settings API by setting +cluster.indices.close.enable+ to +false+. + # Because opening or closing an index allocates its shards, the +wait_for_active_shards+ setting on index creation applies to the +_open+ and +_close+ index actions as well. # - # @option arguments [List] :index A comma separated list of indices to open - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [String] :wait_for_active_shards Sets the number of active shards to wait for before the operation returns. + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. + # Supports wildcards (+*+). + # By default, you must explicitly name the indices you using to limit the request. + # To limit a request using +_all+, +*+, or other wildcard expressions, change the +action.destructive_requires_name+ setting to false. + # You can update this setting in the +elasticsearch.yml+ file or using the cluster update settings API. (*Required*) + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-open # def open(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.open' } @@ -48,12 +75,12 @@ def open(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_open" + path = "#{Utils.listify(_index)}/_open" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb index 1a55479ee6..a60371738d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb @@ -15,20 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Promotes a data stream from a replicated data stream managed by CCR to a regular data stream + # Promote a data stream. + # Promote a data stream from a replicated data stream managed by cross-cluster replication (CCR) to a regular data stream. + # With CCR auto following, a data stream from a remote cluster can be replicated to the local cluster. + # These data streams can't be rolled over in the local cluster. + # These replicated data streams roll over only if the upstream data stream rolls over. + # In the event that the remote cluster is no longer available, the data stream in the local cluster can be promoted to a regular data stream, which allows these data streams to be rolled over in the local cluster. + # NOTE: When promoting a data stream, ensure the local cluster has a data stream enabled index template that matches the data stream. + # If this is missing, the data stream will not be able to roll over until a matching index template is created. + # This will affect the lifecycle management of the data stream and interfere with the data stream size and retention. # - # @option arguments [String] :name The name of the data stream - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String] :name The name of the data stream (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-promote-data-stream # def promote_data_stream(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.promote_data_stream' } @@ -48,7 +56,7 @@ def promote_data_stream(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST - path = "_data_stream/_promote/#{Utils.__listify(_name)}" + path = "_data_stream/_promote/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb index d18dce3386..7548a38c85 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb @@ -15,28 +15,35 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Creates or updates an alias. + # Create or update an alias. + # Adds a data stream or index to an alias. # - # @option arguments [List] :index A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. - # @option arguments [String] :name The name of the alias to be created or updated - # @option arguments [Time] :timeout Explicit timestamp for the document - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String, Array] :index Comma-separated list of data streams or indices to add. + # Supports wildcards (+*+). + # Wildcard patterns that match both data streams and indices return an error. (*Required*) + # @option arguments [String] :name Alias to update. + # If the alias doesn’t exist, the request creates it. + # Index alias names support date math. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The settings for the alias, such as `routing` or `filter` + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-alias # def put_alias(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.put_alias' } - defined_params = %i[index name].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :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? @@ -47,14 +54,14 @@ def put_alias(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = ("#{Utils.__listify(_index)}/_aliases/#{Utils.__listify(_name)}" if _index && _name) + path = ("#{Utils.listify(_index)}/_aliases/#{Utils.listify(_name)}" if _index && _name) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb index 2f03fa0bd3..1843ecc83d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb @@ -15,23 +15,31 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Updates the data stream lifecycle of the selected data streams. + # Update data stream lifecycles. + # Update the data stream lifecycle of the specified data streams. # - # @option arguments [List] :name A comma-separated list of data streams whose lifecycle will be updated; use `*` to set the lifecycle to all data streams - # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) - # @option arguments [Time] :timeout Explicit timestamp for the document - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String, Array] :name Comma-separated list of data streams used to limit the request. + # Supports wildcards (+*+). + # To target all data streams use +*+ or +_all+. (*Required*) + # @option arguments [String, Array] :expand_wildcards Type of data stream that wildcard patterns can match. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +hidden+, +open+, +closed+, +none+. Server default: open. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is + # received before the timeout expires, the request fails and returns an + # error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The data stream lifecycle configuration that consist of the data retention + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-put-lifecycle.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-lifecycle # def put_data_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.put_data_lifecycle' } @@ -51,7 +59,7 @@ def put_data_lifecycle(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = "_data_stream/#{Utils.__listify(_name)}/_lifecycle" + path = "_data_stream/#{Utils.listify(_name)}/_lifecycle" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb index 061f55edbc..0c8a5784e2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb @@ -15,23 +15,44 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Creates or updates an index template. + # Create or update an index template. + # Index templates define settings, mappings, and aliases that can be applied automatically to new indices. + # Elasticsearch applies templates to new indices based on an wildcard pattern that matches the index name. + # Index templates are applied during data stream or index creation. + # For data streams, these settings and mappings are applied when the stream's backing indices are created. + # Settings and mappings specified in a create index API request override any settings or mappings specified in an index template. + # Changes to index templates do not affect existing indices, including the existing backing indices of a data stream. + # You can use C-style +/* *\/+ block comments in index templates. + # You can include comments anywhere in the request body, except before the opening curly bracket. + # **Multiple matching templates** + # If multiple index templates match the name of a new index or data stream, the template with the highest priority is used. + # Multiple templates with overlapping index patterns at the same priority are not allowed and an error will be thrown when attempting to create a template matching an existing index template at identical priorities. + # **Composing aliases, mappings, and settings** + # When multiple component templates are specified in the +composed_of+ field for an index template, they are merged in the order specified, meaning that later component templates override earlier component templates. + # Any mappings, settings, or aliases from the parent index template are merged in next. + # Finally, any configuration on the index request itself is merged. + # Mapping definitions are merged recursively, which means that later mapping components can introduce new field mappings and update the mapping configuration. + # If a field mapping is already contained in an earlier component, its definition will be completely overwritten by the later one. + # This recursive merging strategy applies not only to field mappings, but also root options like +dynamic_templates+ and +meta+. + # If an earlier component contains a +dynamic_templates+ block, then by default new +dynamic_templates+ entries are appended onto the end. + # If an entry already exists with the same key, then it is overwritten by the new definition. # - # @option arguments [String] :name The name of the template - # @option arguments [Boolean] :create Whether the index template should only be added if new or can also replace an existing one + # @option arguments [String] :name Index or template name (*Required*) + # @option arguments [Boolean] :create If +true+, this request cannot replace or update existing index templates. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [String] :cause User defined reason for creating/updating the index template - # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The template definition (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-template.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-index-template # def put_index_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.put_index_template' } @@ -52,7 +73,7 @@ def put_index_template(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = "_index_template/#{Utils.__listify(_name)}" + path = "_index_template/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb index c0c85affa7..a928692779 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb @@ -15,26 +15,51 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Updates the index mappings. + # Update field mappings. + # Add new fields to an existing data stream or index. + # You can also use this API to change the search settings of existing fields and add new properties to existing object fields. + # For data streams, these changes are applied to all backing indices by default. + # **Add multi-fields to an existing field** + # Multi-fields let you index the same field in different ways. + # You can use this API to update the fields mapping parameter and enable multi-fields for an existing field. + # WARNING: If an index (or data stream) contains documents when you add a multi-field, those documents will not have values for the new multi-field. + # You can populate the new multi-field with the update by query API. + # **Change supported mapping parameters for an existing field** + # The documentation for each mapping parameter indicates whether you can update it for an existing field using this API. + # For example, you can use the update mapping API to update the +ignore_above+ parameter. + # **Change the mapping of an existing field** + # Except for supported mapping parameters, you can't change the mapping or field type of an existing field. + # Changing an existing field could invalidate data that's already indexed. + # If you need to change the mapping of a field in a data stream's backing indices, refer to documentation about modifying data streams. + # If you need to change the mapping of a field in other indices, create a new index with the correct mapping and reindex your data into that index. + # **Rename a field** + # Renaming a field would invalidate data already indexed under the old field name. + # Instead, add an alias field to create an alternate field name. # - # @option arguments [List] :index A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :write_index_only When true, applies mappings only to the write index of an alias or data stream + # @option arguments [String, Array] :index A comma-separated list of index names the mapping should be added to (supports wildcards); use +_all+ or omit to add the mapping on all indices. (*Required*) + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Boolean] :write_index_only If +true+, the mappings are applied only to the current write index for the target. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The mapping definition (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping # def put_mapping(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.put_mapping' } @@ -50,12 +75,12 @@ def put_mapping(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_PUT - path = "#{Utils.__listify(_index)}/_mapping" + path = "#{Utils.listify(_index)}/_mapping" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb index 887c817ab4..7b4802d47f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb @@ -15,28 +15,52 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Updates the index settings. + # Update index settings. + # Changes dynamic index settings in real time. + # For data streams, index setting changes are applied to all backing indices by default. + # To revert a setting to the default value, use a null value. + # The list of per-index settings that can be updated dynamically on live indices can be found in index module documentation. + # To preserve existing settings from being updated, set the +preserve_existing+ parameter to +true+. + # NOTE: You can only define new analyzers on closed indices. + # To add an analyzer, you must close the index, define the analyzer, and reopen the index. + # You cannot close the write index of a data stream. + # To update the analyzer for a data stream's write index and future backing indices, update the analyzer in the index template used by the stream. + # Then roll over the data stream to apply the new analyzer to the stream's write index and future backing indices. + # This affects searches and any new data added to the stream after the rollover. + # However, it does not affect the data stream's backing indices or their existing data. + # To change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it. # - # @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Boolean] :preserve_existing Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false` - # @option arguments [Boolean] :reopen Whether to close and reopen the index to apply non-dynamic settings. If set to `true` the indices to which the settings are being applied will be closed temporarily and then reopened in order to apply the changes. The default is `false` - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit + # the request. Supports wildcards (+*+). To target all data streams and + # indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index + # alias, or +_all+ value targets only missing or closed indices. This + # behavior applies even if the request targets other open indices. For + # example, a request targeting +foo*,bar*+ returns an error if an index + # starts with +foo+ but no index starts with +bar+. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target + # data streams, this argument determines whether wildcard expressions match + # hidden data streams. Supports comma-separated values, such as + # +open,hidden+. Server default: open. + # @option arguments [Boolean] :flat_settings If +true+, returns settings in flat format. + # @option arguments [Boolean] :ignore_unavailable If +true+, returns settings in flat format. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is + # received before the timeout expires, the request fails and returns an + # error. Server default: 30s. + # @option arguments [Boolean] :preserve_existing If +true+, existing index settings remain unchanged. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the + # timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The index settings to be updated (*Required*) + # @option arguments [Hash] :body settings # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings # def put_settings(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.put_settings' } @@ -51,13 +75,13 @@ def put_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_PUT path = if _index - "#{Utils.__listify(_index)}/_settings" + "#{Utils.listify(_index)}/_settings" else '_settings' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb index 93888e5236..1a84024197 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb @@ -15,23 +15,41 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Creates or updates an index template. + # Create or update an index template. + # Index templates define settings, mappings, and aliases that can be applied automatically to new indices. + # Elasticsearch applies templates to new indices based on an index pattern that matches the index name. + # IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8. + # Composable templates always take precedence over legacy templates. + # If no composable template matches a new index, matching legacy templates are applied according to their order. + # Index templates are only applied during index creation. + # Changes to index templates do not affect existing indices. + # Settings and mappings specified in create index API requests override any settings or mappings specified in an index template. + # You can use C-style +/* *\/+ block comments in index templates. + # You can include comments anywhere in the request body, except before the opening curly bracket. + # **Indices matching multiple templates** + # Multiple index templates can potentially match an index, in this case, both the settings and mappings are merged into the final configuration of the index. + # The order of the merging can be controlled using the order parameter, with lower order being applied first, and higher orders overriding them. + # NOTE: Multiple matching templates with the same order value will result in a non-deterministic merging order. # - # @option arguments [String] :name The name of the template - # @option arguments [Number] :order The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) - # @option arguments [Boolean] :create Whether the index template should only be added if new or can also replace an existing one - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String] :name The name of the template (*Required*) + # @option arguments [Boolean] :create If true, this request cannot replace or update existing index templates. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is + # received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Integer] :order Order in which Elasticsearch applies this template if index + # matches multiple templates.Templates with lower 'order' values are merged first. Templates with higher + # 'order' values are merged later, overriding templates with lower values. + # @option arguments [String] :cause [TODO] # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The template definition (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-template # def put_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.put_template' } @@ -52,7 +70,7 @@ def put_template(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = "_template/#{Utils.__listify(_name)}" + path = "_template/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb index c599681e96..ce0969b78e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb @@ -15,21 +15,39 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns information about ongoing index shard recoveries. + # Get index recovery information. + # Get information about ongoing and completed shard recoveries for one or more indices. + # For data streams, the API returns information for the stream's backing indices. + # All recoveries, whether ongoing or complete, are kept in the cluster state and may be reported on at any time. + # Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. + # When a shard recovery completes, the recovered shard is available for search and indexing. + # Recovery automatically occurs during the following processes: + # * When creating an index for the first time. + # * When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path. + # * Creation of new replica shard copies from the primary. + # * Relocation of a shard copy to a different node in the same cluster. + # * A snapshot restore operation. + # * A clone, shrink, or split operation. + # You can determine the cause of a shard recovery using the recovery or cat recovery APIs. + # The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. + # It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. + # This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API. # - # @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - # @option arguments [Boolean] :detailed Whether to display detailed information about shard recovery - # @option arguments [Boolean] :active_only Display only those recoveries that are currently on-going + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. + # Supports wildcards (+*+). + # To target all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :active_only If +true+, the response only includes ongoing shard recoveries. + # @option arguments [Boolean] :detailed If +true+, the response includes detailed information about shard recoveries. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-recovery # def recovery(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.recovery' } @@ -42,13 +60,13 @@ def recovery(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index - "#{Utils.__listify(_index)}/_recovery" + "#{Utils.listify(_index)}/_recovery" else '_recovery' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb index 732d10d415..286063149b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb @@ -15,22 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Performs the refresh operation in one or more indices. + # Refresh an index. + # A refresh makes recent operations performed on one or more indices available for search. + # For data streams, the API runs the refresh operation on the stream’s backing indices. + # By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds. + # You can change this default interval with the +index.refresh_interval+ setting. + # Refresh requests are synchronous and do not return a response until the refresh operation completes. + # Refreshes are resource-intensive. + # To ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible. + # If your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's +refresh=wait_for+ query parameter option. + # This option ensures the indexing operation waits for a periodic refresh before running the search. # - # @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. + # Supports wildcards (+*+). + # To target all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh # def refresh(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.refresh' } @@ -43,13 +58,13 @@ def refresh(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "#{Utils.__listify(_index)}/_refresh" + "#{Utils.listify(_index)}/_refresh" else '_refresh' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb index 3fb1dcf414..dc84b403ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb @@ -15,23 +15,32 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Reloads an index's search analyzers and their resources. + # Reload search analyzers. + # Reload an index's search analyzers and their resources. + # For data streams, the API reloads search analyzers and resources for the stream's backing indices. + # IMPORTANT: After reloading the search analyzers you should clear the request cache to make sure it doesn't contain responses derived from the previous versions of the analyzer. + # You can use the reload search analyzers API to pick up changes to synonym files used in the +synonym_graph+ or +synonym+ token filter of a search analyzer. + # To be eligible, the token filter must have an +updateable+ flag of +true+ and only be used in search analyzers. + # NOTE: This API does not perform a reload for each shard of an index. + # Instead, it performs a reload for each node containing index shards. + # As a result, the total shard count returned by the API can differ from the number of index shards. + # Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API. + # This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future. # - # @option arguments [List] :index A comma-separated list of index names to reload analyzers for + # @option arguments [String, Array] :index A comma-separated list of index names to reload analyzers for (*Required*) + # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes +_all+ string or when no indices have been specified) + # @option arguments [String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [String] :resource changed resource to reload analyzers from if applicable # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-reload-analyzers.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-reload-search-analyzers # def reload_search_analyzers(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.reload_search_analyzers' } @@ -46,12 +55,12 @@ def reload_search_analyzers(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET - path = "#{Utils.__listify(_index)}/_reload_search_analyzers" + path = "#{Utils.listify(_index)}/_reload_search_analyzers" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb index 8055280684..4b7c8cd616 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb @@ -15,24 +15,72 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Resolves the specified index expressions to return information about each cluster. If no index expression is provided, this endpoint will return information about all the remote clusters that are configured on the local cluster. + # Resolve the cluster. + # Resolve the specified index expressions to return information about each cluster, including the local "querying" cluster, if included. + # If no index expression is provided, the API will return information about all the remote clusters that are configured on the querying cluster. + # This endpoint is useful before doing a cross-cluster search in order to determine which remote clusters should be included in a search. + # You use the same index expression with this endpoint as you would for cross-cluster search. + # Index and cluster exclusions are also supported with this endpoint. + # For each cluster in the index expression, information is returned about: + # * Whether the querying ("local") cluster is currently connected to each remote cluster specified in the index expression. Note that this endpoint actively attempts to contact the remote clusters, unlike the +remote/info+ endpoint. + # * Whether each remote cluster is configured with +skip_unavailable+ as +true+ or +false+. + # * Whether there are any indices, aliases, or data streams on that cluster that match the index expression. + # * Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index). + # * Cluster version information, including the Elasticsearch server version. + # For example, +GET /_resolve/cluster/my-index-*,cluster*:my-index-*+ returns information about the local cluster and all remotely configured clusters that start with the alias +cluster*+. + # Each cluster returns information about whether it has any indices, aliases or data streams that match +my-index-*+.The ability to query without an index expression was added in version 8.18, so when + # querying remote clusters older than that, the local cluster will send the index + # expression +dummy*+ to those remote clusters. Thus, if an errors occur, you may see a reference + # to that index expression even though you didn't request it. If it causes a problem, you can + # instead include an index expression like +*:*+ to bypass the issue.You may want to exclude a cluster or index from a search when: + # * A remote cluster is not currently connected and is configured with +skip_unavailable=false+. Running a cross-cluster search under those conditions will cause the entire search to fail. + # * A cluster has no matching indices, aliases or data streams for the index expression (or your user does not have permissions to search them). For example, suppose your index expression is +logs*,remote1:logs*+ and the remote1 cluster has no indices, aliases or data streams that match +logs*+. In that case, that cluster will return no results from that cluster if you include it in a cross-cluster search. + # * The index expression (combined with any query parameters you specify) will likely cause an exception to be thrown when you do the search. In these cases, the "error" field in the +_resolve/cluster+ response will be present. (This is also where security/permission errors will be shown.) + # * A remote cluster is an older version that does not support the feature you want to use in your search.The +remote/info+ endpoint is commonly used to test whether the "local" cluster (the cluster being queried) is connected to its remote clusters, but it does not necessarily reflect whether the remote cluster is available or not. + # The remote cluster may be available, while the local cluster is not currently connected to it. + # You can use the +_resolve/cluster+ API to attempt to reconnect to remote clusters. + # For example with +GET _resolve/cluster+ or +GET _resolve/cluster/*:*+. + # The +connected+ field in the response will indicate whether it was successful. + # If a connection was (re-)established, this will also cause the +remote/info+ endpoint to now indicate a connected status. # - # @option arguments [List] :name A comma-separated list of cluster:index names or wildcard expressions - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed). Only allowed when providing an index expression. - # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled. Only allowed when providing an index expression. - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). Only allowed when providing an index expression. - # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open). Only allowed when providing an index expression. (options: open, closed, hidden, none, all) - # @option arguments [Time] :timeout The maximum time to wait for remote clusters to respond + # @option arguments [String, Array] :name A comma-separated list of names or index patterns for the indices, aliases, and data streams to resolve. + # Resources on remote clusters can be specified using the ++:++ syntax. + # Index and cluster exclusions (e.g., +-cluster1:*+) are also supported. + # If no index expression is specified, information about all remote clusters configured on the local cluster + # is returned without doing any index matching + # @option arguments [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing + # or closed indices. This behavior applies even if the request targets other open indices. For example, a request + # targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. + # NOTE: This option is only supported when specifying an index expression. You will get an error if you specify index + # options to the +_resolve/cluster+ API endpoint that takes no index expression. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. + # NOTE: This option is only supported when specifying an index expression. You will get an error if you specify index + # options to the +_resolve/cluster+ API endpoint that takes no index expression. Server default: open. + # @option arguments [Boolean] :ignore_throttled If true, concrete, expanded, or aliased indices are ignored when frozen. + # NOTE: This option is only supported when specifying an index expression. You will get an error if you specify index + # options to the +_resolve/cluster+ API endpoint that takes no index expression. + # @option arguments [Boolean] :ignore_unavailable If false, the request returns an error if it targets a missing or closed index. + # NOTE: This option is only supported when specifying an index expression. You will get an error if you specify index + # options to the +_resolve/cluster+ API endpoint that takes no index expression. + # @option arguments [Time] :timeout The maximum time to wait for remote clusters to respond. + # If a remote cluster does not respond within this timeout period, the API response + # will show the cluster as not connected and include an error message that the + # request timed out.The default timeout is unset and the query can take + # as long as the networking layer is configured to wait for remote clusters that are + # not responding (typically 30 seconds). # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-cluster-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster # def resolve_cluster(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.resolve_cluster' } @@ -51,7 +99,7 @@ def resolve_cluster(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_resolve/cluster/#{Utils.__listify(_name)}" + "_resolve/cluster/#{Utils.listify(_name)}" else '_resolve/cluster' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb index 9c6e38013d..b2aeac394d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb @@ -15,22 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Returns information about any matching indices, aliases, and data streams + # Resolve indices. + # Resolve the names and/or index patterns for indices, aliases, and data streams. + # Multiple patterns and remote clusters are supported. # - # @option arguments [List] :name A comma-separated list of names or wildcard expressions - # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + # @option arguments [String, Array] :name Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve. + # Resources on remote clusters can be specified using the ++:++ syntax. (*Required*) + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. + # For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-index-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-index # def resolve_index(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.resolve_index' } @@ -50,7 +58,7 @@ def resolve_index(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET - path = "_resolve/index/#{Utils.__listify(_name)}" + path = "_resolve/index/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index fe1c79258f..3d2aea201f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -15,32 +15,60 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Updates an alias to point to a new index when the existing index - # is considered to be too large or too old. + # Roll over to a new index. + # TIP: It is recommended to use the index lifecycle rollover action to automate rollovers. + # The rollover API creates a new index for a data stream or index alias. + # The API behavior depends on the rollover target. + # **Roll over a data stream** + # If you roll over a data stream, the API creates a new write index for the stream. + # The stream's previous write index becomes a regular backing index. + # A rollover also increments the data stream's generation. + # **Roll over an index alias with a write index** + # TIP: Prior to Elasticsearch 7.9, you'd typically use an index alias with a write index to manage time series data. + # Data streams replace this functionality, require less maintenance, and automatically integrate with data tiers. + # If an index alias points to multiple indices, one of the indices must be a write index. + # The rollover API creates a new write index for the alias with +is_write_index+ set to +true+. + # The API also +sets is_write_index+ to +false+ for the previous write index. + # **Roll over an index alias with one index** + # If you roll over an index alias that points to only one index, the API creates a new index for the alias and removes the original index from the alias. + # NOTE: A rollover creates a new index and is subject to the +wait_for_active_shards+ setting. + # **Increment index names for an alias** + # When you roll over an index alias, you can specify a name for the new index. + # If you don't specify a name and the current index ends with +-+ and a number, such as +my-index-000001+ or +my-index-3+, the new index name increments that number. + # For example, if you roll over an alias with a current index of +my-index-000001+, the rollover creates a new index named +my-index-000002+. + # This number is always six characters and zero-padded, regardless of the previous index's name. + # If you use an index alias for time series data, you can use date math in the index name to track the rollover date. + # For example, you can create an alias that points to an index named ++. + # If you create the index on May 6, 2099, the index's name is +my-index-2099.05.06-000001+. + # If you roll over the alias on May 7, 2099, the new index's name is +my-index-2099.05.07-000002+. # - # @option arguments [String] :alias The name of the alias to rollover - # @option arguments [String] :new_index The name of the rollover index - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Boolean] :dry_run If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the newly created rollover index before the operation returns. - # @option arguments [Boolean] :lazy If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams. + # @option arguments [String] :alias Name of the data stream or index alias to roll over. (*Required*) + # @option arguments [String] :new_index Name of the index to create. + # Supports date math. + # Data streams do not support this parameter. + # @option arguments [Boolean] :dry_run If +true+, checks whether the current index satisfies the specified conditions but does not perform a rollover. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # Set to all or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The conditions that needs to be met for executing rollover + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-rollover # def rollover(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.rollover' } - defined_params = %i[alias new_index].each_with_object({}) do |variable, set_variables| + defined_params = [:alias, :new_index].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? @@ -50,7 +78,7 @@ def rollover(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _alias = arguments.delete(:alias) @@ -58,9 +86,9 @@ def rollover(arguments = {}) method = Elasticsearch::API::HTTP_POST path = if _alias && _new_index - "#{Utils.__listify(_alias)}/_rollover/#{Utils.__listify(_new_index)}" + "#{Utils.listify(_alias)}/_rollover/#{Utils.listify(_new_index)}" else - "#{Utils.__listify(_alias)}/_rollover" + "#{Utils.listify(_alias)}/_rollover" end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb index 52d5e8c9c3..5a893f4355 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb @@ -15,22 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Provides low-level information about segments in a Lucene index. + # Get index segments. + # Get low-level information about the Lucene segments in index shards. + # For data streams, the API returns information about the stream's backing indices. # - # @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. + # Supports wildcards (+*+). + # To target all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-segments # def segments(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.segments' } @@ -43,13 +51,13 @@ def segments(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index - "#{Utils.__listify(_index)}/_segments" + "#{Utils.listify(_index)}/_segments" else '_segments' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb index 04000d4f7e..ff0c138a15 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb @@ -15,23 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Provides store information for shard copies of indices. + # Get index shard stores. + # Get store information about replica shards in one or more indices. + # For data streams, the API retrieves store information for the stream's backing indices. + # The index shard stores API returns the following information: + # * The node on which each replica shard exists. + # * The allocation ID for each replica shard. + # * A unique ID for each replica shard. + # * Any errors encountered while opening the shard index or from an earlier failure. + # By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards. # - # @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - # @option arguments [List] :status A comma-separated list of statuses used to filter on shards to get store information for (options: green, yellow, red, all) - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) + # @option arguments [String, Array] :index List of data streams, indices, and aliases used to limit the request. + # @option arguments [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias, or _all + # value targets only missing or closed indices. This behavior applies even if the request + # targets other open indices. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, + # this argument determines whether wildcard expressions match hidden data streams. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If true, missing or closed indices are not included in the response. + # @option arguments [Shardstorestatus] :status List of shard health statuses used to limit the request. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-shard-stores # def shard_stores(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.shard_stores' } @@ -44,13 +55,13 @@ def shard_stores(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index - "#{Utils.__listify(_index)}/_shard_stores" + "#{Utils.listify(_index)}/_shard_stores" else '_shard_stores' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb index 00a28b5ec1..64a96a9a4f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb @@ -15,29 +15,54 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Allow to shrink an existing index into a new index with fewer primary shards. + # Shrink an index. + # Shrink an index into a new index with fewer primary shards. + # Before you can shrink an index: + # * The index must be read-only. + # * A copy of every shard in the index must reside on the same node. + # * The index must have a green health status. + # To make shard allocation easier, we recommend you also remove the index's replica shards. + # You can later re-add replica shards as part of the shrink operation. + # The requested number of primary shards in the target index must be a factor of the number of shards in the source index. + # For example an index with 8 primary shards can be shrunk into 4, 2 or 1 primary shards or an index with 15 primary shards can be shrunk into 5, 3 or 1. + # If the number of shards in the index is a prime number it can only be shrunk into a single primary shard + # Before shrinking, a (primary or replica) copy of every shard in the index must be present on the same node. + # The current write index on a data stream cannot be shrunk. In order to shrink the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be shrunk. + # A shrink operation: + # * Creates a new target index with the same definition as the source index, but with a smaller number of primary shards. + # * Hard-links segments from the source index into the target index. If the file system does not support hard-linking, then all segments are copied into the new index, which is a much more time consuming process. Also if using multiple data paths, shards on different data paths require a full copy of segment files if they are not on the same disk since hardlinks do not work across disks. + # * Recovers the target index as though it were a closed index which had just been re-opened. Recovers shards to the +.routing.allocation.initial_recovery._id+ index setting. + # IMPORTANT: Indices can only be shrunk if they satisfy the following requirements: + # * The target index must not exist. + # * The source index must have more primary shards than the target index. + # * The number of primary shards in the target index must be a factor of the number of primary shards in the source index. The source index must have more primary shards than the target index. + # * The index must not contain more than 2,147,483,519 documents in total across all shards that will be shrunk into a single shard on the target index as this is the maximum number of docs that can fit into a single shard. + # * The node handling the shrink process must have sufficient free disk space to accommodate a second copy of the existing index. # - # @option arguments [String] :index The name of the source index to shrink - # @option arguments [String] :target The name of the target index to shrink into - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the shrunken index before the operation returns. + # @option arguments [String] :index Name of the source index to shrink. (*Required*) + # @option arguments [String] :target Name of the target index to create. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shrink-index.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-shrink # def shrink(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.shrink' } - defined_params = %i[index target].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :target].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? @@ -48,14 +73,14 @@ def shrink(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) _target = arguments.delete(:target) method = Elasticsearch::API::HTTP_PUT - path = "#{Utils.__listify(_index)}/_shrink/#{Utils.__listify(_target)}" + path = "#{Utils.listify(_index)}/_shrink/#{Utils.listify(_target)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb index a1f3f7ab50..5c25b779da 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb @@ -35,9 +35,8 @@ module Actions def simulate_index_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.simulate_index_template' } - defined_params = [:name].inject({}) do |set_variables, variable| + defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -51,7 +50,7 @@ def simulate_index_template(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST - path = "_index_template/_simulate_index/#{Utils.__listify(_name)}" + path = "_index_template/_simulate_index/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb index afb1e8306f..ff23b60c61 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb @@ -15,24 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Simulate resolving the given template name or body + # Simulate an index template. + # Get the index configuration that would be applied by a particular index template. # - # @option arguments [String] :name The name of the index template - # @option arguments [Boolean] :create Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one - # @option arguments [String] :cause User defined reason for dry-run creating the new template for simulation purposes - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [Boolean] :include_defaults Return all relevant default configurations for this template simulation (default: false) + # @option arguments [String] :name Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit + # this parameter and specify the template configuration in the request body. + # @option arguments [Boolean] :create If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body New index template definition to be simulated, if no index template name is specified + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-simulate-template.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-template # def simulate_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.simulate_template' } @@ -51,7 +52,7 @@ def simulate_template(arguments = {}) method = Elasticsearch::API::HTTP_POST path = if _name - "_index_template/_simulate/#{Utils.__listify(_name)}" + "_index_template/_simulate/#{Utils.listify(_name)}" else '_index_template/_simulate' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb index 4bd7412a9c..336c9895b8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb @@ -15,29 +15,55 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Allows you to split an existing index into a new index with more primary shards. + # Split an index. + # Split an index into a new index with more primary shards. + # * Before you can split an index: + # * The index must be read-only. + # * The cluster health status must be green. + # You can do make an index read-only with the following request using the add index block API: + # + + # PUT /my_source_index/_block/write + # + + # The current write index on a data stream cannot be split. + # In order to split the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be split. + # The number of times the index can be split (and the number of shards that each original shard can be split into) is determined by the +index.number_of_routing_shards+ setting. + # The number of routing shards specifies the hashing space that is used internally to distribute documents across shards with consistent hashing. + # For instance, a 5 shard index with +number_of_routing_shards+ set to 30 (5 x 2 x 3) could be split by a factor of 2 or 3. + # A split operation: + # * Creates a new target index with the same definition as the source index, but with a larger number of primary shards. + # * Hard-links segments from the source index into the target index. If the file system doesn't support hard-linking, all segments are copied into the new index, which is a much more time consuming process. + # * Hashes all documents again, after low level files are created, to delete documents that belong to a different shard. + # * Recovers the target index as though it were a closed index which had just been re-opened. + # IMPORTANT: Indices can only be split if they satisfy the following requirements: + # * The target index must not exist. + # * The source index must have fewer primary shards than the target index. + # * The number of primary shards in the target index must be a multiple of the number of primary shards in the source index. + # * The node handling the split process must have sufficient free disk space to accommodate a second copy of the existing index. # - # @option arguments [String] :index The name of the source index to split - # @option arguments [String] :target The name of the target index to split into - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master - # @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the shrunken index before the operation returns. + # @option arguments [String] :index Name of the source index to split. (*Required*) + # @option arguments [String] :target Name of the target index to create. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-split-index.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-split # def split(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.split' } - defined_params = %i[index target].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :target].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? @@ -48,14 +74,14 @@ def split(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) _target = arguments.delete(:target) method = Elasticsearch::API::HTTP_PUT - path = "#{Utils.__listify(_index)}/_split/#{Utils.__listify(_target)}" + path = "#{Utils.listify(_index)}/_split/#{Utils.listify(_target)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb index c054f9434a..ebb4c8bf96 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb @@ -15,34 +15,43 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Provides statistics on operations happening in an index. + # Get index statistics. + # For data streams, the API retrieves statistics for the stream's backing indices. + # By default, the returned statistics are index-level with +primaries+ and +total+ aggregations. + # +primaries+ are the values for only the primary shards. + # +total+ are the accumulated values for both primary and replica shards. + # To get shard-level statistics, set the +level+ parameter to +shards+. + # NOTE: When moving to another node, the shard-level statistics for a shard are cleared. + # Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed. # - # @option arguments [List] :metric Limit the information returned the specific metrics. (options: _all, completion, docs, fielddata, query_cache, flush, get, indexing, merge, request_cache, refresh, search, segments, store, warmer, bulk) - # @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - # @option arguments [List] :completion_fields A comma-separated list of fields for the `completion` index metric (supports wildcards) - # @option arguments [List] :fielddata_fields A comma-separated list of fields for the `fielddata` index metric (supports wildcards) - # @option arguments [List] :fields A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) - # @option arguments [List] :groups A comma-separated list of search groups for `search` index metric - # @option arguments [String] :level Return stats aggregated at cluster, index or shard level (options: cluster, indices, shards) - # @option arguments [Boolean] :include_segment_file_sizes Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) - # @option arguments [Boolean] :include_unloaded_segments If set to true segment stats will include stats for segments that are not currently loaded into memory - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :forbid_closed_indices If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices + # @option arguments [String, Array] :metric Limit the information returned the specific metrics. + # @option arguments [String, Array] :index A comma-separated list of index names; use +_all+ or empty string to perform the operation on all indices + # @option arguments [String, Array] :completion_fields Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument + # determines whether wildcard expressions match hidden data streams. Supports comma-separated values, + # such as +open,hidden+. + # @option arguments [String, Array] :fielddata_fields Comma-separated list or wildcard expressions of fields to include in fielddata statistics. + # @option arguments [String, Array] :fields Comma-separated list or wildcard expressions of fields to include in the statistics. + # @option arguments [Boolean] :forbid_closed_indices If true, statistics are not collected from closed indices. Server default: true. + # @option arguments [String] :groups Comma-separated list of search groups to include in the search statistics. + # @option arguments [Boolean] :include_segment_file_sizes If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). + # @option arguments [Boolean] :include_unloaded_segments If true, the response includes information from segments that are not loaded into memory. + # @option arguments [String] :level Indicates whether statistics are aggregated at the cluster, index, or shard level. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-stats # def stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.stats' } - defined_params = %i[metric index].each_with_object({}) do |variable, set_variables| + defined_params = [:metric, :index].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? @@ -58,11 +67,11 @@ def stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _index && _metric - "#{Utils.__listify(_index)}/_stats/#{Utils.__listify(_metric)}" + "#{Utils.listify(_index)}/_stats/#{Utils.listify(_metric)}" elsif _metric - "_stats/#{Utils.__listify(_metric)}" + "_stats/#{Utils.listify(_metric)}" elsif _index - "#{Utils.__listify(_index)}/_stats" + "#{Utils.listify(_index)}/_stats" else '_stats' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb index e7178802bf..0c0cd7a1c2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb @@ -15,21 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Updates index aliases. + # Create or update an alias. + # Adds a data stream or index to an alias. # - # @option arguments [Time] :timeout Request timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The definition of `actions` to perform (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases # def update_aliases(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.update_aliases' } @@ -39,7 +42,7 @@ def update_aliases(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_aliases' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb index 03a22a7bc7..fe8fbd4a5b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb @@ -15,32 +15,41 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Indices module Actions - # Allows a user to validate a potentially expensive query without executing it. + # Validate a query. + # Validates a query without running it. # - # @option arguments [List] :index A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices - # @option arguments [Boolean] :explain Return detailed information about the error - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [String] :q Query in the Lucene query string syntax - # @option arguments [String] :analyzer The analyzer to use for the query string - # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false) - # @option arguments [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR) - # @option arguments [String] :df The field to use as default where no field prefix is given in the query string - # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - # @option arguments [Boolean] :rewrite Provide a more detailed explanation showing the actual Lucene query that will be executed. - # @option arguments [Boolean] :all_shards Execute validation on all shards instead of one random shard per index + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search. + # Supports wildcards (+*+). + # To search all data streams or indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. Server default: true. + # @option arguments [Boolean] :all_shards If +true+, the validation is executed on all shards instead of one random shard per index. + # @option arguments [String] :analyzer Analyzer to use for the query string. + # This parameter can only be used when the +q+ query string parameter is specified. + # @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed. + # @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+. Server default: OR. + # @option arguments [String] :df Field to use as default where no field prefix is given in the query string. + # This parameter can only be used when the +q+ query string parameter is specified. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :explain If +true+, the response returns detailed information if an error has occurred. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + # @option arguments [Boolean] :rewrite If +true+, returns a more detailed explanation showing the actual Lucene query that will be executed. + # @option arguments [String] :q Query in the Lucene query string syntax. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The query definition specified with the Query DSL + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-validate.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-validate-query # def validate_query(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.validate_query' } @@ -63,11 +72,11 @@ def validate_query(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.__listify(_index)}/_validate/query" - else - '_validate/query' - end + path = if _index + "#{Utils.listify(_index)}/_validate/query" + else + '_validate/query' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb index 003f1240ba..a1efed0125 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb @@ -34,9 +34,8 @@ module Actions def chat_completion_unified(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.chat_completion_unified' } - defined_params = [:inference_id].inject({}) do |set_variables, variable| + defined_params = [:inference_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -50,7 +49,7 @@ def chat_completion_unified(arguments = {}) _inference_id = arguments.delete(:inference_id) method = Elasticsearch::API::HTTP_POST - path = "_inference/chat_completion/#{Utils.__listify(_inference_id)}/_stream" + path = "_inference/chat_completion/#{Utils.listify(_inference_id)}/_stream" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb index d32172bcd4..cb8b2e181f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb @@ -34,9 +34,8 @@ module Actions def completion(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.completion' } - defined_params = [:inference_id].inject({}) do |set_variables, variable| + defined_params = [:inference_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -50,7 +49,7 @@ def completion(arguments = {}) _inference_id = arguments.delete(:inference_id) method = Elasticsearch::API::HTTP_POST - path = "_inference/completion/#{Utils.__listify(_inference_id)}" + path = "_inference/completion/#{Utils.listify(_inference_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb index 5e9e570d6e..4bbbcd4bb5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb @@ -35,9 +35,8 @@ module Actions def delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.delete' } - defined_params = [:inference_id, :task_type].inject({}) do |set_variables, variable| + defined_params = [:inference_id, :task_type].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -54,9 +53,9 @@ def delete(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = if _task_type && _inference_id - "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}" + "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_inference_id)}" else - "_inference/#{Utils.__listify(_inference_id)}" + "_inference/#{Utils.listify(_inference_id)}" end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb index 8c419cb1c5..5db62f7c89 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb @@ -33,9 +33,8 @@ module Actions def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.get' } - defined_params = [:inference_id, :task_type].inject({}) do |set_variables, variable| + defined_params = [:inference_id, :task_type].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -50,11 +49,11 @@ def get(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _task_type && _inference_id - "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}" + "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_inference_id)}" elsif _inference_id - "_inference/#{Utils.__listify(_inference_id)}" + "_inference/#{Utils.listify(_inference_id)}" else - "_inference" + '_inference' end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb index 20a984dd46..23fe5e9c17 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb @@ -42,9 +42,8 @@ module Actions def put(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.put' } - defined_params = [:inference_id, :task_type].inject({}) do |set_variables, variable| + defined_params = [:inference_id, :task_type].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -62,9 +61,9 @@ def put(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = if _task_type && _inference_id - "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}" + "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_inference_id)}" else - "_inference/#{Utils.__listify(_inference_id)}" + "_inference/#{Utils.listify(_inference_id)}" end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb index 255ff5de0a..3657cad583 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb @@ -23,7 +23,7 @@ module API module Inference module Actions # Create a Watsonx inference endpoint. - # Creates an inference endpoint to perform an inference task with the +watsonxai+ service. + # Create an inference endpoint to perform an inference task with the +watsonxai+ service. # You need an IBM Cloud Databases for Elasticsearch deployment to use the +watsonxai+ inference service. # You can provision one through the IBM catalog, the Cloud Databases CLI plug-in, the Cloud Databases API, or Terraform. # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. @@ -38,21 +38,22 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-watsonx-ai.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-watsonx # def put_watsonx(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.put_watsonx' } - defined_params = [:task_type, :watsonx_inference_id].inject({}) do |set_variables, variable| + defined_params = [:task_type, :watsonx_inference_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type] - raise ArgumentError, - "Required argument 'watsonx_inference_id' missing" unless arguments[:watsonx_inference_id] + unless arguments[:watsonx_inference_id] + raise ArgumentError, + "Required argument 'watsonx_inference_id' missing" + end arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -64,7 +65,7 @@ def put_watsonx(arguments = {}) _watsonx_inference_id = arguments.delete(:watsonx_inference_id) method = Elasticsearch::API::HTTP_PUT - path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_watsonx_inference_id)}" + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_watsonx_inference_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb index 065fc63a49..2a61fe5855 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb @@ -34,9 +34,8 @@ module Actions def rerank(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.rerank' } - defined_params = [:inference_id].inject({}) do |set_variables, variable| + defined_params = [:inference_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -50,7 +49,7 @@ def rerank(arguments = {}) _inference_id = arguments.delete(:inference_id) method = Elasticsearch::API::HTTP_POST - path = "_inference/rerank/#{Utils.__listify(_inference_id)}" + path = "_inference/rerank/#{Utils.listify(_inference_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb index 76acbf89e9..1d4e4684b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb @@ -34,9 +34,8 @@ module Actions def sparse_embedding(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.sparse_embedding' } - defined_params = [:inference_id].inject({}) do |set_variables, variable| + defined_params = [:inference_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -50,7 +49,7 @@ def sparse_embedding(arguments = {}) _inference_id = arguments.delete(:inference_id) method = Elasticsearch::API::HTTP_POST - path = "_inference/sparse_embedding/#{Utils.__listify(_inference_id)}" + path = "_inference/sparse_embedding/#{Utils.listify(_inference_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb index bd13f1624b..52ed89e631 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb @@ -37,9 +37,8 @@ module Actions def stream_completion(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.stream_completion' } - defined_params = [:inference_id].inject({}) do |set_variables, variable| + defined_params = [:inference_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -53,7 +52,7 @@ def stream_completion(arguments = {}) _inference_id = arguments.delete(:inference_id) method = Elasticsearch::API::HTTP_POST - path = "_inference/completion/#{Utils.__listify(_inference_id)}/_stream" + path = "_inference/completion/#{Utils.listify(_inference_id)}/_stream" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb index 6ad374db68..7be9b68768 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb @@ -34,9 +34,8 @@ module Actions def text_embedding(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.text_embedding' } - defined_params = [:inference_id].inject({}) do |set_variables, variable| + defined_params = [:inference_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -50,7 +49,7 @@ def text_embedding(arguments = {}) _inference_id = arguments.delete(:inference_id) method = Elasticsearch::API::HTTP_POST - path = "_inference/text_embedding/#{Utils.__listify(_inference_id)}" + path = "_inference/text_embedding/#{Utils.listify(_inference_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb index 19b82dedbb..b48c08a45a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb @@ -38,9 +38,8 @@ module Actions def update(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'inference.update' } - defined_params = [:inference_id, :task_type].inject({}) do |set_variables, variable| + defined_params = [:inference_id, :task_type].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -58,9 +57,9 @@ def update(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = if _task_type && _inference_id - "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}/_update" + "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_inference_id)}/_update" else - "_inference/#{Utils.__listify(_inference_id)}/_update" + "_inference/#{Utils.listify(_inference_id)}/_update" end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb index ca00f362a8..0290eac247 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb @@ -15,17 +15,18 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns basic information about the cluster. + # Get cluster info. + # Get basic build, version, and cluster information. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info # def info(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'info' } @@ -33,7 +34,7 @@ def info(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb index a242aaea65..02f312f373 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb @@ -15,21 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Ingest module Actions - # Deletes a geoip database configuration + # Delete GeoIP database configurations. + # Delete one or more IP geolocation database configurations. # - # @option arguments [List] :id A comma-separated list of geoip database configurations to delete - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String, Array] :id A comma-separated list of geoip database configurations to delete (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-geoip-database-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-geoip-database # def delete_geoip_database(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.delete_geoip_database' } @@ -49,7 +51,7 @@ def delete_geoip_database(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE - path = "_ingest/geoip/database/#{Utils.__listify(_id)}" + path = "_ingest/geoip/database/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb index f3a329a184..dcef1cecce 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb @@ -15,21 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Ingest module Actions - # Deletes an ip location database configuration + # Delete IP geolocation database configurations. # - # @option arguments [List] :id A comma-separated list of ip location database configurations to delete - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String, Array] :id A comma-separated list of IP location database configurations. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. + # A value of +-1+ indicates that the request should never time out. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. + # A value of +-1+ indicates that the request should never time out. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-ip-location-database-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-ip-location-database # def delete_ip_location_database(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.delete_ip_location_database' } @@ -49,7 +53,7 @@ def delete_ip_location_database(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE - path = "_ingest/ip_location/database/#{Utils.__listify(_id)}" + path = "_ingest/ip_location/database/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb index d06a96d72f..c0650fe9bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb @@ -15,21 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Ingest module Actions - # Deletes a pipeline. + # Delete pipelines. + # Delete one or more ingest pipelines. # - # @option arguments [String] :id Pipeline ID - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :id Pipeline ID or wildcard expression of pipeline IDs used to limit the request. + # To delete all ingest pipelines in a cluster, use a value of +*+. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-pipeline-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-pipeline # def delete_pipeline(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.delete_pipeline' } @@ -49,7 +53,7 @@ def delete_pipeline(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE - path = "_ingest/pipeline/#{Utils.__listify(_id)}" + path = "_ingest/pipeline/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb index 6764c9cd68..0ada8ec02d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb @@ -15,18 +15,19 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Ingest module Actions - # Returns statistical information about geoip databases + # Get GeoIP statistics. + # Get download statistics for GeoIP2 databases that are used with the GeoIP processor. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-stats-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-processor.html # def geo_ip_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.geo_ip_stats' } @@ -34,7 +35,7 @@ def geo_ip_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_ingest/geoip/stats' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb index 1cc5f6078b..f048c4b255 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Ingest module Actions - # Returns geoip database configuration. + # Get GeoIP database configurations. + # Get information about one or more IP geolocation database configurations. # - # @option arguments [List] :id A comma-separated list of geoip database configurations to get; use `*` to get all geoip database configurations + # @option arguments [String, Array] :id A comma-separated list of database configuration IDs to retrieve. + # Wildcard (+*+) expressions are supported. + # To get all database configurations, omit this parameter or use +*+. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-geoip-database-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-geoip-database # def get_geoip_database(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.get_geoip_database' } @@ -46,7 +49,7 @@ def get_geoip_database(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _id - "_ingest/geoip/database/#{Utils.__listify(_id)}" + "_ingest/geoip/database/#{Utils.listify(_id)}" else '_ingest/geoip/database' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb index 9292718d01..250b9bb376 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb @@ -15,19 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Ingest module Actions - # Returns the specified ip location database configuration + # Get IP geolocation database configurations. # - # @option arguments [List] :id A comma-separated list of ip location database configurations to get; use `*` to get all ip location database configurations + # @option arguments [String, Array] :id Comma-separated list of database configuration IDs to retrieve. + # Wildcard (+*+) expressions are supported. + # To get all database configurations, omit this parameter or use +*+. + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. + # A value of +-1+ indicates that the request should never time out. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ip-location-database-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-ip-location-database # def get_ip_location_database(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.get_ip_location_database' } @@ -46,11 +51,11 @@ def get_ip_location_database(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _id - "_ingest/ip_location/database/#{Utils.__listify(_id)}" + "_ingest/ip_location/database/#{Utils.listify(_id)}" else '_ingest/ip_location/database' end - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb index 250ff6d312..dfdea6e0ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb @@ -15,21 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Ingest module Actions - # Returns a pipeline. + # Get pipelines. + # Get information about one or more ingest pipelines. + # This API returns a local reference of the pipeline. # - # @option arguments [String] :id Comma separated list of pipeline ids. Wildcards supported + # @option arguments [String] :id Comma-separated list of pipeline IDs to retrieve. + # Wildcard (+*+) expressions are supported. + # To get all ingest pipelines, omit this parameter or use +*+. + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Boolean] :summary Return pipelines without their definitions (default: false) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-pipeline-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-pipeline # def get_pipeline(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.get_pipeline' } @@ -48,7 +53,7 @@ def get_pipeline(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _id - "_ingest/pipeline/#{Utils.__listify(_id)}" + "_ingest/pipeline/#{Utils.listify(_id)}" else '_ingest/pipeline' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb index 6dbfa81bbc..eb12d3b194 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb @@ -15,18 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Ingest module Actions - # Returns a list of the built-in patterns. + # Run a grok processor. + # Extract structured fields out of a single text field within a document. + # You must choose which field to extract matched fields from, as well as the grok pattern you expect will match. + # A grok pattern is like a regular expression that supports aliased expressions that can be reused. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html#grok-processor-rest-get + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html # def processor_grok(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.processor_grok' } @@ -34,7 +37,7 @@ def processor_grok(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_ingest/processor/grok' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb index 235affce79..6fe9355da4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb @@ -15,22 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Ingest module Actions - # Puts the configuration for a geoip database to be downloaded + # Create or update a GeoIP database configuration. + # Refer to the create or update IP geolocation database configuration API. # - # @option arguments [String] :id The id of the database configuration - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :id ID of the database configuration to create or update. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The database configuration definition (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-geoip-database-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-geoip-database # def put_geoip_database(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.put_geoip_database' } @@ -51,7 +53,7 @@ def put_geoip_database(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT - path = "_ingest/geoip/database/#{Utils.__listify(_id)}" + path = "_ingest/geoip/database/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb index 0305aef837..121aaa7739 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb @@ -15,22 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Ingest module Actions - # Puts the configuration for a ip location database to be downloaded + # Create or update an IP geolocation database configuration. # - # @option arguments [String] :id The id of the database configuration - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :id The database configuration identifier. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. + # A value of +-1+ indicates that the request should never time out. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. + # If no response is received before the timeout expires, the cluster metadata update still applies but the response indicates that it was not completely acknowledged. + # A value of +-1+ indicates that the request should never time out. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The database configuration definition (*Required*) + # @option arguments [Hash] :body configuration # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-ip-location-database-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-ip-location-database # def put_ip_location_database(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.put_ip_location_database' } @@ -51,7 +55,7 @@ def put_ip_location_database(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT - path = "_ingest/ip_location/database/#{Utils.__listify(_id)}" + path = "_ingest/ip_location/database/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb index 0c626836e2..a7408179ac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb @@ -15,23 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Ingest module Actions - # Creates or updates a pipeline. + # Create or update a pipeline. + # Changes made using this API take effect immediately. # - # @option arguments [String] :id Pipeline ID + # @option arguments [String] :id ID of the ingest pipeline to create or update. (*Required*) + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Integer] :if_version Required version for optimistic concurrency control for pipeline updates - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The ingest definition (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-pipeline-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html # def put_pipeline(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.put_pipeline' } @@ -52,7 +53,7 @@ def put_pipeline(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT - path = "_ingest/pipeline/#{Utils.__listify(_id)}" + path = "_ingest/pipeline/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb index 8ea6e3c717..e2c085a3b9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb @@ -15,21 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Ingest module Actions - # Allows to simulate a pipeline with example documents. + # Simulate a pipeline. + # Run an ingest pipeline against a set of provided documents. + # You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request. # - # @option arguments [String] :id Pipeline ID - # @option arguments [Boolean] :verbose Verbose mode. Display data output for each processor in executed pipeline + # @option arguments [String] :id The pipeline to test. + # If you don't specify a +pipeline+ in the request body, this parameter is required. + # @option arguments [Boolean] :verbose If +true+, the response includes output data for each processor in the executed pipeline. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The simulate definition (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/simulate-pipeline-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-simulate # def simulate(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.simulate' } @@ -50,7 +53,7 @@ def simulate(arguments = {}) method = Elasticsearch::API::HTTP_POST path = if _id - "_ingest/pipeline/#{Utils.__listify(_id)}/_simulate" + "_ingest/pipeline/#{Utils.listify(_id)}/_simulate" else '_ingest/pipeline/_simulate' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb index 8a94ed0529..01fba8fde1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb @@ -15,24 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Performs a kNN search. + # Run a knn search. + # NOTE: The kNN search API has been replaced by the +knn+ option in the search API. + # Perform a k-nearest neighbor (kNN) search on a dense_vector field and return the matching documents. + # Given a query vector, the API finds the k closest vectors and returns those documents as search hits. + # Elasticsearch uses the HNSW algorithm to support efficient kNN search. + # Like most kNN algorithms, HNSW is an approximate method that sacrifices result accuracy for improved search speed. + # This means the results returned are not always the true k closest neighbors. + # The kNN search API supports restricting the search using a filter. + # The search will return the top k documents that also match the filter query. + # A kNN search response has the exact same structure as a search API response. + # However, certain sections have a meaning specific to kNN search: + # * The document +_score+ is determined by the similarity between the query and document vector. + # * The +hits.total+ object contains the total number of nearest neighbor candidates considered, which is +num_candidates * num_shards+. The +hits.total.relation+ will always be +eq+, indicating an exact value. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [List] :index A comma-separated list of index names to search; use `_all` to perform the operation on all indices - # @option arguments [List] :routing A comma-separated list of specific routing values + # @option arguments [String, Array] :index A comma-separated list of index names to search; + # use +_all+ or to perform the operation on all indices. (*Required*) + # @option arguments [String] :routing A comma-separated list of specific routing values. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The search definition + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search-api.html # def knn_search(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'knn_search' } @@ -57,7 +70,7 @@ def knn_search(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "#{Utils.__listify(_index)}/_knn_search" + path = "#{Utils.listify(_index)}/_knn_search" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb index b4a2a5fd9d..bf4fd1b493 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb @@ -15,20 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module License module Actions - # Deletes licensing information for the cluster + # Delete the license. + # When the license expires, your subscription level reverts to Basic. + # If the operator privileges feature is enabled, only operator users can use this API. # - # @option arguments [Time] :master_timeout Timeout for processing on master node - # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-license.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-delete # def delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'license.delete' } @@ -36,7 +38,7 @@ def delete(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_DELETE path = '_license' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb index ee9dc42840..5bac819bc0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb @@ -15,20 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module License module Actions - # Retrieves licensing information for the cluster + # Get license information. + # Get information about your Elastic license including its type, its status, when it was issued, and when it expires. # - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Boolean] :accept_enterprise Supported for backwards compatibility with 7.x. If this param is used it must be set to true *Deprecated* + # @option arguments [Boolean] :accept_enterprise If +true+, this parameter returns enterprise for Enterprise license types. If +false+, this parameter returns platinum for both platinum and enterprise license types. This behavior is maintained for backwards compatibility. + # This parameter is deprecated and will always be set to true in 8.x. Server default: true. + # @option arguments [Boolean] :local Specifies whether to retrieve local information. The default value is +false+, which means the information is retrieved from the master node. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-license.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get # def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'license.get' } @@ -36,7 +38,7 @@ def get(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_license' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb index 351df544dc..d0c94bf9c8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb @@ -15,18 +15,18 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module License module Actions - # Retrieves information about the status of the basic license. + # Get the basic license status. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-basic-status.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-basic-status # def get_basic_status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'license.get_basic_status' } @@ -34,7 +34,7 @@ def get_basic_status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_license/basic_status' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb index e611a4570c..28caa2533b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb @@ -15,18 +15,18 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module License module Actions - # Retrieves information about the status of the trial license. + # Get the trial status. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trial-status.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-trial-status # def get_trial_status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'license.get_trial_status' } @@ -34,7 +34,7 @@ def get_trial_status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_license/trial_status' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb index 54a72d52e3..e7ba4f3d3c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb @@ -15,22 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module License module Actions - # Updates the license for the cluster. + # Update the license. + # You can update your license at runtime without shutting down your nodes. + # License updates take effect immediately. + # If the license you are installing does not support all of the features that were available with your previous license, however, you are notified in the response. + # You must then re-submit the API request with the acknowledge parameter set to true. + # NOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license. + # If the operator privileges feature is enabled, only operator users can use this API. # - # @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false) - # @option arguments [Time] :master_timeout Timeout for processing on master node - # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster + # @option arguments [Boolean] :acknowledge Specifies whether you acknowledge the license changes. + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body licenses to be installed + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-license.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post # def post(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'license.post' } @@ -38,7 +44,7 @@ def post(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT path = '_license' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb index b95eb10bf9..735de4b124 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb @@ -15,21 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module License module Actions - # Starts an indefinite basic license. + # Start a basic license. + # Start an indefinite basic license, which gives access to all the basic features. + # NOTE: In order to start a basic license, you must not currently have a basic license. + # If the basic license does not support all of the features that are available with your current license, however, you are notified in the response. + # You must then re-submit the API request with the +acknowledge+ parameter set to +true+. + # To check the status of your basic license, use the get basic license API. # # @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false) - # @option arguments [Time] :master_timeout Timeout for processing on master node - # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-basic.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post-start-basic # def post_start_basic(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'license.post_start_basic' } @@ -37,7 +42,7 @@ def post_start_basic(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_license/start_basic' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb index 561bb0f061..0ef0cca0a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb @@ -15,21 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module License module Actions - # starts a limited time trial license. + # Start a trial. + # Start a 30-day trial, which gives access to all subscription features. + # NOTE: You are allowed to start a trial only if your cluster has not already activated a trial for the current major product version. + # For example, if you have already activated a trial for v8.0, you cannot start a new trial until v9.0. You can, however, request an extended trial at https://www.elastic.co/trialextension. + # To check the status of your trial, use the get trial status API. # - # @option arguments [String] :type The type of trial license to generate (default: "trial") # @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false) - # @option arguments [Time] :master_timeout Timeout for processing on master node + # @option arguments [String] :type_query_string [TODO] + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trial.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post-start-trial # def post_start_trial(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'license.post_start_trial' } @@ -37,7 +41,7 @@ def post_start_trial(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_license/start_trial' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb index 3b8a16c6d9..30fe90a7c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb @@ -15,19 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Logstash module Actions - # Deletes Logstash Pipelines used by Central Management + # Delete a Logstash pipeline. + # Delete a pipeline that is used for Logstash Central Management. + # If the request succeeds, you receive an empty response with an appropriate status code. # - # @option arguments [String] :id The ID of the Pipeline + # @option arguments [String] :id An identifier for the pipeline. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-delete-pipeline # def delete_pipeline(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'logstash.delete_pipeline' } @@ -47,7 +49,7 @@ def delete_pipeline(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE - path = "_logstash/pipeline/#{Utils.__listify(_id)}" + path = "_logstash/pipeline/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb index eaed065ef7..9debcd5da0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb @@ -15,19 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Logstash module Actions - # Retrieves Logstash Pipelines used by Central Management + # Get Logstash pipelines. + # Get pipelines that are used for Logstash Central Management. # - # @option arguments [String] :id A comma-separated list of Pipeline IDs + # @option arguments [String, Array] :id A comma-separated list of pipeline identifiers. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-get-pipeline # def get_pipeline(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'logstash.get_pipeline' } @@ -46,7 +47,7 @@ def get_pipeline(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _id - "_logstash/pipeline/#{Utils.__listify(_id)}" + "_logstash/pipeline/#{Utils.listify(_id)}" else '_logstash/pipeline' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb index 4e51cb3b13..5b5aa6efdf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb @@ -15,20 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Logstash module Actions - # Adds and updates Logstash Pipelines used for Central Management + # Create or update a Logstash pipeline. + # Create a pipeline that is used for Logstash Central Management. + # If the specified pipeline exists, it is replaced. # - # @option arguments [String] :id The ID of the Pipeline + # @option arguments [String] :id An identifier for the pipeline. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The Pipeline to add or update (*Required*) + # @option arguments [Hash] :body pipeline # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-put-pipeline # def put_pipeline(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'logstash.put_pipeline' } @@ -49,7 +51,7 @@ def put_pipeline(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT - path = "_logstash/pipeline/#{Utils.__listify(_id)}" + path = "_logstash/pipeline/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb index 24d3aa5fc1..aa6aa7820a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb @@ -15,19 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Clear the cached results from a trained model deployment + # Clear trained model deployment cache. + # Cache will be cleared on all nodes where the trained model is assigned. + # A trained model deployment may have an inference cache enabled. + # As requests are handled by each allocated node, their responses may be cached on that individual node. + # Calling this API clears the caches without restarting the deployment. # # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-trained-model-deployment-cache.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-clear-trained-model-deployment-cache # def clear_trained_model_deployment_cache(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.clear_trained_model_deployment_cache' } @@ -47,7 +51,7 @@ def clear_trained_model_deployment_cache(arguments = {}) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/trained_models/#{Utils.__listify(_model_id)}/deployment/cache/_clear" + path = "_ml/trained_models/#{Utils.listify(_model_id)}/deployment/cache/_clear" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb index 5683ec5644..bb084ad2e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb @@ -15,23 +15,29 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Closes one or more anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle. + # Close anomaly detection jobs. + # A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results. + # When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data. + # If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request. + # When a datafeed that has a specified end date stops, it automatically closes its associated job. # - # @option arguments [String] :job_id The name of the job to close - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) - # @option arguments [Boolean] :force True if the job should be forcefully closed - # @option arguments [Time] :timeout Controls the time to wait until a job has closed. Default to 30 minutes + # @option arguments [String] :job_id Identifier for the anomaly detection job. It can be a job identifier, a group name, or a wildcard expression. You can close multiple anomaly detection jobs in a single API request by using a group name, a comma-separated list of jobs, or a wildcard expression. You can close all jobs by using +_all+ or by specifying +*+ as the job identifier. (*Required*) + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: contains wildcard expressions and there are no jobs that match; contains the +_all+ string or no identifiers and there are no matches; or contains wildcard expressions and there are only partial matches. By default, it returns an empty jobs array when there are no matches and the subset of results when there are partial matches. + # If +false+, the request returns a 404 status code when there are no matches or only partial matches. Server default: true. + # @option arguments [Boolean] :force Use to close a failed job, or to forcefully close a job which has not responded to its initial close request; the request returns without performing the associated actions such as flushing buffers and persisting the model snapshots. + # If you want the job to be in a consistent state after the close job API returns, do not set to +true+. This parameter should be used only in situations where the job has already failed or where you are not interested in results the job might have recently produced or might produce in the future. + # @option arguments [Time] :timeout Controls the time to wait until a job has closed. Server default: 30m. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The URL params optionally sent in the body + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-close-job # def close_job(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.close_job' } @@ -51,7 +57,7 @@ def close_job(arguments = {}) _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_close" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_close" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb index 196d6e25b1..2ca3b10444 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb @@ -15,19 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Deletes a calendar. + # Delete a calendar. + # Remove all scheduled events from a calendar, then delete it. # - # @option arguments [String] :calendar_id The ID of the calendar to delete + # @option arguments [String] :calendar_id A string that uniquely identifies a calendar. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar # def delete_calendar(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_calendar' } @@ -47,7 +48,7 @@ def delete_calendar(arguments = {}) _calendar_id = arguments.delete(:calendar_id) method = Elasticsearch::API::HTTP_DELETE - path = "_ml/calendars/#{Utils.__listify(_calendar_id)}" + path = "_ml/calendars/#{Utils.listify(_calendar_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb index 2e9d83e657..c24801b254 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb @@ -15,25 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Deletes scheduled events from a calendar. + # Delete events from a calendar. # - # @option arguments [String] :calendar_id The ID of the calendar to modify - # @option arguments [String] :event_id The ID of the event to remove from the calendar + # @option arguments [String] :calendar_id A string that uniquely identifies a calendar. (*Required*) + # @option arguments [String] :event_id Identifier for the scheduled event. + # You can obtain this identifier by using the get calendar events API. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar-event # def delete_calendar_event(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_calendar_event' } - defined_params = %i[calendar_id event_id].each_with_object({}) do |variable, set_variables| + defined_params = [:calendar_id, :event_id].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? @@ -51,7 +52,7 @@ def delete_calendar_event(arguments = {}) _event_id = arguments.delete(:event_id) method = Elasticsearch::API::HTTP_DELETE - path = "_ml/calendars/#{Utils.__listify(_calendar_id)}/events/#{Utils.__listify(_event_id)}" + path = "_ml/calendars/#{Utils.listify(_calendar_id)}/events/#{Utils.listify(_event_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb index f13bc4a282..8e49a024d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb @@ -15,25 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Deletes anomaly detection jobs from a calendar. + # Delete anomaly jobs from a calendar. # - # @option arguments [String] :calendar_id The ID of the calendar to modify - # @option arguments [String] :job_id The ID of the job to remove from the calendar + # @option arguments [String] :calendar_id A string that uniquely identifies a calendar. (*Required*) + # @option arguments [String, Array] :job_id An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a + # comma-separated list of jobs or groups. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar-job # def delete_calendar_job(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_calendar_job' } - defined_params = %i[calendar_id job_id].each_with_object({}) do |variable, set_variables| + defined_params = [:calendar_id, :job_id].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? @@ -51,7 +52,7 @@ def delete_calendar_job(arguments = {}) _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_DELETE - path = "_ml/calendars/#{Utils.__listify(_calendar_id)}/jobs/#{Utils.__listify(_job_id)}" + path = "_ml/calendars/#{Utils.listify(_calendar_id)}/jobs/#{Utils.listify(_job_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb index 3bb2df5542..0cf70a621f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb @@ -15,21 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Deletes an existing data frame analytics job. + # Delete a data frame analytics job. # - # @option arguments [String] :id The ID of the data frame analytics to delete - # @option arguments [Boolean] :force True if the job should be forcefully deleted - # @option arguments [Time] :timeout Controls the time to wait until a job is deleted. Defaults to 1 minute + # @option arguments [String] :id Identifier for the data frame analytics job. (*Required*) + # @option arguments [Boolean] :force If +true+, it deletes a job that is not stopped; this method is quicker than stopping and deleting the job. + # @option arguments [Time] :timeout The time to wait for the job to be deleted. Server default: 1m. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-data-frame-analytics # def delete_data_frame_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_data_frame_analytics' } @@ -49,7 +49,7 @@ def delete_data_frame_analytics(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE - path = "_ml/data_frame/analytics/#{Utils.__listify(_id)}" + path = "_ml/data_frame/analytics/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb index d8778a21b3..76d29f6baa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb @@ -15,20 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Deletes an existing datafeed. + # Delete a datafeed. # - # @option arguments [String] :datafeed_id The ID of the datafeed to delete - # @option arguments [Boolean] :force True if the datafeed should be forcefully deleted + # @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed. This + # identifier can contain lowercase alphanumeric characters (a-z and 0-9), + # hyphens, and underscores. It must start and end with alphanumeric + # characters. (*Required*) + # @option arguments [Boolean] :force Use to forcefully delete a started datafeed; this method is quicker than + # stopping and deleting the datafeed. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-datafeed # def delete_datafeed(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_datafeed' } @@ -48,7 +52,7 @@ def delete_datafeed(arguments = {}) _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_DELETE - path = "_ml/datafeeds/#{Utils.__listify(_datafeed_id)}" + path = "_ml/datafeeds/#{Utils.listify(_datafeed_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb index 5d9f381d1d..e57a006074 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb @@ -15,22 +15,32 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Deletes expired and unused machine learning data. + # Delete expired ML data. + # Delete all job results, model snapshots and forecast data that have exceeded + # their retention days period. Machine learning state documents that are not + # associated with any job are also deleted. + # You can limit the request to a single or set of anomaly detection jobs by + # using a job identifier, a group name, a comma-separated list of jobs, or a + # wildcard expression. You can delete expired data for all anomaly detection + # jobs by using +_all+, by specifying +*+ as the ++, or by omitting the + # ++. # - # @option arguments [String] :job_id The ID of the job(s) to perform expired data hygiene for - # @option arguments [Number] :requests_per_second The desired requests per second for the deletion processes. - # @option arguments [Time] :timeout How long can the underlying delete processes run until they are canceled + # @option arguments [String] :job_id Identifier for an anomaly detection job. It can be a job identifier, a + # group name, or a wildcard expression. + # @option arguments [Float] :requests_per_second The desired requests per second for the deletion processes. The default + # behavior is no throttling. + # @option arguments [Time] :timeout How long can the underlying delete processes run until they are canceled. Server default: 8h. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body deleting expired data parameters + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-expired-data # def delete_expired_data(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_expired_data' } @@ -49,7 +59,7 @@ def delete_expired_data(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = if _job_id - "_ml/_delete_expired_data/#{Utils.__listify(_job_id)}" + "_ml/_delete_expired_data/#{Utils.listify(_job_id)}" else '_ml/_delete_expired_data' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb index 1079e0b75d..ad0cbf546a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb @@ -15,19 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Deletes a filter. + # Delete a filter. + # If an anomaly detection job references the filter, you cannot delete the + # filter. You must update or delete the job before you can delete the filter. # - # @option arguments [String] :filter_id The ID of the filter to delete + # @option arguments [String] :filter_id A string that uniquely identifies a filter. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-filter # def delete_filter(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_filter' } @@ -47,7 +49,7 @@ def delete_filter(arguments = {}) _filter_id = arguments.delete(:filter_id) method = Elasticsearch::API::HTTP_DELETE - path = "_ml/filters/#{Utils.__listify(_filter_id)}" + path = "_ml/filters/#{Utils.listify(_filter_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb index 0a0d52aab3..2379ca06d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb @@ -15,27 +15,38 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Deletes forecasts from a machine learning job. + # Delete forecasts from a job. + # By default, forecasts are retained for 14 days. You can specify a + # different retention period with the +expires_in+ parameter in the forecast + # jobs API. The delete forecast API enables you to delete one or more + # forecasts before they expire. # - # @option arguments [String] :job_id The ID of the job from which to delete forecasts - # @option arguments [String] :forecast_id The ID of the forecast to delete, can be comma delimited list. Leaving blank implies `_all` - # @option arguments [Boolean] :allow_no_forecasts Whether to ignore if `_all` matches no forecasts - # @option arguments [Time] :timeout Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [String] :forecast_id A comma-separated list of forecast identifiers. If you do not specify + # this optional parameter or if you specify +_all+ or +*+ the API deletes + # all forecasts from the job. + # @option arguments [Boolean] :allow_no_forecasts Specifies whether an error occurs when there are no forecasts. In + # particular, if this parameter is set to +false+ and there are no + # forecasts associated with the job, attempts to delete all forecasts + # return an error. Server default: true. + # @option arguments [Time] :timeout Specifies the period of time to wait for the completion of the delete + # operation. When this period of time elapses, the API fails and returns an + # error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-forecast # def delete_forecast(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_forecast' } - defined_params = %i[job_id forecast_id].each_with_object({}) do |variable, set_variables| + defined_params = [:job_id, :forecast_id].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? @@ -53,9 +64,9 @@ def delete_forecast(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = if _job_id && _forecast_id - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_forecast/#{Utils.__listify(_forecast_id)}" + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_forecast/#{Utils.listify(_forecast_id)}" else - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_forecast" + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_forecast" end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb index 7ae7b88f3f..db1a024a0c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb @@ -15,22 +15,32 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Deletes an existing anomaly detection job. + # Delete an anomaly detection job. + # All job configuration, model state and results are deleted. + # It is not currently possible to delete multiple jobs using wildcards or a + # comma separated list. If you delete a job that has a datafeed, the request + # first tries to delete the datafeed. This behavior is equivalent to calling + # the delete datafeed API with the same timeout and force parameters as the + # delete job request. # - # @option arguments [String] :job_id The ID of the job to delete - # @option arguments [Boolean] :force True if the job should be forcefully deleted - # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning - # @option arguments [Boolean] :delete_user_annotations Should annotations added by the user be deleted + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [Boolean] :force Use to forcefully delete an opened job; this method is quicker than + # closing and deleting the job. + # @option arguments [Boolean] :delete_user_annotations Specifies whether annotations that have been added by the + # user should be deleted along with any auto-generated annotations when the job is + # reset. + # @option arguments [Boolean] :wait_for_completion Specifies whether the request should return immediately or wait until the + # job deletion completes. Server default: true. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-job # def delete_job(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_job' } @@ -50,7 +60,7 @@ def delete_job(arguments = {}) _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_DELETE - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb index 85cb5b61f7..507287984e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb @@ -15,25 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Deletes an existing model snapshot. + # Delete a model snapshot. + # You cannot delete the active model snapshot. To delete that snapshot, first + # revert to a different one. To identify the active model snapshot, refer to + # the +model_snapshot_id+ in the results from the get jobs API. # - # @option arguments [String] :job_id The ID of the job to fetch - # @option arguments [String] :snapshot_id The ID of the snapshot to delete + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [String] :snapshot_id Identifier for the model snapshot. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-model-snapshot # def delete_model_snapshot(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_model_snapshot' } - defined_params = %i[job_id snapshot_id].each_with_object({}) do |variable, set_variables| + defined_params = [:job_id, :snapshot_id].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? @@ -51,7 +54,7 @@ def delete_model_snapshot(arguments = {}) _snapshot_id = arguments.delete(:snapshot_id) method = Elasticsearch::API::HTTP_DELETE - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/model_snapshots/#{Utils.__listify(_snapshot_id)}" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/model_snapshots/#{Utils.listify(_snapshot_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb index 56ea524b30..0cca4a8caf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb @@ -15,21 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Deletes an existing trained inference model that is currently not referenced by an ingest pipeline. + # Delete an unreferenced trained model. + # The request deletes a trained inference model that is not referenced by an ingest pipeline. # - # @option arguments [String] :model_id The ID of the trained model to delete - # @option arguments [Time] :timeout Controls the amount of time to wait for the model to be deleted. - # @option arguments [Boolean] :force True if the model should be forcefully deleted + # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*) + # @option arguments [Boolean] :force Forcefully deletes a trained model that is referenced by ingest pipelines or has a started deployment. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-trained-model # def delete_trained_model(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_trained_model' } @@ -49,7 +50,7 @@ def delete_trained_model(arguments = {}) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_DELETE - path = "_ml/trained_models/#{Utils.__listify(_model_id)}" + path = "_ml/trained_models/#{Utils.listify(_model_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb index cc56b05856..55e1ae300f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb @@ -15,25 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Deletes a model alias that refers to the trained model + # Delete a trained model alias. + # This API deletes an existing model alias that refers to a trained model. If + # the model alias is missing or refers to a model other than the one identified + # by the +model_id+, this API returns an error. # - # @option arguments [String] :model_alias The trained model alias to delete - # @option arguments [String] :model_id The trained model where the model alias is assigned + # @option arguments [String] :model_alias The model alias to delete. (*Required*) + # @option arguments [String] :model_id The trained model ID to which the model alias refers. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-trained-model-alias # def delete_trained_model_alias(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.delete_trained_model_alias' } - defined_params = %i[model_id model_alias].each_with_object({}) do |variable, set_variables| + defined_params = [:model_id, :model_alias].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? @@ -51,7 +54,7 @@ def delete_trained_model_alias(arguments = {}) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_DELETE - path = "_ml/trained_models/#{Utils.__listify(_model_id)}/model_aliases/#{Utils.__listify(_model_alias)}" + path = "_ml/trained_models/#{Utils.listify(_model_id)}/model_aliases/#{Utils.listify(_model_alias)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb index dc40e34a56..da232f07dd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Estimates the model memory + # Estimate job model memory usage. + # Make an estimation of the memory usage for an anomaly detection job model. + # The estimate is based on analysis configuration details for the job and cardinality + # estimates for the fields it references. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The analysis config, plus cardinality estimates for fields it references (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-estimate-model-memory # def estimate_model_memory(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.estimate_model_memory' } @@ -37,7 +40,7 @@ def estimate_model_memory(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_ml/anomaly_detectors/_estimate_model_memory' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb index 957f203433..513dbd04d6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb @@ -15,19 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Evaluates the data frame analytics for an annotated index. + # Evaluate data frame analytics. + # The API packages together commonly used evaluation metrics for various types + # of machine learning features. This has been designed for use on indexes + # created by data frame analytics. Evaluation requires both a ground truth + # field and an analytics result field to be present. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The evaluation definition (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-evaluate-data-frame # def evaluate_data_frame(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.evaluate_data_frame' } @@ -37,7 +41,7 @@ def evaluate_data_frame(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_ml/data_frame/_evaluate' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb index 8aef4b83b4..04c6a913b0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb @@ -15,20 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Explains a data frame analytics config. + # Explain data frame analytics config. + # This API provides explanations for a data frame analytics config that either + # exists already or one that has not been created yet. The following + # explanations are provided: + # * which fields are included or not in the analysis and why, + # * how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. + # If you have object fields or fields that are excluded via source filtering, they are not included in the explanation. # - # @option arguments [String] :id The ID of the data frame analytics to explain + # @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain + # lowercase alphanumeric characters (a-z and 0-9), hyphens, and + # underscores. It must start and end with alphanumeric characters. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The data frame analytics config to explain + # @option arguments [Hash] :body request body # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-explain-data-frame-analytics # def explain_data_frame_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.explain_data_frame_analytics' } @@ -51,11 +59,11 @@ def explain_data_frame_analytics(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _id - "_ml/data_frame/analytics/#{Utils.__listify(_id)}/_explain" - else - '_ml/data_frame/analytics/_explain' - end + path = if _id + "_ml/data_frame/analytics/#{Utils.listify(_id)}/_explain" + else + '_ml/data_frame/analytics/_explain' + end params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb index 48b8334e30..851d01678b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb @@ -15,25 +15,38 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Forces any buffered data to be processed by the job. + # Force buffered data to be processed. + # The flush jobs API is only applicable when sending data for analysis using + # the post data API. Depending on the content of the buffer, then it might + # additionally calculate new results. Both flush and close operations are + # similar, however the flush is more efficient if you are expecting to send + # more data for analysis. When flushing, the job remains open and is available + # to continue analyzing data. A close operation additionally prunes and + # persists the model state to disk and the job must be opened again before + # analyzing further data. # - # @option arguments [String] :job_id The name of the job to flush - # @option arguments [Boolean] :calc_interim Calculates interim results for the most recent bucket or all buckets within the latency period - # @option arguments [String] :start When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results - # @option arguments [String] :end When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results - # @option arguments [String] :advance_time Advances time to the given value generating results and updating the model for the advanced interval - # @option arguments [String] :skip_time Skips time to the given value without generating results or updating the model for the skipped interval + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [String, Time] :advance_time Specifies to advance to a particular time value. Results are generated + # and the model is updated for data from the specified time interval. + # @option arguments [Boolean] :calc_interim If true, calculates the interim results for the most recent bucket or all + # buckets within the latency period. + # @option arguments [String, Time] :end When used in conjunction with +calc_interim+ and +start+, specifies the + # range of buckets on which to calculate interim results. + # @option arguments [String, Time] :skip_time Specifies to skip to a particular time value. Results are not generated + # and the model is not updated for data from the specified time interval. + # @option arguments [String, Time] :start When used in conjunction with +calc_interim+, specifies the range of + # buckets on which to calculate interim results. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Flush parameters + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-flush-job # def flush_job(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.flush_job' } @@ -53,7 +66,7 @@ def flush_job(arguments = {}) _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_flush" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_flush" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb index fefe7dbdb5..d65a0d6ceb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb @@ -15,23 +15,36 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Predicts the future behavior of a time series by using its historical behavior. + # Predict future behavior of a time series. + # Forecasts are not supported for jobs that perform population analysis; an + # error occurs if you try to create a forecast for a job that has an + # +over_field_name+ in its configuration. Forcasts predict future behavior + # based on historical data. # - # @option arguments [String] :job_id The ID of the job to forecast for - # @option arguments [Time] :duration The duration of the forecast - # @option arguments [Time] :expires_in The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity. - # @option arguments [String] :max_model_memory The max memory able to be used by the forecast. Default is 20mb. + # @option arguments [String] :job_id Identifier for the anomaly detection job. The job must be open when you + # create a forecast; otherwise, an error occurs. (*Required*) + # @option arguments [Time] :duration A period of time that indicates how far into the future to forecast. For + # example, +30d+ corresponds to 30 days. The forecast starts at the last + # record that was processed. Server default: 1d. + # @option arguments [Time] :expires_in The period of time that forecast results are retained. After a forecast + # expires, the results are deleted. If set to a value of 0, the forecast is + # never automatically deleted. Server default: 14d. + # @option arguments [String] :max_model_memory The maximum memory the forecast can use. If the forecast needs to use + # more than the provided amount, it will spool to disk. Default is 20mb, + # maximum is 500mb and minimum is 1mb. If set to 40% or more of the job’s + # configured memory limit, it is automatically reduced to below that + # amount. Server default: 20mb. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Query parameters can be specified in the body + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-forecast # def forecast(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.forecast' } @@ -51,7 +64,7 @@ def forecast(arguments = {}) _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_forecast" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_forecast" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb index a68322b96a..f7f3715926 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb @@ -15,35 +15,39 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves anomaly detection job results for one or more buckets. + # Get anomaly detection job results for buckets. + # The API presents a chronological view of the records, grouped by bucket. # - # @option arguments [String] :job_id ID of the job to get bucket results from - # @option arguments [String] :timestamp The timestamp of the desired single bucket result - # @option arguments [Boolean] :expand Include anomaly records - # @option arguments [Boolean] :exclude_interim Exclude interim results - # @option arguments [Integer] :from skips a number of buckets - # @option arguments [Integer] :size specifies a max number of buckets to get - # @option arguments [String] :start Start time filter for buckets - # @option arguments [String] :end End time filter for buckets - # @option arguments [Double] :anomaly_score Filter for the most anomalous buckets - # @option arguments [String] :sort Sort buckets by a particular field - # @option arguments [Boolean] :desc Set the sort direction + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [String, Time] :timestamp The timestamp of a single bucket result. If you do not specify this + # parameter, the API returns information about all buckets. + # @option arguments [Float] :anomaly_score Returns buckets with anomaly scores greater or equal than this value. Server default: 0. + # @option arguments [Boolean] :desc If +true+, the buckets are sorted in descending order. + # @option arguments [String, Time] :end Returns buckets with timestamps earlier than this time. +-1+ means it is + # unset and results are not limited to specific timestamps. Server default: -1. + # @option arguments [Boolean] :exclude_interim If +true+, the output excludes interim results. + # @option arguments [Boolean] :expand If true, the output includes anomaly records. + # @option arguments [Integer] :from Skips the specified number of buckets. Server default: 0. + # @option arguments [Integer] :size Specifies the maximum number of buckets to obtain. Server default: 100. + # @option arguments [String] :sort Specifies the sort field for the requested buckets. Server default: timestamp. + # @option arguments [String, Time] :start Returns buckets with timestamps after this time. +-1+ means it is unset + # and results are not limited to specific timestamps. Server default: -1. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Bucket selection details if not provided in URI + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-buckets # def get_buckets(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_buckets' } - defined_params = %i[job_id timestamp].each_with_object({}) do |variable, set_variables| + defined_params = [:job_id, :timestamp].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? @@ -65,11 +69,11 @@ def get_buckets(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _job_id && _timestamp - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/buckets/#{Utils.__listify(_timestamp)}" - else - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/buckets" - end + path = if _job_id && _timestamp + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/buckets/#{Utils.listify(_timestamp)}" + else + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/buckets" + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb index d207e8872b..8e8c9ff299 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb @@ -15,24 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves information about the scheduled events in calendars. + # Get info about events in calendars. # - # @option arguments [String] :calendar_id The ID of the calendar containing the events - # @option arguments [String] :job_id Get events for the job. When this option is used calendar_id must be '_all' - # @option arguments [String] :start Get events after this time - # @option arguments [Date] :end Get events before this time - # @option arguments [Integer] :from Skips a number of events - # @option arguments [Integer] :size Specifies a max number of events to get + # @option arguments [String] :calendar_id A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using +_all+ or +*+ or by omitting the calendar identifier. (*Required*) + # @option arguments [String, Time] :end Specifies to get events with timestamps earlier than this time. + # @option arguments [Integer] :from Skips the specified number of events. Server default: 0. + # @option arguments [String] :job_id Specifies to get events for a specific anomaly detection job identifier or job group. It must be used with a calendar identifier of +_all+ or +*+. + # @option arguments [Integer] :size Specifies the maximum number of events to obtain. Server default: 100. + # @option arguments [String, Time] :start Specifies to get events with timestamps after this time. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-calendar-events # def get_calendar_events(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_calendar_events' } @@ -52,7 +52,7 @@ def get_calendar_events(arguments = {}) _calendar_id = arguments.delete(:calendar_id) method = Elasticsearch::API::HTTP_GET - path = "_ml/calendars/#{Utils.__listify(_calendar_id)}/events" + path = "_ml/calendars/#{Utils.listify(_calendar_id)}/events" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb index b068075dbe..0a2bde4ba1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb @@ -15,22 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves configuration information for calendars. + # Get calendar configuration info. # - # @option arguments [String] :calendar_id The ID of the calendar to fetch - # @option arguments [Integer] :from skips a number of calendars - # @option arguments [Integer] :size specifies a max number of calendars to get + # @option arguments [String] :calendar_id A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using +_all+ or +*+ or by omitting the calendar identifier. + # @option arguments [Integer] :from Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier. Server default: 0. + # @option arguments [Integer] :size Specifies the maximum number of calendars to obtain. This parameter is supported only when you omit the calendar identifier. Server default: 10000. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The from and size parameters optionally sent in the body + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-calendars # def get_calendars(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_calendars' } @@ -53,11 +53,11 @@ def get_calendars(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _calendar_id - "_ml/calendars/#{Utils.__listify(_calendar_id)}" - else - '_ml/calendars' - end + path = if _calendar_id + "_ml/calendars/#{Utils.listify(_calendar_id)}" + else + '_ml/calendars' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb index 4bac8ea0e6..4410a70801 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb @@ -15,29 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves anomaly detection job results for one or more categories. + # Get anomaly detection job results for categories. # - # @option arguments [String] :job_id The name of the job - # @option arguments [Long] :category_id The identifier of the category definition of interest - # @option arguments [Integer] :from skips a number of categories - # @option arguments [Integer] :size specifies a max number of categories to get - # @option arguments [String] :partition_field_value Specifies the partition to retrieve categories for. This is optional, and should never be used for jobs where per-partition categorization is disabled. + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [String] :category_id Identifier for the category, which is unique in the job. If you specify + # neither the category ID nor the partition_field_value, the API returns + # information about all categories. If you specify only the + # partition_field_value, it returns information about all categories for + # the specified partition. + # @option arguments [Integer] :from Skips the specified number of categories. Server default: 0. + # @option arguments [String] :partition_field_value Only return categories for the specified partition. + # @option arguments [Integer] :size Specifies the maximum number of categories to obtain. Server default: 100. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Category selection details if not provided in URI + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-categories # def get_categories(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_categories' } - defined_params = %i[job_id category_id].each_with_object({}) do |variable, set_variables| + defined_params = [:job_id, :category_id].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? @@ -59,11 +63,11 @@ def get_categories(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _job_id && _category_id - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/categories/#{Utils.__listify(_category_id)}" - else - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/categories" - end + path = if _job_id && _category_id + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/categories/#{Utils.listify(_category_id)}" + else + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/categories" + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb index a6a097d654..9d178afa76 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb @@ -15,23 +15,38 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves configuration information for data frame analytics jobs. + # Get data frame analytics job configuration info. + # You can get information for multiple data frame analytics jobs in a single + # API request by using a comma-separated list of data frame analytics jobs or a + # wildcard expression. # - # @option arguments [String] :id The ID of the data frame analytics to fetch - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) - # @option arguments [Integer] :from skips a number of analytics - # @option arguments [Integer] :size specifies a max number of analytics to get - # @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on data frame analytics PUT + # @option arguments [String] :id Identifier for the data frame analytics job. If you do not specify this + # option, the API returns information for the first hundred data frame + # analytics jobs. + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no data frame analytics + # jobs that match. + # - Contains the +_all+ string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # The default value returns an empty data_frame_analytics array when there + # are no matches and the subset of results when there are partial matches. + # If this parameter is +false+, the request returns a 404 status code when + # there are no matches or only partial matches. Server default: true. + # @option arguments [Integer] :from Skips the specified number of data frame analytics jobs. Server default: 0. + # @option arguments [Integer] :size Specifies the maximum number of data frame analytics jobs to obtain. Server default: 100. + # @option arguments [Boolean] :exclude_generated Indicates if certain fields should be removed from the configuration on + # retrieval. This allows the configuration to be in an acceptable format to + # be retrieved and then added to another cluster. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics # def get_data_frame_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_data_frame_analytics' } @@ -50,7 +65,7 @@ def get_data_frame_analytics(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _id - "_ml/data_frame/analytics/#{Utils.__listify(_id)}" + "_ml/data_frame/analytics/#{Utils.listify(_id)}" else '_ml/data_frame/analytics' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb index 5a12263db7..fa39c69b19 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb @@ -15,23 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves usage information for data frame analytics jobs. + # Get data frame analytics jobs usage info. # - # @option arguments [String] :id The ID of the data frame analytics stats to fetch - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) - # @option arguments [Integer] :from skips a number of analytics - # @option arguments [Integer] :size specifies a max number of analytics to get - # @option arguments [Boolean] :verbose whether the stats response should be verbose + # @option arguments [String] :id Identifier for the data frame analytics job. If you do not specify this + # option, the API returns information for the first hundred data frame + # analytics jobs. + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no data frame analytics + # jobs that match. + # - Contains the +_all+ string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # The default value returns an empty data_frame_analytics array when there + # are no matches and the subset of results when there are partial matches. + # If this parameter is +false+, the request returns a 404 status code when + # there are no matches or only partial matches. Server default: true. + # @option arguments [Integer] :from Skips the specified number of data frame analytics jobs. Server default: 0. + # @option arguments [Integer] :size Specifies the maximum number of data frame analytics jobs to obtain. Server default: 100. + # @option arguments [Boolean] :verbose Defines whether the stats response should be verbose. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics-stats # def get_data_frame_analytics_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_data_frame_analytics_stats' } @@ -50,7 +60,7 @@ def get_data_frame_analytics_stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _id - "_ml/data_frame/analytics/#{Utils.__listify(_id)}/_stats" + "_ml/data_frame/analytics/#{Utils.listify(_id)}/_stats" else '_ml/data_frame/analytics/_stats' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb index 9a527cf537..59be4a3535 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb @@ -15,20 +15,35 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves usage information for datafeeds. + # Get datafeeds usage info. + # You can get statistics for multiple datafeeds in a single API request by + # using a comma-separated list of datafeeds or a wildcard expression. You can + # get statistics for all datafeeds by using +_all+, by specifying +*+ as the + # ++, or by omitting the ++. If the datafeed is stopped, the + # only information you receive is the +datafeed_id+ and the +state+. + # This API returns a maximum of 10,000 datafeeds. # - # @option arguments [String] :datafeed_id The ID of the datafeeds stats to fetch - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) + # @option arguments [String, Array] :datafeed_id Identifier for the datafeed. It can be a datafeed identifier or a + # wildcard expression. If you do not specify one of these options, the API + # returns information about all datafeeds. + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no datafeeds that match. + # - Contains the +_all+ string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # The default value is +true+, which returns an empty +datafeeds+ array + # when there are no matches and the subset of results when there are + # partial matches. If this parameter is +false+, the request returns a + # +404+ status code when there are no matches or only partial matches. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeed-stats # def get_datafeed_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_datafeed_stats' } @@ -47,7 +62,7 @@ def get_datafeed_stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _datafeed_id - "_ml/datafeeds/#{Utils.__listify(_datafeed_id)}/_stats" + "_ml/datafeeds/#{Utils.listify(_datafeed_id)}/_stats" else '_ml/datafeeds/_stats' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb index f7c0d75e1a..2c2bceb6c6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb @@ -15,21 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves configuration information for datafeeds. + # Get datafeeds configuration info. + # You can get information for multiple datafeeds in a single API request by + # using a comma-separated list of datafeeds or a wildcard expression. You can + # get information for all datafeeds by using +_all+, by specifying +*+ as the + # ++, or by omitting the ++. + # This API returns a maximum of 10,000 datafeeds. # - # @option arguments [String] :datafeed_id The ID of the datafeeds to fetch - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) - # @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on datafeed PUT + # @option arguments [String, Array] :datafeed_id Identifier for the datafeed. It can be a datafeed identifier or a + # wildcard expression. If you do not specify one of these options, the API + # returns information about all datafeeds. + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no datafeeds that match. + # - Contains the +_all+ string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # The default value is +true+, which returns an empty +datafeeds+ array + # when there are no matches and the subset of results when there are + # partial matches. If this parameter is +false+, the request returns a + # +404+ status code when there are no matches or only partial matches. + # @option arguments [Boolean] :exclude_generated Indicates if certain fields should be removed from the configuration on + # retrieval. This allows the configuration to be in an acceptable format to + # be retrieved and then added to another cluster. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeeds # def get_datafeeds(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_datafeeds' } @@ -48,7 +64,7 @@ def get_datafeeds(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _datafeed_id - "_ml/datafeeds/#{Utils.__listify(_datafeed_id)}" + "_ml/datafeeds/#{Utils.listify(_datafeed_id)}" else '_ml/datafeeds' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb index 740d6087d1..3e17278c24 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb @@ -15,21 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves filters. + # Get filters. + # You can get a single filter or all filters. # - # @option arguments [String] :filter_id The ID of the filter to fetch - # @option arguments [Integer] :from skips a number of filters - # @option arguments [Integer] :size specifies a max number of filters to get + # @option arguments [String, Array] :filter_id A string that uniquely identifies a filter. + # @option arguments [Integer] :from Skips the specified number of filters. Server default: 0. + # @option arguments [Integer] :size Specifies the maximum number of filters to obtain. Server default: 100. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-filters # def get_filters(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_filters' } @@ -48,7 +49,7 @@ def get_filters(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _filter_id - "_ml/filters/#{Utils.__listify(_filter_id)}" + "_ml/filters/#{Utils.listify(_filter_id)}" else '_ml/filters' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb index c26cfe0ee3..65b29fbc12 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb @@ -15,28 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves anomaly detection job results for one or more influencers. + # Get anomaly detection job results for influencers. + # Influencers are the entities that have contributed to, or are to blame for, + # the anomalies. Influencer results are available only if an + # +influencer_field_name+ is specified in the job configuration. # - # @option arguments [String] :job_id Identifier for the anomaly detection job - # @option arguments [Boolean] :exclude_interim Exclude interim results - # @option arguments [Integer] :from skips a number of influencers - # @option arguments [Integer] :size specifies a max number of influencers to get - # @option arguments [String] :start start timestamp for the requested influencers - # @option arguments [String] :end end timestamp for the requested influencers - # @option arguments [Double] :influencer_score influencer score threshold for the requested influencers - # @option arguments [String] :sort sort field for the requested influencers - # @option arguments [Boolean] :desc whether the results should be sorted in decending order + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [Boolean] :desc If true, the results are sorted in descending order. + # @option arguments [String, Time] :end Returns influencers with timestamps earlier than this time. + # The default value means it is unset and results are not limited to + # specific timestamps. Server default: -1. + # @option arguments [Boolean] :exclude_interim If true, the output excludes interim results. By default, interim results + # are included. + # @option arguments [Float] :influencer_score Returns influencers with anomaly scores greater than or equal to this + # value. Server default: 0. + # @option arguments [Integer] :from Skips the specified number of influencers. Server default: 0. + # @option arguments [Integer] :size Specifies the maximum number of influencers to obtain. Server default: 100. + # @option arguments [String] :sort Specifies the sort field for the requested influencers. By default, the + # influencers are sorted by the +influencer_score+ value. + # @option arguments [String, Time] :start Returns influencers with timestamps after this time. The default value + # means it is unset and results are not limited to specific timestamps. Server default: -1. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Influencer selection criteria + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-influencers # def get_influencers(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_influencers' } @@ -61,7 +70,7 @@ def get_influencers(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/influencers" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/influencers" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb index a775aa6822..ece2041398 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb @@ -15,20 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves usage information for anomaly detection jobs. + # Get anomaly detection jobs usage info. # - # @option arguments [String] :job_id The ID of the jobs stats to fetch - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + # @option arguments [String] :job_id Identifier for the anomaly detection job. It can be a job identifier, a + # group name, a comma-separated list of jobs, or a wildcard expression. If + # you do not specify one of these options, the API returns information for + # all anomaly detection jobs. + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no jobs that match. + # - Contains the _all string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # If +true+, the API returns an empty +jobs+ array when + # there are no matches and the subset of results when there are partial + # matches. If +false+, the API returns a +404+ status + # code when there are no matches or only partial matches. Server default: true. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-job-stats # def get_job_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_job_stats' } @@ -47,7 +57,7 @@ def get_job_stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _job_id - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_stats" + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_stats" else '_ml/anomaly_detectors/_stats' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb index ed56801065..7fede94ea7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb @@ -15,21 +15,36 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves configuration information for anomaly detection jobs. + # Get anomaly detection jobs configuration info. + # You can get information for multiple anomaly detection jobs in a single API + # request by using a group name, a comma-separated list of jobs, or a wildcard + # expression. You can get information for all anomaly detection jobs by using + # +_all+, by specifying +*+ as the ++, or by omitting the ++. # - # @option arguments [String] :job_id The ID of the jobs to fetch - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) - # @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on job PUT + # @option arguments [String, Array] :job_id Identifier for the anomaly detection job. It can be a job identifier, a + # group name, or a wildcard expression. If you do not specify one of these + # options, the API returns information for all anomaly detection jobs. + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no jobs that match. + # - Contains the _all string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # The default value is +true+, which returns an empty +jobs+ array when + # there are no matches and the subset of results when there are partial + # matches. If this parameter is +false+, the request returns a +404+ status + # code when there are no matches or only partial matches. Server default: true. + # @option arguments [Boolean] :exclude_generated Indicates if certain fields should be removed from the configuration on + # retrieval. This allows the configuration to be in an acceptable format to + # be retrieved and then added to another cluster. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-jobs # def get_jobs(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_jobs' } @@ -48,7 +63,7 @@ def get_jobs(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _job_id - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}" + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}" else '_ml/anomaly_detectors' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb index 001adaa2d5..082aa30af6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb @@ -15,21 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Returns information on how ML is using memory. + # Get machine learning memory usage info. + # Get information about how machine learning jobs and trained models are using memory, + # on each node, both within the JVM heap, and natively, outside of the JVM. # - # @option arguments [String] :node_id Specifies the node or nodes to retrieve stats for. - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :node_id The names of particular nodes in the cluster to target. For example, +nodeId1,nodeId2+ or + # +ml:true+ + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout + # expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request + # fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-memory-stats # def get_memory_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_memory_stats' } @@ -48,7 +53,7 @@ def get_memory_stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _node_id - "_ml/memory/#{Utils.__listify(_node_id)}/_stats" + "_ml/memory/#{Utils.listify(_node_id)}/_stats" else '_ml/memory/_stats' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb index 561bd95bad..0aadfe94b4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb @@ -15,26 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Gets stats for anomaly detection job model snapshot upgrades that are in progress. + # Get anomaly detection job model snapshot upgrade usage info. # - # @option arguments [String] :job_id The ID of the job. May be a wildcard, comma separated list or `_all`. - # @option arguments [String] :snapshot_id The ID of the snapshot. May be a wildcard, comma separated list or `_all`. - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs or no snapshots. (This includes the `_all` string.) + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [String] :snapshot_id A numerical character string that uniquely identifies the model snapshot. You can get information for multiple + # snapshots by using a comma-separated list or a wildcard expression. You can get all snapshots by using +_all+, + # by specifying +*+ as the snapshot ID, or by omitting the snapshot ID. (*Required*) + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no jobs that match. + # - Contains the _all string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # The default value is true, which returns an empty jobs array when there are no matches and the subset of results + # when there are partial matches. If this parameter is false, the request returns a 404 status code when there are + # no matches or only partial matches. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-model-snapshot-upgrade-stats # def get_model_snapshot_upgrade_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_model_snapshot_upgrade_stats' } - defined_params = %i[job_id snapshot_id].each_with_object({}) do |variable, set_variables| + defined_params = [:job_id, :snapshot_id].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? @@ -52,7 +60,7 @@ def get_model_snapshot_upgrade_stats(arguments = {}) _snapshot_id = arguments.delete(:snapshot_id) method = Elasticsearch::API::HTTP_GET - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/model_snapshots/#{Utils.__listify(_snapshot_id)}/_upgrade/_stats" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/model_snapshots/#{Utils.listify(_snapshot_id)}/_upgrade/_stats" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb index df56a11e88..03886805d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb @@ -15,32 +15,35 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves information about model snapshots. + # Get model snapshots info. # - # @option arguments [String] :job_id The ID of the job to fetch - # @option arguments [String] :snapshot_id The ID of the snapshot to fetch - # @option arguments [Integer] :from Skips a number of documents - # @option arguments [Integer] :size The default number of documents returned in queries as a string. - # @option arguments [Date] :start The filter 'start' query parameter - # @option arguments [Date] :end The filter 'end' query parameter - # @option arguments [String] :sort Name of the field to sort on - # @option arguments [Boolean] :desc True if the results should be sorted in descending order + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [String] :snapshot_id A numerical character string that uniquely identifies the model snapshot. You can get information for multiple + # snapshots by using a comma-separated list or a wildcard expression. You can get all snapshots by using +_all+, + # by specifying +*+ as the snapshot ID, or by omitting the snapshot ID. + # @option arguments [Boolean] :desc If true, the results are sorted in descending order. + # @option arguments [String, Time] :end Returns snapshots with timestamps earlier than this time. + # @option arguments [Integer] :from Skips the specified number of snapshots. Server default: 0. + # @option arguments [Integer] :size Specifies the maximum number of snapshots to obtain. Server default: 100. + # @option arguments [String] :sort Specifies the sort field for the requested snapshots. By default, the + # snapshots are sorted by their timestamp. + # @option arguments [String, Time] :start Returns snapshots with timestamps after this time. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Model snapshot selection criteria + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-model-snapshots # def get_model_snapshots(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_model_snapshots' } - defined_params = %i[job_id snapshot_id].each_with_object({}) do |variable, set_variables| + defined_params = [:job_id, :snapshot_id].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? @@ -62,11 +65,11 @@ def get_model_snapshots(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _job_id && _snapshot_id - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/model_snapshots/#{Utils.__listify(_snapshot_id)}" - else - "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/model_snapshots" - end + path = if _job_id && _snapshot_id + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/model_snapshots/#{Utils.listify(_snapshot_id)}" + else + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/model_snapshots" + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb index fa40a14238..4942ad413c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb @@ -15,27 +15,59 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs. + # Get overall bucket results. + # Retrievs overall bucket results that summarize the bucket results of + # multiple anomaly detection jobs. + # The +overall_score+ is calculated by combining the scores of all the + # buckets within the overall bucket span. First, the maximum + # +anomaly_score+ per anomaly detection job in the overall bucket is + # calculated. Then the +top_n+ of those scores are averaged to result in + # the +overall_score+. This means that you can fine-tune the + # +overall_score+ so that it is more or less sensitive to the number of + # jobs that detect an anomaly at the same time. For example, if you set + # +top_n+ to +1+, the +overall_score+ is the maximum bucket score in the + # overall bucket. Alternatively, if you set +top_n+ to the number of jobs, + # the +overall_score+ is high only when all jobs detect anomalies in that + # overall bucket. If you set the +bucket_span+ parameter (to a value + # greater than its default), the +overall_score+ is the maximum + # +overall_score+ of the overall buckets that have a span equal to the + # jobs' largest bucket span. # - # @option arguments [String] :job_id The job IDs for which to calculate overall bucket results - # @option arguments [Integer] :top_n The number of top job bucket scores to be used in the overall_score calculation - # @option arguments [String] :bucket_span The span of the overall buckets. Defaults to the longest job bucket_span - # @option arguments [Double] :overall_score Returns overall buckets with overall scores higher than this value - # @option arguments [Boolean] :exclude_interim If true overall buckets that include interim buckets will be excluded - # @option arguments [String] :start Returns overall buckets with timestamps after this time - # @option arguments [String] :end Returns overall buckets with timestamps earlier than this time - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + # @option arguments [String] :job_id Identifier for the anomaly detection job. It can be a job identifier, a + # group name, a comma-separated list of jobs or groups, or a wildcard + # expression.You can summarize the bucket results for all anomaly detection jobs by + # using +_all+ or by specifying +*+ as the ++. (*Required*) + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no jobs that match. + # - Contains the +_all+ string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # If +true+, the request returns an empty +jobs+ array when there are no + # matches and the subset of results when there are partial matches. If this + # parameter is +false+, the request returns a +404+ status code when there + # are no matches or only partial matches. Server default: true. + # @option arguments [Time] :bucket_span The span of the overall buckets. Must be greater or equal to the largest + # bucket span of the specified anomaly detection jobs, which is the default + # value.By default, an overall bucket has a span equal to the largest bucket span + # of the specified anomaly detection jobs. To override that behavior, use + # the optional +bucket_span+ parameter. + # @option arguments [String, Time] :end Returns overall buckets with timestamps earlier than this time. + # @option arguments [Boolean] :exclude_interim If +true+, the output excludes interim results. + # @option arguments [Double, String] :overall_score Returns overall buckets with overall scores greater than or equal to this + # value. + # @option arguments [String, Time] :start Returns overall buckets with timestamps after this time. + # @option arguments [Integer] :top_n The number of top anomaly detection job bucket scores to be used in the + # +overall_score+ calculation. Server default: 1. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Overall bucket selection details if not provided in URI + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-overall-buckets # def get_overall_buckets(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_overall_buckets' } @@ -60,7 +92,7 @@ def get_overall_buckets(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/overall_buckets" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/overall_buckets" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb index 66b4f6b7df..bd6b57eb87 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb @@ -15,28 +15,40 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves anomaly records for an anomaly detection job. + # Get anomaly records for an anomaly detection job. + # Records contain the detailed analytical results. They describe the anomalous + # activity that has been identified in the input data based on the detector + # configuration. + # There can be many anomaly records depending on the characteristics and size + # of the input data. In practice, there are often too many to be able to + # manually process them. The machine learning features therefore perform a + # sophisticated aggregation of the anomaly records into buckets. + # The number of record results depends on the number of anomalies found in each + # bucket, which relates to the number of time series being modeled and the + # number of detectors. # - # @option arguments [String] :job_id The ID of the job - # @option arguments [Boolean] :exclude_interim Exclude interim results - # @option arguments [Integer] :from skips a number of records - # @option arguments [Integer] :size specifies a max number of records to get - # @option arguments [String] :start Start time filter for records - # @option arguments [String] :end End time filter for records - # @option arguments [Double] :record_score Returns records with anomaly scores greater or equal than this value - # @option arguments [String] :sort Sort records by a particular field - # @option arguments [Boolean] :desc Set the sort direction + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [Boolean] :desc If true, the results are sorted in descending order. + # @option arguments [String, Time] :end Returns records with timestamps earlier than this time. The default value + # means results are not limited to specific timestamps. Server default: -1. + # @option arguments [Boolean] :exclude_interim If +true+, the output excludes interim results. + # @option arguments [Integer] :from Skips the specified number of records. Server default: 0. + # @option arguments [Float] :record_score Returns records with anomaly scores greater or equal than this value. Server default: 0. + # @option arguments [Integer] :size Specifies the maximum number of records to obtain. Server default: 100. + # @option arguments [String] :sort Specifies the sort field for the requested records. Server default: record_score. + # @option arguments [String, Time] :start Returns records with timestamps after this time. The default value means + # results are not limited to specific timestamps. Server default: -1. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Record selection criteria + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-records # def get_records(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_records' } @@ -61,7 +73,7 @@ def get_records(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/results/records" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/records" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb index 09b7813943..181f6bd742 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb @@ -15,27 +15,39 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves configuration information for a trained inference model. + # Get trained model configuration info. # - # @option arguments [String] :model_id The ID of the trained models to fetch - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) - # @option arguments [String] :include A comma-separate list of fields to optionally include. Valid options are 'definition' and 'total_feature_importance'. Default is none. - # @option arguments [Boolean] :include_model_definition Should the full model definition be included in the results. These definitions can be large. So be cautious when including them. Defaults to false. *Deprecated* - # @option arguments [Boolean] :decompress_definition Should the model definition be decompressed into valid JSON or returned in a custom compressed format. Defaults to true. - # @option arguments [Integer] :from skips a number of trained models - # @option arguments [Integer] :size specifies a max number of trained models to get - # @option arguments [List] :tags A comma-separated list of tags that the model must have. - # @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on model PUT + # @option arguments [String, Array] :model_id The unique identifier of the trained model or a model alias.You can get information for multiple trained models in a single API + # request by using a comma-separated list of model IDs or a wildcard + # expression. + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no models that match. + # - Contains the _all string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # If true, it returns an empty array when there are no matches and the + # subset of results when there are partial matches. Server default: true. + # @option arguments [Boolean] :decompress_definition Specifies whether the included model definition should be returned as a + # JSON map (true) or in a custom compressed format (false). Server default: true. + # @option arguments [Boolean] :exclude_generated Indicates if certain fields should be removed from the configuration on + # retrieval. This allows the configuration to be in an acceptable format to + # be retrieved and then added to another cluster. + # @option arguments [Integer] :from Skips the specified number of models. Server default: 0. + # @option arguments [String] :include A comma delimited string of optional fields to include in the response + # body. + # @option arguments [Integer] :size Specifies the maximum number of models to obtain. Server default: 100. + # @option arguments [String] :tags A comma delimited string of tags. A trained model can have many tags, or + # none. When supplied, only trained models that contain all the supplied + # tags are returned. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-trained-models # def get_trained_models(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_trained_models' } @@ -54,7 +66,7 @@ def get_trained_models(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _model_id - "_ml/trained_models/#{Utils.__listify(_model_id)}" + "_ml/trained_models/#{Utils.listify(_model_id)}" else '_ml/trained_models' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb index 0d56ddb20a..2b3767b811 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb @@ -15,22 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Retrieves usage information for trained inference models. + # Get trained models usage info. + # You can get usage information for multiple trained + # models in a single API request by using a comma-separated list of model IDs or a wildcard expression. # - # @option arguments [String] :model_id The ID of the trained models stats to fetch - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) - # @option arguments [Integer] :from skips a number of trained models - # @option arguments [Integer] :size specifies a max number of trained models to get + # @option arguments [String, Array] :model_id The unique identifier of the trained model or a model alias. It can be a + # comma-separated list or a wildcard expression. + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no models that match. + # - Contains the _all string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # If true, it returns an empty array when there are no matches and the + # subset of results when there are partial matches. Server default: true. + # @option arguments [Integer] :from Skips the specified number of models. Server default: 0. + # @option arguments [Integer] :size Specifies the maximum number of models to obtain. Server default: 100. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-trained-models-stats # def get_trained_models_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.get_trained_models_stats' } @@ -49,7 +57,7 @@ def get_trained_models_stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _model_id - "_ml/trained_models/#{Utils.__listify(_model_id)}/_stats" + "_ml/trained_models/#{Utils.listify(_model_id)}/_stats" else '_ml/trained_models/_stats' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb index 22631f81f9..cf4ee04d60 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb @@ -29,19 +29,13 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # - # *Deprecation notice*: - # /_ml/trained_models/{model_id}/deployment/_infer is deprecated. Use /_ml/trained_models/{model_id}/_infer instead - # Deprecated since version 8.3.0 - # - # # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-infer-trained-model # def infer_trained_model(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.infer_trained_model' } - defined_params = [:model_id].inject({}) do |set_variables, variable| + defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,7 +50,7 @@ def infer_trained_model(arguments = {}) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/trained_models/#{Utils.__listify(_model_id)}/_infer" + path = "_ml/trained_models/#{Utils.listify(_model_id)}/_infer" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb index c1f3d46670..eaccba1b3a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb @@ -15,18 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Returns defaults and limits used by machine learning. + # Get machine learning information. + # Get defaults and limits used by machine learning. + # This endpoint is designed to be used by a user interface that needs to fully + # understand machine learning configurations where some options are not + # specified, meaning that the defaults should be used. This endpoint may be + # used to find out what those defaults are. It also provides information about + # the maximum size of machine learning jobs that could run in the current + # cluster configuration. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-info # def info(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.info' } @@ -34,7 +41,7 @@ def info(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_ml/info' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb index 69ab6ad44e..fec9b337a9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb @@ -15,20 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Opens one or more anomaly detection jobs. + # Open anomaly detection jobs. + # An anomaly detection job must be opened to be ready to receive and analyze + # data. It can be opened and closed multiple times throughout its lifecycle. + # When you open a new job, it starts with an empty model. + # When you open an existing job, the most recent model state is automatically + # loaded. The job is ready to resume its analysis from where it left off, once + # new data is received. # - # @option arguments [String] :job_id The ID of the job to open + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [Time] :timeout Controls the time to wait until a job has opened. Server default: 30m. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Query parameters can be specified in the body + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-open-job # def open_job(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.open_job' } @@ -48,8 +55,8 @@ def open_job(arguments = {}) _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_open" - params = {} + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_open" + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb index c80bc49eab..2fa75ce5fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb @@ -15,20 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Posts scheduled events in a calendar. + # Add scheduled events to the calendar. # - # @option arguments [String] :calendar_id The ID of the calendar to modify + # @option arguments [String] :calendar_id A string that uniquely identifies a calendar. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body A list of events (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-post-calendar-events # def post_calendar_events(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.post_calendar_events' } @@ -49,7 +49,7 @@ def post_calendar_events(arguments = {}) _calendar_id = arguments.delete(:calendar_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/calendars/#{Utils.__listify(_calendar_id)}/events" + path = "_ml/calendars/#{Utils.listify(_calendar_id)}/events" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb index f19f58530b..4c5c8c8c09 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb @@ -15,22 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Sends data to an anomaly detection job for analysis. + # Send data to an anomaly detection job for analysis. + # IMPORTANT: For each job, data can be accepted from only a single connection at a time. + # It is not currently possible to post data to multiple jobs using wildcards or a comma-separated list. # - # @option arguments [String] :job_id The name of the job receiving the data - # @option arguments [String] :reset_start Optional parameter to specify the start of the bucket resetting range - # @option arguments [String] :reset_end Optional parameter to specify the end of the bucket resetting range + # @option arguments [String] :job_id Identifier for the anomaly detection job. The job must have a state of open to receive and process the data. (*Required*) + # @option arguments [String, Time] :reset_end Specifies the end of the bucket resetting range. + # @option arguments [String, Time] :reset_start Specifies the start of the bucket resetting range. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The data to process (*Required*) + # @option arguments [Hash] :body data # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-post-data # def post_data(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.post_data' } @@ -51,7 +53,7 @@ def post_data(arguments = {}) _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_data" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_data" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb index 33e7ca9675..8f42a9eea6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb @@ -15,20 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Previews that will be analyzed given a data frame analytics config. + # Preview features used by data frame analytics. + # Preview the extracted features used by a data frame analytics config. # - # @option arguments [String] :id The ID of the data frame analytics to preview + # @option arguments [String] :id Identifier for the data frame analytics job. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The data frame analytics config to preview + # @option arguments [Hash] :body request body # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-data-frame-analytics # def preview_data_frame_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.preview_data_frame_analytics' } @@ -51,11 +52,11 @@ def preview_data_frame_analytics(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _id - "_ml/data_frame/analytics/#{Utils.__listify(_id)}/_preview" - else - '_ml/data_frame/analytics/_preview' - end + path = if _id + "_ml/data_frame/analytics/#{Utils.listify(_id)}/_preview" + else + '_ml/data_frame/analytics/_preview' + end params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb index 78f421329b..8f165e5b34 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb @@ -15,22 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Previews a datafeed. + # Preview a datafeed. + # This API returns the first "page" of search results from a datafeed. + # You can preview an existing datafeed or provide configuration details for a datafeed + # and anomaly detection job in the API. The preview shows the structure of the data + # that will be passed to the anomaly detection engine. + # IMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that + # called the API. However, when the datafeed starts it uses the roles of the last user that created or updated the + # datafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials. + # You can also use secondary authorization headers to supply the credentials. # - # @option arguments [String] :datafeed_id The ID of the datafeed to preview - # @option arguments [String] :start The start time from where the datafeed preview should begin - # @option arguments [String] :end The end time when the datafeed preview should stop + # @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase + # alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric + # characters. NOTE: If you use this path parameter, you cannot provide datafeed or anomaly detection job + # configuration details in the request body. + # @option arguments [String, Time] :start The start time from where the datafeed preview should begin + # @option arguments [String, Time] :end The end time when the datafeed preview should stop # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The datafeed config and job config with which to execute the preview + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-datafeed # def preview_datafeed(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.preview_datafeed' } @@ -53,11 +64,11 @@ def preview_datafeed(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _datafeed_id - "_ml/datafeeds/#{Utils.__listify(_datafeed_id)}/_preview" - else - '_ml/datafeeds/_preview' - end + path = if _datafeed_id + "_ml/datafeeds/#{Utils.listify(_datafeed_id)}/_preview" + else + '_ml/datafeeds/_preview' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb index 6bac27c8cc..7867aa163c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb @@ -15,20 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Instantiates a calendar. + # Create a calendar. # - # @option arguments [String] :calendar_id The ID of the calendar to create + # @option arguments [String] :calendar_id A string that uniquely identifies a calendar. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The calendar details + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar # def put_calendar(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.put_calendar' } @@ -48,7 +48,7 @@ def put_calendar(arguments = {}) _calendar_id = arguments.delete(:calendar_id) method = Elasticsearch::API::HTTP_PUT - path = "_ml/calendars/#{Utils.__listify(_calendar_id)}" + path = "_ml/calendars/#{Utils.listify(_calendar_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb index 5c7b779e81..e7818bd8e9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb @@ -15,25 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Adds an anomaly detection job to a calendar. + # Add anomaly detection job to calendar. # - # @option arguments [String] :calendar_id The ID of the calendar to modify - # @option arguments [String] :job_id The ID of the job to add to the calendar + # @option arguments [String] :calendar_id A string that uniquely identifies a calendar. (*Required*) + # @option arguments [String, Array] :job_id An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a comma-separated list of jobs or groups. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar-job # def put_calendar_job(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.put_calendar_job' } - defined_params = %i[calendar_id job_id].each_with_object({}) do |variable, set_variables| + defined_params = [:calendar_id, :job_id].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? @@ -51,7 +51,7 @@ def put_calendar_job(arguments = {}) _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_PUT - path = "_ml/calendars/#{Utils.__listify(_calendar_id)}/jobs/#{Utils.__listify(_job_id)}" + path = "_ml/calendars/#{Utils.listify(_calendar_id)}/jobs/#{Utils.listify(_job_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb index 737b51a739..95bf1b7cab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb @@ -15,20 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Instantiates a data frame analytics job. + # Create a data frame analytics job. + # This API creates a data frame analytics job that performs an analysis on the + # source indices and stores the outcome in a destination index. + # By default, the query used in the source configuration is +{"match_all": {}}+. + # If the destination index does not exist, it is created automatically when you start the job. + # If you supply only a subset of the regression or classification parameters, hyperparameter optimization occurs. It determines a value for each of the undefined parameters. # - # @option arguments [String] :id The ID of the data frame analytics to create + # @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain + # lowercase alphanumeric characters (a-z and 0-9), hyphens, and + # underscores. It must start and end with alphanumeric characters. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The data frame analytics configuration (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-data-frame-analytics # def put_data_frame_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.put_data_frame_analytics' } @@ -49,7 +56,7 @@ def put_data_frame_analytics(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT - path = "_ml/data_frame/analytics/#{Utils.__listify(_id)}" + path = "_ml/data_frame/analytics/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb index 55ac679569..fb360bcf25 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb @@ -15,24 +15,38 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Instantiates a datafeed. + # Create a datafeed. + # Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. + # You can associate only one datafeed with each anomaly detection job. + # The datafeed contains a query that runs at a defined interval (+frequency+). + # If you are concerned about delayed data, you can add a delay (+query_delay') at each interval. + # By default, the datafeed uses the following query:+{"match_all": {"boost": 1}}+. + # When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had + # at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, + # those credentials are used instead. + # You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed + # directly to the+.ml-config+index. Do not give users+write+privileges on the+.ml-config` index. # - # @option arguments [String] :datafeed_id The ID of the datafeed to create - # @option arguments [Boolean] :ignore_unavailable Ignore unavailable indexes (default: false) - # @option arguments [Boolean] :allow_no_indices Ignore if the source indices expressions resolves to no concrete indices (default: true) - # @option arguments [Boolean] :ignore_throttled Ignore indices that are marked as throttled (default: true) - # @option arguments [String] :expand_wildcards Whether source index expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) + # @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed. + # This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. + # It must start and end with alphanumeric characters. (*Required*) + # @option arguments [Boolean] :allow_no_indices If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the +_all+ + # string or when no indices are specified. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines + # whether wildcard expressions match hidden data streams. Supports comma-separated values. Server default: open. + # @option arguments [Boolean] :ignore_throttled If true, concrete, expanded, or aliased indices are ignored when frozen. Server default: true. + # @option arguments [Boolean] :ignore_unavailable If true, unavailable indices (missing or closed) are ignored. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The datafeed config (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-datafeed # def put_datafeed(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.put_datafeed' } @@ -53,7 +67,7 @@ def put_datafeed(arguments = {}) _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_PUT - path = "_ml/datafeeds/#{Utils.__listify(_datafeed_id)}" + path = "_ml/datafeeds/#{Utils.listify(_datafeed_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb index b08ad3dc1c..47a01cbf06 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb @@ -15,20 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Instantiates a filter. + # Create a filter. + # A filter contains a list of strings. It can be used by one or more anomaly detection jobs. + # Specifically, filters are referenced in the +custom_rules+ property of detector configuration objects. # - # @option arguments [String] :filter_id The ID of the filter to create + # @option arguments [String] :filter_id A string that uniquely identifies a filter. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The filter details (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-filter # def put_filter(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.put_filter' } @@ -49,7 +51,7 @@ def put_filter(arguments = {}) _filter_id = arguments.delete(:filter_id) method = Elasticsearch::API::HTTP_PUT - path = "_ml/filters/#{Utils.__listify(_filter_id)}" + path = "_ml/filters/#{Utils.listify(_filter_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb index d5cebda595..610448a923 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb @@ -15,24 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Instantiates an anomaly detection job. + # Create an anomaly detection job. + # If you include a +datafeed_config+, you must have read index privileges on the source index. + # If you include a +datafeed_config+ but do not provide a query, the datafeed uses +{"match_all": {"boost": 1}}+. # - # @option arguments [String] :job_id The ID of the job to create - # @option arguments [Boolean] :ignore_unavailable Ignore unavailable indexes (default: false). Only set if datafeed_config is provided. - # @option arguments [Boolean] :allow_no_indices Ignore if the source indices expressions resolves to no concrete indices (default: true). Only set if datafeed_config is provided. - # @option arguments [Boolean] :ignore_throttled Ignore indices that are marked as throttled (default: true). Only set if datafeed_config is provided. - # @option arguments [String] :expand_wildcards Whether source index expressions should get expanded to open or closed indices (default: open). Only set if datafeed_config is provided. (options: open, closed, hidden, none, all) + # @option arguments [String] :job_id The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. (*Required*) + # @option arguments [Boolean] :allow_no_indices If +true+, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the + # +_all+ string or when no indices are specified. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines + # whether wildcard expressions match hidden data streams. Supports comma-separated values. Valid values are: + # - +all+: Match any data stream or index, including hidden ones. + # - +closed+: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed. + # - +hidden+: Match hidden data streams and hidden indices. Must be combined with +open+, +closed+, or both. + # - +none+: Wildcard patterns are not accepted. + # - +open+: Match open, non-hidden indices. Also matches any non-hidden data stream. Server default: open. + # @option arguments [Boolean] :ignore_throttled If +true+, concrete, expanded or aliased indices are ignored when frozen. Server default: true. + # @option arguments [Boolean] :ignore_unavailable If +true+, unavailable indices (missing or closed) are ignored. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The job (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-job # def put_job(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.put_job' } @@ -53,7 +62,7 @@ def put_job(arguments = {}) _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_PUT - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb index 5107273c56..026ae8a287 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb @@ -15,22 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Creates an inference trained model. + # Create a trained model. + # Enable you to supply a trained model that is not created by data frame analytics. # - # @option arguments [String] :model_id The ID of the trained models to store - # @option arguments [Boolean] :defer_definition_decompression If set to `true` and a `compressed_definition` is provided, the request defers definition decompression and skips relevant validations. - # @option arguments [Boolean] :wait_for_completion Whether to wait for all child operations(e.g. model download) to complete, before returning or not. Default to false + # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*) + # @option arguments [Boolean] :defer_definition_decompression If set to +true+ and a +compressed_definition+ is provided, + # the request defers definition decompression and skips relevant + # validations. + # @option arguments [Boolean] :wait_for_completion Whether to wait for all child operations (e.g. model download) + # to complete. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The trained model configuration (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model # def put_trained_model(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.put_trained_model' } @@ -51,7 +55,7 @@ def put_trained_model(arguments = {}) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_PUT - path = "_ml/trained_models/#{Utils.__listify(_model_id)}" + path = "_ml/trained_models/#{Utils.listify(_model_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb index 9da28749f1..b618ac7e4c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb @@ -15,26 +15,44 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Creates a new model alias (or reassigns an existing one) to refer to the trained model + # Create or update a trained model alias. + # A trained model alias is a logical name used to reference a single trained + # model. + # You can use aliases instead of trained model identifiers to make it easier to + # reference your models. For example, you can use aliases in inference + # aggregations and processors. + # An alias must be unique and refer to only a single trained model. However, + # you can have multiple aliases for each trained model. + # If you use this API to update an alias such that it references a different + # trained model ID and the model uses a different type of data frame analytics, + # an error occurs. For example, this situation occurs if you have a trained + # model for regression analysis and a trained model for classification + # analysis; you cannot reassign an alias from one type of trained model to + # another. + # If you use this API to update an alias and there are very few input fields in + # common between the old and new trained models for the model alias, the API + # returns a warning. # - # @option arguments [String] :model_alias The trained model alias to update - # @option arguments [String] :model_id The trained model where the model alias should be assigned - # @option arguments [Boolean] :reassign If the model_alias already exists and points to a separate model_id, this parameter must be true. Defaults to false. + # @option arguments [String] :model_alias The alias to create or update. This value cannot end in numbers. (*Required*) + # @option arguments [String] :model_id The identifier for the trained model that the alias refers to. (*Required*) + # @option arguments [Boolean] :reassign Specifies whether the alias gets reassigned to the specified trained + # model if it is already assigned to a different model. If the alias is + # already assigned and this parameter is false, the API returns an error. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-alias # def put_trained_model_alias(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.put_trained_model_alias' } - defined_params = %i[model_id model_alias].each_with_object({}) do |variable, set_variables| + defined_params = [:model_id, :model_alias].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? @@ -52,7 +70,7 @@ def put_trained_model_alias(arguments = {}) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_PUT - path = "_ml/trained_models/#{Utils.__listify(_model_id)}/model_aliases/#{Utils.__listify(_model_alias)}" + path = "_ml/trained_models/#{Utils.listify(_model_id)}/model_aliases/#{Utils.listify(_model_alias)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb index 5fb6155e59..220a93b669 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb @@ -15,26 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Creates part of a trained model definition + # Create part of a trained model definition. # - # @option arguments [String] :model_id The ID of the trained model for this definition part - # @option arguments [Integer] :part The part number + # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*) + # @option arguments [Integer] :part The definition part number. When the definition is loaded for inference the definition parts are streamed in the + # order of their part number. The first part must be +0+ and the final part must be +total_parts - 1+. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The trained model definition part (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-definition-part # def put_trained_model_definition_part(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.put_trained_model_definition_part' } - defined_params = %i[model_id part].each_with_object({}) do |variable, set_variables| + defined_params = [:model_id, :part].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? @@ -53,7 +54,7 @@ def put_trained_model_definition_part(arguments = {}) _part = arguments.delete(:part) method = Elasticsearch::API::HTTP_PUT - path = "_ml/trained_models/#{Utils.__listify(_model_id)}/definition/#{Utils.__listify(_part)}" + path = "_ml/trained_models/#{Utils.listify(_model_id)}/definition/#{Utils.listify(_part)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb index f080f5f763..7ef36f9b27 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb @@ -15,20 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Creates a trained model vocabulary + # Create a trained model vocabulary. + # This API is supported only for natural language processing (NLP) models. + # The vocabulary is stored in the index as described in +inference_config.*.vocabulary+ of the trained model definition. # - # @option arguments [String] :model_id The ID of the trained model for this vocabulary + # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The trained model vocabulary (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-vocabulary # def put_trained_model_vocabulary(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.put_trained_model_vocabulary' } @@ -49,7 +51,7 @@ def put_trained_model_vocabulary(arguments = {}) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_PUT - path = "_ml/trained_models/#{Utils.__listify(_model_id)}/vocabulary" + path = "_ml/trained_models/#{Utils.listify(_model_id)}/vocabulary" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb index a5ce0e1b20..0098ac6f0c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb @@ -15,21 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Resets an existing anomaly detection job. + # Reset an anomaly detection job. + # All model state and results are deleted. The job is ready to start over as if + # it had just been created. + # It is not currently possible to reset multiple jobs using wildcards or a + # comma separated list. # - # @option arguments [String] :job_id The ID of the job to reset - # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning - # @option arguments [Boolean] :delete_user_annotations Should annotations added by the user be deleted + # @option arguments [String] :job_id The ID of the job to reset. (*Required*) + # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before + # returning. Server default: true. + # @option arguments [Boolean] :delete_user_annotations Specifies whether annotations that have been added by the + # user should be deleted along with any auto-generated annotations when the job is + # reset. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-reset-job # def reset_job(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.reset_job' } @@ -49,7 +56,7 @@ def reset_job(arguments = {}) _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_reset" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_reset" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb index 80f70b212a..ed2fa69b83 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb @@ -15,27 +15,41 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Reverts to a specific snapshot. + # Revert to a snapshot. + # The machine learning features react quickly to anomalous input, learning new + # behaviors in data. Highly anomalous input increases the variance in the + # models whilst the system learns whether this is a new step-change in behavior + # or a one-off event. In the case where this anomalous input is known to be a + # one-off, then it might be appropriate to reset the model state to a time + # before this event. For example, you might consider reverting to a saved + # snapshot after Black Friday or a critical system failure. # - # @option arguments [String] :job_id The ID of the job to fetch - # @option arguments [String] :snapshot_id The ID of the snapshot to revert to - # @option arguments [Boolean] :delete_intervening_results Should we reset the results back to the time of the snapshot? + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [String] :snapshot_id You can specify +empty+ as the . Reverting to the empty + # snapshot means the anomaly detection job starts learning a new model from + # scratch when it is started. (*Required*) + # @option arguments [Boolean] :delete_intervening_results If true, deletes the results in the time period between the latest + # results and the time of the reverted snapshot. It also resets the model + # to accept records for this time period. If you choose not to delete + # intervening results when reverting a snapshot, the job will not accept + # input data that is older than the current time. If you want to resend + # data, then delete the intervening results. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Reversion options + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-revert-model-snapshot # def revert_model_snapshot(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.revert_model_snapshot' } - defined_params = %i[job_id snapshot_id].each_with_object({}) do |variable, set_variables| + defined_params = [:job_id, :snapshot_id].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? @@ -53,7 +67,7 @@ def revert_model_snapshot(arguments = {}) _snapshot_id = arguments.delete(:snapshot_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/model_snapshots/#{Utils.__listify(_snapshot_id)}/_revert" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/model_snapshots/#{Utils.listify(_snapshot_id)}/_revert" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb index 08bba48120..8658f97917 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb @@ -15,20 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Sets a cluster wide upgrade_mode setting that prepares machine learning indices for an upgrade. + # Set upgrade_mode for ML indices. + # Sets a cluster wide upgrade_mode setting that prepares machine learning + # indices for an upgrade. + # When upgrading your cluster, in some circumstances you must restart your + # nodes and reindex your machine learning indices. In those circumstances, + # there must be no machine learning jobs running. You can close the machine + # learning jobs, do the upgrade, then open all the jobs again. Alternatively, + # you can use this API to temporarily halt tasks associated with the jobs and + # datafeeds and prevent new jobs from opening. You can also use this API + # during upgrades that do not require you to reindex your machine learning + # indices, though stopping jobs is not a requirement in that case. + # You can see the current value for the upgrade_mode setting by using the get + # machine learning info API. # - # @option arguments [Boolean] :enabled Whether to enable upgrade_mode ML setting or not. Defaults to false. - # @option arguments [Time] :timeout Controls the time to wait before action times out. Defaults to 30 seconds + # @option arguments [Boolean] :enabled When +true+, it enables +upgrade_mode+ which temporarily halts all job + # and datafeed tasks and prohibits new job and datafeed tasks from + # starting. + # @option arguments [Time] :timeout The time to wait for the request to be completed. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-set-upgrade-mode # def set_upgrade_mode(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.set_upgrade_mode' } @@ -36,7 +50,7 @@ def set_upgrade_mode(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_ml/set_upgrade_mode' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb index f54893de3d..09ae68db21 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb @@ -15,21 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Starts a data frame analytics job. + # Start a data frame analytics job. + # A data frame analytics job can be started and stopped multiple times + # throughout its lifecycle. + # If the destination index does not exist, it is created automatically the + # first time you start the data frame analytics job. The + # +index.number_of_shards+ and +index.number_of_replicas+ settings for the + # destination index are copied from the source index. If there are multiple + # source indices, the destination index copies the highest setting values. The + # mappings for the destination index are also copied from the source indices. + # If there are any mapping conflicts, the job fails to start. + # If the destination index exists, it is used as is. You can therefore set up + # the destination index in advance with custom settings and mappings. # - # @option arguments [String] :id The ID of the data frame analytics to start - # @option arguments [Time] :timeout Controls the time to wait until the task has started. Defaults to 20 seconds + # @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain + # lowercase alphanumeric characters (a-z and 0-9), hyphens, and + # underscores. It must start and end with alphanumeric characters. (*Required*) + # @option arguments [Time] :timeout Controls the amount of time to wait until the data frame analytics job + # starts. Server default: 20s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The start data frame analytics parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-data-frame-analytics # def start_data_frame_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.start_data_frame_analytics' } @@ -44,12 +57,12 @@ def start_data_frame_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = nil _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_POST - path = "_ml/data_frame/analytics/#{Utils.__listify(_id)}/_start" + path = "_ml/data_frame/analytics/#{Utils.listify(_id)}/_start" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb index ec6b3957df..6cfe5d538e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb @@ -15,23 +15,46 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Starts one or more datafeeds. + # Start datafeeds. + # A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped + # multiple times throughout its lifecycle. + # Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs. + # If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped. + # If new data was indexed for that exact millisecond between stopping and starting, it will be ignored. + # When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or + # update it had at the time of creation or update and runs the query using those same roles. If you provided secondary + # authorization headers when you created or updated the datafeed, those credentials are used instead. # - # @option arguments [String] :datafeed_id The ID of the datafeed to start - # @option arguments [String] :start The start time from where the datafeed should begin - # @option arguments [String] :end The end time when the datafeed should stop. When not set, the datafeed continues in real time - # @option arguments [Time] :timeout Controls the time to wait until a datafeed has started. Default to 20 seconds + # @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase + # alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric + # characters. (*Required*) + # @option arguments [String, Time] :end The time that the datafeed should end, which can be specified by using one of the following formats: + # - ISO 8601 format with milliseconds, for example +2017-01-22T06:00:00.000Z+ + # - ISO 8601 format without milliseconds, for example +2017-01-22T06:00:00+00:00+ + # - Milliseconds since the epoch, for example +1485061200000+ + # Date-time arguments using either of the ISO 8601 formats must have a time zone designator, where +Z+ is accepted + # as an abbreviation for UTC time. When a URL is expected (for example, in browsers), the +++ used in time zone + # designators must be encoded as +%2B+. + # The end time value is exclusive. If you do not specify an end time, the datafeed + # runs continuously. + # @option arguments [String, Time] :start The time that the datafeed should begin, which can be specified by using the same formats as the +end+ parameter. + # This value is inclusive. + # If you do not specify a start time and the datafeed is associated with a new anomaly detection job, the analysis + # starts from the earliest time for which data is available. + # If you restart a stopped datafeed and specify a start value that is earlier than the timestamp of the latest + # processed record, the datafeed continues from 1 millisecond after the timestamp of the latest processed record. + # @option arguments [Time] :timeout Specifies the amount of time to wait until a datafeed starts. Server default: 20s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The start datafeed parameters + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-datafeed # def start_datafeed(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.start_datafeed' } @@ -51,7 +74,7 @@ def start_datafeed(arguments = {}) _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/datafeeds/#{Utils.__listify(_datafeed_id)}/_start" + path = "_ml/datafeeds/#{Utils.listify(_datafeed_id)}/_start" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb index ddb800d1d9..28962abf57 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb @@ -55,9 +55,8 @@ module Actions def start_trained_model_deployment(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.start_trained_model_deployment' } - defined_params = [:model_id].inject({}) do |set_variables, variable| + defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -71,7 +70,7 @@ def start_trained_model_deployment(arguments = {}) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/trained_models/#{Utils.__listify(_model_id)}/deployment/_start" + path = "_ml/trained_models/#{Utils.listify(_model_id)}/deployment/_start" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb index 142085941a..740e6ca514 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb @@ -15,23 +15,35 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Stops one or more data frame analytics jobs. + # Stop data frame analytics jobs. + # A data frame analytics job can be started and stopped multiple times + # throughout its lifecycle. # - # @option arguments [String] :id The ID of the data frame analytics to stop - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) - # @option arguments [Boolean] :force True if the data frame analytics should be forcefully stopped - # @option arguments [Time] :timeout Controls the time to wait until the task has stopped. Defaults to 20 seconds + # @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain + # lowercase alphanumeric characters (a-z and 0-9), hyphens, and + # underscores. It must start and end with alphanumeric characters. (*Required*) + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no data frame analytics + # jobs that match. + # - Contains the _all string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # The default value is true, which returns an empty data_frame_analytics + # array when there are no matches and the subset of results when there are + # partial matches. If this parameter is false, the request returns a 404 + # status code when there are no matches or only partial matches. Server default: true. + # @option arguments [Boolean] :force If true, the data frame analytics job is stopped forcefully. + # @option arguments [Time] :timeout Controls the amount of time to wait until the data frame analytics job + # stops. Defaults to 20 seconds. Server default: 20s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The stop data frame analytics parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-data-frame-analytics # def stop_data_frame_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.stop_data_frame_analytics' } @@ -46,12 +58,12 @@ def stop_data_frame_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = nil _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_POST - path = "_ml/data_frame/analytics/#{Utils.__listify(_id)}/_stop" + path = "_ml/data_frame/analytics/#{Utils.listify(_id)}/_stop" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb index dd7e8f0ad3..03d96f9a30 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb @@ -15,24 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Stops one or more datafeeds. + # Stop datafeeds. + # A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped + # multiple times throughout its lifecycle. # - # @option arguments [String] :datafeed_id The ID of the datafeed to stop - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) - # @option arguments [Boolean] :allow_no_datafeeds Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) *Deprecated* - # @option arguments [Boolean] :force True if the datafeed should be forcefully stopped. - # @option arguments [Time] :timeout Controls the time to wait until a datafeed has stopped. Default to 20 seconds + # @option arguments [String] :datafeed_id Identifier for the datafeed. You can stop multiple datafeeds in a single API request by using a comma-separated + # list of datafeeds or a wildcard expression. You can close all datafeeds by using +_all+ or by specifying +*+ as + # the identifier. (*Required*) + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no datafeeds that match. + # - Contains the +_all+ string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # If +true+, the API returns an empty datafeeds array when there are no matches and the subset of results when + # there are partial matches. If +false+, the API returns a 404 status code when there are no matches or only + # partial matches. Server default: true. + # @option arguments [Boolean] :force If +true+, the datafeed is stopped forcefully. + # @option arguments [Time] :timeout Specifies the amount of time to wait until a datafeed stops. Server default: 20s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The URL params optionally sent in the body + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-datafeed # def stop_datafeed(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.stop_datafeed' } @@ -52,7 +61,7 @@ def stop_datafeed(arguments = {}) _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/datafeeds/#{Utils.__listify(_datafeed_id)}/_stop" + path = "_ml/datafeeds/#{Utils.listify(_datafeed_id)}/_stop" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb index df59c9fb7a..d43fc75b17 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb @@ -15,8 +15,8 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API @@ -25,12 +25,15 @@ module Actions # Stop a trained model deployment. # # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*) - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no deployments. (This includes `_all` string or when no deployments have been specified) - # @option arguments [Boolean] :force True if the deployment should be forcefully stopped + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: contains wildcard expressions and there are no deployments that match; + # contains the +_all+ string or no identifiers and there are no matches; or contains wildcard expressions and + # there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches. + # If +false+, the request returns a 404 status code when there are no matches or only partial matches. Server default: true. + # @option arguments [Boolean] :force Forcefully stops the deployment, even if it is used by ingest pipelines. You can't use these pipelines until you + # restart the model deployment. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The stop deployment parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-trained-model-deployment.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-trained-model-deployment # def stop_trained_model_deployment(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.stop_trained_model_deployment' } @@ -45,12 +48,12 @@ def stop_trained_model_deployment(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = nil _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/trained_models/#{Utils.__listify(_model_id)}/deployment/_stop" + path = "_ml/trained_models/#{Utils.listify(_model_id)}/deployment/_stop" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb index fe5c713b46..64430334f6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb @@ -15,20 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Updates certain properties of a data frame analytics job. + # Update a data frame analytics job. # - # @option arguments [String] :id The ID of the data frame analytics to update + # @option arguments [String] :id Identifier for the data frame analytics job. This identifier can contain + # lowercase alphanumeric characters (a-z and 0-9), hyphens, and + # underscores. It must start and end with alphanumeric characters. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The data frame analytics settings to update (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-data-frame-analytics # def update_data_frame_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.update_data_frame_analytics' } @@ -49,7 +51,7 @@ def update_data_frame_analytics(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_POST - path = "_ml/data_frame/analytics/#{Utils.__listify(_id)}/_update" + path = "_ml/data_frame/analytics/#{Utils.listify(_id)}/_update" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb index 34dc4dc9e3..ea04135319 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb @@ -15,24 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Updates certain properties of a datafeed. + # Update a datafeed. + # You must stop and start the datafeed for the changes to be applied. + # When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at + # the time of the update and runs the query using those same roles. If you provide secondary authorization headers, + # those credentials are used instead. # - # @option arguments [String] :datafeed_id The ID of the datafeed to update - # @option arguments [Boolean] :ignore_unavailable Ignore unavailable indexes (default: false) - # @option arguments [Boolean] :allow_no_indices Ignore if the source indices expressions resolves to no concrete indices (default: true) - # @option arguments [Boolean] :ignore_throttled Ignore indices that are marked as throttled (default: true) - # @option arguments [String] :expand_wildcards Whether source index expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) + # @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed. + # This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. + # It must start and end with alphanumeric characters. (*Required*) + # @option arguments [Boolean] :allow_no_indices If +true+, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the + # +_all+ string or when no indices are specified. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines + # whether wildcard expressions match hidden data streams. Supports comma-separated values. Valid values are: + # - +all+: Match any data stream or index, including hidden ones. + # - +closed+: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed. + # - +hidden+: Match hidden data streams and hidden indices. Must be combined with +open+, +closed+, or both. + # - +none+: Wildcard patterns are not accepted. + # - +open+: Match open, non-hidden indices. Also matches any non-hidden data stream. Server default: open. + # @option arguments [Boolean] :ignore_throttled If +true+, concrete, expanded or aliased indices are ignored when frozen. Server default: true. + # @option arguments [Boolean] :ignore_unavailable If +true+, unavailable indices (missing or closed) are ignored. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The datafeed update settings (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-datafeed # def update_datafeed(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.update_datafeed' } @@ -53,7 +66,7 @@ def update_datafeed(arguments = {}) _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/datafeeds/#{Utils.__listify(_datafeed_id)}/_update" + path = "_ml/datafeeds/#{Utils.listify(_datafeed_id)}/_update" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb index a540151478..37768e2d69 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb @@ -15,20 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Updates the description of a filter, adds items, or removes items. + # Update a filter. + # Updates the description of a filter, adds items, or removes items from the list. # - # @option arguments [String] :filter_id The ID of the filter to update + # @option arguments [String] :filter_id A string that uniquely identifies a filter. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The filter update (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-filter # def update_filter(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.update_filter' } @@ -49,7 +50,7 @@ def update_filter(arguments = {}) _filter_id = arguments.delete(:filter_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/filters/#{Utils.__listify(_filter_id)}/_update" + path = "_ml/filters/#{Utils.listify(_filter_id)}/_update" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb index 6ed25d906e..4d45669025 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb @@ -15,20 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions + # Update an anomaly detection job. # Updates certain properties of an anomaly detection job. # - # @option arguments [String] :job_id The ID of the job to create + # @option arguments [String] :job_id Identifier for the job. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The job update settings (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-job # def update_job(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.update_job' } @@ -49,7 +50,7 @@ def update_job(arguments = {}) _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_update" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_update" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb index 06c73a0dcc..496423f3e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb @@ -15,26 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions + # Update a snapshot. # Updates certain properties of a snapshot. # - # @option arguments [String] :job_id The ID of the job to fetch - # @option arguments [String] :snapshot_id The ID of the snapshot to update + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [String] :snapshot_id Identifier for the model snapshot. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The model snapshot properties to update (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-model-snapshot # def update_model_snapshot(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.update_model_snapshot' } - defined_params = %i[job_id snapshot_id].each_with_object({}) do |variable, set_variables| + defined_params = [:job_id, :snapshot_id].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? @@ -53,7 +54,7 @@ def update_model_snapshot(arguments = {}) _snapshot_id = arguments.delete(:snapshot_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/model_snapshots/#{Utils.__listify(_snapshot_id)}/_update" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/model_snapshots/#{Utils.listify(_snapshot_id)}/_update" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb index 64c623c328..f57e275fca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb @@ -15,21 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Updates certain properties of trained model deployment. + # Update a trained model deployment. # - # @option arguments [String] :model_id The unique identifier of the trained model. - # @option arguments [Integer] :number_of_allocations Update the model deployment to this number of allocations. + # @option arguments [String] :model_id The unique identifier of the trained model. Currently, only PyTorch models are supported. (*Required*) + # @option arguments [Integer] :number_of_allocations The number of model allocations on each node where the model is deployed. + # All allocations on a node share the same copy of the model in memory but use + # a separate set of threads to evaluate the model. + # Increasing this value generally increases the throughput. + # If this setting is greater than the number of hardware threads + # it will automatically be changed to a value less than the number of hardware threads. Server default: 1. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The updated trained model deployment settings + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-trained-model-deployment.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-trained-model-deployment # def update_trained_model_deployment(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.update_trained_model_deployment' } @@ -49,7 +54,7 @@ def update_trained_model_deployment(arguments = {}) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/trained_models/#{Utils.__listify(_model_id)}/deployment/_update" + path = "_ml/trained_models/#{Utils.listify(_model_id)}/deployment/_update" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb index 7d21a2afd3..64b9cff288 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb @@ -15,27 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module MachineLearning module Actions - # Upgrades a given job snapshot to the current major version. + # Upgrade a snapshot. + # Upgrade an anomaly detection model snapshot to the latest major version. + # Over time, older snapshot formats are deprecated and removed. Anomaly + # detection jobs support only snapshots that are from the current or previous + # major version. + # This API provides a means to upgrade a snapshot to the current major version. + # This aids in preparing the cluster for an upgrade to the next major version. + # Only one snapshot per anomaly detection job can be upgraded at a time and the + # upgraded snapshot cannot be the current snapshot of the anomaly detection + # job. # - # @option arguments [String] :job_id The ID of the job - # @option arguments [String] :snapshot_id The ID of the snapshot - # @option arguments [Time] :timeout How long should the API wait for the job to be opened and the old snapshot to be loaded. - # @option arguments [Boolean] :wait_for_completion Should the request wait until the task is complete before responding to the caller. Default is false. + # @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*) + # @option arguments [String] :snapshot_id A numerical character string that uniquely identifies the model snapshot. (*Required*) + # @option arguments [Boolean] :wait_for_completion When true, the API won’t respond until the upgrade is complete. + # Otherwise, it responds as soon as the upgrade task is assigned to a node. + # @option arguments [Time] :timeout Controls the time to wait for the request to complete. Server default: 30m. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-upgrade-job-snapshot # def upgrade_job_snapshot(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.upgrade_job_snapshot' } - defined_params = %i[job_id snapshot_id].each_with_object({}) do |variable, set_variables| + defined_params = [:job_id, :snapshot_id].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? @@ -53,7 +63,7 @@ def upgrade_job_snapshot(arguments = {}) _snapshot_id = arguments.delete(:snapshot_id) method = Elasticsearch::API::HTTP_POST - path = "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/model_snapshots/#{Utils.__listify(_snapshot_id)}/_upgrade" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/model_snapshots/#{Utils.listify(_snapshot_id)}/_upgrade" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb index ada183568f..5bf3aa7c18 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb @@ -15,28 +15,44 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Allows to get multiple documents in one request. + # Get multiple documents. + # Get multiple JSON documents by ID from one or more indices. + # If you specify an index in the request URI, you only need to specify the document IDs in the request body. + # To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. + # **Filter source fields** + # By default, the +_source+ field is returned for every document (if stored). + # Use the +_source+ and +_source_include+ or +source_exclude+ attributes to filter what fields are returned for a particular document. + # You can include the +_source+, +_source_includes+, and +_source_excludes+ query parameters in the request URI to specify the defaults to use when there are no per-document instructions. + # **Get stored fields** + # Use the +stored_fields+ attribute to specify the set of stored fields you want to retrieve. + # Any requested fields that are not stored are ignored. + # You can include the +stored_fields+ query parameter in the request URI to specify the defaults to use when there are no per-document instructions. # - # @option arguments [String] :index The name of the index - # @option arguments [Boolean] :force_synthetic_source Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. - # @option arguments [List] :stored_fields A comma-separated list of stored fields to return in the response - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [Boolean] :realtime Specify whether to perform the operation in realtime or search mode - # @option arguments [Boolean] :refresh Refresh the shard containing the document before performing the operation - # @option arguments [String] :routing Specific routing value - # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return - # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field - # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field + # @option arguments [String] :index Name of the index to retrieve documents from when +ids+ are specified, or when a document in the +docs+ array does not specify an index. + # @option arguments [Boolean] :force_synthetic_source Should this request force synthetic _source? + # Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. + # Fetches with this enabled will be slower the enabling synthetic source natively in the index. + # @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default. + # @option arguments [Boolean] :realtime If +true+, the request is real-time as opposed to near-real-time. Server default: true. + # @option arguments [Boolean] :refresh If +true+, the request refreshes relevant shards before retrieving documents. + # @option arguments [String] :routing Custom value used to route operations to a specific shard. + # @option arguments [Boolean, String, Array] :_source True or false to return the +_source+ field or not, or a list of fields to return. + # @option arguments [String, Array] :_source_excludes A comma-separated list of source fields to exclude from the response. + # You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter. + # @option arguments [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the +_source_excludes+ query parameter. + # If the +_source+ parameter is +false+, this parameter is ignored. + # @option arguments [String, Array] :stored_fields If +true+, retrieves the document fields stored in the index rather than the document +_source+. Server default: false. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-mget # def mget(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'mget' } @@ -51,13 +67,13 @@ def mget(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "#{Utils.__listify(_index)}/_mget" + "#{Utils.listify(_index)}/_mget" else '_mget' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb index 561bfa4c0d..7dfb488e75 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Migration module Actions - # Retrieves information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version. + # Get deprecation information. + # Get information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version. + # TIP: This APIs is designed for indirect use by the Upgrade Assistant. + # You are strongly recommended to use the Upgrade Assistant. # - # @option arguments [String] :index Index pattern + # @option arguments [String] :index Comma-separate list of data streams or indices to check. Wildcard (*) expressions are supported. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-migration-deprecations # def deprecations(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'migration.deprecations' } @@ -40,13 +43,13 @@ def deprecations(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index - "#{Utils.__listify(_index)}/_migration/deprecations" + "#{Utils.listify(_index)}/_migration/deprecations" else '_migration/deprecations' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb index b5263b949f..bb86a55598 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb @@ -15,18 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Migration module Actions - # Find out whether system features need to be upgraded or not + # Get feature migration information. + # Version upgrades sometimes require changes to how features store configuration information and data in system indices. + # Check which features need to be migrated and the status of any migrations that are in progress. + # TIP: This API is designed for indirect use by the Upgrade Assistant. + # You are strongly recommended to use the Upgrade Assistant. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-migration-get-feature-upgrade-status # def get_feature_upgrade_status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'migration.get_feature_upgrade_status' } @@ -34,7 +38,7 @@ def get_feature_upgrade_status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_migration/system_features' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb index 64f31d63d6..d113b40b5a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb @@ -15,18 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Migration module Actions - # Begin upgrades for system features + # Start the feature migration. + # Version upgrades sometimes require changes to how features store configuration information and data in system indices. + # This API starts the automatic migration process. + # Some functionality might be temporarily unavailable during the migration process. + # TIP: The API is designed for indirect use by the Upgrade Assistant. We strongly recommend you use the Upgrade Assistant. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-migration-get-feature-upgrade-status # def post_feature_upgrade(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'migration.post_feature_upgrade' } @@ -34,7 +38,7 @@ def post_feature_upgrade(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_migration/system_features' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb index 4b326a03fc..d28a78406a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb @@ -15,26 +15,49 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Allows to execute several search operations in one request. + # Run multiple searches. + # The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + # The structure is as follows: + # + + # header\n + # body\n + # header\n + # body\n + # + + # This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + # IMPORTANT: The final line of data must end with a newline character +\n+. + # Each newline character may be preceded by a carriage return +\r+. + # When sending requests to this endpoint the +Content-Type+ header should be set to +application/x-ndjson+. # - # @option arguments [List] :index A comma-separated list of index names to use as default - # @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch) - # @option arguments [Number] :max_concurrent_searches Controls the maximum number of concurrent searches the multi search api will execute - # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response - # @option arguments [Number] :pre_filter_shard_size A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. - # @option arguments [Number] :max_concurrent_shard_requests The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests - # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response - # @option arguments [Boolean] :ccs_minimize_roundtrips Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and index aliases to search. + # @option arguments [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. + # @option arguments [Boolean] :ccs_minimize_roundtrips If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests. Server default: true. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # @option arguments [Boolean] :ignore_throttled If true, concrete, expanded or aliased indices are ignored when frozen. + # @option arguments [Boolean] :ignore_unavailable If true, missing or closed indices are not included in the response. + # @option arguments [Boolean] :include_named_queries_score Indicates whether hit.matched_queries should be rendered as a map that includes + # the name of the matched query associated with its score (true) + # or as an array containing the name of the matched queries (false) + # This functionality reruns each named query on every hit in a search response. + # Typically, this adds a small overhead to a request. + # However, using computationally expensive named queries on a large number of hits may add significant overhead. + # @option arguments [Integer] :max_concurrent_searches Maximum number of concurrent searches the multi search API can execute. + # @option arguments [Integer] :max_concurrent_shard_requests Maximum number of concurrent shard requests that each sub-search request executes per node. Server default: 5. + # @option arguments [Integer] :pre_filter_shard_size Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. + # @option arguments [Boolean] :rest_total_hits_as_int If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. + # @option arguments [String] :routing Custom routing value used to route search operations to a specific shard. + # @option arguments [String] :search_type Indicates whether global term and document frequencies should be used when scoring returned documents. + # @option arguments [Boolean] :typed_keys Specifies whether aggregation and suggester names should be prefixed by their respective types in the response. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The request definitions (metadata-search request definition pairs), separated by newlines (*Required*) + # @option arguments [Hash] :body searches # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-msearch # def msearch(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'msearch' } @@ -49,19 +72,19 @@ def msearch(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "#{Utils.__listify(_index)}/_msearch" + "#{Utils.listify(_index)}/_msearch" else '_msearch' end params = Utils.process_params(arguments) - if body.is_a?(Array) && body.any? { |d| d.has_key? :search } + if body.is_a?(Array) && body.any? { |d| d.key? :search } payload = body.each_with_object([]) do |item, sum| meta = item data = meta.delete(:search) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb index 9f8c741f39..5ba499f0d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb @@ -15,24 +15,38 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Allows to execute several search template operations in one request. + # Run multiple templated searches. + # Run multiple templated searches with a single request. + # If you are providing a text file or text input to +curl+, use the +--data-binary+ flag instead of +-d+ to preserve newlines. + # For example: + # + + # $ cat requests + # { "index": "my-index" } + # { "id": "my-search-template", "params": { "query_string": "hello world", "from": 0, "size": 10 }} + # { "index": "my-other-index" } + # { "id": "my-other-search-template", "params": { "query_type": "match_all" }} + # $ curl -H "Content-Type: application/x-ndjson" -XGET localhost:9200/_msearch/template --data-binary "@requests"; echo + # + # - # @option arguments [List] :index A comma-separated list of index names to use as default - # @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch) - # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response - # @option arguments [Number] :max_concurrent_searches Controls the maximum number of concurrent searches the multi search api will execute - # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response - # @option arguments [Boolean] :ccs_minimize_roundtrips Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases to search. + # It supports wildcards (+*+). + # To search all data streams and indices, omit this parameter or use +*+. + # @option arguments [Boolean] :ccs_minimize_roundtrips If +true+, network round-trips are minimized for cross-cluster search requests. Server default: true. + # @option arguments [Integer] :max_concurrent_searches The maximum number of concurrent searches the API can run. + # @option arguments [String] :search_type The type of the search operation. + # @option arguments [Boolean] :rest_total_hits_as_int If +true+, the response returns +hits.total+ as an integer. + # If +false+, it returns +hits.total+ as an object. + # @option arguments [Boolean] :typed_keys If +true+, the response prefixes aggregation and suggester names with their respective types. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The request definitions (metadata-search request definition pairs), separated by newlines (*Required*) + # @option arguments [Hash] :body search_templates # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-msearch-template # def msearch_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'msearch_template' } @@ -47,13 +61,13 @@ def msearch_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "#{Utils.__listify(_index)}/_msearch/template" + "#{Utils.listify(_index)}/_msearch/template" else '_msearch/template' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb index 2621ff9d51..b99963c16a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb @@ -15,31 +15,41 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns multiple termvectors in one request. + # Get multiple term vectors. + # Get multiple term vectors with a single request. + # You can specify existing documents by index and ID or provide artificial documents in the body of the request. + # You can specify the index in the request body or request URI. + # The response contains a +docs+ array with all the fetched termvectors. + # Each element has the structure provided by the termvectors API. + # **Artificial documents** + # You can also use +mtermvectors+ to generate term vectors for artificial documents provided in the body of the request. + # The mapping used is determined by the specified +_index+. # - # @option arguments [String] :index The index in which the document resides. - # @option arguments [List] :ids A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body - # @option arguments [Boolean] :term_statistics Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". - # @option arguments [Boolean] :field_statistics Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". - # @option arguments [List] :fields A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". - # @option arguments [Boolean] :offsets Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". - # @option arguments [Boolean] :positions Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". - # @option arguments [Boolean] :payloads Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". - # @option arguments [String] :routing Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". - # @option arguments [Boolean] :realtime Specifies if requests are real-time as opposed to near-real-time (default: true). - # @option arguments [Number] :version Explicit version number for concurrency control - # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) + # @option arguments [String] :index The name of the index that contains the documents. + # @option arguments [Array] :ids A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body + # @option arguments [String, Array] :fields A comma-separated list or wildcard expressions of fields to include in the statistics. + # It is used as the default list unless a specific field list is provided in the +completion_fields+ or +fielddata_fields+ parameters. + # @option arguments [Boolean] :field_statistics If +true+, the response includes the document count, sum of document frequencies, and sum of total term frequencies. Server default: true. + # @option arguments [Boolean] :offsets If +true+, the response includes term offsets. Server default: true. + # @option arguments [Boolean] :payloads If +true+, the response includes term payloads. Server default: true. + # @option arguments [Boolean] :positions If +true+, the response includes term positions. Server default: true. + # @option arguments [String] :preference The node or shard the operation should be performed on. + # It is random by default. + # @option arguments [Boolean] :realtime If true, the request is real-time as opposed to near-real-time. Server default: true. + # @option arguments [String] :routing A custom value used to route operations to a specific shard. + # @option arguments [Boolean] :term_statistics If true, the response includes term frequency and document frequency. + # @option arguments [Integer] :version If +true+, returns the document version as part of a hit. + # @option arguments [String] :version_type The version type. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-mtermvectors # def mtermvectors(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'mtermvectors' } @@ -52,11 +62,7 @@ def mtermvectors(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = if (ids = arguments.delete(:ids)) - { ids: ids } - else - arguments.delete(:body) - end + body = arguments.delete(:body) _index = arguments.delete(:index) @@ -66,11 +72,11 @@ def mtermvectors(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.__listify(_index)}/_mtermvectors" - else - '_mtermvectors' - end + path = if _index + "#{Utils.listify(_index)}/_mtermvectors" + else + '_mtermvectors' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb index 9d26816ac4..3ad4c45b11 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb @@ -15,35 +15,40 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Nodes module Actions - # Removes the archived repositories metering information present in the cluster. + # Clear the archived repositories metering. + # Clear the archived repositories metering information in the cluster. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [List] :node_id Comma-separated list of node IDs or names used to limit returned information. - # @option arguments [Long] :max_archive_version Specifies the maximum archive_version to be cleared from the archive. + # @option arguments [String, Array] :node_id Comma-separated list of node IDs or names used to limit returned information. (*Required*) + # @option arguments [Integer] :max_archive_version Specifies the maximum +archive_version+ to be cleared from the archive. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-clear-repositories-metering-archive # def clear_repositories_metering_archive(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.clear_repositories_metering_archive' } - defined_params = %i[node_id max_archive_version].each_with_object({}) do |variable, set_variables| + defined_params = [:node_id, :max_archive_version].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 'node_id' missing" unless arguments[:node_id] - raise ArgumentError, "Required argument 'max_archive_version' missing" unless arguments[:max_archive_version] + + unless arguments[:max_archive_version] + raise ArgumentError, + "Required argument 'max_archive_version' missing" + end arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -55,7 +60,7 @@ def clear_repositories_metering_archive(arguments = {}) _max_archive_version = arguments.delete(:max_archive_version) method = Elasticsearch::API::HTTP_DELETE - path = "_nodes/#{Utils.__listify(_node_id)}/_repositories_metering/#{Utils.__listify(_max_archive_version)}" + path = "_nodes/#{Utils.listify(_node_id)}/_repositories_metering/#{Utils.listify(_max_archive_version)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb index 9afe42fab4..17435353a4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb @@ -15,23 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Nodes module Actions - # Returns cluster repositories metering information. + # Get cluster repositories metering. + # Get repositories metering information for a cluster. + # This API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time. + # Additionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information. + # @option arguments [String, Array] :node_id Comma-separated list of node IDs or names used to limit returned information. + # All the nodes selective options are explained {https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes here}. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-get-repositories-metering-info # def get_repositories_metering_info(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.get_repositories_metering_info' } @@ -51,7 +55,7 @@ def get_repositories_metering_info(arguments = {}) _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_GET - path = "_nodes/#{Utils.__listify(_node_id)}/_repositories_metering" + path = "_nodes/#{Utils.listify(_node_id)}/_repositories_metering" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb index 20465247db..7ad48722b4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb @@ -15,26 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Nodes module Actions - # Returns information about hot threads on each node in the cluster. + # Get the hot threads for nodes. + # Get a breakdown of the hot threads on each selected node in the cluster. + # The output is plain text with a breakdown of the top hot threads for each node. # - # @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - # @option arguments [Time] :interval The interval for the second sampling of threads - # @option arguments [Number] :snapshots Number of samples of thread stacktrace (default: 10) - # @option arguments [Number] :threads Specify the number of threads to provide information for (default: 3) - # @option arguments [Boolean] :ignore_idle_threads Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) - # @option arguments [String] :type The type to sample (default: cpu) (options: cpu, wait, block, mem) - # @option arguments [String] :sort The sort order for 'cpu' type (default: total) (options: cpu, total) - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String, Array] :node_id List of node IDs or names used to limit returned information. + # @option arguments [Boolean] :ignore_idle_threads If true, known idle threads (e.g. waiting in a socket select, or to get + # a task from an empty queue) are filtered out. Server default: true. + # @option arguments [Time] :interval The interval to do the second sampling of threads. Server default: 500ms. + # @option arguments [Integer] :snapshots Number of samples of thread stacktrace. Server default: 10. + # @option arguments [Integer] :threads Specifies the number of hot threads to provide information for. Server default: 3. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received + # before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [String] :type The type to sample. Server default: cpu. + # @option arguments [String] :sort The sort order for 'cpu' type (default: total) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-hot-threads # def hot_threads(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.hot_threads' } @@ -53,7 +57,7 @@ def hot_threads(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _node_id - "_nodes/#{Utils.__listify(_node_id)}/hot_threads" + "_nodes/#{Utils.listify(_node_id)}/hot_threads" else '_nodes/hot_threads' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb index 0fb3986309..00299b1514 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb @@ -15,27 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Nodes module Actions - # Returns information about nodes in the cluster. + # Get node information. + # By default, the API returns all attributes and core settings for cluster nodes. # - # @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - # @option arguments [List] :metric A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics. (options: settings, os, process, jvm, thread_pool, transport, http, plugins, ingest, indices, aggregations, _all, _none) - # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false) - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String, Array] :node_id Comma-separated list of node IDs or names used to limit returned information. + # @option arguments [String, Array] :metric Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest. + # @option arguments [Boolean] :flat_settings If true, returns settings in flat format. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-info # def info(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.info' } - defined_params = %i[node_id metric].each_with_object({}) do |variable, set_variables| + defined_params = [:node_id, :metric].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? @@ -51,11 +52,11 @@ def info(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _node_id && _metric - "_nodes/#{Utils.__listify(_node_id)}/#{Utils.__listify(_metric)}" + "_nodes/#{Utils.listify(_node_id)}/#{Utils.listify(_metric)}" elsif _node_id - "_nodes/#{Utils.__listify(_node_id)}" + "_nodes/#{Utils.listify(_node_id)}" elsif _metric - "_nodes/#{Utils.__listify(_metric)}" + "_nodes/#{Utils.listify(_metric)}" else '_nodes' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb index 8c7ed792db..6940da5b9c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb @@ -15,21 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Nodes module Actions - # Reloads secure settings. + # Reload the keystore on nodes in the cluster. + # Secure settings are stored in an on-disk keystore. Certain of these settings are reloadable. + # That is, you can change them on disk and reload them without restarting any nodes in the cluster. + # When you have updated reloadable secure settings in your keystore, you can use this API to reload those settings on each node. + # When the Elasticsearch keystore is password protected and not simply obfuscated, you must provide the password for the keystore when you reload the secure settings. + # Reloading the settings for the whole cluster assumes that the keystores for all nodes are protected with the same password; this method is allowed only when inter-node communications are encrypted. + # Alternatively, you can reload the secure settings on each node by locally accessing the API and passing the node-specific Elasticsearch keystore password. # - # @option arguments [List] :node_id A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String, Array] :node_id The names of particular nodes in the cluster to target. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An object containing the password for the elasticsearch keystore + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/secure-settings.html#reloadable-secure-settings + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-reload-secure-settings # def reload_secure_settings(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.reload_secure_settings' } @@ -48,7 +55,7 @@ def reload_secure_settings(arguments = {}) method = Elasticsearch::API::HTTP_POST path = if _node_id - "_nodes/#{Utils.__listify(_node_id)}/reload_secure_settings" + "_nodes/#{Utils.listify(_node_id)}/reload_secure_settings" else '_nodes/reload_secure_settings' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb index 318d8c217c..e9b2bf4d65 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb @@ -15,35 +15,37 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Nodes module Actions - # Returns statistical information about nodes in the cluster. + # Get node statistics. + # Get statistics for nodes in a cluster. + # By default, all stats are returned. You can limit the returned information by using metrics. # - # @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - # @option arguments [List] :metric Limit the information returned to the specified metrics (options: _all, breaker, fs, http, indices, jvm, os, process, thread_pool, transport, discovery, indexing_pressure) - # @option arguments [List] :index_metric Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. (options: _all, completion, docs, fielddata, query_cache, flush, get, indexing, merge, request_cache, refresh, search, segments, store, warmer, bulk, shard_stats) - # @option arguments [List] :completion_fields A comma-separated list of fields for the `completion` index metric (supports wildcards) - # @option arguments [List] :fielddata_fields A comma-separated list of fields for the `fielddata` index metric (supports wildcards) - # @option arguments [List] :fields A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) - # @option arguments [Boolean] :groups A comma-separated list of search groups for `search` index metric - # @option arguments [String] :level Return indices stats aggregated at index, node or shard level (options: indices, node, shards) - # @option arguments [List] :types A comma-separated list of document types for the `indexing` index metric - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Boolean] :include_segment_file_sizes Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) - # @option arguments [Boolean] :include_unloaded_segments If set to true segment stats will include stats for segments that are not currently loaded into memory + # @option arguments [String, Array] :node_id Comma-separated list of node IDs or names used to limit returned information. + # @option arguments [String, Array] :metric Limit the information returned to the specified metrics + # @option arguments [String, Array] :index_metric Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified. + # @option arguments [String, Array] :completion_fields Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. + # @option arguments [String, Array] :fielddata_fields Comma-separated list or wildcard expressions of fields to include in fielddata statistics. + # @option arguments [String, Array] :fields Comma-separated list or wildcard expressions of fields to include in the statistics. + # @option arguments [Boolean] :groups Comma-separated list of search groups to include in the search statistics. + # @option arguments [Boolean] :include_segment_file_sizes If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). + # @option arguments [String] :level Indicates whether statistics are aggregated at the cluster, index, or shard level. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Array] :types A comma-separated list of document types for the indexing index metric. + # @option arguments [Boolean] :include_unloaded_segments If +true+, the response includes information from segments that are not loaded into memory. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-stats # def stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.stats' } - defined_params = %i[node_id metric index_metric].each_with_object({}) do |variable, set_variables| + defined_params = [:node_id, :metric, :index_metric].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? @@ -61,15 +63,15 @@ def stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _node_id && _metric && _index_metric - "_nodes/#{Utils.__listify(_node_id)}/stats/#{Utils.__listify(_metric)}/#{Utils.__listify(_index_metric)}" + "_nodes/#{Utils.listify(_node_id)}/stats/#{Utils.listify(_metric)}/#{Utils.listify(_index_metric)}" elsif _metric && _index_metric - "_nodes/stats/#{Utils.__listify(_metric)}/#{Utils.__listify(_index_metric)}" + "_nodes/stats/#{Utils.listify(_metric)}/#{Utils.listify(_index_metric)}" elsif _node_id && _metric - "_nodes/#{Utils.__listify(_node_id)}/stats/#{Utils.__listify(_metric)}" + "_nodes/#{Utils.listify(_node_id)}/stats/#{Utils.listify(_metric)}" elsif _node_id - "_nodes/#{Utils.__listify(_node_id)}/stats" + "_nodes/#{Utils.listify(_node_id)}/stats" elsif _metric - "_nodes/stats/#{Utils.__listify(_metric)}" + "_nodes/stats/#{Utils.listify(_metric)}" else '_nodes/stats' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb index 9d5150ab6c..73a98171bc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb @@ -15,26 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Nodes module Actions - # Returns low-level information about REST actions usage on nodes. + # Get feature usage information. # - # @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - # @option arguments [List] :metric Limit the information returned to the specified metrics (options: _all, rest_actions) - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String, Array] :node_id A comma-separated list of node IDs or names to limit the returned information; use +_local+ to return information from the node you're connecting to, leave empty to get information from all nodes + # @option arguments [String, Array] :metric Limits the information returned to the specific metrics. + # A comma-separated list of the following options: +_all+, +rest_actions+. + # @option arguments [Time] :timeout Period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-usage.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-usage # def usage(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'nodes.usage' } - defined_params = %i[node_id metric].each_with_object({}) do |variable, set_variables| + defined_params = [:node_id, :metric].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? @@ -50,11 +52,11 @@ def usage(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _node_id && _metric - "_nodes/#{Utils.__listify(_node_id)}/usage/#{Utils.__listify(_metric)}" + "_nodes/#{Utils.listify(_node_id)}/usage/#{Utils.listify(_metric)}" elsif _node_id - "_nodes/#{Utils.__listify(_node_id)}/usage" + "_nodes/#{Utils.listify(_node_id)}/usage" elsif _metric - "_nodes/usage/#{Utils.__listify(_metric)}" + "_nodes/usage/#{Utils.listify(_metric)}" else '_nodes/usage' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb index 79bda5d140..0ec8e149e7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb @@ -15,25 +15,55 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Open a point in time that can be used in subsequent searches + # Open a point in time. + # A search request by default runs against the most recent visible data of the target indices, + # which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the + # state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple + # search requests using the same point in time. For example, if refreshes happen between + # +search_after+ requests, then the results of those requests might not be consistent as changes happening + # between searches are only visible to the more recent point in time. + # A point in time must be opened explicitly before being used in search requests. + # A subsequent search request with the +pit+ parameter must not specify +index+, +routing+, or +preference+ values as these parameters are copied from the point in time. + # Just like regular searches, you can use +from+ and +size+ to page through point in time search results, up to the first 10,000 hits. + # If you want to retrieve more hits, use PIT with +search_after+. + # IMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request. + # When a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a +NoShardAvailableActionException+ exception. + # To get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime. + # **Keeping point in time alive** + # The +keep_alive+ parameter, which is passed to a open point in time request and search request, extends the time to live of the corresponding point in time. + # The value does not need to be long enough to process all data — it just needs to be long enough for the next request. + # Normally, the background merge process optimizes the index by merging together smaller segments to create new, bigger segments. + # Once the smaller segments are no longer needed they are deleted. + # However, open point-in-times prevent the old segments from being deleted since they are still in use. + # TIP: Keeping older segments alive means that more disk space and file handles are needed. + # Ensure that you have configured your nodes to have ample free file handles. + # Additionally, if a segment contains deleted or updated documents then the point in time must keep track of whether each document in the segment was live at the time of the initial search request. + # Ensure that your nodes have sufficient heap space if you have many open point-in-times on an index that is subject to ongoing deletes or updates. + # Note that a point-in-time doesn't prevent its associated indices from being deleted. + # You can check how many point-in-times (that is, search contexts) are open with the nodes stats API. # - # @option arguments [List] :index A comma-separated list of index names to open point in time; use `_all` or empty string to perform the operation on all indices - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [String] :routing Specific routing value - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [String] :keep_alive Specific the time to live for the point in time (*Required*) - # @option arguments [Boolean] :allow_partial_search_results Specify whether to tolerate shards missing when creating the point-in-time, or otherwise throw an exception. (default: false) + # @option arguments [String, Array] :index A comma-separated list of index names to open point in time; use +_all+ or empty string to perform the operation on all indices (*Required*) + # @option arguments [Time] :keep_alive Extend the length of time that the point in time persists. (*Required*) + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [String] :preference The node or shard the operation should be performed on. + # By default, it is random. + # @option arguments [String] :routing A custom value that is used to route operations to a specific shard. + # @option arguments [String, Array] :expand_wildcards The type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # It supports comma-separated values, such as +open,hidden+. Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :allow_partial_search_results Indicates whether the point in time tolerates unavailable shards or shard failures when initially creating the PIT. + # If +false+, creating a point in time request when a shard is missing or unavailable will throw an exception. + # If +true+, the point in time will contain all the shards that are available at the time of the request. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An index_filter specified with the Query DSL + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-open-point-in-time # def open_point_in_time(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'open_point_in_time' } @@ -48,12 +78,12 @@ def open_point_in_time(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_pit" + path = "#{Utils.listify(_index)}/_pit" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb index 7f8dd0bbf8..e2e7a66f6a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb @@ -15,17 +15,18 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns whether the cluster is running. + # Ping the cluster. + # Get information about whether the cluster is running. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster # def ping(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ping' } @@ -33,7 +34,7 @@ def ping(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_HEAD path = '' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb index b720d74044..0d4c61d57b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb @@ -15,27 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Creates or updates a script. + # Create or update a script or search template. + # Creates or updates a stored script or search template. # - # @option arguments [String] :id Script ID - # @option arguments [String] :context Script context - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [String] :id The identifier for the stored script or search template. + # It must be unique within the cluster. (*Required*) + # @option arguments [String] :context The context in which the script or search template should run. + # To prevent errors, the API immediately compiles the script or template in this context. + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. + # It can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The document (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-script # def put_script(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'put_script' } - defined_params = %i[id context].each_with_object({}) do |variable, set_variables| + defined_params = [:id, :context].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? @@ -54,9 +61,9 @@ def put_script(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = if _id && _context - "_scripts/#{Utils.__listify(_id)}/#{Utils.__listify(_context)}" + "_scripts/#{Utils.listify(_id)}/#{Utils.listify(_context)}" else - "_scripts/#{Utils.__listify(_id)}" + "_scripts/#{Utils.listify(_id)}" end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb index a7f69d8916..06b30468cc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb @@ -15,25 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module QueryRules module Actions - # Deletes an individual query rule within a ruleset. + # Delete a query rule. + # Delete a query rule within a query ruleset. + # This is a destructive action that is only recoverable by re-adding the same rule with the create or update query rule API. # - # @option arguments [String] :ruleset_id The unique identifier of the query ruleset this rule exists in - # @option arguments [String] :rule_id The unique identifier of the rule to delete. + # @option arguments [String] :ruleset_id The unique identifier of the query ruleset containing the rule to delete (*Required*) + # @option arguments [String] :rule_id The unique identifier of the query rule within the specified ruleset to delete (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-rule.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-rule # def delete_rule(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'query_rules.delete_rule' } - defined_params = %i[ruleset_id rule_id].each_with_object({}) do |variable, set_variables| + defined_params = [:ruleset_id, :rule_id].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? @@ -51,7 +53,7 @@ def delete_rule(arguments = {}) _rule_id = arguments.delete(:rule_id) method = Elasticsearch::API::HTTP_DELETE - path = "_query_rules/#{Utils.__listify(_ruleset_id)}/_rule/#{Utils.__listify(_rule_id)}" + path = "_query_rules/#{Utils.listify(_ruleset_id)}/_rule/#{Utils.listify(_rule_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb index f6739b40b6..34a0884e4c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb @@ -15,19 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module QueryRules module Actions - # Deletes a query ruleset. + # Delete a query ruleset. + # Remove a query ruleset and its associated data. + # This is a destructive action that is not recoverable. # - # @option arguments [String] :ruleset_id The unique identifier of the query ruleset to delete + # @option arguments [String] :ruleset_id The unique identifier of the query ruleset to delete (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-ruleset.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-ruleset # def delete_ruleset(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'query_rules.delete_ruleset' } @@ -47,20 +49,12 @@ def delete_ruleset(arguments = {}) _ruleset_id = arguments.delete(:ruleset_id) method = Elasticsearch::API::HTTP_DELETE - path = "_query_rules/#{Utils.__listify(_ruleset_id)}" - params = Utils.process_params(arguments) + path = "_query_rules/#{Utils.listify(_ruleset_id)}" + params = {} - if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do - Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, request_opts) - ) - end - else - Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, request_opts) - ) - end + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) end end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb index 579d2a9627..415128bed4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb @@ -15,25 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module QueryRules module Actions - # Returns the details about an individual query rule within a ruleset. + # Get a query rule. + # Get details about a query rule within a query ruleset. # - # @option arguments [String] :ruleset_id The unique identifier of the query ruleset the rule exists within - # @option arguments [String] :rule_id The unique identifier of the rule to be retrieved. + # @option arguments [String] :ruleset_id The unique identifier of the query ruleset containing the rule to retrieve (*Required*) + # @option arguments [String] :rule_id The unique identifier of the query rule within the specified ruleset to retrieve (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-rule.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-rule # def get_rule(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'query_rules.get_rule' } - defined_params = %i[ruleset_id rule_id].each_with_object({}) do |variable, set_variables| + defined_params = [:ruleset_id, :rule_id].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? @@ -51,7 +52,7 @@ def get_rule(arguments = {}) _rule_id = arguments.delete(:rule_id) method = Elasticsearch::API::HTTP_GET - path = "_query_rules/#{Utils.__listify(_ruleset_id)}/_rule/#{Utils.__listify(_rule_id)}" + path = "_query_rules/#{Utils.listify(_ruleset_id)}/_rule/#{Utils.listify(_rule_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb index 3eb2931d90..de912178e2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb @@ -15,19 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module QueryRules module Actions - # Returns the details about a query ruleset. + # Get a query ruleset. + # Get details about a query ruleset. # - # @option arguments [String] :ruleset_id The unique identifier of the query ruleset + # @option arguments [String] :ruleset_id The unique identifier of the query ruleset (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-ruleset.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-ruleset # def get_ruleset(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'query_rules.get_ruleset' } @@ -47,7 +48,7 @@ def get_ruleset(arguments = {}) _ruleset_id = arguments.delete(:ruleset_id) method = Elasticsearch::API::HTTP_GET - path = "_query_rules/#{Utils.__listify(_ruleset_id)}" + path = "_query_rules/#{Utils.listify(_ruleset_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb index 46cb469e2a..6f9450a030 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb @@ -15,20 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module QueryRules module Actions - # Lists query rulesets. + # Get all query rulesets. + # Get summarized information about the query rulesets. # - # @option arguments [Integer] :from Starting offset (default: 0) - # @option arguments [Integer] :size specifies a max number of results to get (default: 100) + # @option arguments [Integer] :from The offset from the first result to fetch. Server default: 0. + # @option arguments [Integer] :size The maximum number of results to retrieve. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-query-rulesets.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-list-rulesets # def list_rulesets(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'query_rules.list_rulesets' } @@ -36,7 +37,7 @@ def list_rulesets(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_query_rules' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb index 659f785d6c..5e726c4e75 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb @@ -15,26 +15,31 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module QueryRules module Actions - # Creates or updates a query rule within a ruleset. + # Create or update a query rule. + # Create or update a query rule within a query ruleset. + # IMPORTANT: Due to limitations within pinned queries, you can only pin documents using ids or docs, but cannot use both in single rule. + # It is advised to use one or the other in query rulesets, to avoid errors. + # Additionally, pinned queries have a maximum limit of 100 pinned hits. + # If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset. # - # @option arguments [String] :ruleset_id The unique identifier of the ruleset this rule should be added to. The ruleset will be created if it does not exist. - # @option arguments [String] :rule_id The unique identifier of the rule to be created or updated. + # @option arguments [String] :ruleset_id The unique identifier of the query ruleset containing the rule to be created or updated. (*Required*) + # @option arguments [String] :rule_id The unique identifier of the query rule within the specified ruleset to be created or updated. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The query rule configuration, including the type of rule, the criteria to match the rule, and the action that should be taken if the rule matches. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-rule.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-put-rule # def put_rule(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'query_rules.put_rule' } - defined_params = %i[ruleset_id rule_id].each_with_object({}) do |variable, set_variables| + defined_params = [:ruleset_id, :rule_id].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? @@ -53,7 +58,7 @@ def put_rule(arguments = {}) _rule_id = arguments.delete(:rule_id) method = Elasticsearch::API::HTTP_PUT - path = "_query_rules/#{Utils.__listify(_ruleset_id)}/_rule/#{Utils.__listify(_rule_id)}" + path = "_query_rules/#{Utils.listify(_ruleset_id)}/_rule/#{Utils.listify(_rule_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb index ed042f3960..8d32d0b90a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb @@ -15,20 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module QueryRules module Actions - # Creates or updates a query ruleset. + # Create or update a query ruleset. + # There is a limit of 100 rules per ruleset. + # This limit can be increased by using the +xpack.applications.rules.max_rules_per_ruleset+ cluster setting. + # IMPORTANT: Due to limitations within pinned queries, you can only select documents using +ids+ or +docs+, but cannot use both in single rule. + # It is advised to use one or the other in query rulesets, to avoid errors. + # Additionally, pinned queries have a maximum limit of 100 pinned hits. + # If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset. # - # @option arguments [String] :ruleset_id The unique identifier of the ruleset to be created or updated. + # @option arguments [String] :ruleset_id The unique identifier of the query ruleset to be created or updated. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The query ruleset configuration, including `rules` (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-ruleset.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-put-ruleset # def put_ruleset(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'query_rules.put_ruleset' } @@ -49,7 +55,7 @@ def put_ruleset(arguments = {}) _ruleset_id = arguments.delete(:ruleset_id) method = Elasticsearch::API::HTTP_PUT - path = "_query_rules/#{Utils.__listify(_ruleset_id)}" + path = "_query_rules/#{Utils.listify(_ruleset_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb index 0215f0656a..66b972cb45 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb @@ -15,24 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module QueryRules module Actions - # Tests a query ruleset to identify the rules that would match input criteria - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Test a query ruleset. + # Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. # - # @option arguments [String] :ruleset_id The unique identifier of the ruleset to test. + # @option arguments [String] :ruleset_id The unique identifier of the query ruleset to be created or updated (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The match criteria to test against the ruleset (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/test-query-ruleset.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-test # def test(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'query_rules.test' } @@ -53,7 +50,7 @@ def test(arguments = {}) _ruleset_id = arguments.delete(:ruleset_id) method = Elasticsearch::API::HTTP_POST - path = "_query_rules/#{Utils.__listify(_ruleset_id)}/_test" + path = "_query_rules/#{Utils.listify(_ruleset_id)}/_test" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb index f9477705e7..dcdf02dff7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb @@ -15,23 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Allows to evaluate the quality of ranked search results over a set of typical search queries + # Evaluate ranked search results. + # Evaluate the quality of ranked search results over a set of typical search queries. # - # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch) + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and index aliases used to limit the request. + # Wildcard (+*+) expressions are supported. + # To target all data streams and indices in a cluster, omit this parameter or use +_all+ or +*+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true. + # @option arguments [String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. + # @option arguments [Boolean] :ignore_unavailable If +true+, missing or closed indices are not included in the response. + # @option arguments [String] :search_type Search operation type # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-rank-eval.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rank-eval # def rank_eval(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'rank_eval' } @@ -46,13 +49,13 @@ def rank_eval(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "#{Utils.__listify(_index)}/_rank_eval" + "#{Utils.listify(_index)}/_rank_eval" else '_rank_eval' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb index 1447568931..55161e4536 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb @@ -15,28 +15,167 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Allows to copy documents from one index to another, optionally filtering the source - # documents by a query, changing the destination index settings, or fetching the - # documents from a remote cluster. + # Reindex documents. + # Copy documents from a source to a destination. + # You can copy all documents to the destination index or reindex a subset of the documents. + # The source can be any existing index, alias, or data stream. + # The destination must differ from the source. + # For example, you cannot reindex a data stream into itself. + # IMPORTANT: Reindex requires +_source+ to be enabled for all documents in the source. + # The destination should be configured as wanted before calling the reindex API. + # Reindex does not copy the settings from the source or its associated template. + # Mappings, shard counts, and replicas, for example, must be configured ahead of time. + # If the Elasticsearch security features are enabled, you must have the following security privileges: + # * The +read+ index privilege for the source data stream, index, or alias. + # * The +write+ index privilege for the destination data stream, index, or index alias. + # * To automatically create a data stream or index with a reindex API request, you must have the +auto_configure+, +create_index+, or +manage+ index privilege for the destination data stream, index, or alias. + # * If reindexing from a remote cluster, the +source.remote.user+ must have the +monitor+ cluster privilege and the +read+ index privilege for the source data stream, index, or alias. + # If reindexing from a remote cluster, you must explicitly allow the remote host in the +reindex.remote.whitelist+ setting. + # Automatic data stream creation requires a matching index template with data stream enabled. + # The +dest+ element can be configured like the index API to control optimistic concurrency control. + # Omitting +version_type+ or setting it to +internal+ causes Elasticsearch to blindly dump documents into the destination, overwriting any that happen to have the same ID. + # Setting +version_type+ to +external+ causes Elasticsearch to preserve the +version+ from the source, create any documents that are missing, and update any documents that have an older version in the destination than they do in the source. + # Setting +op_type+ to +create+ causes the reindex API to create only missing documents in the destination. + # All existing documents will cause a version conflict. + # IMPORTANT: Because data streams are append-only, any reindex request to a destination data stream must have an +op_type+ of +create+. + # A reindex can only add new documents to a destination data stream. + # It cannot update existing documents in a destination data stream. + # By default, version conflicts abort the reindex process. + # To continue reindexing if there are conflicts, set the +conflicts+ request body property to +proceed+. + # In this case, the response includes a count of the version conflicts that were encountered. + # Note that the handling of other error types is unaffected by the +conflicts+ property. + # Additionally, if you opt to count version conflicts, the operation could attempt to reindex more documents from the source than +max_docs+ until it has successfully indexed +max_docs+ documents into the target or it has gone through every document in the source query. + # NOTE: The reindex API makes no effort to handle ID collisions. + # The last document written will "win" but the order isn't usually predictable so it is not a good idea to rely on this behavior. + # Instead, make sure that IDs are unique by using a script. + # **Running reindex asynchronously** + # If the request contains +wait_for_completion=false+, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to cancel or get the status of the task. + # Elasticsearch creates a record of this task as a document at +_tasks/+. + # **Reindex from multiple sources** + # If you have many sources to reindex it is generally better to reindex them one at a time rather than using a glob pattern to pick up multiple sources. + # That way you can resume the process if there are any errors by removing the partially completed source and starting over. + # It also makes parallelizing the process fairly simple: split the list of sources to reindex and run each list in parallel. + # For example, you can use a bash script like this: + # + + # for index in i1 i2 i3 i4 i5; do + # curl -HContent-Type:application/json -XPOST localhost:9200/_reindex?pretty -d'{ + # "source": { + # "index": "'$index'" + # }, + # "dest": { + # "index": "'$index'-reindexed" + # } + # }' + # done + # + + # **Throttling** + # Set +requests_per_second+ to any positive decimal number (+1.4+, +6+, +1000+, for example) to throttle the rate at which reindex issues batches of index operations. + # Requests are throttled by padding each batch with a wait time. + # To turn off throttling, set +requests_per_second+ to +-1+. + # The throttling is done by waiting between batches so that the scroll that reindex uses internally can be given a timeout that takes into account the padding. + # The padding time is the difference between the batch size divided by the +requests_per_second+ and the time spent writing. + # By default the batch size is +1000+, so if +requests_per_second+ is set to +500+: + # + + # target_time = 1000 / 500 per second = 2 seconds + # wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds + # + + # Since the batch is issued as a single bulk request, large batch sizes cause Elasticsearch to create many requests and then wait for a while before starting the next set. + # This is "bursty" instead of "smooth". + # **Slicing** + # Reindex supports sliced scroll to parallelize the reindexing process. + # This parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts. + # NOTE: Reindexing from remote clusters does not support manual or automatic slicing. + # You can slice a reindex request manually by providing a slice ID and total number of slices to each request. + # You can also let reindex automatically parallelize by using sliced scroll to slice on +_id+. + # The +slices+ parameter specifies the number of slices to use. + # Adding +slices+ to the reindex request just automates the manual process, creating sub-requests which means it has some quirks: + # * You can see these requests in the tasks API. These sub-requests are "child" tasks of the task for the request with slices. + # * Fetching the status of the task for the request with +slices+ only contains the status of completed slices. + # * These sub-requests are individually addressable for things like cancellation and rethrottling. + # * Rethrottling the request with +slices+ will rethrottle the unfinished sub-request proportionally. + # * Canceling the request with +slices+ will cancel each sub-request. + # * Due to the nature of +slices+, each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution. + # * Parameters like +requests_per_second+ and +max_docs+ on a request with +slices+ are distributed proportionally to each sub-request. Combine that with the previous point about distribution being uneven and you should conclude that using +max_docs+ with +slices+ might not result in exactly +max_docs+ documents being reindexed. + # * Each sub-request gets a slightly different snapshot of the source, though these are all taken at approximately the same time. + # If slicing automatically, setting +slices+ to +auto+ will choose a reasonable number for most indices. + # If slicing manually or otherwise tuning automatic slicing, use the following guidelines. + # Query performance is most efficient when the number of slices is equal to the number of shards in the index. + # If that number is large (for example, +500+), choose a lower number as too many slices will hurt performance. + # Setting slices higher than the number of shards generally does not improve efficiency and adds overhead. + # Indexing performance scales linearly across available resources with the number of slices. + # Whether query or indexing performance dominates the runtime depends on the documents being reindexed and cluster resources. + # **Modify documents during reindexing** + # Like +_update_by_query+, reindex operations support a script that modifies the document. + # Unlike +_update_by_query+, the script is allowed to modify the document's metadata. + # Just as in +_update_by_query+, you can set +ctx.op+ to change the operation that is run on the destination. + # For example, set +ctx.op+ to +noop+ if your script decides that the document doesn’t have to be indexed in the destination. This "no operation" will be reported in the +noop+ counter in the response body. + # Set +ctx.op+ to +delete+ if your script decides that the document must be deleted from the destination. + # The deletion will be reported in the +deleted+ counter in the response body. + # Setting +ctx.op+ to anything else will return an error, as will setting any other field in +ctx+. + # Think of the possibilities! Just be careful; you are able to change: + # * +_id+ + # * +_index+ + # * +_version+ + # * +_routing+ + # Setting +_version+ to +null+ or clearing it from the +ctx+ map is just like not sending the version in an indexing request. + # It will cause the document to be overwritten in the destination regardless of the version on the target or the version type you use in the reindex API. + # **Reindex from remote** + # Reindex supports reindexing from a remote Elasticsearch cluster. + # The +host+ parameter must contain a scheme, host, port, and optional path. + # The +username+ and +password+ parameters are optional and when they are present the reindex operation will connect to the remote Elasticsearch node using basic authentication. + # Be sure to use HTTPS when using basic authentication or the password will be sent in plain text. + # There are a range of settings available to configure the behavior of the HTTPS connection. + # When using Elastic Cloud, it is also possible to authenticate against the remote cluster through the use of a valid API key. + # Remote hosts must be explicitly allowed with the +reindex.remote.whitelist+ setting. + # It can be set to a comma delimited list of allowed remote host and port combinations. + # Scheme is ignored; only the host and port are used. + # For example: + # + + # reindex.remote.whitelist: [otherhost:9200, another:9200, 127.0.10.*:9200, localhost:*"] + # + + # The list of allowed hosts must be configured on any nodes that will coordinate the reindex. + # This feature should work with remote clusters of any version of Elasticsearch. + # This should enable you to upgrade from any version of Elasticsearch to the current version by reindexing from a cluster of the old version. + # WARNING: Elasticsearch does not support forward compatibility across major versions. + # For example, you cannot reindex from a 7.x cluster into a 6.x cluster. + # To enable queries sent to older versions of Elasticsearch, the +query+ parameter is sent directly to the remote host without validation or modification. + # NOTE: Reindexing from remote clusters does not support manual or automatic slicing. + # Reindexing from a remote server uses an on-heap buffer that defaults to a maximum size of 100mb. + # If the remote index includes very large documents you'll need to use a smaller batch size. + # It is also possible to set the socket read timeout on the remote connection with the +socket_timeout+ field and the connection timeout with the +connect_timeout+ field. + # Both default to 30 seconds. + # **Configuring SSL parameters** + # Reindex from remote supports configurable SSL settings. + # These must be specified in the +elasticsearch.yml+ file, with the exception of the secure settings, which you add in the Elasticsearch keystore. + # It is not possible to configure SSL in the body of the reindex request. # - # @option arguments [Boolean] :refresh Should the affected indexes be refreshed? - # @option arguments [Time] :timeout Time each individual bulk request should wait for shards that are unavailable. - # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - # @option arguments [Boolean] :wait_for_completion Should the request should block until the reindex is complete. - # @option arguments [Number] :requests_per_second The throttle to set on this request in sub-requests per second. -1 means no throttle. - # @option arguments [Time] :scroll Control how long to keep the search context alive - # @option arguments [Number|string] :slices The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`. - # @option arguments [Number] :max_docs Maximum number of documents to process (default: all documents) + # @option arguments [Boolean] :refresh If +true+, the request refreshes affected shards to make this operation visible to search. + # @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second. + # By default, there is no throttle. Server default: -1. + # @option arguments [Time] :scroll The period of time that a consistent view of the index should be maintained for scrolled search. + # @option arguments [Integer, String] :slices The number of slices this task should be divided into. + # It defaults to one slice, which means the task isn't sliced into subtasks.Reindex supports sliced scroll to parallelize the reindexing process. + # This parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts.NOTE: Reindexing from remote clusters does not support manual or automatic slicing.If set to +auto+, Elasticsearch chooses the number of slices to use. + # This setting will use one slice per shard, up to a certain limit. + # If there are multiple sources, it will choose the number of slices based on the index or backing index with the smallest number of shards. Server default: 1. + # @option arguments [Time] :timeout The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards. + # By default, Elasticsearch waits for at least one minute before failing. + # The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # Set it to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). + # The default value is one, which means it waits for each primary shard to be active. Server default: 1. + # @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the operation is complete. Server default: true. + # @option arguments [Boolean] :require_alias If +true+, the destination must be an index alias. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The search definition using the Query DSL and the prototype for the index request. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex # def reindex(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'reindex' } @@ -46,7 +185,7 @@ def reindex(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_reindex' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb index e528d3b6ed..130ab943a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb @@ -15,19 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Changes the number of requests per second for a particular Reindex operation. + # Throttle a reindex operation. + # Change the number of requests per second for a particular reindex operation. + # For example: + # + + # POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1 + # + + # Rethrottling that speeds up the query takes effect immediately. + # Rethrottling that slows down the query will take effect after completing the current batch. + # This behavior prevents scroll timeouts. # - # @option arguments [String] :task_id The task id to rethrottle - # @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (*Required*) + # @option arguments [String] :task_id The task identifier, which can be found by using the tasks API. (*Required*) + # @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second. + # It can be either +-1+ to turn off throttling or any decimal number like +1.7+ or +12+ to throttle to that level. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex # def reindex_rethrottle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'reindex_rethrottle' } @@ -47,7 +56,7 @@ def reindex_rethrottle(arguments = {}) _task_id = arguments.delete(:task_id) method = Elasticsearch::API::HTTP_POST - path = "_reindex/#{Utils.__listify(_task_id)}/_rethrottle" + path = "_reindex/#{Utils.listify(_task_id)}/_rethrottle" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb index 90de6aaea6..04700eae37 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb @@ -15,19 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Allows to use the Mustache language to pre-render a search definition. + # Render a search template. + # Render a search template as a search request body. # - # @option arguments [String] :id The id of the stored search template + # @option arguments [String] :id The ID of the search template to render. + # If no +source+ is specified, this or the +id+ request body parameter is required. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The search definition template and its params + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-render-search-template # def render_search_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'render_search_template' } @@ -50,11 +52,11 @@ def render_search_template(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _id - "_render/template/#{Utils.__listify(_id)}" - else - '_render/template' - end + path = if _id + "_render/template/#{Utils.listify(_id)}" + else + '_render/template' + end params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb index e9cc67da66..3deb397c3c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb @@ -15,20 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Allows an arbitrary script to be executed and a result to be returned + # Run a script. + # Runs a script and returns a result. + # Use this API to build and test scripts, such as when defining a script for a runtime field. + # This API requires very few dependencies and is especially useful if you don't have permissions to write documents on a cluster. + # The API uses several _contexts_, which control how scripts are run, what variables are available at runtime, and what the return type is. + # Each context requires a script, but additional parameters depend on the context you're using for that script. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The script to execute + # @option arguments [Hash] :body request body # # @see https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html # @@ -38,7 +43,7 @@ def scripts_painless_execute(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = if body Elasticsearch::API::HTTP_POST @@ -46,7 +51,7 @@ def scripts_painless_execute(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_scripts/painless/_execute' + path = '_scripts/painless/_execute' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb index 2885c09a83..97dbda7298 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb @@ -15,35 +15,39 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Allows to retrieve a large numbers of results from a single search request. + # Run a scrolling search. + # IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the +search_after+ parameter with a point in time (PIT). + # The scroll API gets large sets of results from a single scrolling search request. + # To get the necessary scroll ID, submit a search API request that includes an argument for the +scroll+ query parameter. + # The +scroll+ parameter indicates how long Elasticsearch should retain the search context for the request. + # The search response returns a scroll ID in the +_scroll_id+ response body parameter. + # You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request. + # If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search. + # You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context. + # IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests. # - # @option arguments [String] :scroll_id The scroll ID *Deprecated* - # @option arguments [Time] :scroll Specify how long a consistent view of the index should be maintained for scrolled search - # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response + # @option arguments [String] :scroll_id The scroll ID + # @option arguments [Time] :scroll The period to retain the search context for scrolling. Server default: 1d. + # @option arguments [Boolean] :rest_total_hits_as_int If true, the API response’s hit.total property is returned as an integer. If false, the API response’s hit.total property is returned as an object. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The scroll ID if not passed by URL or query parameter. + # @option arguments [Hash] :body request body # # *Deprecation notice*: # A scroll id can be quite large and should be specified as part of the body # Deprecated since version 7.0.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-scroll + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-scroll # def scroll(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'scroll' } - defined_params = [:scroll_id].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) || {} @@ -57,11 +61,7 @@ def scroll(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _scroll_id - "_search/scroll/#{Utils.__listify(_scroll_id)}" - else - '_search/scroll' - end + path = '_search/scroll' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb index b62d05935d..4a58dcea68 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb @@ -15,63 +15,142 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns results matching a query. + # Run a search. + # Get search hits that match the query defined in the request. + # You can provide search queries using the +q+ query string parameter or the request body. + # If both are specified, only the query parameter is used. + # If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. + # To search a point in time (PIT) for an alias, you must have the +read+ index privilege for the alias's data streams or indices. + # **Search slicing** + # When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the +slice+ and +pit+ properties. + # By default the splitting is done first on the shards, then locally on each shard. + # The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. + # For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. + # IMPORTANT: The same point-in-time ID should be used for all slices. + # If different PIT IDs are used, slices can overlap and miss documents. + # This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index. # - # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - # @option arguments [String] :analyzer The analyzer to use for the query string - # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false) - # @option arguments [Boolean] :ccs_minimize_roundtrips Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution - # @option arguments [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR) - # @option arguments [String] :df The field to use as default where no field prefix is given in the query string - # @option arguments [Boolean] :explain Specify whether to return detailed information about score computation as part of a hit - # @option arguments [List] :stored_fields A comma-separated list of stored fields to return as part of a hit - # @option arguments [List] :docvalue_fields A comma-separated list of fields to return as the docvalue representation of a field for each hit - # @option arguments [Number] :from Starting offset (default: 0) - # @option arguments [Boolean] :force_synthetic_source Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [String] :q Query in the Lucene query string syntax - # @option arguments [List] :routing A comma-separated list of specific routing values - # @option arguments [Time] :scroll Specify how long a consistent view of the index should be maintained for scrolled search - # @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch) - # @option arguments [Number] :size Number of hits to return (default: 10) - # @option arguments [List] :sort A comma-separated list of : pairs - # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return - # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field - # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field - # @option arguments [Number] :terminate_after The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. - # @option arguments [List] :stats Specific 'tag' of the request for logging and statistical purposes - # @option arguments [String] :suggest_field Specify which field to use for suggestions - # @option arguments [String] :suggest_mode Specify suggest mode (options: missing, popular, always) - # @option arguments [Number] :suggest_size How many suggestions to return in response - # @option arguments [String] :suggest_text The source text for which the suggestions should be returned - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Boolean] :track_scores Whether to calculate and return scores even if they are not used for sorting - # @option arguments [Boolean|long] :track_total_hits Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number. - # @option arguments [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout - # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response - # @option arguments [Boolean] :version Specify whether to return document version as part of a hit - # @option arguments [Boolean] :seq_no_primary_term Specify whether to return sequence number and primary term of the last modification of each hit - # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to index level setting - # @option arguments [Number] :batched_reduce_size The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. - # @option arguments [Number] :max_concurrent_shard_requests The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests - # @option arguments [Number] :pre_filter_shard_size A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. - # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response - # @option arguments [Boolean] :include_named_queries_score Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false) + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases to search. + # It supports wildcards (+*+). + # To search all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. + # For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true. + # @option arguments [Boolean] :allow_partial_search_results If +true+ and there are shard request timeouts or shard failures, the request returns partial results. + # If +false+, it returns an error with no partial results.To override the default behavior, you can set the +search.default_allow_partial_results+ cluster setting to +false+. Server default: true. + # @option arguments [String] :analyzer The analyzer to use for the query string. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [Integer] :batched_reduce_size The number of shard results that should be reduced at once on the coordinating node. + # If the potential number of shards in the request can be large, this value should be used as a protection mechanism to reduce the memory overhead per search request. Server default: 512. + # @option arguments [Boolean] :ccs_minimize_roundtrips If +true+, network round-trips between the coordinating node and the remote clusters are minimized when running cross-cluster search (CCS) requests. Server default: true. + # @option arguments [String] :default_operator The default operator for the query string query: +AND+ or +OR+. + # This parameter can be used only when the +q+ query string parameter is specified. Server default: OR. + # @option arguments [String] :df The field to use as a default when no field prefix is given in the query string. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [String, Array] :docvalue_fields A comma-separated list of fields to return as the docvalue representation of a field for each hit. + # @option arguments [String, Array] :expand_wildcards The type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # It supports comma-separated values such as +open,hidden+. Server default: open. + # @option arguments [Boolean] :explain If +true+, the request returns detailed information about score computation as part of a hit. + # @option arguments [Boolean] :ignore_throttled If +true+, concrete, expanded or aliased indices will be ignored when frozen. Server default: true. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Boolean] :include_named_queries_score If +true+, the response includes the score contribution from any named queries.This functionality reruns each named query on every hit in a search response. + # Typically, this adds a small overhead to a request. + # However, using computationally expensive named queries on a large number of hits may add significant overhead. + # @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [Integer] :max_concurrent_shard_requests The number of concurrent shard requests per node that the search runs concurrently. + # This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. Server default: 5. + # @option arguments [String] :preference The nodes and shards used for the search. + # By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. + # Valid values are: + # - +_only_local+ to run the search only on shards on the local node. + # - +_local+ to, if possible, run the search on shards on the local node, or if not, select shards using the default method. + # - +_only_nodes:,+ to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method. + # - +_prefer_nodes:,+ to if possible, run the search on the specified nodes IDs. If not, select shards using the default method. + # +_shards:,+ to run the search only on the specified shards. You can combine this value with other +preference+ values. However, the +_shards+ value must come first. For example: +_shards:2,3|_local+. + # ++ (any string that does not start with +_+) to route searches with the same ++ to the same shards in the same order. + # @option arguments [Integer] :pre_filter_shard_size A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. + # This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint). + # When unspecified, the pre-filter phase is executed if any of these conditions is met: + # - The request targets more than 128 shards. + # - The request targets one or more read-only index. + # - The primary sort of the query targets an indexed field. + # @option arguments [Boolean] :request_cache If +true+, the caching of search results is enabled for requests where +size+ is +0+. + # It defaults to index level settings. + # @option arguments [String] :routing A custom value that is used to route operations to a specific shard. + # @option arguments [Time] :scroll The period to retain the search context for scrolling. + # By default, this value cannot exceed +1d+ (24 hours). + # You can change this limit by using the +search.max_keep_alive+ cluster-level setting. + # @option arguments [String] :search_type Indicates how distributed term frequencies are calculated for relevance scoring. + # @option arguments [Array] :stats Specific +tag+ of the request for logging and statistical purposes. + # @option arguments [String, Array] :stored_fields A comma-separated list of stored fields to return as part of a hit. + # If no fields are specified, no stored fields are included in the response. + # If this field is specified, the +_source+ parameter defaults to +false+. + # You can pass +_source: true+ to return both source fields and stored fields in the search response. + # @option arguments [String] :suggest_field The field to use for suggestions. + # @option arguments [String] :suggest_mode The suggest mode. + # This parameter can be used only when the +suggest_field+ and +suggest_text+ query string parameters are specified. Server default: missing. + # @option arguments [Integer] :suggest_size The number of suggestions to return. + # This parameter can be used only when the +suggest_field+ and +suggest_text+ query string parameters are specified. + # @option arguments [String] :suggest_text The source text for which the suggestions should be returned. + # This parameter can be used only when the +suggest_field+ and +suggest_text+ query string parameters are specified. + # @option arguments [Integer] :terminate_after The maximum number of documents to collect for each shard. + # If a query reaches this limit, Elasticsearch terminates the query early. + # Elasticsearch collects documents before sorting.IMPORTANT: Use with caution. + # Elasticsearch applies this parameter to each shard handling the request. + # When possible, let Elasticsearch perform early termination automatically. + # Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + # If set to +0+ (default), the query does not terminate early. Server default: 0. + # @option arguments [Time] :timeout The period of time to wait for a response from each shard. + # If no response is received before the timeout expires, the request fails and returns an error. + # It defaults to no timeout. + # @option arguments [Boolean, Integer] :track_total_hits The number of hits matching the query to count accurately. + # If +true+, the exact number of hits is returned at the cost of some performance. + # If +false+, the response does not include the total number of hits matching the query. Server default: 10000. + # @option arguments [Boolean] :track_scores If +true+, the request calculates and returns document scores, even if the scores are not used for sorting. + # @option arguments [Boolean] :typed_keys If +true+, aggregation and suggester names are be prefixed by their respective types in the response. + # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether +hits.total+ should be rendered as an integer or an object in the rest search response. + # @option arguments [Boolean] :version If +true+, the request returns the document version as part of a hit. + # @option arguments [Boolean, String, Array] :_source The source fields that are returned for matching documents. + # These fields are returned in the +hits._source+ property of the search response. + # Valid values are: + # - +true+ to return the entire document source. + # - +false+ to not return the document source. + # - ++ to return the source fields that are specified as a comma-separated list that supports wildcard (+*+) patterns. Server default: true. + # @option arguments [String, Array] :_source_excludes A comma-separated list of source fields to exclude from the response. + # You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter. + # If the +_source+ parameter is +false+, this parameter is ignored. + # @option arguments [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # If this parameter is specified, only these source fields are returned. + # You can exclude fields from this subset using the +_source_excludes+ query parameter. + # If the +_source+ parameter is +false+, this parameter is ignored. + # @option arguments [Boolean] :seq_no_primary_term If +true+, the request returns the sequence number and primary term of the last modification of each hit. + # @option arguments [String] :q A query in the Lucene query string syntax. + # Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.IMPORTANT: This parameter overrides the query parameter in the request body. + # If both parameters are specified, documents matching the query request body parameter are not returned. + # @option arguments [Integer] :size The number of hits to return. + # By default, you cannot page through more than 10,000 hits using the +from+ and +size+ parameters. + # To page through more hits, use the +search_after+ parameter. Server default: 10. + # @option arguments [Integer] :from The starting document offset, which must be non-negative. + # By default, you cannot page through more than 10,000 hits using the +from+ and +size+ parameters. + # To page through more hits, use the +search_after+ parameter. Server default: 0. + # @option arguments [String] :sort A comma-separated list of +:+ pairs. + # @option arguments [Boolean] :force_synthetic_source Should this request force synthetic _source? + # Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. + # Fetches with this enabled will be slower the enabling synthetic source natively in the index. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The search definition using the Query DSL + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search # def search(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search' } @@ -94,11 +173,11 @@ def search(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.__listify(_index)}/_search" - else - '_search' - end + path = if _index + "#{Utils.listify(_index)}/_search" + else + '_search' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb index 165e1093dd..177b54a314 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb @@ -15,23 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchApplication module Actions - # Deletes a search application. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Delete a search application. + # Remove a search application and its associated alias. Indices attached to the search application are not removed. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :name The name of the search application + # @option arguments [String] :name The name of the search application to delete. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-search-application.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete # def delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.delete' } @@ -51,7 +52,7 @@ def delete(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = "_application/search_application/#{Utils.__listify(_name)}" + path = "_application/search_application/#{Utils.listify(_name)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb index 38ab030e26..d5a2fc575f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb @@ -15,23 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchApplication module Actions # Delete a behavioral analytics collection. + # The associated data stream is also deleted. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :name The name of the analytics collection to be deleted + # @option arguments [String] :name The name of the analytics collection to be deleted (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-analytics-collection.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete-behavioral-analytics # def delete_behavioral_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.delete_behavioral_analytics' } @@ -51,7 +52,7 @@ def delete_behavioral_analytics(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = "_application/analytics/#{Utils.__listify(_name)}" + path = "_application/analytics/#{Utils.listify(_name)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb index a860983d7f..4449134c22 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb @@ -15,23 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchApplication module Actions - # Returns the details about a search application. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Get search application details. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :name The name of the search application + # @option arguments [String] :name The name of the search application (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-search-application.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get # def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.get' } @@ -51,7 +51,7 @@ def get(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET - path = "_application/search_application/#{Utils.__listify(_name)}" + path = "_application/search_application/#{Utils.listify(_name)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb index 03162964b8..fdcdfc4c79 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb @@ -15,23 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchApplication module Actions - # Returns the existing behavioral analytics collections. + # Get behavioral analytics collections. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [List] :name A comma-separated list of analytics collections to limit the returned information + # @option arguments [Array] :name A list of analytics collections to limit the returned information # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-analytics-collection.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get-behavioral-analytics # def get_behavioral_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.get_behavioral_analytics' } @@ -50,7 +50,7 @@ def get_behavioral_analytics(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_application/analytics/#{Utils.__listify(_name)}" + "_application/analytics/#{Utils.listify(_name)}" else '_application/analytics' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb index e16653f8d0..2bf7ecfe75 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb @@ -15,25 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchApplication module Actions - # Returns the existing search applications. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Get search applications. + # Get information about search applications. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :q Query in the Lucene query string syntax - # @option arguments [Integer] :from Starting offset (default: 0) - # @option arguments [Integer] :size specifies a max number of results to get + # @option arguments [String] :q Query in the Lucene query string syntax. + # @option arguments [Integer] :from Starting offset. Server default: 0. + # @option arguments [Integer] :size Specifies a max number of results to get. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-search-applications.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get-behavioral-analytics # def list(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.list' } @@ -41,7 +42,7 @@ def list(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_application/search_application' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb index 73ddcf543e..1753a24ee7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb @@ -15,31 +15,31 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchApplication module Actions - # Creates a behavioral analytics event for existing collection. + # Create a behavioral analytics collection event. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :collection_name The name of behavioral analytics collection - # @option arguments [String] :event_type Behavioral analytics event type. Available: page_view, search, search_click - # @option arguments [Boolean] :debug If true, returns event information that will be stored + # @option arguments [String] :collection_name The name of the behavioral analytics collection. (*Required*) + # @option arguments [String] :event_type The analytics event type. (*Required*) + # @option arguments [Boolean] :debug Whether the response type has to include more details # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The event definition (*Required*) + # @option arguments [Hash] :body payload # - # @see http://todo.com/tbd + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-post-behavioral-analytics-event # def post_behavioral_analytics_event(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.post_behavioral_analytics_event' } - defined_params = %i[collection_name event_type].each_with_object({}) do |variable, set_variables| + defined_params = [:collection_name, :event_type].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? @@ -58,7 +58,7 @@ def post_behavioral_analytics_event(arguments = {}) _event_type = arguments.delete(:event_type) method = Elasticsearch::API::HTTP_POST - path = "_application/analytics/#{Utils.__listify(_collection_name)}/event/#{Utils.__listify(_event_type)}" + path = "_application/analytics/#{Utils.listify(_collection_name)}/event/#{Utils.listify(_event_type)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb index 4b71715586..7b7cdf5542 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb @@ -15,25 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchApplication module Actions - # Creates or updates a search application. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Create or update a search application. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :name The name of the search application to be created or updated - # @option arguments [Boolean] :create If true, requires that a search application with the specified resource_id does not already exist. (default: false) + # @option arguments [String] :name The name of the search application to be created or updated. (*Required*) + # @option arguments [Boolean] :create If +true+, this request cannot replace or update existing Search Applications. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The search application configuration, including `indices` (*Required*) + # @option arguments [Hash] :body search_application # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-search-application.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put # def put(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.put' } @@ -54,7 +54,7 @@ def put(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = "_application/search_application/#{Utils.__listify(_name)}" + path = "_application/search_application/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb index b04054239f..9eddc3786d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb @@ -15,23 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchApplication module Actions - # Creates a behavioral analytics collection. + # Create a behavioral analytics collection. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :name The name of the analytics collection to be created or updated + # @option arguments [String] :name The name of the analytics collection to be created or updated. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-analytics-collection.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put-behavioral-analytics # def put_behavioral_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.put_behavioral_analytics' } @@ -51,7 +51,7 @@ def put_behavioral_analytics(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = "_application/analytics/#{Utils.__listify(_name)}" + path = "_application/analytics/#{Utils.listify(_name)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb index b6d21c350a..d41ca4da21 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb @@ -15,24 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchApplication module Actions - # Renders a query for given search application search parameters + # Render a search application query. + # Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified. + # If a parameter used in the search template is not specified in +params+, the parameter's default value will be used. + # The API returns the specific Elasticsearch query that would be generated and run by calling the search application search API. + # You must have +read+ privileges on the backing alias of the search application. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :name The name of the search application to render the query for + # @option arguments [String] :name The name of the search application to render teh query for. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Search parameters, which will override any default search parameters defined in the search application template + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-render-query.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-render-query # def render_query(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.render_query' } @@ -52,7 +56,7 @@ def render_query(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST - path = "_application/search_application/#{Utils.__listify(_name)}/_render_query" + path = "_application/search_application/#{Utils.listify(_name)}/_render_query" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb index f3a7797355..f90fb133a9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb @@ -15,25 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchApplication module Actions - # Perform a search against a search application - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Run a search application search. + # Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template. + # Unspecified template parameters are assigned their default values if applicable. + # This functionality is in Beta and is subject to change. The design and + # code is less mature than official GA features and is being provided + # as-is with no warranties. Beta features are not subject to the support + # SLA of official GA features. # - # @option arguments [String] :name The name of the search application to be searched - # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response + # @option arguments [String] :name The name of the search application to be searched. (*Required*) + # @option arguments [Boolean] :typed_keys Determines whether aggregation names are prefixed by their respective types in the response. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Search parameters, including template parameters that override defaults + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-search.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-search # def search(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.search' } @@ -58,7 +60,7 @@ def search(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_application/search_application/#{Utils.__listify(_name)}/_search" + path = "_application/search_application/#{Utils.listify(_name)}/_search" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb index 80bde3ce4f..b7f12e176f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb @@ -15,39 +15,170 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Search a vector tile. + # Search a vector tile for geospatial values. + # Before using this API, you should be familiar with the Mapbox vector tile specification. + # The API returns results as a binary mapbox vector tile. + # Internally, Elasticsearch translates a vector tile search API request into a search containing: + # * A +geo_bounding_box+ query on the ++. The query uses the +//+ tile as a bounding box. + # * A +geotile_grid+ or +geohex_grid+ aggregation on the ++. The +grid_agg+ parameter determines the aggregation type. The aggregation uses the +//+ tile as a bounding box. + # * Optionally, a +geo_bounds+ aggregation on the ++. The search only includes this aggregation if the +exact_bounds+ parameter is +true+. + # * If the optional parameter +with_labels+ is +true+, the internal search will include a dynamic runtime field that calls the +getLabelPosition+ function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. + # For example, Elasticsearch may translate a vector tile search API request with a +grid_agg+ argument of +geotile+ and an +exact_bounds+ argument of +true+ into the following search + # + + # GET my-index/_search + # { + # "size": 10000, + # "query": { + # "geo_bounding_box": { + # "my-geo-field": { + # "top_left": { + # "lat": -40.979898069620134, + # "lon": -45 + # }, + # "bottom_right": { + # "lat": -66.51326044311186, + # "lon": 0 + # } + # } + # } + # }, + # "aggregations": { + # "grid": { + # "geotile_grid": { + # "field": "my-geo-field", + # "precision": 11, + # "size": 65536, + # "bounds": { + # "top_left": { + # "lat": -40.979898069620134, + # "lon": -45 + # }, + # "bottom_right": { + # "lat": -66.51326044311186, + # "lon": 0 + # } + # } + # } + # }, + # "bounds": { + # "geo_bounds": { + # "field": "my-geo-field", + # "wrap_longitude": false + # } + # } + # } + # } + # + + # The API returns results as a binary Mapbox vector tile. + # Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: + # * A +hits+ layer containing a feature for each ++ value matching the +geo_bounding_box+ query. + # * An +aggs+ layer containing a feature for each cell of the +geotile_grid+ or +geohex_grid+. The layer only contains features for cells with matching data. + # * A meta layer containing: + # * A feature containing a bounding box. By default, this is the bounding box of the tile. + # * Value ranges for any sub-aggregations on the +geotile_grid+ or +geohex_grid+. + # * Metadata for the search. + # The API only returns features that can display at its zoom level. + # For example, if a polygon feature has no area at its zoom level, the API omits it. + # The API returns errors as UTF-8 encoded JSON. + # IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter. + # If you specify both parameters, the query parameter takes precedence. + # **Grid precision for geotile** + # For a +grid_agg+ of +geotile+, you can use cells in the +aggs+ layer as tiles for lower zoom levels. + # +grid_precision+ represents the additional zoom levels available through these cells. The final precision is computed by as follows: + + grid_precision+. + # For example, if ++ is 7 and +grid_precision+ is 8, then the +geotile_grid+ aggregation will use a precision of 15. + # The maximum final precision is 29. + # The +grid_precision+ also determines the number of cells for the grid as follows: +(2^grid_precision) x (2^grid_precision)+. + # For example, a value of 8 divides the tile into a grid of 256 x 256 cells. + # The +aggs+ layer only contains features for cells with matching data. + # **Grid precision for geohex** + # For a +grid_agg+ of +geohex+, Elasticsearch uses ++ and +grid_precision+ to calculate a final precision as follows: + + grid_precision+. + # This precision determines the H3 resolution of the hexagonal cells produced by the +geohex+ aggregation. + # The following table maps the H3 resolution for each precision. + # For example, if ++ is 3 and +grid_precision+ is 3, the precision is 6. + # At a precision of 6, hexagonal cells have an H3 resolution of 2. + # If ++ is 3 and +grid_precision+ is 4, the precision is 7. + # At a precision of 7, hexagonal cells have an H3 resolution of 3. + # | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | + # | --------- | ---------------- | ------------- | ----------------| ----- | + # | 1 | 4 | 0 | 122 | 30.5 | + # | 2 | 16 | 0 | 122 | 7.625 | + # | 3 | 64 | 1 | 842 | 13.15625 | + # | 4 | 256 | 1 | 842 | 3.2890625 | + # | 5 | 1024 | 2 | 5882 | 5.744140625 | + # | 6 | 4096 | 2 | 5882 | 1.436035156 | + # | 7 | 16384 | 3 | 41162 | 2.512329102 | + # | 8 | 65536 | 3 | 41162 | 0.6280822754 | + # | 9 | 262144 | 4 | 288122 | 1.099098206 | + # | 10 | 1048576 | 4 | 288122 | 0.2747745514 | + # | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | + # | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | + # | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | + # | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | + # | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | + # | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | + # | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | + # | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | + # | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | + # | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | + # | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | + # | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | + # | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | + # | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | + # | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | + # | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | + # | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | + # | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | + # | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | + # Hexagonal cells don't align perfectly on a vector tile. + # Some cells may intersect more than one vector tile. + # To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. + # Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. # - # @option arguments [List] :index Comma-separated list of data streams, indices, or aliases to search - # @option arguments [String] :field Field containing geospatial data to return - # @option arguments [Integer] :zoom Zoom level for the vector tile to search - # @option arguments [Integer] :x X coordinate for the vector tile to search - # @option arguments [Integer] :y Y coordinate for the vector tile to search - # @option arguments [Boolean] :exact_bounds If false, the meta layer's feature is the bounding box of the tile. If true, the meta layer's feature is a bounding box resulting from a `geo_bounds` aggregation. - # @option arguments [Integer] :extent Size, in pixels, of a side of the vector tile. - # @option arguments [Integer] :grid_precision Additional zoom levels available through the aggs layer. Accepts 0-8. - # @option arguments [String] :grid_type Determines the geometry type for features in the aggs layer. (options: grid, point, centroid) + # @option arguments [String, Array] :index Comma-separated list of data streams, indices, or aliases to search (*Required*) + # @option arguments [String] :field Field containing geospatial data to return (*Required*) + # @option arguments [Integer] :zoom Zoom level for the vector tile to search (*Required*) + # @option arguments [Integer] :x X coordinate for the vector tile to search (*Required*) + # @option arguments [Integer] :y Y coordinate for the vector tile to search (*Required*) + # @option arguments [Boolean] :exact_bounds If +false+, the meta layer's feature is the bounding box of the tile. + # If true, the meta layer's feature is a bounding box resulting from a + # geo_bounds aggregation. The aggregation runs on values that intersect + # the // tile with wrap_longitude set to false. The resulting + # bounding box may be larger than the vector tile. + # @option arguments [Integer] :extent The size, in pixels, of a side of the tile. Vector tiles are square with equal sides. Server default: 4096. + # @option arguments [String] :grid_agg Aggregation used to create a grid for +field+. + # @option arguments [Integer] :grid_precision Additional zoom levels available through the aggs layer. For example, if is 7 + # and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results + # don't include the aggs layer. Server default: 8. + # @option arguments [String] :grid_type Determines the geometry type for features in the aggs layer. In the aggs layer, + # each feature represents a geotile_grid cell. If 'grid' each feature is a Polygon + # of the cells bounding box. If 'point' each feature is a Point that is the centroid + # of the cell. Server default: grid. # @option arguments [Integer] :size Maximum number of features to return in the hits layer. Accepts 0-10000. - # @option arguments [Boolean|long] :track_total_hits Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number. - # @option arguments [Boolean] :with_labels If true, the hits and aggs layers will contain additional point features with suggested label positions for the original features. + # If 0, results don't include the hits layer. Server default: 10000. + # @option arguments [Boolean] :with_labels If +true+, the hits and aggs layers will contain additional point features representing + # suggested label positions for the original features. + # - +Point+ and +MultiPoint+ features will have one of the points selected. + # - +Polygon+ and +MultiPolygon+ features will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree. + # - +LineString+ features will likewise provide a roughly central point selected from the triangle-tree. + # - The aggregation results will provide one central point for each aggregation bucket. + # All attributes from the original features will also be copied to the new label features. + # In addition, the new features will be distinguishable using the tag +_mvt_label_position+. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Search request body. + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-vector-tile-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-mvt # def search_mvt(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_mvt' } - defined_params = %i[index field zoom x y].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :field, :zoom, :x, :y].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? @@ -61,7 +192,7 @@ def search_mvt(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) @@ -74,7 +205,7 @@ def search_mvt(arguments = {}) _y = arguments.delete(:y) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_mvt/#{Utils.__listify(_field)}/#{Utils.__listify(_zoom)}/#{Utils.__listify(_x)}/#{Utils.__listify(_y)}" + path = "#{Utils.listify(_index)}/_mvt/#{Utils.listify(_field)}/#{Utils.listify(_zoom)}/#{Utils.listify(_x)}/#{Utils.listify(_y)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb index 70189da643..1130b42d16 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb @@ -15,25 +15,39 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns information about the indices and shards that a search request would be executed against. + # Get the search shards. + # Get the indices and shards that a search request would be run against. + # This information can be useful for working out issues or planning optimizations with routing and shard preferences. + # When filtered aliases are used, the filter is returned as part of the +indices+ section. + # If the Elasticsearch security features are enabled, you must have the +view_index_metadata+ or +manage+ index privilege for the target data stream, index, or alias. # - # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [String] :routing Specific routing value - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases to search. + # It supports wildcards (+*+). + # To search all data streams and indices, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. + # For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. + # @option arguments [String, Array] :expand_wildcards Type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Boolean] :local If +true+, the request retrieves information from the local node only. + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # IT can also be set to +-1+ to indicate that the request should never timeout. Server default: 30s. + # @option arguments [String] :preference The node or shard the operation should be performed on. + # It is random by default. + # @option arguments [String] :routing A custom value used to route operations to a specific shard. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-shards # def search_shards(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_shards' } @@ -46,13 +60,13 @@ def search_shards(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index - "#{Utils.__listify(_index)}/_search_shards" + "#{Utils.listify(_index)}/_search_shards" else '_search_shards' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb index 5b67dfb582..93da013150 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb @@ -15,32 +15,41 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Allows to use the Mustache language to pre-render a search definition. + # Run a search with a search template. # - # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [List] :routing A comma-separated list of specific routing values - # @option arguments [Time] :scroll Specify how long a consistent view of the index should be maintained for scrolled search - # @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch) - # @option arguments [Boolean] :explain Specify whether to return detailed information about score computation as part of a hit - # @option arguments [Boolean] :profile Specify whether to profile the query execution - # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response - # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response - # @option arguments [Boolean] :ccs_minimize_roundtrips Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases to search. + # It supports wildcards (+*+). + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. + # For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true. + # @option arguments [Boolean] :ccs_minimize_roundtrips If +true+, network round-trips are minimized for cross-cluster search requests. + # @option arguments [String, Array] :expand_wildcards The type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # Supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. + # @option arguments [Boolean] :explain If +true+, the response includes additional details about score computation as part of a hit. + # @option arguments [Boolean] :ignore_throttled If +true+, specified concrete, expanded, or aliased indices are not included in the response when throttled. Server default: true. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [String] :preference The node or shard the operation should be performed on. + # It is random by default. + # @option arguments [Boolean] :profile If +true+, the query execution is profiled. + # @option arguments [String] :routing A custom value used to route operations to a specific shard. + # @option arguments [Time] :scroll Specifies how long a consistent view of the index + # should be maintained for scrolled search. + # @option arguments [String] :search_type The type of the search operation. + # @option arguments [Boolean] :rest_total_hits_as_int If +true+, +hits.total+ is rendered as an integer in the response. + # If +false+, it is rendered as an object. + # @option arguments [Boolean] :typed_keys If +true+, the response prefixes aggregation and suggester names with their respective types. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The search definition template and its params (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-template # def search_template(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_template' } @@ -55,13 +64,13 @@ def search_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "#{Utils.__listify(_index)}/_search/template" + "#{Utils.listify(_index)}/_search/template" else '_search/template' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb index 89b16a6c14..1237da39c3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb @@ -15,23 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchableSnapshots module Actions - # Retrieve node-level cache statistics about searchable snapshots. + # Get cache statistics. + # Get statistics about the shared cache for partially mounted indices. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + # @option arguments [String, Array] :node_id The names of the nodes in the cluster to target. + # @option arguments [Time] :master_timeout [TODO] # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-cache-stats # def cache_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'searchable_snapshots.cache_stats' } @@ -50,11 +52,11 @@ def cache_stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _node_id - "_searchable_snapshots/#{Utils.__listify(_node_id)}/cache/stats" + "_searchable_snapshots/#{Utils.listify(_node_id)}/cache/stats" else '_searchable_snapshots/cache/stats' end - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb index a7d0b6a246..41eb19211b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb @@ -15,26 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchableSnapshots module Actions - # Clear the cache of searchable snapshots. + # Clear the cache. + # Clear indices and data streams from the shared cache for partially mounted indices. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [List] :index A comma-separated list of index names + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases to clear from the cache. + # It supports wildcards (+*+). + # @option arguments [String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. + # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes +_all+ string or when no indices have been specified) # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-clear-cache # def clear_cache(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'searchable_snapshots.clear_cache' } @@ -47,13 +49,13 @@ def clear_cache(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "#{Utils.__listify(_index)}/_searchable_snapshots/cache/clear" + "#{Utils.listify(_index)}/_searchable_snapshots/cache/clear" else '_searchable_snapshots/cache/clear' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb index e8238c98b7..06efd2b868 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb @@ -15,29 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchableSnapshots module Actions - # Mount a snapshot as a searchable index. + # Mount a snapshot. + # Mount a snapshot as a searchable snapshot index. + # Do not use this API for snapshots managed by index lifecycle management (ILM). + # Manually mounting ILM-managed snapshots can interfere with ILM processes. # - # @option arguments [String] :repository The name of the repository containing the snapshot of the index to mount - # @option arguments [String] :snapshot The name of the snapshot of the index to mount - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning - # @option arguments [String] :storage Selects the kind of local storage used to accelerate searches. Experimental, and defaults to `full_copy` + # @option arguments [String] :repository The name of the repository containing the snapshot of the index to mount. (*Required*) + # @option arguments [String] :snapshot The name of the snapshot of the index to mount. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. + # @option arguments [Boolean] :wait_for_completion If true, the request blocks until the operation is complete. + # @option arguments [String] :storage The mount option for the searchable snapshot index. Server default: full_copy. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The restore configuration for mounting the snapshot as searchable (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-mount-snapshot.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-mount # def mount(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'searchable_snapshots.mount' } - defined_params = %i[repository snapshot].each_with_object({}) do |variable, set_variables| + defined_params = [:repository, :snapshot].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? @@ -56,7 +61,7 @@ def mount(arguments = {}) _snapshot = arguments.delete(:snapshot) method = Elasticsearch::API::HTTP_POST - path = "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}/_mount" + path = "_snapshot/#{Utils.listify(_repository)}/#{Utils.listify(_snapshot)}/_mount" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb index eafb705ad0..8c9610a0be 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb @@ -15,20 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SearchableSnapshots module Actions - # Retrieve shard-level statistics about searchable snapshots. + # Get searchable snapshot statistics. # - # @option arguments [List] :index A comma-separated list of index names - # @option arguments [String] :level Return stats aggregated at cluster, index or shard level (options: cluster, indices, shards) + # @option arguments [String, Array] :index A comma-separated list of data streams and indices to retrieve statistics for. + # @option arguments [String] :level Return stats aggregated at cluster, index or shard level # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-stats # def stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'searchable_snapshots.stats' } @@ -41,13 +41,13 @@ def stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index - "#{Utils.__listify(_index)}/_searchable_snapshots/stats" + "#{Utils.listify(_index)}/_searchable_snapshots/stats" else '_searchable_snapshots/stats' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb index 113f36a786..73fb59b0c1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb @@ -49,7 +49,7 @@ def activate_user_profile(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/profile/_activate" + path = '_security/profile/_activate' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb index 03f02c57ea..a13dd73857 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb @@ -15,18 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Enables authentication as a user and retrieve information about the authenticated user. + # Authenticate a user. + # Authenticates a user and returns information about the authenticated user. + # Include the user information in a {https://en.wikipedia.org/wiki/Basic_access_authentication basic auth header}. + # A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. + # If the user cannot be authenticated, this API returns a 401 status code. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-authenticate # def authenticate(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.authenticate' } @@ -34,7 +38,7 @@ def authenticate(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_security/_authenticate' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb index ae3d6bbfd1..de67518c75 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb @@ -15,20 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Bulk delete roles in the native realm. + # Bulk delete roles. + # The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + # The bulk delete roles API cannot delete roles that are defined in roles files. # - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The roles to delete (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-delete-role.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-bulk-delete-role # def bulk_delete_role(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.bulk_delete_role' } @@ -38,7 +40,7 @@ def bulk_delete_role(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_DELETE path = '_security/role' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb index 5ec4578391..4c9360f172 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb @@ -15,20 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Bulk adds and updates roles in the native realm. + # Bulk create or update roles. + # The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + # The bulk create or update roles API cannot update roles that are defined in roles files. # - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The roles to add (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-put-role.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-bulk-put-role # def bulk_put_role(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.bulk_put_role' } @@ -38,7 +40,7 @@ def bulk_put_role(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/role' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb index bf311c01f4..4e18787d0c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb @@ -15,19 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Updates the attributes of multiple existing API keys. + # Bulk update API keys. + # Update the attributes for multiple API keys. + # IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required. + # This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates. + # It is not possible to update expired or invalidated API keys. + # This API supports updates to API key access scope, metadata and expiration. + # The access scope of each API key is derived from the +role_descriptors+ you specify in the request and a snapshot of the owner user's permissions at the time of the request. + # The snapshot of the owner's permissions is updated automatically on every call. + # IMPORTANT: If you don't specify +role_descriptors+ in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified. + # A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The API key request to update the attributes of multiple API keys. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-update-api-keys.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-bulk-update-api-keys # def bulk_update_api_keys(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.bulk_update_api_keys' } @@ -37,7 +46,7 @@ def bulk_update_api_keys(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/api_key/_bulk_update' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb index 186861cdb7..85b4e9fea7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb @@ -15,21 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Changes the passwords of users in the native realm and built-in users. + # Change passwords. + # Change the passwords of users in the native realm and built-in users. # - # @option arguments [String] :username The username of the user to change the password for - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :username The user whose password you want to change. If you do not specify this + # parameter, the password is changed for the current user. + # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body the new password for the user (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-change-password # def change_password(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.change_password' } @@ -50,7 +52,7 @@ def change_password(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = if _username - "_security/user/#{Utils.__listify(_username)}/_password" + "_security/user/#{Utils.listify(_username)}/_password" else '_security/user/_password' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb index 8eb36221f1..dbd8451464 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb @@ -15,19 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Clear a subset or all entries from the API key cache. + # Clear the API key cache. + # Evict a subset of all entries from the API key cache. + # The cache is also automatically cleared on state changes of the security index. # - # @option arguments [List] :ids A comma-separated list of IDs of API keys to clear from the cache + # @option arguments [String, Array] :ids Comma-separated list of API key IDs to evict from the API key cache. + # To evict all API keys, use +*+. + # Does not support other wildcard patterns. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-api-key-cache.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-api-key-cache # def clear_api_key_cache(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.clear_api_key_cache' } @@ -42,12 +46,12 @@ def clear_api_key_cache(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil _ids = arguments.delete(:ids) method = Elasticsearch::API::HTTP_POST - path = "_security/api_key/#{Utils.__listify(_ids)}/_clear_cache" + path = "_security/api_key/#{Utils.listify(_ids)}/_clear_cache" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb index 2b6ff2d79e..a26071661d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb @@ -15,19 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Evicts application privileges from the native application privileges cache. + # Clear the privileges cache. + # Evict privileges from the native application privilege cache. + # The cache is also automatically cleared for applications that have their privileges updated. # - # @option arguments [List] :application A comma-separated list of application names + # @option arguments [String] :application A comma-separated list of applications. + # To clear all applications, use an asterism (+*+). + # It does not support other wildcard patterns. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-privilege-cache.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-privileges # def clear_cached_privileges(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.clear_cached_privileges' } @@ -47,7 +51,7 @@ def clear_cached_privileges(arguments = {}) _application = arguments.delete(:application) method = Elasticsearch::API::HTTP_POST - path = "_security/privilege/#{Utils.__listify(_application)}/_clear_cache" + path = "_security/privilege/#{Utils.listify(_application)}/_clear_cache" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb index 9f427c62e3..db6f761a87 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb @@ -15,20 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Evicts users from the user cache. Can completely clear the cache or evict specific users. + # Clear the user cache. + # Evict users from the user cache. + # You can completely clear the cache or evict specific users. + # User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request. + # There are realm settings that you can use to configure the user cache. + # For more information, refer to the documentation about controlling the user cache. # - # @option arguments [List] :realms Comma-separated list of realms to clear - # @option arguments [List] :usernames Comma-separated list of usernames to clear from the cache + # @option arguments [String, Array] :realms A comma-separated list of realms. + # To clear all realms, use an asterisk (+*+). + # It does not support other wildcard patterns. (*Required*) + # @option arguments [Array] :usernames A comma-separated list of the users to clear from the cache. + # If you do not specify this parameter, the API evicts all users from the user cache. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-realms # def clear_cached_realms(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.clear_cached_realms' } @@ -48,7 +56,7 @@ def clear_cached_realms(arguments = {}) _realms = arguments.delete(:realms) method = Elasticsearch::API::HTTP_POST - path = "_security/realm/#{Utils.__listify(_realms)}/_clear_cache" + path = "_security/realm/#{Utils.listify(_realms)}/_clear_cache" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb index 8e253de2d5..e5a45f1a67 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Evicts roles from the native role cache. + # Clear the roles cache. + # Evict roles from the native role cache. # - # @option arguments [List] :name Role name + # @option arguments [String, Array] :name A comma-separated list of roles to evict from the role cache. + # To evict all roles, use an asterisk (+*+). + # It does not support other wildcard patterns. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-roles # def clear_cached_roles(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.clear_cached_roles' } @@ -47,7 +50,7 @@ def clear_cached_roles(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST - path = "_security/role/#{Utils.__listify(_name)}/_clear_cache" + path = "_security/role/#{Utils.listify(_name)}/_clear_cache" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb index e2d0d96d0b..4e145bc442 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb @@ -15,26 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Evicts tokens from the service account token caches. + # Clear service account token caches. + # Evict a subset of all entries from the service account token caches. + # Two separate caches exist for service account tokens: one cache for tokens backed by the +service_tokens+ file, and another for tokens backed by the +.security+ index. + # This API clears matching entries from both caches. + # The cache for service account tokens backed by the +.security+ index is cleared automatically on state changes of the security index. + # The cache for tokens backed by the +service_tokens+ file is cleared automatically on file changes. # - # @option arguments [String] :namespace An identifier for the namespace - # @option arguments [String] :service An identifier for the service name - # @option arguments [List] :name A comma-separated list of service token names + # @option arguments [String] :namespace The namespace, which is a top-level grouping of service accounts. (*Required*) + # @option arguments [String] :service The name of the service, which must be unique within its namespace. (*Required*) + # @option arguments [String, Array] :name A comma-separated list of token names to evict from the service account token caches. + # Use a wildcard (+*+) to evict all tokens that belong to a service account. + # It does not support other wildcard patterns. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-service-tokens # def clear_cached_service_tokens(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.clear_cached_service_tokens' } - defined_params = %i[namespace service name].each_with_object({}) do |variable, set_variables| + defined_params = [:namespace, :service, :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? @@ -55,7 +62,7 @@ def clear_cached_service_tokens(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST - path = "_security/service/#{Utils.__listify(_namespace)}/#{Utils.__listify(_service)}/credential/token/#{Utils.__listify(_name)}/_clear_cache" + path = "_security/service/#{Utils.listify(_namespace)}/#{Utils.listify(_service)}/credential/token/#{Utils.listify(_name)}/_clear_cache" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb index eb05c11c87..bee4c4e272 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb @@ -15,20 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Creates an API key for access without requiring basic authentication. + # Create an API key. + # Create an API key for access without requiring basic authentication. + # IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. + # If you specify privileges, the API returns an error. + # A successful request returns a JSON structure that contains the API key, its unique id, and its name. + # If applicable, it also returns expiration information for the API key in milliseconds. + # NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. + # The API keys are created by the Elasticsearch API key service, which is automatically enabled. + # To configure or turn off the API key service, refer to API key service setting documentation. # - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The api key request to create an API key (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-api-key # def create_api_key(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.create_api_key' } @@ -38,7 +46,7 @@ def create_api_key(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT path = '_security/api_key' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb index 4933f9fbb8..8b8bb6edf1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb @@ -15,19 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Creates a cross-cluster API key for API key based remote cluster access. + # Create a cross-cluster API key. + # Create an API key of the +cross_cluster+ type for the API key based remote cluster access. + # A +cross_cluster+ API key cannot be used to authenticate through the REST interface. + # IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. + # Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. + # NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the +access+ property. + # A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. + # By default, API keys never expire. You can specify expiration information when you create the API keys. + # Cross-cluster API keys can only be updated with the update cross-cluster API key API. + # Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The request to create a cross-cluster API key (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-cross-cluster-api-key.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-cross-cluster-api-key # def create_cross_cluster_api_key(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.create_cross_cluster_api_key' } @@ -37,7 +46,7 @@ def create_cross_cluster_api_key(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/cross_cluster/api_key' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb index 9ebfacea38..b9b338a89c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb @@ -15,27 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Creates a service account token for access without requiring basic authentication. + # Create a service account token. + # Create a service accounts token for access without requiring basic authentication. + # NOTE: Service account tokens never expire. + # You must actively delete them if they are no longer needed. # - # @option arguments [String] :namespace An identifier for the namespace - # @option arguments [String] :service An identifier for the service name - # @option arguments [String] :name An identifier for the token name - # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :namespace The name of the namespace, which is a top-level grouping of service accounts. (*Required*) + # @option arguments [String] :service The name of the service. (*Required*) + # @option arguments [String] :name The name for the service account token. + # If omitted, a random name will be generated.Token names must be at least one and no more than 256 characters. + # They can contain alphanumeric characters (a-z, A-Z, 0-9), dashes (+-+), and underscores (+_+), but cannot begin with an underscore.NOTE: Token names must be unique in the context of the associated service account. + # They must also be globally unique with their fully qualified names, which are comprised of the service account principal and token name, such as +//+. + # @option arguments [String] :refresh If +true+ then refresh the affected shards to make this operation visible to search, if +wait_for+ (the default) then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-create-service-token # def create_service_token(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.create_service_token' } - defined_params = %i[namespace service name].each_with_object({}) do |variable, set_variables| + defined_params = [:namespace, :service, :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? @@ -56,9 +62,9 @@ def create_service_token(arguments = {}) method = _name ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST path = if _namespace && _service && _name - "_security/service/#{Utils.__listify(_namespace)}/#{Utils.__listify(_service)}/credential/token/#{Utils.__listify(_name)}" + "_security/service/#{Utils.listify(_namespace)}/#{Utils.listify(_service)}/credential/token/#{Utils.listify(_name)}" else - "_security/service/#{Utils.__listify(_namespace)}/#{Utils.__listify(_service)}/credential/token" + "_security/service/#{Utils.listify(_namespace)}/#{Utils.listify(_service)}/credential/token" end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb index 1d637ba77e..b232a566bd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb @@ -15,19 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions # Delegate PKI authentication. + # This API implements the exchange of an X509Certificate chain for an Elasticsearch access token. + # The certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has +delegation.enabled+ set to +true+. + # A successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw +username_pattern+ of the respective realm. + # This API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-​as if the user connected directly to Elasticsearch. + # IMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated. + # This is part of the TLS authentication process and it is delegated to the proxy that calls this API. + # The proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The X509Certificate chain. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delegate-pki-authentication.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delegate-pki # def delegate_pki(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.delegate_pki' } @@ -37,7 +44,7 @@ def delegate_pki(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/delegate_pki' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb index fa4260b296..edca42ff9f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb @@ -15,26 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Removes application privileges. + # Delete application privileges. + # To use this API, you must have one of the following privileges: + # * The +manage_security+ cluster privilege (or a greater privilege such as +all+). + # * The "Manage Application Privileges" global privilege for the application being referenced in the request. # - # @option arguments [String] :application Application name - # @option arguments [String] :name Privilege name - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :application The name of the application. + # Application privileges are always associated with exactly one application. (*Required*) + # @option arguments [String, Array] :name The name of the privilege. (*Required*) + # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-privileges # def delete_privileges(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.delete_privileges' } - defined_params = %i[application name].each_with_object({}) do |variable, set_variables| + defined_params = [:application, :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? @@ -52,7 +56,7 @@ def delete_privileges(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = "_security/privilege/#{Utils.__listify(_application)}/#{Utils.__listify(_name)}" + path = "_security/privilege/#{Utils.listify(_application)}/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb index 81a755ea5a..c5b992666d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb @@ -15,20 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Removes roles in the native realm. + # Delete roles. + # Delete roles in the native realm. + # The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + # The delete roles API cannot remove roles that are defined in roles files. # - # @option arguments [String] :name Role name - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :name The name of the role. (*Required*) + # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-role # def delete_role(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.delete_role' } @@ -48,7 +51,7 @@ def delete_role(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = "_security/role/#{Utils.__listify(_name)}" + path = "_security/role/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb index 57cc5f4258..bab3c8cf2f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb @@ -15,20 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Removes role mappings. + # Delete role mappings. + # Role mappings define which roles are assigned to each user. + # The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. + # The delete role mappings API cannot remove role mappings that are defined in role mapping files. # - # @option arguments [String] :name Role-mapping name - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :name The distinct name that identifies the role mapping. + # The name is used solely as an identifier to facilitate interaction via the API; it does not affect the behavior of the mapping in any way. (*Required*) + # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-role-mapping # def delete_role_mapping(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.delete_role_mapping' } @@ -48,7 +52,7 @@ def delete_role_mapping(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = "_security/role_mapping/#{Utils.__listify(_name)}" + path = "_security/role_mapping/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb index e1e956f288..0fc74f010f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb @@ -15,27 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Deletes a service account token. + # Delete service account tokens. + # Delete service account tokens for a service in a specified namespace. # - # @option arguments [String] :namespace An identifier for the namespace - # @option arguments [String] :service An identifier for the service name - # @option arguments [String] :name An identifier for the token name - # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :namespace The namespace, which is a top-level grouping of service accounts. (*Required*) + # @option arguments [String] :service The service name. (*Required*) + # @option arguments [String] :name The name of the service account token. (*Required*) + # @option arguments [String] :refresh If +true+ then refresh the affected shards to make this operation visible to search, if +wait_for+ (the default) then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-service-token # def delete_service_token(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.delete_service_token' } - defined_params = %i[namespace service name].each_with_object({}) do |variable, set_variables| + defined_params = [:namespace, :service, :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? @@ -56,7 +57,7 @@ def delete_service_token(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE - path = "_security/service/#{Utils.__listify(_namespace)}/#{Utils.__listify(_service)}/credential/token/#{Utils.__listify(_name)}" + path = "_security/service/#{Utils.listify(_namespace)}/#{Utils.listify(_service)}/credential/token/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb index 6c60f97ffc..8e1142c8dd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb @@ -15,20 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Deletes users from the native realm. + # Delete users. + # Delete users from the native realm. # - # @option arguments [String] :username username - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :username An identifier for the user. (*Required*) + # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-user # def delete_user(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.delete_user' } @@ -48,7 +49,7 @@ def delete_user(arguments = {}) _username = arguments.delete(:username) method = Elasticsearch::API::HTTP_DELETE - path = "_security/user/#{Utils.__listify(_username)}" + path = "_security/user/#{Utils.listify(_username)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb index cd15f71593..2bc8cb57c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb @@ -15,20 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Disables users in the native realm. + # Disable users. + # Disable users in the native realm. + # By default, when you create users, they are enabled. + # You can use this API to revoke a user's access to Elasticsearch. # - # @option arguments [String] :username The username of the user to disable - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :username An identifier for the user. (*Required*) + # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-disable-user # def disable_user(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.disable_user' } @@ -48,7 +51,7 @@ def disable_user(arguments = {}) _username = arguments.delete(:username) method = Elasticsearch::API::HTTP_PUT - path = "_security/user/#{Utils.__listify(_username)}/_disable" + path = "_security/user/#{Utils.listify(_username)}/_disable" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb index 2ec39dbc7a..30b86ec2a2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb @@ -41,9 +41,8 @@ module Actions def disable_user_profile(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.disable_user_profile' } - defined_params = [:uid].inject({}) do |set_variables, variable| + defined_params = [:uid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -57,7 +56,7 @@ def disable_user_profile(arguments = {}) _uid = arguments.delete(:uid) method = Elasticsearch::API::HTTP_PUT - path = "_security/profile/#{Utils.__listify(_uid)}/_disable" + path = "_security/profile/#{Utils.listify(_uid)}/_disable" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb index e6dadc479f..811ce40315 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb @@ -15,20 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Enables users in the native realm. + # Enable users. + # Enable users in the native realm. + # By default, when you create users, they are enabled. # - # @option arguments [String] :username The username of the user to enable - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :username An identifier for the user. (*Required*) + # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enable-user # def enable_user(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.enable_user' } @@ -48,7 +50,7 @@ def enable_user(arguments = {}) _username = arguments.delete(:username) method = Elasticsearch::API::HTTP_PUT - path = "_security/user/#{Utils.__listify(_username)}/_enable" + path = "_security/user/#{Utils.listify(_username)}/_enable" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb index 7b2e01cb08..5e3da8160b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb @@ -42,9 +42,8 @@ module Actions def enable_user_profile(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.enable_user_profile' } - defined_params = [:uid].inject({}) do |set_variables, variable| + defined_params = [:uid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -58,7 +57,7 @@ def enable_user_profile(arguments = {}) _uid = arguments.delete(:uid) method = Elasticsearch::API::HTTP_PUT - path = "_security/profile/#{Utils.__listify(_uid)}/_enable" + path = "_security/profile/#{Utils.listify(_uid)}/_enable" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb index 9c16f925ef..9b18c8e597 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb @@ -15,18 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Allows a kibana instance to configure itself to communicate with a secured elasticsearch cluster. + # Enroll Kibana. + # Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster. + # NOTE: This API is currently intended for internal use only by Kibana. + # Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-kibana-enrollment.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enroll-kibana # def enroll_kibana(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.enroll_kibana' } @@ -34,7 +37,7 @@ def enroll_kibana(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_security/enroll/kibana' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb index 2a9dc5c0af..55a83981a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb @@ -15,18 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Allows a new node to enroll to an existing cluster with security enabled. + # Enroll a node. + # Enroll a new node to allow it to join an existing cluster with security features enabled. + # The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster. + # The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-node-enrollment.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enroll-node # def enroll_node(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.enroll_node' } @@ -34,7 +37,7 @@ def enroll_node(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_security/enroll/node' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb index b023edb480..c5f9e49cbd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb @@ -15,26 +15,38 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions + # Get API key information. # Retrieves information for one or more API keys. + # NOTE: If you have only the +manage_own_api_key+ privilege, this API returns only the API keys that you own. + # If you have +read_security+, +manage_api_key+ or greater privileges (including +manage_security+), this API returns all API keys regardless of ownership. # - # @option arguments [String] :id API key id of the API key to be retrieved - # @option arguments [String] :name API key name of the API key to be retrieved - # @option arguments [String] :username user name of the user who created this API key to be retrieved - # @option arguments [String] :realm_name realm name of the user who created this API key to be retrieved - # @option arguments [Boolean] :owner flag to query API keys owned by the currently authenticated user - # @option arguments [Boolean] :with_limited_by flag to show the limited-by role descriptors of API Keys - # @option arguments [Boolean] :with_profile_uid flag to also retrieve the API Key's owner profile uid, if it exists - # @option arguments [Boolean] :active_only flag to limit response to only active (not invalidated or expired) API keys + # @option arguments [String] :id An API key id. + # This parameter cannot be used with any of +name+, +realm_name+ or +username+. + # @option arguments [String] :name An API key name. + # This parameter cannot be used with any of +id+, +realm_name+ or +username+. + # It supports prefix search with wildcard. + # @option arguments [Boolean] :owner A boolean flag that can be used to query API keys owned by the currently authenticated user. + # The +realm_name+ or +username+ parameters cannot be specified when this parameter is set to +true+ as they are assumed to be the currently authenticated ones. + # @option arguments [String] :realm_name The name of an authentication realm. + # This parameter cannot be used with either +id+ or +name+ or when +owner+ flag is set to +true+. + # @option arguments [String] :username The username of a user. + # This parameter cannot be used with either +id+ or +name+ or when +owner+ flag is set to +true+. + # @option arguments [Boolean] :with_limited_by Return the snapshot of the owner user's role descriptors + # associated with the API key. An API key's actual + # permission is the intersection of its assigned role + # descriptors and the owner user's role descriptors. + # @option arguments [Boolean] :active_only A boolean flag that can be used to query API keys that are currently active. An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together with other parameters such as +owner+ or +name+. If +active_only+ is false, the response will include both active and inactive (expired or invalidated) keys. + # @option arguments [Boolean] :with_profile_uid Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-api-key # def get_api_key(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.get_api_key' } @@ -42,7 +54,7 @@ def get_api_key(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_security/api_key' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb index aac95e8a75..7306287536 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb @@ -15,18 +15,19 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch. + # Get builtin privileges. + # Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-builtin-privileges # def get_builtin_privileges(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.get_builtin_privileges' } @@ -34,7 +35,7 @@ def get_builtin_privileges(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_security/privilege/_builtin' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb index 08b6a96c22..a1f89b1468 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb @@ -15,25 +15,31 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Retrieves application privileges. + # Get application privileges. + # To use this API, you must have one of the following privileges: + # * The +read_security+ cluster privilege (or a greater privilege such as +manage_security+ or +all+). + # * The "Manage Application Privileges" global privilege for the application being referenced in the request. # - # @option arguments [String] :application Application name - # @option arguments [String] :name Privilege name + # @option arguments [String] :application The name of the application. + # Application privileges are always associated with exactly one application. + # If you do not specify this parameter, the API returns information about all privileges for all applications. + # @option arguments [String, Array] :name The name of the privilege. + # If you do not specify this parameter, the API returns information about all privileges for the requested application. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-privileges # def get_privileges(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.get_privileges' } - defined_params = %i[application name].each_with_object({}) do |variable, set_variables| + defined_params = [:application, :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? @@ -49,9 +55,9 @@ def get_privileges(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _application && _name - "_security/privilege/#{Utils.__listify(_application)}/#{Utils.__listify(_name)}" + "_security/privilege/#{Utils.listify(_application)}/#{Utils.listify(_name)}" elsif _application - "_security/privilege/#{Utils.__listify(_application)}" + "_security/privilege/#{Utils.listify(_application)}" else '_security/privilege' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb index 9b8f533987..7f547ed5ba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb @@ -15,19 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Retrieves roles in the native realm. + # Get roles. + # Get roles in the native realm. + # The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + # The get roles API cannot retrieve roles that are defined in roles files. # - # @option arguments [List] :name A comma-separated list of role names + # @option arguments [String, Array] :name The name of the role. + # You can specify multiple roles as a comma-separated list. + # If you do not specify this parameter, the API returns information about all roles. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-role # def get_role(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.get_role' } @@ -46,14 +51,14 @@ def get_role(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_security/role/#{Utils.__listify(_name)}" + "_security/role/#{Utils.listify(_name)}" else '_security/role' end params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb index 2c6a79f930..d3de4c9cd5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Retrieves role mappings. + # Get role mappings. + # Role mappings define which roles are assigned to each user. + # The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. + # The get role mappings API cannot retrieve role mappings that are defined in role mapping files. # - # @option arguments [List] :name A comma-separated list of role-mapping names + # @option arguments [String, Array] :name The distinct name that identifies the role mapping. The name is used solely as an identifier to facilitate interaction via the API; it does not affect the behavior of the mapping in any way. You can specify multiple mapping names as a comma-separated list. If you do not specify this parameter, the API returns information about all role mappings. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-role-mapping # def get_role_mapping(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.get_role_mapping' } @@ -46,7 +49,7 @@ def get_role_mapping(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _name - "_security/role_mapping/#{Utils.__listify(_name)}" + "_security/role_mapping/#{Utils.listify(_name)}" else '_security/role_mapping' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb index 4bf5a17cf6..18f00572fd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb @@ -15,25 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Retrieves information about service accounts. + # Get service accounts. + # Get a list of service accounts that match the provided path parameters. + # NOTE: Currently, only the +elastic/fleet-server+ service account is available. # - # @option arguments [String] :namespace An identifier for the namespace - # @option arguments [String] :service An identifier for the service name + # @option arguments [String] :namespace The name of the namespace. + # Omit this parameter to retrieve information about all service accounts. + # If you omit this parameter, you must also omit the +service+ parameter. + # @option arguments [String] :service The service name. + # Omit this parameter to retrieve information about all service accounts that belong to the specified +namespace+. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-service-accounts # def get_service_accounts(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.get_service_accounts' } - defined_params = %i[namespace service].each_with_object({}) do |variable, set_variables| + defined_params = [:namespace, :service].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? @@ -49,9 +54,9 @@ def get_service_accounts(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _namespace && _service - "_security/service/#{Utils.__listify(_namespace)}/#{Utils.__listify(_service)}" + "_security/service/#{Utils.listify(_namespace)}/#{Utils.listify(_service)}" elsif _namespace - "_security/service/#{Utils.__listify(_namespace)}" + "_security/service/#{Utils.listify(_namespace)}" else '_security/service' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb index b66a44c054..4079fed8f9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb @@ -15,25 +15,29 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Retrieves information of all service credentials for a service account. + # Get service account credentials. + # To use this API, you must have at least the +read_security+ cluster privilege (or a greater privilege such as +manage_service_account+ or +manage_security+). + # The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster. + # NOTE: For tokens backed by the +service_tokens+ file, the API collects them from all nodes of the cluster. + # Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens. # - # @option arguments [String] :namespace An identifier for the namespace - # @option arguments [String] :service An identifier for the service name + # @option arguments [String] :namespace The name of the namespace. (*Required*) + # @option arguments [String] :service The service name. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-service-credentials # def get_service_credentials(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.get_service_credentials' } - defined_params = %i[namespace service].each_with_object({}) do |variable, set_variables| + defined_params = [:namespace, :service].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? @@ -51,7 +55,7 @@ def get_service_credentials(arguments = {}) _service = arguments.delete(:service) method = Elasticsearch::API::HTTP_GET - path = "_security/service/#{Utils.__listify(_namespace)}/#{Utils.__listify(_service)}/credential" + path = "_security/service/#{Utils.listify(_namespace)}/#{Utils.listify(_service)}/credential" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb index ce1a6ba852..540acd3beb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb @@ -15,19 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Retrieve settings for the security system indices + # Get security index settings. + # Get the user-configurable settings for the security internal index (+.security+ and associated indices). + # Only a subset of the index settings — those that are user-configurable—will be shown. + # This includes: + # * +index.auto_expand_replicas+ + # * +index.number_of_replicas+ # - # @option arguments [Time] :master_timeout Timeout for connection to master + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-settings.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-settings # def get_settings(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.get_settings' } @@ -35,7 +41,7 @@ def get_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_security/settings' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb index bbe77102bb..b2e7feccc2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb @@ -15,19 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Creates a bearer token for access without requiring basic authentication. + # Get a token. + # Create a bearer token for access without requiring basic authentication. + # The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface. + # Alternatively, you can explicitly enable the +xpack.security.authc.token.enabled+ setting. + # When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface. + # The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body. + # A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available. + # The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used. + # That time period is defined by the +xpack.security.authc.token.timeout+ setting. + # If you want to invalidate a token immediately, you can do so by using the invalidate token API. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The token request to get (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-token # def get_token(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.get_token' } @@ -37,7 +46,7 @@ def get_token(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/oauth2/token' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb index 94efebad8b..bc2d6b220b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb @@ -15,20 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Retrieves information about users in the native realm and built-in users. + # Get users. + # Get information about users in the native realm and built-in users. # - # @option arguments [List] :username A comma-separated list of usernames - # @option arguments [Boolean] :with_profile_uid flag to retrieve profile uid (if exists) associated to the user + # @option arguments [Username] :username An identifier for the user. You can specify multiple usernames as a comma-separated list. If you omit this parameter, the API retrieves information about all users. + # @option arguments [Boolean] :with_profile_uid Determines whether to retrieve the user profile UID, if it exists, for the users. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user # def get_user(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.get_user' } @@ -47,14 +48,14 @@ def get_user(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _username - "_security/user/#{Utils.__listify(_username)}" + "_security/user/#{Utils.listify(_username)}" else '_security/user' end params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb index 926460dc99..488950a148 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb @@ -15,18 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Retrieves security privileges for the logged in user. + # Get user privileges. + # Get the security privileges for the logged in user. + # All users can use this API, but only to determine their own privileges. + # To check the privileges of other users, you must use the run as feature. + # To check whether a user has a specific list of privileges, use the has privileges API. # + # @option arguments [String] :application The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications. + # @option arguments [String] :priviledge The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application. + # @option arguments [Name, Null] :username [TODO] # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user-privileges # def get_user_privileges(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.get_user_privileges' } @@ -34,11 +41,11 @@ def get_user_privileges(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_security/user/_privileges' - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb index 6f2a93df94..26ba054916 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb @@ -40,9 +40,8 @@ module Actions def get_user_profile(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.get_user_profile' } - defined_params = [:uid].inject({}) do |set_variables, variable| + defined_params = [:uid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -56,7 +55,7 @@ def get_user_profile(arguments = {}) _uid = arguments.delete(:uid) method = Elasticsearch::API::HTTP_GET - path = "_security/profile/#{Utils.__listify(_uid)}" + path = "_security/profile/#{Utils.listify(_uid)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb index 19567099a6..ec1caaca9f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb @@ -15,20 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Creates an API key on behalf of another user. + # Grant an API key. + # Create an API key on behalf of another user. + # This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. + # The caller must have authentication credentials for the user on whose behalf the API key will be created. + # It is not possible to use this API to create an API key without that user's credentials. + # The supported user authentication credential types are: + # * username and password + # * Elasticsearch access tokens + # * JWTs + # The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. + # In this case, the API key will be created on behalf of the impersonated user. + # This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. + # The API keys are created by the Elasticsearch API key service, which is automatically enabled. + # A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. + # If applicable, it also returns expiration information for the API key in milliseconds. + # By default, API keys never expire. You can specify expiration information when you create the API keys. # - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The api key request to create an API key (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-grant-api-key # def grant_api_key(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.grant_api_key' } @@ -38,11 +52,11 @@ def grant_api_key(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/api_key/grant' - params = Utils.process_params(arguments) + params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb index db564b4390..82ac5d28c8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb @@ -15,20 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Determines whether the specified user has a specified list of privileges. + # Check user privileges. + # Determine whether the specified user has a specified list of privileges. + # All users can use this API, but only to determine their own privileges. + # To check the privileges of other users, you must use the run as feature. # # @option arguments [String] :user Username # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The privileges to test (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-has-privileges # def has_privileges(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.has_privileges' } @@ -49,7 +52,7 @@ def has_privileges(arguments = {}) method = Elasticsearch::API::HTTP_POST path = if _user - "_security/user/#{Utils.__listify(_user)}/_has_privileges" + "_security/user/#{Utils.listify(_user)}/_has_privileges" else '_security/user/_has_privileges' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb index d7b2b4e7b2..5bb59b68ce 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb @@ -43,7 +43,7 @@ def has_privileges_user_profile(arguments = {}) body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/profile/_has_privileges" + path = '_security/profile/_has_privileges' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb index 4bc0e103fa..3c6be088b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb @@ -15,19 +15,29 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Invalidates one or more API keys. + # Invalidate API keys. + # This API invalidates API keys created by the create API key or grant API key APIs. + # Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. + # To use this API, you must have at least the +manage_security+, +manage_api_key+, or +manage_own_api_key+ cluster privileges. + # The +manage_security+ privilege allows deleting any API key, including both REST and cross cluster API keys. + # The +manage_api_key+ privilege allows deleting any REST API key, but not cross cluster API keys. + # The +manage_own_api_key+ only allows deleting REST API keys that are owned by the user. + # In addition, with the +manage_own_api_key+ privilege, an invalidation request must be issued in one of the three formats: + # - Set the parameter +owner=true+. + # - Or, set both +username+ and +realm_name+ to match the user's identity. + # - Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the +ids+ field. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The api key request to invalidate API key(s) (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-invalidate-api-key # def invalidate_api_key(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.invalidate_api_key' } @@ -37,7 +47,7 @@ def invalidate_api_key(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_DELETE path = '_security/api_key' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb index dcae33c44c..b7a690b38c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb @@ -15,19 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Invalidates one or more access tokens or refresh tokens. + # Invalidate a token. + # The access tokens returned by the get token API have a finite period of time for which they are valid. + # After that time period, they can no longer be used. + # The time period is defined by the +xpack.security.authc.token.timeout+ setting. + # The refresh tokens returned by the get token API are only valid for 24 hours. + # They can also be used exactly once. + # If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. + # NOTE: While all parameters are optional, at least one of them is required. + # More specifically, either one of +token+ or +refresh_token+ parameters is required. + # If none of these two are specified, then +realm_name+ and/or +username+ need to be specified. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The token to invalidate (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-invalidate-token # def invalidate_token(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.invalidate_token' } @@ -37,7 +46,7 @@ def invalidate_token(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_DELETE path = '_security/oauth2/token' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb index e100fc59b2..bda8197c41 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Exchanges an OpenID Connection authentication response message for an Elasticsearch access token and refresh token pair + # Authenticate OpenID Connect. + # Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + # Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + # These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The OpenID Connect response to authenticate (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-authenticate.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-oidc-authenticate # def oidc_authenticate(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.oidc_authenticate' } @@ -37,7 +40,7 @@ def oidc_authenticate(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/oidc/authenticate' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb index e39f9d4b34..0d87a6af6f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb @@ -15,19 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Invalidates a refresh token and access token that was generated from the OpenID Connect Authenticate API + # Logout of OpenID Connect. + # Invalidate an access token and a refresh token that were generated as a response to the +/_security/oidc/authenticate+ API. + # If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout. + # Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + # These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Access token and refresh token to invalidate (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-logout.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-oidc-logout # def oidc_logout(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.oidc_logout' } @@ -37,7 +41,7 @@ def oidc_logout(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/oidc/logout' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb index 2d9247ecd4..06271cea54 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb @@ -15,19 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Creates an OAuth 2.0 authentication request as a URL string + # Prepare OpenID connect authentication. + # Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch. + # The response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process. + # Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs. + # These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The OpenID Connect authentication realm configuration (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-prepare-authentication.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-oidc-prepare-authentication # def oidc_prepare_authentication(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.oidc_prepare_authentication' } @@ -37,7 +41,7 @@ def oidc_prepare_authentication(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/oidc/prepare' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb index 0e4b52836e..43eb19c56b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb @@ -15,20 +15,32 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Adds or updates application privileges. + # Create or update application privileges. + # To use this API, you must have one of the following privileges: + # * The +manage_security+ cluster privilege (or a greater privilege such as +all+). + # * The "Manage Application Privileges" global privilege for the application being referenced in the request. + # Application names are formed from a prefix, with an optional suffix that conform to the following rules: + # * The prefix must begin with a lowercase ASCII letter. + # * The prefix must contain only ASCII letters or digits. + # * The prefix must be at least 3 characters long. + # * If the suffix exists, it must begin with either a dash +-+ or +_+. + # * The suffix cannot contain any of the following characters: +\+, +/+, +*+, +?+, +"+, +<+, +>+, +|+, +,+, +*+. + # * No part of the name can contain whitespace. + # Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters +_+, +-+, and +.+. + # Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: +/+, +*+, +:+. # - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The privilege(s) to add (*Required*) + # @option arguments [Hash] :body privileges # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-privileges # def put_privileges(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.put_privileges' } @@ -38,7 +50,7 @@ def put_privileges(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT path = '_security/privilege' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb index a0e102ee73..03b596aa4b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb @@ -15,21 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Adds and updates roles in the native realm. + # Create or update roles. + # The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. + # The create or update roles API cannot update roles that are defined in roles files. + # File-based role management is not available in Elastic Serverless. # - # @option arguments [String] :name Role name - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :name The name of the role that is being created or updated. On Elasticsearch Serverless, the role name must begin with a letter or digit and can only contain letters, digits and the characters '_', '-', and '.'. Each role must have a unique name, as this will serve as the identifier for that role. (*Required*) + # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The role to add (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role # def put_role(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.put_role' } @@ -50,7 +53,7 @@ def put_role(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = "_security/role/#{Utils.__listify(_name)}" + path = "_security/role/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb index 4e238c2d0b..10ef366d2d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb @@ -15,21 +15,39 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Creates and updates role mappings. + # Create or update role mappings. + # Role mappings define which roles are assigned to each user. + # Each mapping has rules that identify users and a list of roles that are granted to those users. + # The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. + # NOTE: This API does not create roles. Rather, it maps users to existing roles. + # Roles can be created by using the create or update roles API or roles files. + # **Role templates** + # The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name. + # For example, all users in the +cn=admin,dc=example,dc=com+ LDAP group should be given the superuser role in Elasticsearch. + # The +roles+ field is used for this purpose. + # For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user. + # The +role_templates+ field is used for this purpose. + # NOTE: To use role templates successfully, the relevant scripting feature must be enabled. + # Otherwise, all attempts to create a role mapping with role templates fail. + # All of the user fields that are available in the role mapping rules are also available in the role templates. + # Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated. + # By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user. + # If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names. # - # @option arguments [String] :name Role-mapping name - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :name The distinct name that identifies the role mapping. + # The name is used solely as an identifier to facilitate interaction via the API; it does not affect the behavior of the mapping in any way. (*Required*) + # @option arguments [String] :refresh If +true+ (the default) then refresh the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ then do nothing with refreshes. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The role mapping to add (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-role-mapping # def put_role_mapping(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.put_role_mapping' } @@ -50,7 +68,7 @@ def put_role_mapping(arguments = {}) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT - path = "_security/role_mapping/#{Utils.__listify(_name)}" + path = "_security/role_mapping/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb index 453d00ef59..5facf778ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb @@ -15,21 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Adds and updates users in the native realm. These users are commonly referred to as native users. + # Create or update users. + # Add and update users in the native realm. + # A password is required for adding a new user but is optional when updating an existing user. + # To change a user's password without updating any other fields, use the change password API. # - # @option arguments [String] :username The username of the User - # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) + # @option arguments [String] :username An identifier for the user.NOTE: Usernames must be at least 1 and no more than 507 characters. + # They can contain alphanumeric characters (a-z, A-Z, 0-9), spaces, punctuation, and printable symbols in the Basic Latin (ASCII) block. + # Leading or trailing whitespace is not allowed. (*Required*) + # @option arguments [String] :refresh Valid values are +true+, +false+, and +wait_for+. + # These values have the same meaning as in the index API, but the default value for this API is true. Server default: true. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The user to add (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-user # def put_user(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.put_user' } @@ -50,7 +56,7 @@ def put_user(arguments = {}) _username = arguments.delete(:username) method = Elasticsearch::API::HTTP_PUT - path = "_security/user/#{Utils.__listify(_username)}" + path = "_security/user/#{Utils.listify(_username)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb index 02cf165e18..d84df5583c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb @@ -15,22 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Retrieves information for API keys using a subset of query DSL + # Find API keys with a query. + # Get a paginated list of API keys and their information. + # You can optionally filter the results with a query. + # To use this API, you must have at least the +manage_own_api_key+ or the +read_security+ cluster privileges. + # If you have only the +manage_own_api_key+ privilege, this API returns only the API keys that you own. + # If you have the +read_security+, +manage_api_key+, or greater privileges (including +manage_security+), this API returns all API keys regardless of ownership. # - # @option arguments [Boolean] :with_limited_by flag to show the limited-by role descriptors of API Keys - # @option arguments [Boolean] :with_profile_uid flag to also retrieve the API Key's owner profile uid, if it exists - # @option arguments [Boolean] :typed_keys flag to prefix aggregation names by their respective types in the response + # @option arguments [Boolean] :with_limited_by Return the snapshot of the owner user's role descriptors associated with the API key. + # An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors (effectively limited by it). + # An API key cannot retrieve any API key’s limited-by role descriptors (including itself) unless it has +manage_api_key+ or higher privileges. + # @option arguments [Boolean] :with_profile_uid Determines whether to also retrieve the profile UID for the API key owner principal. + # If it exists, the profile UID is returned under the +profile_uid+ response field for each API key. + # @option arguments [Boolean] :typed_keys Determines whether aggregation names are prefixed by their respective types in the response. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body From, size, query, sort and search_after + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-api-keys # def query_api_keys(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.query_api_keys' } @@ -38,7 +46,7 @@ def query_api_keys(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = if body Elasticsearch::API::HTTP_POST @@ -46,7 +54,7 @@ def query_api_keys(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_security/_query/api_key' + path = '_security/_query/api_key' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb index c5d84ec159..45f2babd0c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb @@ -15,19 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Retrieves information for Roles using a subset of query DSL + # Find roles with a query. + # Get roles in a paginated manner. + # The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. + # The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. + # You can optionally filter the results with a query. + # Also, the results can be paginated and sorted. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body From, size, query, sort and search_after + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-role.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-role # def query_role(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.query_role' } @@ -35,7 +40,7 @@ def query_role(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = if body Elasticsearch::API::HTTP_POST @@ -43,7 +48,7 @@ def query_role(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_security/_query/role' + path = '_security/_query/role' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb index a4df6bb7ee..82b5b1e318 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb @@ -15,20 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Retrieves information for Users using a subset of query DSL + # Find users with a query. + # Get information for users in a paginated manner. + # You can optionally filter the results with a query. + # NOTE: As opposed to the get user API, built-in users are excluded from the result. + # This API is only for native users. # - # @option arguments [Boolean] :with_profile_uid flag to retrieve profile uid (if exists) associated with the user + # @option arguments [Boolean] :with_profile_uid Determines whether to retrieve the user profile UID, if it exists, for the users. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body From, size, query, sort and search_after + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-user.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-user # def query_user(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.query_user' } @@ -36,7 +40,7 @@ def query_user(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = if body Elasticsearch::API::HTTP_POST @@ -44,7 +48,7 @@ def query_user(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_security/_query/user' + path = '_security/_query/user' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb index 7d0486ca5c..0b661c21cd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb @@ -15,19 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Exchanges a SAML Response message for an Elasticsearch access token and refresh token pair + # Authenticate SAML. + # Submit a SAML response message to Elasticsearch for consumption. + # NOTE: This API is intended for use by custom web applications other than Kibana. + # If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + # The SAML message that is submitted can be: + # * A response to a SAML authentication request that was previously created using the SAML prepare authentication API. + # * An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow. + # In either case, the SAML message needs to be a base64 encoded XML document with a root element of ++. + # After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. + # This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The SAML response to authenticate (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-authenticate # def saml_authenticate(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.saml_authenticate' } @@ -37,7 +46,7 @@ def saml_authenticate(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/saml/authenticate' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb index 7d0db5fec3..0a2d0377e1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb @@ -15,19 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Verifies the logout response sent from the SAML IdP + # Logout of SAML completely. + # Verifies the logout response sent from the SAML IdP. + # NOTE: This API is intended for use by custom web applications other than Kibana. + # If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + # The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout. + # This API verifies the response by ensuring the content is relevant and validating its signature. + # An empty response is returned if the verification process is successful. + # The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding. + # The caller of this API must prepare the request accordingly so that this API can handle either of them. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The logout response to verify (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-complete-logout # def saml_complete_logout(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.saml_complete_logout' } @@ -37,7 +45,7 @@ def saml_complete_logout(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/saml/complete_logout' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb index 28951664e4..8167ee80c7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb @@ -15,19 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Consumes a SAML LogoutRequest + # Invalidate SAML. + # Submit a SAML LogoutRequest message to Elasticsearch for consumption. + # NOTE: This API is intended for use by custom web applications other than Kibana. + # If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + # The logout request comes from the SAML IdP during an IdP initiated Single Logout. + # The custom web application can use this API to have Elasticsearch process the +LogoutRequest+. + # After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message. + # Thus the user can be redirected back to their IdP. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The LogoutRequest message (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-invalidate # def saml_invalidate(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.saml_invalidate' } @@ -37,7 +44,7 @@ def saml_invalidate(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/saml/invalidate' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb index 17bccc2ddd..3ac13644f7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb @@ -15,19 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Invalidates an access token and a refresh token that were generated via the SAML Authenticate API + # Logout of SAML. + # Submits a request to invalidate an access token and refresh token. + # NOTE: This API is intended for use by custom web applications other than Kibana. + # If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + # This API invalidates the tokens that were generated for a user by the SAML authenticate API. + # If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout). # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The tokens to invalidate (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-logout # def saml_logout(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.saml_logout' } @@ -37,7 +42,7 @@ def saml_logout(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/saml/logout' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb index 81bec3685d..2869b47747 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb @@ -15,19 +15,29 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Creates a SAML authentication request + # Prepare SAML authentication. + # Create a SAML authentication request (++) as a URL string based on the configuration of the respective SAML realm in Elasticsearch. + # NOTE: This API is intended for use by custom web applications other than Kibana. + # If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. + # This API returns a URL pointing to the SAML Identity Provider. + # You can use the URL to redirect the browser of the user in order to continue the authentication process. + # The URL includes a single parameter named +SAMLRequest+, which contains a SAML Authentication request that is deflated and Base64 encoded. + # If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named +SigAlg+ and +Signature+. + # These parameters contain the algorithm used for the signature and the signature value itself. + # It also returns a random string that uniquely identifies this SAML Authentication request. + # The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The realm for which to create the authentication request, identified by either its name or the ACS URL (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-prepare-authentication # def saml_prepare_authentication(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.saml_prepare_authentication' } @@ -37,7 +47,7 @@ def saml_prepare_authentication(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_security/saml/prepare' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb index cecd339eee..477c59e748 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Generates SAML metadata for the Elastic stack SAML 2.0 Service Provider + # Create SAML service provider metadata. + # Generate SAML metadata for a SAML 2.0 Service Provider. + # The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file. + # This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch. # - # @option arguments [String] :realm_name The name of the SAML realm to get the metadata for + # @option arguments [String] :realm_name The name of the SAML realm in Elasticsearch. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-saml-service-provider-metadata # def saml_service_provider_metadata(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.saml_service_provider_metadata' } @@ -47,7 +50,7 @@ def saml_service_provider_metadata(arguments = {}) _realm_name = arguments.delete(:realm_name) method = Elasticsearch::API::HTTP_GET - path = "_security/saml/metadata/#{Utils.__listify(_realm_name)}" + path = "_security/saml/metadata/#{Utils.listify(_realm_name)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb index 3586f601f0..8a51c2f29f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb @@ -52,7 +52,7 @@ def suggest_user_profiles(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_security/profile/_suggest" + path = '_security/profile/_suggest' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb index dad4b51305..e06d970842 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb @@ -15,20 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Updates attributes of an existing API key. + # Update an API key. + # Update attributes of an existing API key. + # This API supports updates to an API key's access scope, expiration, and metadata. + # To use this API, you must have at least the +manage_own_api_key+ cluster privilege. + # Users can only update API keys that they created or that were granted to them. + # To update another user’s API key, use the +run_as+ feature to submit a request on behalf of another user. + # IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required. + # Use this API to update API keys created by the create API key or grant API Key APIs. + # If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. + # It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. + # The access scope of an API key is derived from the +role_descriptors+ you specify in the request and a snapshot of the owner user's permissions at the time of the request. + # The snapshot of the owner's permissions is updated automatically on every call. + # IMPORTANT: If you don't specify +role_descriptors+ in the request, a call to this API might still change the API key's access scope. + # This change can occur if the owner user's permissions have changed since the API key was created or last modified. # - # @option arguments [String] :id The ID of the API key to update + # @option arguments [String] :id The ID of the API key to update. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The API key request to update attributes of an API key. + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-api-key.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-api-key # def update_api_key(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.update_api_key' } @@ -48,7 +61,7 @@ def update_api_key(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT - path = "_security/api_key/#{Utils.__listify(_id)}" + path = "_security/api_key/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb index 141a5cd3af..90ea10d8c4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb @@ -15,20 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Updates attributes of an existing cross-cluster API key. + # Update a cross-cluster API key. + # Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. + # To use this API, you must have at least the +manage_security+ cluster privilege. + # Users can only update API keys that they created. + # To update another user's API key, use the +run_as+ feature to submit a request on behalf of another user. + # IMPORTANT: It's not possible to use an API key as the authentication credential for this API. + # To update an API key, the owner user's credentials are required. + # It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. + # This API supports updates to an API key's access scope, metadata, and expiration. + # The owner user's information, such as the +username+ and +realm+, is also updated automatically on every call. + # NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API. # - # @option arguments [String] :id The ID of the cross-cluster API key to update + # @option arguments [String] :id The ID of the cross-cluster API key to update. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The request to update attributes of a cross-cluster API key. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-cross-cluster-api-key # def update_cross_cluster_api_key(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.update_cross_cluster_api_key' } @@ -49,7 +59,7 @@ def update_cross_cluster_api_key(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT - path = "_security/cross_cluster/api_key/#{Utils.__listify(_id)}" + path = "_security/cross_cluster/api_key/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb index bd86ffcbca..80f01e9a43 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb @@ -15,21 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Security module Actions - # Update settings for the security system index + # Update security index settings. + # Update the user-configurable settings for the security internal index (+.security+ and associated indices). Only a subset of settings are allowed to be modified. This includes +index.auto_expand_replicas+ and +index.number_of_replicas+. + # NOTE: If +index.auto_expand_replicas+ is set, +index.number_of_replicas+ will be ignored during updates. + # If a specific index is not in use on the system and settings are provided for it, the request will be rejected. + # This API does not yet support configuring the settings for indices before they are in use. # - # @option arguments [Time] :master_timeout Timeout for connection to master - # @option arguments [Time] :timeout Timeout for acknowledgements from all nodes + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An object with the new settings for each index, if any (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-settings.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-settings # def update_settings(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.update_settings' } @@ -39,7 +45,7 @@ def update_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT path = '_security/settings' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb index a8e24acf6f..7c1595368f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb @@ -50,9 +50,8 @@ module Actions def update_user_profile_data(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'security.update_user_profile_data' } - defined_params = [:uid].inject({}) do |set_variables, variable| + defined_params = [:uid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) - set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -67,7 +66,7 @@ def update_user_profile_data(arguments = {}) _uid = arguments.delete(:uid) method = Elasticsearch::API::HTTP_PUT - path = "_security/profile/#{Utils.__listify(_uid)}/_data" + path = "_security/profile/#{Utils.listify(_uid)}/_data" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb b/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb index 19ee6beeed..4ab2d42b98 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb @@ -15,25 +15,40 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Simulate module Actions - # Simulates running ingest with example documents. + # Simulate data ingestion. + # Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index. + # This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch. + # The API runs the default and final pipeline for that index against a set of documents provided in the body of the request. + # If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would. + # No data is indexed into Elasticsearch. + # Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation. + # The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result. + # This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline. + # The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index. + # By default, the pipeline definitions that are currently in the system are used. + # However, you can supply substitute pipeline definitions in the body of the request. + # These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :index Default index for docs which don't provide one - # @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with if no pipeline is given for a particular document + # @option arguments [String] :index The index to simulate ingesting into. + # This value can be overridden by specifying an index on each document. + # If you specify this parameter in the request path, it is used for any documents that do not explicitly specify an index argument. + # @option arguments [String] :pipeline The pipeline to use as the default pipeline. + # This value can be used to override the default pipeline of the index. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The simulate definition (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/simulate-ingest-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-simulate-ingest # def ingest(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'simulate.ingest' } @@ -48,13 +63,13 @@ def ingest(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index - "_ingest/#{Utils.__listify(_index)}/_simulate" + "_ingest/#{Utils.listify(_index)}/_simulate" else '_ingest/_simulate' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb index dfc7b63c8c..5527338a51 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb @@ -15,21 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Snapshot module Actions - # Removes stale data from repository. + # Clean up the snapshot repository. + # Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots. # - # @option arguments [String] :repository A repository name - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :repository The name of the snapshot repository to clean up. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+ Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. + # If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clean-up-snapshot-repo-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-cleanup-repository # def cleanup_repository(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'snapshot.cleanup_repository' } @@ -49,7 +54,7 @@ def cleanup_repository(arguments = {}) _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_POST - path = "_snapshot/#{Utils.__listify(_repository)}/_cleanup" + path = "_snapshot/#{Utils.listify(_repository)}/_cleanup" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb index 4771ebf213..925759ff51 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb @@ -15,28 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Snapshot module Actions - # Clones indices from one snapshot into another snapshot in the same repository. + # Clone a snapshot. + # Clone part of all of a snapshot into another snapshot in the same repository. # - # @option arguments [String] :repository A repository name - # @option arguments [String] :snapshot The name of the snapshot to clone from - # @option arguments [String] :target_snapshot The name of the cloned snapshot to create - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node + # @option arguments [String] :repository The name of the snapshot repository that both source and target snapshot belong to. (*Required*) + # @option arguments [String] :snapshot The source snapshot name. (*Required*) + # @option arguments [String] :target_snapshot The target snapshot name. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. + # @option arguments [Time] :timeout The period of time to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The snapshot clone definition (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-clone # def clone(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'snapshot.clone' } - defined_params = %i[repository snapshot target_snapshot].each_with_object({}) do |variable, set_variables| + defined_params = [:repository, :snapshot, :target_snapshot].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? @@ -58,7 +63,7 @@ def clone(arguments = {}) _target_snapshot = arguments.delete(:target_snapshot) method = Elasticsearch::API::HTTP_PUT - path = "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}/_clone/#{Utils.__listify(_target_snapshot)}" + path = "_snapshot/#{Utils.listify(_repository)}/#{Utils.listify(_snapshot)}/_clone/#{Utils.listify(_target_snapshot)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb index 7b6e01d725..a398e747b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb @@ -15,28 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Snapshot module Actions - # Creates a snapshot in a repository. + # Create a snapshot. + # Take a snapshot of a cluster or of data streams and indices. # - # @option arguments [String] :repository A repository name - # @option arguments [String] :snapshot A snapshot name - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning + # @option arguments [String] :repository The name of the repository for the snapshot. (*Required*) + # @option arguments [String] :snapshot The name of the snapshot. + # It supportes date math. + # It must be unique in the repository. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Boolean] :wait_for_completion If +true+, the request returns a response when the snapshot is complete. + # If +false+, the request returns a response when the snapshot initializes. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The snapshot definition + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create # def create(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'snapshot.create' } - defined_params = %i[repository snapshot].each_with_object({}) do |variable, set_variables| + defined_params = [:repository, :snapshot].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? @@ -54,7 +59,7 @@ def create(arguments = {}) _snapshot = arguments.delete(:snapshot) method = Elasticsearch::API::HTTP_PUT - path = "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}" + path = "_snapshot/#{Utils.listify(_repository)}/#{Utils.listify(_snapshot)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb index aa94f85ffe..6e90dedd7c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb @@ -15,23 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Snapshot module Actions - # Creates a repository. + # Create or update a snapshot repository. + # IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters. + # To register a snapshot repository, the cluster's global metadata must be writeable. + # Ensure there are no cluster blocks (for example, +cluster.blocks.read_only+ and +clsuter.blocks.read_only_allow_delete+ settings) that prevent write access. + # Several options for this API can be specified using a query parameter or a request body parameter. + # If both parameters are specified, only the query parameter is used. # - # @option arguments [String] :repository A repository name - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Boolean] :verify Whether to verify the repository after creation + # @option arguments [String] :repository The name of the snapshot repository to register or update. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. + # If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. + # @option arguments [Boolean] :verify If +true+, the request verifies the repository is functional on all master and data nodes in the cluster. + # If +false+, this verification is skipped. + # You can also perform this verification with the verify snapshot repository API. Server default: true. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The repository definition (*Required*) + # @option arguments [Hash] :body repository # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create-repository # def create_repository(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'snapshot.create_repository' } @@ -52,7 +63,7 @@ def create_repository(arguments = {}) _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_PUT - path = "_snapshot/#{Utils.__listify(_repository)}" + path = "_snapshot/#{Utils.listify(_repository)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb index 3489aad395..44bd6dc04a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb @@ -15,27 +15,29 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Snapshot module Actions - # Deletes one or more snapshots. + # Delete snapshots. # - # @option arguments [String] :repository A repository name - # @option arguments [List] :snapshot A comma-separated list of snapshot names - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning + # @option arguments [String] :repository The name of the repository to delete a snapshot from. (*Required*) + # @option arguments [String] :snapshot A comma-separated list of snapshot names to delete. + # It also accepts wildcards (+*+). (*Required*) + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-delete # def delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'snapshot.delete' } - defined_params = %i[repository snapshot].each_with_object({}) do |variable, set_variables| + defined_params = [:repository, :snapshot].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? @@ -53,11 +55,11 @@ def delete(arguments = {}) _snapshot = arguments.delete(:snapshot) method = Elasticsearch::API::HTTP_DELETE - path = "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}" + path = "_snapshot/#{Utils.listify(_repository)}/#{Utils.listify(_snapshot)}" params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb index c6168a3ff7..5cb0453cdb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb @@ -15,21 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Snapshot module Actions - # Deletes a repository. + # Delete snapshot repositories. + # When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. + # The snapshots themselves are left untouched and in place. # - # @option arguments [List] :repository Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported. - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String, Array] :repository The ame of the snapshot repositories to unregister. + # Wildcard (+*+) patterns are supported. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. + # If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-delete-repository # def delete_repository(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'snapshot.delete_repository' } @@ -49,11 +56,11 @@ def delete_repository(arguments = {}) _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_DELETE - path = "_snapshot/#{Utils.__listify(_repository)}" + path = "_snapshot/#{Utils.listify(_repository)}" params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb index fcb5af696b..a5bd37e8ec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb @@ -15,38 +15,56 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Snapshot module Actions - # Returns information about a snapshot. + # Get snapshot information. + # NOTE: The +after+ parameter and +next+ field enable you to iterate through snapshots with some consistency guarantees regarding concurrent creation or deletion of snapshots. + # It is guaranteed that any snapshot that exists at the beginning of the iteration and is not concurrently deleted will be seen during the iteration. + # Snapshots concurrently created may be seen during an iteration. # - # @option arguments [String] :repository A repository name - # @option arguments [List] :snapshot A comma-separated list of snapshot names - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown - # @option arguments [Boolean] :index_names Whether to include the name of each index in the snapshot. Defaults to true. - # @option arguments [Boolean] :index_details Whether to include details of each index in the snapshot, if those details are available. Defaults to false. - # @option arguments [Boolean] :include_repository Whether to include the repository name in the snapshot info. Defaults to true. - # @option arguments [String] :sort Allows setting a sort order for the result. Defaults to start_time (options: start_time, duration, name, repository, index_count, shard_count, failed_shard_count) - # @option arguments [Integer] :size Maximum number of snapshots to return. Defaults to 0 which means return all that match without limit. - # @option arguments [String] :order Sort order (options: asc, desc) - # @option arguments [String] :from_sort_value Value of the current sort column at which to start retrieval. - # @option arguments [String] :after Offset identifier to start pagination from as returned by the 'next' field in the response body. - # @option arguments [Integer] :offset Numeric offset to start pagination based on the snapshots matching the request. Defaults to 0 - # @option arguments [String] :slm_policy_filter Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Accepts wildcards. Use the special pattern '_none' to match snapshots without an SLM policy - # @option arguments [Boolean] :verbose Whether to show verbose snapshot info or only show the basic info found in the repository index blob + # @option arguments [String] :repository A comma-separated list of snapshot repository names used to limit the request. + # Wildcard (+*+) expressions are supported. (*Required*) + # @option arguments [String, Array] :snapshot A comma-separated list of snapshot names to retrieve + # Wildcards (+*+) are supported. + # - To get information about all snapshots in a registered repository, use a wildcard (+*+) or +_all+. + # - To get information about any snapshots that are currently running, use +_current+. (*Required*) + # @option arguments [String] :after An offset identifier to start pagination from as returned by the next field in the response body. + # @option arguments [String] :from_sort_value The value of the current sort column at which to start retrieval. + # It can be a string +snapshot-+ or a repository name when sorting by snapshot or repository name. + # It can be a millisecond time value or a number when sorting by +index-+ or shard count. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error for any snapshots that are unavailable. + # @option arguments [Boolean] :index_details If +true+, the response includes additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. + # The default is +false+, meaning that this information is omitted. + # @option arguments [Boolean] :index_names If +true+, the response includes the name of each index in each snapshot. Server default: true. + # @option arguments [Boolean] :include_repository If +true+, the response includes the repository name in each snapshot. Server default: true. + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [String] :order The sort order. + # Valid values are +asc+ for ascending and +desc+ for descending order. + # The default behavior is ascending order. Server default: asc. + # @option arguments [Integer] :offset Numeric offset to start pagination from based on the snapshots matching this request. Using a non-zero value for this parameter is mutually exclusive with using the after parameter. Defaults to 0. Server default: 0. + # @option arguments [Integer] :size The maximum number of snapshots to return. + # The default is 0, which means to return all that match the request without limit. Server default: 0. + # @option arguments [String] :slm_policy_filter Filter snapshots by a comma-separated list of snapshot lifecycle management (SLM) policy names that snapshots belong to.You can use wildcards (+*+) and combinations of wildcards followed by exclude patterns starting with +-+. + # For example, the pattern +*,-policy-a-\*+ will return all snapshots except for those that were created by an SLM policy with a name starting with +policy-a-+. + # Note that the wildcard pattern +*+ matches all snapshots created by an SLM policy but not those snapshots that were not created by an SLM policy. + # To include snapshots that were not created by an SLM policy, you can use the special pattern +_none+ that will match all snapshots without an SLM policy. + # @option arguments [String] :sort The sort order for the result. + # The default behavior is sorting by snapshot start time stamp. Server default: start_time. + # @option arguments [Boolean] :verbose If +true+, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted.NOTE: The parameters +size+, +order+, +after+, +from_sort_value+, +offset+, +slm_policy_filter+, and +sort+ are not supported when you set +verbose=false+ and the sort order for requests with +verbose=false+ is undefined. Server default: true. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-get # def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'snapshot.get' } - defined_params = %i[repository snapshot].each_with_object({}) do |variable, set_variables| + defined_params = [:repository, :snapshot].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? @@ -64,11 +82,11 @@ def get(arguments = {}) _snapshot = arguments.delete(:snapshot) method = Elasticsearch::API::HTTP_GET - path = "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}" + path = "_snapshot/#{Utils.listify(_repository)}/#{Utils.listify(_snapshot)}" params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb index 83f3983f5d..87aa3a1789 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb @@ -15,21 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Snapshot module Actions - # Returns information about a repository. + # Get snapshot repository information. # - # @option arguments [List] :repository A comma-separated list of repository names - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) + # @option arguments [String, Array] :repository A comma-separated list of snapshot repository names used to limit the request. + # Wildcard (+*+) expressions are supported including combining wildcards with exclude patterns starting with +-+.To get information about all snapshot repositories registered in the cluster, omit this parameter or use +*+ or +_all+. + # @option arguments [Boolean] :local If +true+, the request gets information from the local node only. + # If +false+, the request gets information from the master node. + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: to 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-get-repository # def get_repository(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'snapshot.get_repository' } @@ -48,14 +52,14 @@ def get_repository(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _repository - "_snapshot/#{Utils.__listify(_repository)}" + "_snapshot/#{Utils.listify(_repository)}" else '_snapshot' end params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb index 575313a411..0a77e940ae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb @@ -15,30 +15,111 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Snapshot module Actions - # Analyzes a repository for correctness and performance + # Analyze a snapshot repository. + # Analyze the performance characteristics and any incorrect behaviour found in a repository. + # The response exposes implementation details of the analysis which may change from version to version. + # The response body format is therefore not considered stable and may be different in newer versions. + # There are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch. + # Some storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do. This API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system. + # The default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations. + # Run your first analysis with the default parameter values to check for simple problems. + # If successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a +blob_count+ of at least +2000+, a +max_blob_size+ of at least +2gb+, a +max_total_data_size+ of at least +1tb+, and a +register_operation_count+ of at least +100+. + # Always specify a generous timeout, possibly +1h+ or longer, to allow time for each analysis to run to completion. + # Perform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once. + # If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly. + # This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support. + # If so, this storage system is not suitable for use as a snapshot repository. + # You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects. + # If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took. + # You can use this information to determine the performance of your storage system. + # If any operation fails or returns an incorrect result, the API returns an error. + # If the API returns an error, it may not have removed all the data it wrote to the repository. + # The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs. + # You should verify that this location has been cleaned up correctly. + # If there is still leftover data at the specified location, you should manually remove it. + # If the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled. + # Some clients are configured to close their connection if no response is received within a certain timeout. + # An analysis takes a long time to complete so you might need to relax any such client-side timeouts. + # On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all. + # The path to the leftover data is recorded in the Elasticsearch logs. + # You should verify that this location has been cleaned up correctly. + # If there is still leftover data at the specified location, you should manually remove it. + # If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed. + # The analysis attempts to detect common bugs but it does not offer 100% coverage. + # Additionally, it does not test the following: + # * Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster. + # * Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted. + # * Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results. + # IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again. + # This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself. + # You must ensure this load does not affect other users of these systems. + # Analyses respect the repository settings +max_snapshot_bytes_per_sec+ and +max_restore_bytes_per_sec+ if available and the cluster setting +indices.recovery.max_bytes_per_sec+ which you can use to limit the bandwidth they consume. + # NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. + # NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones. + # A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version. + # This indicates it behaves incorrectly in ways that the former version did not detect. + # You must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch. + # NOTE: This API may not work correctly in a mixed-version cluster. + # *Implementation details* + # NOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions. The request parameters and response format depend on details of the implementation so may also be different in newer versions. + # The analysis comprises a number of blob-level tasks, as set by the +blob_count+ parameter and a number of compare-and-exchange operations on linearizable registers, as set by the +register_operation_count+ parameter. + # These tasks are distributed over the data and master-eligible nodes in the cluster for execution. + # For most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote. + # The size of the blob is chosen randomly, according to the +max_blob_size+ and +max_total_data_size+ parameters. + # If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires. + # For some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes. + # These reads are permitted to fail, but must not return partial data. + # If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires. + # For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it. + # In this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs. + # If any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites. + # The executing node will use a variety of different methods to write the blob. + # For instance, where applicable, it will use both single-part and multi-part uploads. + # Similarly, the reading nodes will use a variety of different methods to read the data back again. + # For instance they may read the entire blob from start to end or may read only a subset of the data. + # For some blob-level tasks, the executing node will cancel the write before it is complete. + # In this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob. + # Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation. + # This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time. + # The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type. + # Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed. + # Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results. + # If an operation fails due to contention, Elasticsearch retries the operation until it succeeds. + # Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob. + # Some operations also verify the behavior on small blobs with sizes other than 8 bytes. # - # @option arguments [String] :repository A repository name - # @option arguments [Number] :blob_count Number of blobs to create during the test. Defaults to 100. - # @option arguments [Number] :concurrency Number of operations to run concurrently during the test. Defaults to 10. - # @option arguments [Number] :read_node_count Number of nodes on which to read a blob after writing. Defaults to 10. - # @option arguments [Number] :early_read_node_count Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the 'rare_action_probability' parameter is also relevant. Defaults to 2. - # @option arguments [Number] :seed Seed for the random number generator used to create the test workload. Defaults to a random value. - # @option arguments [Number] :rare_action_probability Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02. - # @option arguments [String] :max_blob_size Maximum size of a blob to create during the test, e.g '1gb' or '100mb'. Defaults to '10mb'. - # @option arguments [String] :max_total_data_size Maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'. - # @option arguments [Time] :timeout Explicit operation timeout. Defaults to '30s'. - # @option arguments [Boolean] :detailed Whether to return detailed results or a summary. Defaults to 'false' so that only the summary is returned. - # @option arguments [Boolean] :rarely_abort_writes Whether to rarely abort writes before they complete. Defaults to 'true'. + # @option arguments [String] :repository The name of the repository. (*Required*) + # @option arguments [Integer] :blob_count The total number of blobs to write to the repository during the test. + # For realistic experiments, you should set it to at least +2000+. Server default: 100. + # @option arguments [Integer] :concurrency The number of operations to run concurrently during the test. Server default: 10. + # @option arguments [Boolean] :detailed Indicates whether to return detailed results, including timing information for every operation performed during the analysis. + # If false, it returns only a summary of the analysis. + # @option arguments [Integer] :early_read_node_count The number of nodes on which to perform an early read operation while writing each blob. + # Early read operations are only rarely performed. Server default: 2. + # @option arguments [Integer, String] :max_blob_size The maximum size of a blob to be written during the test. + # For realistic experiments, you should set it to at least +2gb+. Server default: 10mb. + # @option arguments [Integer, String] :max_total_data_size An upper limit on the total size of all the blobs written during the test. + # For realistic experiments, you should set it to at least +1tb+. Server default: 1gb. + # @option arguments [Float] :rare_action_probability The probability of performing a rare action such as an early read, an overwrite, or an aborted write on each blob. Server default: 0.02. + # @option arguments [Boolean] :rarely_abort_writes Indicates whether to rarely cancel writes before they complete. Server default: true. + # @option arguments [Integer] :read_node_count The number of nodes on which to read a blob after writing. Server default: 10. + # @option arguments [Integer] :register_operation_count The minimum number of linearizable register operations to perform in total. + # For realistic experiments, you should set it to at least +100+. Server default: 10. + # @option arguments [Integer] :seed The seed for the pseudo-random number generator used to generate the list of operations performed during the test. + # To repeat the same set of operations in multiple experiments, use the same seed in each experiment. + # Note that the operations are performed concurrently so might not always happen in the same order on each run. + # @option arguments [Time] :timeout The period of time to wait for the test to complete. + # If no response is received before the timeout expires, the test is cancelled and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-repository-analyze # def repository_analyze(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'snapshot.repository_analyze' } @@ -58,7 +139,7 @@ def repository_analyze(arguments = {}) _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_POST - path = "_snapshot/#{Utils.__listify(_repository)}/_analyze" + path = "_snapshot/#{Utils.listify(_repository)}/_analyze" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb index 02e05a2114..cade7340f5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb @@ -15,28 +15,43 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Snapshot module Actions - # Restores a snapshot. + # Restore a snapshot. + # Restore a snapshot of a cluster or data streams and indices. + # You can restore a snapshot only to a running cluster with an elected master node. + # The snapshot repository must be registered and available to the cluster. + # The snapshot and cluster versions must be compatible. + # To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks. + # Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API: + # + + # GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream + # + + # If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices. + # If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot. # - # @option arguments [String] :repository A repository name - # @option arguments [String] :snapshot A snapshot name - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning + # @option arguments [String] :repository The name of the repository to restore a snapshot from. (*Required*) + # @option arguments [String] :snapshot The name of the snapshot to restore. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. + # @option arguments [Boolean] :wait_for_completion If +true+, the request returns a response when the restore operation completes. + # The operation is complete when it finishes all attempts to recover primary shards for restored indices. + # This applies even if one or more of the recovery attempts fail.If +false+, the request returns a response when the restore operation initializes. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Details of what to restore + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-restore # def restore(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'snapshot.restore' } - defined_params = %i[repository snapshot].each_with_object({}) do |variable, set_variables| + defined_params = [:repository, :snapshot].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? @@ -54,7 +69,7 @@ def restore(arguments = {}) _snapshot = arguments.delete(:snapshot) method = Elasticsearch::API::HTTP_POST - path = "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}/_restore" + path = "_snapshot/#{Utils.listify(_repository)}/#{Utils.listify(_snapshot)}/_restore" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb index d6fa97d5ea..d62a87b00c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb @@ -15,27 +15,44 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Snapshot module Actions - # Returns information about the status of a snapshot. + # Get the snapshot status. + # Get a detailed description of the current state for each shard participating in the snapshot. + # Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. + # If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API. + # If you omit the ++ request path parameter, the request retrieves information only for currently running snapshots. + # This usage is preferred. + # If needed, you can specify ++ and ++ to retrieve information for specific snapshots, even if they're not currently running. + # WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. + # The API requires a read from the repository for each shard in each snapshot. + # For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). + # Depending on the latency of your storage, such requests can take an extremely long time to return results. + # These requests can also tax machine resources and, when using cloud storage, incur high processing costs. # - # @option arguments [String] :repository A repository name - # @option arguments [List] :snapshot A comma-separated list of snapshot names - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown + # @option arguments [String] :repository The snapshot repository name used to limit the request. + # It supports wildcards (+*+) if ++ isn't specified. + # @option arguments [String, Array] :snapshot A comma-separated list of snapshots to retrieve status for. + # The default is currently running snapshots. + # Wildcards (+*+) are not supported. + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error for any snapshots that are unavailable. + # If +true+, the request ignores snapshots that are unavailable, such as those that are corrupted or temporarily cannot be returned. + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-status # def status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'snapshot.status' } - defined_params = %i[repository snapshot].each_with_object({}) do |variable, set_variables| + defined_params = [:repository, :snapshot].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? @@ -51,16 +68,16 @@ def status(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _repository && _snapshot - "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}/_status" + "_snapshot/#{Utils.listify(_repository)}/#{Utils.listify(_snapshot)}/_status" elsif _repository - "_snapshot/#{Utils.__listify(_repository)}/_status" + "_snapshot/#{Utils.listify(_repository)}/_status" else '_snapshot/_status' end params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb index 335d962d3c..35d5b2a751 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb @@ -15,21 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Snapshot module Actions - # Verifies a repository. + # Verify a snapshot repository. + # Check for common misconfigurations in a snapshot repository. # - # @option arguments [String] :repository A repository name - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :repository The name of the snapshot repository to verify. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. + # If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-verify-repository # def verify_repository(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'snapshot.verify_repository' } @@ -49,7 +54,7 @@ def verify_repository(arguments = {}) _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_POST - path = "_snapshot/#{Utils.__listify(_repository)}/_verify" + path = "_snapshot/#{Utils.listify(_repository)}/_verify" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb index 96088812ca..2e2646c249 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb @@ -15,21 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SnapshotLifecycleManagement module Actions - # Deletes an existing snapshot lifecycle policy. + # Delete a policy. + # Delete a snapshot lifecycle policy definition. + # This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots. # - # @option arguments [String] :policy_id The id of the snapshot lifecycle policy to remove - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :policy_id The id of the snapshot lifecycle policy to remove (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-delete-lifecycle # def delete_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.delete_lifecycle' } @@ -49,7 +53,7 @@ def delete_lifecycle(arguments = {}) _policy_id = arguments.delete(:policy_id) method = Elasticsearch::API::HTTP_DELETE - path = "_slm/policy/#{Utils.__listify(_policy_id)}" + path = "_slm/policy/#{Utils.listify(_policy_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb index de3210fc9a..bf07a5a396 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb @@ -15,21 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SnapshotLifecycleManagement module Actions - # Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time. + # Run a policy. + # Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. + # The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance. # - # @option arguments [String] :policy_id The id of the snapshot lifecycle policy to be executed - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :policy_id The id of the snapshot lifecycle policy to be executed (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-execute-lifecycle # def execute_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.execute_lifecycle' } @@ -49,7 +53,7 @@ def execute_lifecycle(arguments = {}) _policy_id = arguments.delete(:policy_id) method = Elasticsearch::API::HTTP_PUT - path = "_slm/policy/#{Utils.__listify(_policy_id)}/_execute" + path = "_slm/policy/#{Utils.listify(_policy_id)}/_execute" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb index 6a16a045ef..66ea76d8a2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb @@ -15,20 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SnapshotLifecycleManagement module Actions - # Deletes any snapshots that are expired according to the policy's retention rules. + # Run a retention policy. + # Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. + # The retention policy is normally applied according to its schedule. # - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-execute-retention # def execute_retention(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.execute_retention' } @@ -36,7 +40,7 @@ def execute_retention(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_slm/_execute_retention' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb index a697d0624f..d6888ebc34 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb @@ -15,21 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SnapshotLifecycleManagement module Actions - # Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts. + # Get policy information. + # Get snapshot lifecycle policy definitions and information about the latest snapshot attempts. # - # @option arguments [List] :policy_id Comma-separated list of snapshot lifecycle policies to retrieve - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String, Array] :policy_id Comma-separated list of snapshot lifecycle policies to retrieve + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-lifecycle # def get_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.get_lifecycle' } @@ -48,7 +51,7 @@ def get_lifecycle(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _policy_id - "_slm/policy/#{Utils.__listify(_policy_id)}" + "_slm/policy/#{Utils.listify(_policy_id)}" else '_slm/policy' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb index 2a80670fa1..3f26c45fab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb @@ -15,20 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SnapshotLifecycleManagement module Actions - # Returns global and policy-level statistics about actions taken by snapshot lifecycle management. + # Get snapshot lifecycle management statistics. + # Get global and policy-level statistics about actions taken by snapshot lifecycle management. # - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-stats # def get_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.get_stats' } @@ -36,7 +37,7 @@ def get_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_slm/stats' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb index 5e2172e4c2..cada77a855 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb @@ -15,20 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SnapshotLifecycleManagement module Actions - # Retrieves the status of snapshot lifecycle management (SLM). + # Get the snapshot lifecycle management status. # - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-status # def get_status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.get_status' } @@ -36,7 +40,7 @@ def get_status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_slm/status' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb index 23e3d41bda..6260834677 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb @@ -15,22 +15,29 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SnapshotLifecycleManagement module Actions - # Creates or updates a snapshot lifecycle policy. + # Create or update a policy. + # Create or update a snapshot lifecycle policy. + # If the policy already exists, this request increments the policy version. + # Only the latest version of a policy is stored. # - # @option arguments [String] :policy_id The id of the snapshot lifecycle policy - # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :policy_id The identifier for the snapshot lifecycle policy you want to create or update. (*Required*) + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The snapshot lifecycle policy definition to register + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-put-lifecycle # def put_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.put_lifecycle' } @@ -50,7 +57,7 @@ def put_lifecycle(arguments = {}) _policy_id = arguments.delete(:policy_id) method = Elasticsearch::API::HTTP_PUT - path = "_slm/policy/#{Utils.__listify(_policy_id)}" + path = "_slm/policy/#{Utils.listify(_policy_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb index 7e5a1d73bf..00d132d571 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb @@ -15,20 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SnapshotLifecycleManagement module Actions - # Turns on snapshot lifecycle management (SLM). + # Start snapshot lifecycle management. + # Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. + # Manually starting SLM is necessary only if it has been stopped using the stop SLM API. # - # @option arguments [Time] :master_timeout Timeout for processing on master node - # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-start # def start(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.start' } @@ -36,7 +42,7 @@ def start(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_slm/start' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb index d5dbab1d1e..b2eba1d5f8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb @@ -15,20 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SnapshotLifecycleManagement module Actions - # Turns off snapshot lifecycle management (SLM). + # Stop snapshot lifecycle management. + # Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. + # This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices. + # Stopping SLM does not stop any snapshots that are in progress. + # You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped. + # The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. + # Use the get snapshot lifecycle management status API to see if SLM is running. # - # @option arguments [Time] :master_timeout Timeout for processing on master node - # @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-stop # def stop(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.stop' } @@ -36,7 +46,7 @@ def stop(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_slm/stop' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb index c9ff2560fe..c7c6dfe84a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb @@ -15,19 +15,19 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SQL module Actions - # Clears the SQL cursor + # Clear an SQL search cursor. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Specify the cursor value in the `cursor` element to clean the cursor. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-sql-cursor-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-clear-cursor # def clear_cursor(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'sql.clear_cursor' } @@ -37,7 +37,7 @@ def clear_cursor(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_sql/close' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb index 06b0b77f9d..052c0a5ba4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb @@ -15,19 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SQL module Actions - # Deletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it. + # Delete an async SQL search. + # Delete an async SQL search or a stored synchronous SQL search. + # If the search is still running, the API cancels it. + # If the Elasticsearch security features are enabled, only the following users can use this API to delete a search: + # * Users with the +cancel_task+ cluster privilege. + # * The user who first submitted the search. # - # @option arguments [String] :id The async search ID + # @option arguments [String] :id The identifier for the search. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-async-sql-search-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-delete-async # def delete_async(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'sql.delete_async' } @@ -47,7 +52,7 @@ def delete_async(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE - path = "_sql/async/delete/#{Utils.__listify(_id)}" + path = "_sql/async/delete/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb index c1eb5685ea..0622304942 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb @@ -15,23 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SQL module Actions - # Returns the current status and available results for an async SQL search or stored synchronous SQL search + # Get async SQL search results. + # Get the current status and available results for an async SQL search or stored synchronous SQL search. + # If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API. # - # @option arguments [String] :id The async search ID - # @option arguments [String] :delimiter Separator for CSV results - # @option arguments [String] :format Short version of the Accept header, e.g. json, yaml - # @option arguments [Time] :keep_alive Retention period for the search and its results - # @option arguments [Time] :wait_for_completion_timeout Duration to wait for complete results + # @option arguments [String] :id The identifier for the search. (*Required*) + # @option arguments [String] :delimiter The separator for CSV results. + # The API supports this parameter only for CSV responses. Server default: ,. + # @option arguments [String] :format The format for the response. + # You must specify a format using this parameter or the +Accept+ HTTP header. + # If you specify both, the API uses this parameter. + # @option arguments [Time] :keep_alive The retention period for the search and its results. + # It defaults to the +keep_alive+ period for the original SQL search. + # @option arguments [Time] :wait_for_completion_timeout The period to wait for complete results. + # It defaults to no timeout, meaning the request waits for complete search results. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-get-async # def get_async(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'sql.get_async' } @@ -51,7 +58,7 @@ def get_async(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET - path = "_sql/async/#{Utils.__listify(_id)}" + path = "_sql/async/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb index a217d9fdae..aba738f988 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb @@ -15,19 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SQL module Actions - # Returns the current status of an async SQL search or a stored synchronous SQL search + # Get the async SQL search status. + # Get the current status of an async SQL search or a stored synchronous SQL search. # - # @option arguments [String] :id The async search ID + # @option arguments [String] :id The identifier for the search. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-status-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-get-async-status # def get_async_status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'sql.get_async_status' } @@ -47,7 +48,7 @@ def get_async_status(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET - path = "_sql/async/status/#{Utils.__listify(_id)}" + path = "_sql/async/status/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb index 7a187a5107..fd4de3da75 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb @@ -15,20 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SQL module Actions - # Executes a SQL request + # Get SQL search results. + # Run an SQL request. # - # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml + # @option arguments [String] :format The format for the response. + # You can also specify a format using the +Accept+ HTTP header. + # If you specify both this parameter and the +Accept+ HTTP header, this parameter takes precedence. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Use the `query` element to start a query. Use the `cursor` element to continue a query. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-query # def query(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'sql.query' } @@ -38,7 +41,7 @@ def query(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_sql' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb index 1f872caf67..2064f4e3a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb @@ -15,19 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SQL module Actions - # Translates SQL into Elasticsearch queries + # Translate SQL into Elasticsearch queries. + # Translate an SQL search into a search API request containing Query DSL. + # It accepts the same request body parameters as the SQL search API, excluding +cursor+. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Specify the query in the `query` element. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-translate # def translate(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'sql.translate' } @@ -37,7 +39,7 @@ def translate(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_sql/translate' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb index 004f33c185..2b27c9a165 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb @@ -15,18 +15,28 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module SSL module Actions - # Retrieves information about the X.509 certificates used to encrypt communications in the cluster. + # Get SSL certificates. + # Get information about the X.509 certificates that are used to encrypt communications in the cluster. + # The API returns a list that includes certificates from all TLS contexts including: + # - Settings for transport and HTTP interfaces + # - TLS settings that are used within authentication realms + # - TLS settings for remote monitoring exporters + # The list includes certificates that are used for configuring trust, such as those configured in the +xpack.security.transport.ssl.truststore+ and +xpack.security.transport.ssl.certificate_authorities+ settings. + # It also includes certificates that are used for configuring server identity, such as +xpack.security.http.ssl.keystore+ and +xpack.security.http.ssl.certificate settings+. + # The list does not include certificates that are sourced from the default SSL context of the Java Runtime Environment (JRE), even if those certificates are in use within Elasticsearch. + # NOTE: When a PKCS#11 token is configured as the truststore of the JRE, the API returns all the certificates that are included in the PKCS#11 token irrespective of whether these are used in the Elasticsearch TLS configuration. + # If Elasticsearch is configured to use a keystore or truststore, the API output includes all certificates in that store, even though some of the certificates might not be in active use within the cluster. # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ssl-certificates # def certificates(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ssl.certificates' } @@ -34,7 +44,7 @@ def certificates(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_ssl/certificates' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb index 9d91211e7a..11bd143164 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb @@ -15,19 +15,31 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Synonyms module Actions - # Deletes a synonym set + # Delete a synonym set. + # You can only delete a synonyms set that is not in use by any index analyzer. + # Synonyms sets can be used in synonym graph token filters and synonym token filters. + # These synonym filters can be used as part of search analyzers. + # Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open). + # Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase. + # If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available. + # To prevent that, synonyms sets that are used in analyzers can't be deleted. + # A delete request in this case will return a 400 response code. + # To remove a synonyms set, you must first remove all indices that contain analyzers using it. + # You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data. + # Once finished, you can delete the index. + # When the synonyms set is not used in analyzers, you will be able to delete it. # - # @option arguments [String] :id The id of the synonyms set to be deleted + # @option arguments [String] :id The synonyms set identifier to delete. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonyms-set.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym # def delete_synonym(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'synonyms.delete_synonym' } @@ -47,7 +59,7 @@ def delete_synonym(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE - path = "_synonyms/#{Utils.__listify(_id)}" + path = "_synonyms/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb index 26183609b4..479c7f3521 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb @@ -15,25 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Synonyms module Actions - # Deletes a synonym rule in a synonym set + # Delete a synonym rule. + # Delete a synonym rule from a synonym set. # - # @option arguments [String] :set_id The id of the synonym set to be updated - # @option arguments [String] :rule_id The id of the synonym rule to be deleted + # @option arguments [String] :set_id The ID of the synonym set to update. (*Required*) + # @option arguments [String] :rule_id The ID of the synonym rule to delete. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonym-rule.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule # def delete_synonym_rule(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'synonyms.delete_synonym_rule' } - defined_params = %i[set_id rule_id].each_with_object({}) do |variable, set_variables| + defined_params = [:set_id, :rule_id].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? @@ -51,7 +52,7 @@ def delete_synonym_rule(arguments = {}) _rule_id = arguments.delete(:rule_id) method = Elasticsearch::API::HTTP_DELETE - path = "_synonyms/#{Utils.__listify(_set_id)}/#{Utils.__listify(_rule_id)}" + path = "_synonyms/#{Utils.listify(_set_id)}/#{Utils.listify(_rule_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb index c09fddeac4..caaf07bb49 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb @@ -15,21 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Synonyms module Actions - # Retrieves a synonym set + # Get a synonym set. # - # @option arguments [String] :id The name of the synonyms set to be retrieved - # @option arguments [Integer] :from Starting offset - # @option arguments [Integer] :size specifies a max number of results to get + # @option arguments [String] :id The synonyms set identifier to retrieve. (*Required*) + # @option arguments [Integer] :from The starting offset for query rules to retrieve. Server default: 0. + # @option arguments [Integer] :size The max number of query rules to retrieve. Server default: 10. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonyms-set.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym # def get_synonym(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'synonyms.get_synonym' } @@ -49,7 +49,7 @@ def get_synonym(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET - path = "_synonyms/#{Utils.__listify(_id)}" + path = "_synonyms/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb index 59769ec746..fec5854a14 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb @@ -15,25 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Synonyms module Actions - # Retrieves a synonym rule from a synonym set + # Get a synonym rule. + # Get a synonym rule from a synonym set. # - # @option arguments [String] :set_id The id of the synonym set to retrieve the synonym rule from - # @option arguments [String] :rule_id The id of the synonym rule to retrieve + # @option arguments [String] :set_id The ID of the synonym set to retrieve the synonym rule from. (*Required*) + # @option arguments [String] :rule_id The ID of the synonym rule to retrieve. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonym-rule.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule # def get_synonym_rule(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'synonyms.get_synonym_rule' } - defined_params = %i[set_id rule_id].each_with_object({}) do |variable, set_variables| + defined_params = [:set_id, :rule_id].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? @@ -51,7 +52,7 @@ def get_synonym_rule(arguments = {}) _rule_id = arguments.delete(:rule_id) method = Elasticsearch::API::HTTP_GET - path = "_synonyms/#{Utils.__listify(_set_id)}/#{Utils.__listify(_rule_id)}" + path = "_synonyms/#{Utils.listify(_set_id)}/#{Utils.listify(_rule_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb index 3580303fb4..cce4b22e61 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb @@ -15,20 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Synonyms module Actions - # Retrieves a summary of all defined synonym sets + # Get all synonym sets. + # Get a summary of all defined synonym sets. # - # @option arguments [Integer] :from Starting offset - # @option arguments [Integer] :size specifies a max number of results to get + # @option arguments [Integer] :from The starting offset for synonyms sets to retrieve. Server default: 0. + # @option arguments [Integer] :size The maximum number of synonyms sets to retrieve. Server default: 10. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-synonyms-sets.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym # def get_synonyms_sets(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'synonyms.get_synonyms_sets' } @@ -36,7 +37,7 @@ def get_synonyms_sets(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_synonyms' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb index 99a76d6515..2f4e788060 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb @@ -15,20 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Synonyms module Actions - # Creates or updates a synonyms set + # Create or update a synonym set. + # Synonyms sets are limited to a maximum of 10,000 synonym rules per set. + # If you need to manage more synonym rules, you can create multiple synonym sets. + # When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices. + # This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set. # - # @option arguments [String] :id The id of the synonyms set to be created or updated + # @option arguments [String] :id The ID of the synonyms set to be created or updated. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Synonyms set rules (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonyms-set.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym # def put_synonym(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'synonyms.put_synonym' } @@ -49,7 +53,7 @@ def put_synonym(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT - path = "_synonyms/#{Utils.__listify(_id)}" + path = "_synonyms/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb index cc7804380e..f73755d617 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb @@ -15,26 +15,29 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Synonyms module Actions - # Creates or updates a synonym rule in a synonym set + # Create or update a synonym rule. + # Create or update a synonym rule in a synonym set. + # If any of the synonym rules included is invalid, the API returns an error. + # When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule. # - # @option arguments [String] :set_id The id of the synonym set to be updated with the synonym rule - # @option arguments [String] :rule_id The id of the synonym rule to be updated or created + # @option arguments [String] :set_id The ID of the synonym set. (*Required*) + # @option arguments [String] :rule_id The ID of the synonym rule to be updated or created. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Synonym rule (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonym-rule.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym-rule # def put_synonym_rule(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'synonyms.put_synonym_rule' } - defined_params = %i[set_id rule_id].each_with_object({}) do |variable, set_variables| + defined_params = [:set_id, :rule_id].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? @@ -53,7 +56,7 @@ def put_synonym_rule(arguments = {}) _rule_id = arguments.delete(:rule_id) method = Elasticsearch::API::HTTP_PUT - path = "_synonyms/#{Utils.__listify(_set_id)}/#{Utils.__listify(_rule_id)}" + path = "_synonyms/#{Utils.listify(_set_id)}/#{Utils.listify(_rule_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb index 9ce81d2afc..dd20ab97d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb @@ -15,27 +15,35 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Tasks module Actions - # Cancels a task, if it can be cancelled through an API. + # Cancel a task. + # WARNING: The task management API is new and should still be considered a beta feature. + # The API may change in ways that are not backwards compatible. + # A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. + # It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. + # The get task information API will continue to list these cancelled tasks until they complete. + # The cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible. + # To troubleshoot why a cancelled task does not complete promptly, use the get task information API with the +?detailed+ parameter to identify the other tasks the system is running. + # You can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :task_id Cancel the task with specified task id (node_id:task_number) - # @option arguments [List] :nodes A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - # @option arguments [List] :actions A comma-separated list of actions that should be cancelled. Leave empty to cancel all. - # @option arguments [String] :parent_task_id Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. - # @option arguments [Boolean] :wait_for_completion Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false + # @option arguments [String, Integer] :task_id The task identifier. + # @option arguments [String] :actions A comma-separated list or wildcard expression of actions that is used to limit the request. + # @option arguments [Array] :nodes A comma-separated list of node IDs or names that is used to limit the request. + # @option arguments [String] :parent_task_id A parent task ID that is used to limit the tasks. + # @option arguments [Boolean] :wait_for_completion If true, the request blocks until all found tasks are complete. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks # def cancel(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'tasks.cancel' } @@ -54,7 +62,7 @@ def cancel(arguments = {}) method = Elasticsearch::API::HTTP_POST path = if _task_id - "_tasks/#{Utils.__listify(_task_id)}/_cancel" + "_tasks/#{Utils.listify(_task_id)}/_cancel" else '_tasks/_cancel' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb index 49f700537a..4ab7f321fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb @@ -15,25 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Tasks module Actions - # Returns information about a task. + # Get task information. + # Get information about a task currently running in the cluster. + # WARNING: The task management API is new and should still be considered a beta feature. + # The API may change in ways that are not backwards compatible. + # If the task identifier is not found, a 404 response code indicates that there are no resources that match the request. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String] :task_id Return the task with specified id (node_id:task_number) - # @option arguments [Boolean] :wait_for_completion Wait for the matching tasks to complete (default: false) - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :task_id The task identifier. (*Required*) + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the task has completed. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks # def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'tasks.get' } @@ -43,6 +48,8 @@ def get(arguments = {}) end request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} @@ -51,7 +58,7 @@ def get(arguments = {}) _task_id = arguments.delete(:task_id) method = Elasticsearch::API::HTTP_GET - path = "_tasks/#{Utils.__listify(_task_id)}" + path = "_tasks/#{Utils.listify(_task_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb index 52c522cbea..97ced16659 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb @@ -15,29 +15,87 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Tasks module Actions - # Returns a list of tasks. + # Get all tasks. + # Get information about the tasks currently running on one or more nodes in the cluster. + # WARNING: The task management API is new and should still be considered a beta feature. + # The API may change in ways that are not backwards compatible. + # **Identifying running tasks** + # The +X-Opaque-Id header+, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information. + # This enables you to track certain calls or associate certain tasks with the client that started them. + # For example: + # + + # curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents" + # + + # The API returns the following result: + # + + # HTTP/1.1 200 OK + # X-Opaque-Id: 123456 + # content-type: application/json; charset=UTF-8 + # content-length: 831 + # { + # "tasks" : { + # "u5lcZHqcQhu-rUoFaqDphA:45" : { + # "node" : "u5lcZHqcQhu-rUoFaqDphA", + # "id" : 45, + # "type" : "transport", + # "action" : "cluster:monitor/tasks/lists", + # "start_time_in_millis" : 1513823752749, + # "running_time_in_nanos" : 293139, + # "cancellable" : false, + # "headers" : { + # "X-Opaque-Id" : "123456" + # }, + # "children" : [ + # { + # "node" : "u5lcZHqcQhu-rUoFaqDphA", + # "id" : 46, + # "type" : "direct", + # "action" : "cluster:monitor/tasks/lists[n]", + # "start_time_in_millis" : 1513823752750, + # "running_time_in_nanos" : 92133, + # "cancellable" : false, + # "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", + # "headers" : { + # "X-Opaque-Id" : "123456" + # } + # } + # ] + # } + # } + # } + # + + # In this example, +X-Opaque-Id: 123456+ is the ID as a part of the response header. + # The +X-Opaque-Id+ in the task +headers+ is the ID for the task that was initiated by the REST request. + # The +X-Opaque-Id+ in the children +headers+ is the child task of the task that was initiated by the REST request. # This functionality is Experimental and may be changed or removed # completely in a future release. Elastic will take a best effort approach # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [List] :nodes A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - # @option arguments [List] :actions A comma-separated list of actions that should be returned. Leave empty to return all. - # @option arguments [Boolean] :detailed Return detailed task information (default: false) - # @option arguments [String] :parent_task_id Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. - # @option arguments [Boolean] :wait_for_completion Wait for the matching tasks to complete (default: false) - # @option arguments [String] :group_by Group tasks by nodes or parent/child relationships (options: nodes, parents, none) - # @option arguments [Time] :timeout Explicit operation timeout + # @option arguments [String] :actions A comma-separated list or wildcard expression of actions used to limit the request. + # For example, you can use +cluser:*+ to retrieve all cluster-related tasks. + # @option arguments [Boolean] :detailed If +true+, the response includes detailed information about the running tasks. + # This information is useful to distinguish tasks from each other but is more costly to run. + # @option arguments [String] :group_by A key that is used to group tasks in the response. + # The task lists can be grouped either by nodes or by parent tasks. + # @option arguments [String, Array] :nodes A comma-separated list of node IDs or names that is used to limit the returned information. + # @option arguments [String] :parent_task_id A parent task identifier that is used to limit returned information. + # To return all tasks, omit this parameter or use a value of +-1+. + # If the parent task is not found, the API does not return a 404 response code. + # @option arguments [Time] :timeout The period to wait for each node to respond. + # If a node does not respond before its timeout expires, the response does not include its information. + # However, timed out nodes are included in the +node_failures+ property. Server default: 30s. + # @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the operation is complete. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks # def list(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'tasks.list' } @@ -45,7 +103,7 @@ def list(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_tasks' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb index 93cbc80f7e..6b0c1d731e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb @@ -15,19 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # The terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios. + # Get terms in an index. + # Discover terms that match a partial string in an index. + # This API is designed for low-latency look-ups used in auto-complete scenarios. # - # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + # @option arguments [String] :index A comma-separated list of data streams, indices, and index aliases to search. + # Wildcard (+*+) expressions are supported. + # To search all data streams or indices, omit this parameter or use +*+ or +_all+. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body field name, string which is the prefix expected in matching terms, timeout and size for max number of results + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-terms-enum # def terms_enum(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'terms_enum' } @@ -52,7 +56,7 @@ def terms_enum(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "#{Utils.__listify(_index)}/_terms_enum" + path = "#{Utils.listify(_index)}/_terms_enum" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb index 8b834d9ab6..75508e31fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb @@ -15,36 +15,63 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Returns information and statistics about terms in the fields of a particular document. + # Get term vector information. + # Get information and statistics about terms in the fields of a particular document. + # You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. + # You can specify the fields you are interested in through the +fields+ parameter or by adding the fields to the request body. + # For example: + # + + # GET /my-index-000001/_termvectors/1?fields=message + # + + # Fields can be specified using wildcards, similar to the multi match query. + # Term vectors are real-time by default, not near real-time. + # This can be changed by setting +realtime+ parameter to +false+. + # You can request three types of values: _term information_, _term statistics_, and _field statistics_. + # By default, all term information and field statistics are returned for all fields but term statistics are excluded. + # **Term information** + # * term frequency in the field (always returned) + # * term positions (+positions: true+) + # * start and end offsets (+offsets: true+) + # * term payloads (+payloads: true+), as base64 encoded bytes + # If the requested information wasn't stored in the index, it will be computed on the fly if possible. + # Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. # - # @option arguments [String] :index The index in which the document resides. - # @option arguments [String] :id The id of the document, when not specified a doc param should be supplied. - # @option arguments [Boolean] :term_statistics Specifies if total term frequency and document frequency should be returned. - # @option arguments [Boolean] :field_statistics Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. - # @option arguments [List] :fields A comma-separated list of fields to return. - # @option arguments [Boolean] :offsets Specifies if term offsets should be returned. - # @option arguments [Boolean] :positions Specifies if term positions should be returned. - # @option arguments [Boolean] :payloads Specifies if term payloads should be returned. - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random). - # @option arguments [String] :routing Specific routing value. - # @option arguments [Boolean] :realtime Specifies if request is real-time as opposed to near-real-time (default: true). - # @option arguments [Number] :version Explicit version number for concurrency control - # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) + # @option arguments [String] :index The name of the index that contains the document. (*Required*) + # @option arguments [String] :id A unique identifier for the document. + # @option arguments [String, Array] :fields A comma-separated list or wildcard expressions of fields to include in the statistics. + # It is used as the default list unless a specific field list is provided in the +completion_fields+ or +fielddata_fields+ parameters. + # @option arguments [Boolean] :field_statistics If +true+, the response includes: + # - The document count (how many documents contain this field). + # - The sum of document frequencies (the sum of document frequencies for all terms in this field). + # - The sum of total term frequencies (the sum of total term frequencies of each term in this field). Server default: true. + # @option arguments [Boolean] :offsets If +true+, the response includes term offsets. Server default: true. + # @option arguments [Boolean] :payloads If +true+, the response includes term payloads. Server default: true. + # @option arguments [Boolean] :positions If +true+, the response includes term positions. Server default: true. + # @option arguments [String] :preference The node or shard the operation should be performed on. + # It is random by default. + # @option arguments [Boolean] :realtime If true, the request is real-time as opposed to near-real-time. Server default: true. + # @option arguments [String] :routing A custom value that is used to route operations to a specific shard. + # @option arguments [Boolean] :term_statistics If +true+, the response includes: + # - The total term frequency (how often a term occurs in all documents). + # - The document frequency (the number of documents containing the current term). + # By default these values are not returned since term statistics can have a serious performance impact. + # @option arguments [Integer] :version If +true+, returns the document version as part of a hit. + # @option arguments [String] :version_type The version type. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Define parameters and or supply a document to get termvectors for. See documentation. + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-termvectors # def termvectors(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'termvectors' } - defined_params = %i[index id].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :id].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? @@ -68,9 +95,9 @@ def termvectors(arguments = {}) arguments.delete(:endpoint) path = if _index && _id - "#{Utils.__listify(_index)}/_termvectors/#{Utils.__listify(_id)}" + "#{Utils.listify(_index)}/_termvectors/#{Utils.listify(_id)}" else - "#{Utils.__listify(_index)}/_termvectors" + "#{Utils.listify(_index)}/_termvectors" end params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb index 8464acff62..f4137ad0a4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb @@ -15,32 +15,95 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module TextStructure module Actions - # Finds the structure of a text field in an index. + # Find the structure of a text field. + # Find the structure of a text field in an Elasticsearch index. + # This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. + # For example, if you have ingested data into a very simple index that has just +@timestamp+ and message fields, you can use this API to see what common structure exists in the message field. + # The response from the API contains: + # * Sample messages. + # * Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + # * Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + # * Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + # All this information can be calculated by the structure finder with no guidance. + # However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + # If the structure finder produces unexpected results, specify the +explain+ query parameter and an explanation will appear in the response. + # It helps determine why the returned structure was chosen. # - # @option arguments [String] :index The index containing the analyzed field (*Required*) - # @option arguments [String] :field The field that should be analyzed (*Required*) - # @option arguments [Integer] :documents_to_sample How many documents should be included in the analysis - # @option arguments [Time] :timeout Timeout after which the analysis will be aborted - # @option arguments [String] :format Optional parameter to specify the high level file format (options: ndjson, xml, delimited, semi_structured_text) - # @option arguments [List] :column_names Optional parameter containing a comma separated list of the column names for a delimited file - # @option arguments [String] :delimiter Optional parameter to specify the delimiter character for a delimited file - must be a single character - # @option arguments [String] :quote Optional parameter to specify the quote character for a delimited file - must be a single character - # @option arguments [Boolean] :should_trim_fields Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them - # @option arguments [String] :grok_pattern Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file - # @option arguments [String] :ecs_compatibility Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled' - # @option arguments [String] :timestamp_field Optional parameter to specify the timestamp field in the file - # @option arguments [String] :timestamp_format Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format - # @option arguments [Boolean] :explain Whether to include a commentary on how the structure was derived + # @option arguments [String] :column_names If +format+ is set to +delimited+, you can specify the column names in a comma-separated list. + # If this parameter is not specified, the structure finder uses the column names from the header row of the text. + # If the text does not have a header row, columns are named "column1", "column2", "column3", for example. + # @option arguments [String] :delimiter If you have set +format+ to +delimited+, you can specify the character used to delimit the values in each row. + # Only a single character is supported; the delimiter cannot have multiple characters. + # By default, the API considers the following possibilities: comma, tab, semi-colon, and pipe (+|+). + # In this default scenario, all rows must have the same number of fields for the delimited format to be detected. + # If you specify a delimiter, up to 10% of the rows can have a different number of columns than the first row. + # @option arguments [Integer] :documents_to_sample The number of documents to include in the structural analysis. + # The minimum value is 2. Server default: 1000. + # @option arguments [String] :ecs_compatibility The mode of compatibility with ECS compliant Grok patterns. + # Use this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern. + # This setting primarily has an impact when a whole message Grok pattern such as +%{CATALINALOG}+ matches the input. + # If the structure finder identifies a common structure but has no idea of the meaning then generic field names such as +path+, +ipaddress+, +field1+, and +field2+ are used in the +grok_pattern+ output. + # The intention in that situation is that a user who knows the meanings will rename the fields before using them. Server default: disabled. + # @option arguments [Boolean] :explain If +true+, the response includes a field named +explanation+, which is an array of strings that indicate how the structure finder produced its result. + # @option arguments [String] :field The field that should be analyzed. (*Required*) + # @option arguments [String] :format The high level structure of the text. + # By default, the API chooses the format. + # In this default scenario, all rows must have the same number of fields for a delimited format to be detected. + # If the format is set to delimited and the delimiter is not set, however, the API tolerates up to 5% of rows that have a different number of columns than the first row. + # @option arguments [String] :grok_pattern If the format is +semi_structured_text+, you can specify a Grok pattern that is used to extract fields from every message in the text. + # The name of the timestamp field in the Grok pattern must match what is specified in the +timestamp_field+ parameter. + # If that parameter is not specified, the name of the timestamp field in the Grok pattern must match "timestamp". + # If +grok_pattern+ is not specified, the structure finder creates a Grok pattern. + # @option arguments [String] :index The name of the index that contains the analyzed field. (*Required*) + # @option arguments [String] :quote If the format is +delimited+, you can specify the character used to quote the values in each row if they contain newlines or the delimiter character. + # Only a single character is supported. + # If this parameter is not specified, the default value is a double quote (+"+). + # If your delimited text format does not use quoting, a workaround is to set this argument to a character that does not appear anywhere in the sample. + # @option arguments [Boolean] :should_trim_fields If the format is +delimited+, you can specify whether values between delimiters should have whitespace trimmed from them. + # If this parameter is not specified and the delimiter is pipe (+|+), the default value is true. + # Otherwise, the default value is +false+. + # @option arguments [Time] :timeout The maximum amount of time that the structure analysis can take. + # If the analysis is still running when the timeout expires, it will be stopped. Server default: 25s. + # @option arguments [String] :timestamp_field The name of the field that contains the primary timestamp of each record in the text. + # In particular, if the text was ingested into an index, this is the field that would be used to populate the +@timestamp+ field.If the format is +semi_structured_text+, this field must match the name of the appropriate extraction in the +grok_pattern+. + # Therefore, for semi-structured text, it is best not to specify this parameter unless +grok_pattern+ is also specified.For structured text, if you specify this parameter, the field must exist within the text.If this parameter is not specified, the structure finder makes a decision about which field (if any) is the primary timestamp field. + # For structured text, it is not compulsory to have a timestamp in the text. + # @option arguments [String] :timestamp_format The Java time format of the timestamp field in the text. + # Only a subset of Java time format letter groups are supported: + # - +a+ + # - +d+ + # - +dd+ + # - +EEE+ + # - +EEEE+ + # - +H+ + # - +HH+ + # - +h+ + # - +M+ + # - +MM+ + # - +MMM+ + # - +MMMM+ + # - +mm+ + # - +ss+ + # - +XX+ + # - +XXX+ + # - +yy+ + # - +yyyy+ + # - +zzz+ + # Additionally +S+ letter groups (fractional seconds) of length one to nine are supported providing they occur after +ss+ and are separated from the +ss+ by a period (+.+), comma (+,+), or colon (+:+). + # Spacing and punctuation is also permitted with the exception a question mark (+?+), newline, and carriage return, together with literal text enclosed in single quotes. + # For example, +MM/dd HH.mm.ss,SSSSSS 'in' yyyy+ is a valid override format.One valuable use case for this parameter is when the format is semi-structured text, there are multiple timestamp formats in the text, and you know which format corresponds to the primary timestamp, but you do not want to specify the full +grok_pattern+. + # Another is when the timestamp format is one that the structure finder does not consider by default.If this parameter is not specified, the structure finder chooses the best format from a built-in set.If the special value +null+ is specified, the structure finder will not look for a primary timestamp in the text. + # When the format is semi-structured text, this will result in the structure finder treating the text as single-line messages. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-field-structure.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-text_structure # def find_field_structure(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'text_structure.find_field_structure' } @@ -48,7 +111,7 @@ def find_field_structure(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_text_structure/find_field_structure' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb index fcd7456472..75146cb1ac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb @@ -15,30 +15,92 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module TextStructure module Actions - # Finds the structure of a list of messages. The messages must contain data that is suitable to be ingested into Elasticsearch. + # Find the structure of text messages. + # Find the structure of a list of text messages. + # The messages must contain data that is suitable to be ingested into Elasticsearch. + # This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. + # Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. + # The response from the API contains: + # * Sample messages. + # * Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + # * Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + # Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + # All this information can be calculated by the structure finder with no guidance. + # However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. + # If the structure finder produces unexpected results, specify the +explain+ query parameter and an explanation will appear in the response. + # It helps determine why the returned structure was chosen. # - # @option arguments [Time] :timeout Timeout after which the analysis will be aborted - # @option arguments [String] :format Optional parameter to specify the high level file format (options: ndjson, xml, delimited, semi_structured_text) - # @option arguments [List] :column_names Optional parameter containing a comma separated list of the column names for a delimited file - # @option arguments [String] :delimiter Optional parameter to specify the delimiter character for a delimited file - must be a single character - # @option arguments [String] :quote Optional parameter to specify the quote character for a delimited file - must be a single character - # @option arguments [Boolean] :should_trim_fields Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them - # @option arguments [String] :grok_pattern Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file - # @option arguments [String] :ecs_compatibility Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled' - # @option arguments [String] :timestamp_field Optional parameter to specify the timestamp field in the file - # @option arguments [String] :timestamp_format Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format - # @option arguments [Boolean] :explain Whether to include a commentary on how the structure was derived + # @option arguments [String] :column_names If the format is +delimited+, you can specify the column names in a comma-separated list. + # If this parameter is not specified, the structure finder uses the column names from the header row of the text. + # If the text does not have a header role, columns are named "column1", "column2", "column3", for example. + # @option arguments [String] :delimiter If you the format is +delimited+, you can specify the character used to delimit the values in each row. + # Only a single character is supported; the delimiter cannot have multiple characters. + # By default, the API considers the following possibilities: comma, tab, semi-colon, and pipe (+|+). + # In this default scenario, all rows must have the same number of fields for the delimited format to be detected. + # If you specify a delimiter, up to 10% of the rows can have a different number of columns than the first row. + # @option arguments [String] :ecs_compatibility The mode of compatibility with ECS compliant Grok patterns. + # Use this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern. + # This setting primarily has an impact when a whole message Grok pattern such as +%{CATALINALOG}+ matches the input. + # If the structure finder identifies a common structure but has no idea of meaning then generic field names such as +path+, +ipaddress+, +field1+, and +field2+ are used in the +grok_pattern+ output, with the intention that a user who knows the meanings rename these fields before using it. Server default: disabled. + # @option arguments [Boolean] :explain If this parameter is set to true, the response includes a field named +explanation+, which is an array of strings that indicate how the structure finder produced its result. + # @option arguments [String] :format The high level structure of the text. + # By default, the API chooses the format. + # In this default scenario, all rows must have the same number of fields for a delimited format to be detected. + # If the format is +delimited+ and the delimiter is not set, however, the API tolerates up to 5% of rows that have a different number of columns than the first row. + # @option arguments [String] :grok_pattern If the format is +semi_structured_text+, you can specify a Grok pattern that is used to extract fields from every message in the text. + # The name of the timestamp field in the Grok pattern must match what is specified in the +timestamp_field+ parameter. + # If that parameter is not specified, the name of the timestamp field in the Grok pattern must match "timestamp". + # If +grok_pattern+ is not specified, the structure finder creates a Grok pattern. + # @option arguments [String] :quote If the format is +delimited+, you can specify the character used to quote the values in each row if they contain newlines or the delimiter character. + # Only a single character is supported. + # If this parameter is not specified, the default value is a double quote (+"+). + # If your delimited text format does not use quoting, a workaround is to set this argument to a character that does not appear anywhere in the sample. + # @option arguments [Boolean] :should_trim_fields If the format is +delimited+, you can specify whether values between delimiters should have whitespace trimmed from them. + # If this parameter is not specified and the delimiter is pipe (+|+), the default value is true. + # Otherwise, the default value is +false+. + # @option arguments [Time] :timeout The maximum amount of time that the structure analysis can take. + # If the analysis is still running when the timeout expires, it will be stopped. Server default: 25s. + # @option arguments [String] :timestamp_field The name of the field that contains the primary timestamp of each record in the text. + # In particular, if the text was ingested into an index, this is the field that would be used to populate the +@timestamp+ field.If the format is +semi_structured_text+, this field must match the name of the appropriate extraction in the +grok_pattern+. + # Therefore, for semi-structured text, it is best not to specify this parameter unless +grok_pattern+ is also specified.For structured text, if you specify this parameter, the field must exist within the text.If this parameter is not specified, the structure finder makes a decision about which field (if any) is the primary timestamp field. + # For structured text, it is not compulsory to have a timestamp in the text. + # @option arguments [String] :timestamp_format The Java time format of the timestamp field in the text. + # Only a subset of Java time format letter groups are supported: + # - +a+ + # - +d+ + # - +dd+ + # - +EEE+ + # - +EEEE+ + # - +H+ + # - +HH+ + # - +h+ + # - +M+ + # - +MM+ + # - +MMM+ + # - +MMMM+ + # - +mm+ + # - +ss+ + # - +XX+ + # - +XXX+ + # - +yy+ + # - +yyyy+ + # - +zzz+ + # Additionally +S+ letter groups (fractional seconds) of length one to nine are supported providing they occur after +ss+ and are separated from the +ss+ by a period (+.+), comma (+,+), or colon (+:+). + # Spacing and punctuation is also permitted with the exception a question mark (+?+), newline, and carriage return, together with literal text enclosed in single quotes. + # For example, +MM/dd HH.mm.ss,SSSSSS 'in' yyyy+ is a valid override format.One valuable use case for this parameter is when the format is semi-structured text, there are multiple timestamp formats in the text, and you know which format corresponds to the primary timestamp, but you do not want to specify the full +grok_pattern+. + # Another is when the timestamp format is one that the structure finder does not consider by default.If this parameter is not specified, the structure finder chooses the best format from a built-in set.If the special value +null+ is specified, the structure finder will not look for a primary timestamp in the text. + # When the format is semi-structured text, this will result in the structure finder treating the text as single-line messages. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body JSON object with one field [messages], containing an array of messages to be analyzed (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-message-structure.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-find-message-structure # def find_message_structure(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'text_structure.find_message_structure' } @@ -48,7 +110,7 @@ def find_message_structure(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_text_structure/find_message_structure' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb index 099d91ebc5..6eef39943a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb @@ -15,34 +15,106 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module TextStructure module Actions - # Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch. + # Find the structure of a text file. + # The text file must contain data that is suitable to be ingested into Elasticsearch. + # This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. + # Unlike other Elasticsearch endpoints, the data that is posted to this endpoint does not need to be UTF-8 encoded and in JSON format. + # It must, however, be text; binary text formats are not currently supported. + # The size is limited to the Elasticsearch HTTP receive buffer size, which defaults to 100 Mb. + # The response from the API contains: + # * A couple of messages from the beginning of the text. + # * Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. + # * Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. + # * Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. + # All this information can be calculated by the structure finder with no guidance. + # However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. # - # @option arguments [Integer] :lines_to_sample How many lines of the file should be included in the analysis - # @option arguments [Integer] :line_merge_size_limit Maximum number of characters permitted in a single message when lines are merged to create messages. - # @option arguments [Time] :timeout Timeout after which the analysis will be aborted - # @option arguments [String] :charset Optional parameter to specify the character set of the file - # @option arguments [String] :format Optional parameter to specify the high level file format (options: ndjson, xml, delimited, semi_structured_text) - # @option arguments [Boolean] :has_header_row Optional parameter to specify whether a delimited file includes the column names in its first row - # @option arguments [List] :column_names Optional parameter containing a comma separated list of the column names for a delimited file - # @option arguments [String] :delimiter Optional parameter to specify the delimiter character for a delimited file - must be a single character - # @option arguments [String] :quote Optional parameter to specify the quote character for a delimited file - must be a single character - # @option arguments [Boolean] :should_trim_fields Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them - # @option arguments [String] :grok_pattern Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file - # @option arguments [String] :ecs_compatibility Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled' - # @option arguments [String] :timestamp_field Optional parameter to specify the timestamp field in the file - # @option arguments [String] :timestamp_format Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format - # @option arguments [Boolean] :explain Whether to include a commentary on how the structure was derived + # @option arguments [String] :charset The text's character set. + # It must be a character set that is supported by the JVM that Elasticsearch uses. + # For example, +UTF-8+, +UTF-16LE+, +windows-1252+, or +EUC-JP+. + # If this parameter is not specified, the structure finder chooses an appropriate character set. + # @option arguments [String] :column_names If you have set format to +delimited+, you can specify the column names in a comma-separated list. + # If this parameter is not specified, the structure finder uses the column names from the header row of the text. + # If the text does not have a header role, columns are named "column1", "column2", "column3", for example. + # @option arguments [String] :delimiter If you have set +format+ to +delimited+, you can specify the character used to delimit the values in each row. + # Only a single character is supported; the delimiter cannot have multiple characters. + # By default, the API considers the following possibilities: comma, tab, semi-colon, and pipe (+|+). + # In this default scenario, all rows must have the same number of fields for the delimited format to be detected. + # If you specify a delimiter, up to 10% of the rows can have a different number of columns than the first row. + # @option arguments [String] :ecs_compatibility The mode of compatibility with ECS compliant Grok patterns. + # Use this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern. + # Valid values are +disabled+ and +v1+. + # This setting primarily has an impact when a whole message Grok pattern such as +%{CATALINALOG}+ matches the input. + # If the structure finder identifies a common structure but has no idea of meaning then generic field names such as +path+, +ipaddress+, +field1+, and +field2+ are used in the +grok_pattern+ output, with the intention that a user who knows the meanings rename these fields before using it. Server default: disabled. + # @option arguments [Boolean] :explain If this parameter is set to +true+, the response includes a field named explanation, which is an array of strings that indicate how the structure finder produced its result. + # If the structure finder produces unexpected results for some text, use this query parameter to help you determine why the returned structure was chosen. + # @option arguments [String] :format The high level structure of the text. + # Valid values are +ndjson+, +xml+, +delimited+, and +semi_structured_text+. + # By default, the API chooses the format. + # In this default scenario, all rows must have the same number of fields for a delimited format to be detected. + # If the format is set to +delimited+ and the delimiter is not set, however, the API tolerates up to 5% of rows that have a different number of columns than the first row. + # @option arguments [String] :grok_pattern If you have set +format+ to +semi_structured_text+, you can specify a Grok pattern that is used to extract fields from every message in the text. + # The name of the timestamp field in the Grok pattern must match what is specified in the +timestamp_field+ parameter. + # If that parameter is not specified, the name of the timestamp field in the Grok pattern must match "timestamp". + # If +grok_pattern+ is not specified, the structure finder creates a Grok pattern. + # @option arguments [Boolean] :has_header_row If you have set +format+ to +delimited+, you can use this parameter to indicate whether the column names are in the first row of the text. + # If this parameter is not specified, the structure finder guesses based on the similarity of the first row of the text to other rows. + # @option arguments [Integer] :line_merge_size_limit The maximum number of characters in a message when lines are merged to form messages while analyzing semi-structured text. + # If you have extremely long messages you may need to increase this, but be aware that this may lead to very long processing times if the way to group lines into messages is misdetected. Server default: 10000. + # @option arguments [Integer] :lines_to_sample The number of lines to include in the structural analysis, starting from the beginning of the text. + # The minimum is 2. + # If the value of this parameter is greater than the number of lines in the text, the analysis proceeds (as long as there are at least two lines in the text) for all of the lines.NOTE: The number of lines and the variation of the lines affects the speed of the analysis. + # For example, if you upload text where the first 1000 lines are all variations on the same message, the analysis will find more commonality than would be seen with a bigger sample. + # If possible, however, it is more efficient to upload sample text with more variety in the first 1000 lines than to request analysis of 100000 lines to achieve some variety. Server default: 1000. + # @option arguments [String] :quote If you have set +format+ to +delimited+, you can specify the character used to quote the values in each row if they contain newlines or the delimiter character. + # Only a single character is supported. + # If this parameter is not specified, the default value is a double quote (+"+). + # If your delimited text format does not use quoting, a workaround is to set this argument to a character that does not appear anywhere in the sample. + # @option arguments [Boolean] :should_trim_fields If you have set +format+ to +delimited+, you can specify whether values between delimiters should have whitespace trimmed from them. + # If this parameter is not specified and the delimiter is pipe (+|+), the default value is +true+. + # Otherwise, the default value is +false+. + # @option arguments [Time] :timeout The maximum amount of time that the structure analysis can take. + # If the analysis is still running when the timeout expires then it will be stopped. Server default: 25s. + # @option arguments [String] :timestamp_field The name of the field that contains the primary timestamp of each record in the text. + # In particular, if the text were ingested into an index, this is the field that would be used to populate the +@timestamp+ field.If the +format+ is +semi_structured_text+, this field must match the name of the appropriate extraction in the +grok_pattern+. + # Therefore, for semi-structured text, it is best not to specify this parameter unless +grok_pattern+ is also specified.For structured text, if you specify this parameter, the field must exist within the text.If this parameter is not specified, the structure finder makes a decision about which field (if any) is the primary timestamp field. + # For structured text, it is not compulsory to have a timestamp in the text. + # @option arguments [String] :timestamp_format The Java time format of the timestamp field in the text.Only a subset of Java time format letter groups are supported: + # - +a+ + # - +d+ + # - +dd+ + # - +EEE+ + # - +EEEE+ + # - +H+ + # - +HH+ + # - +h+ + # - +M+ + # - +MM+ + # - +MMM+ + # - +MMMM+ + # - +mm+ + # - +ss+ + # - +XX+ + # - +XXX+ + # - +yy+ + # - +yyyy+ + # - +zzz+ + # Additionally +S+ letter groups (fractional seconds) of length one to nine are supported providing they occur after +ss+ and separated from the +ss+ by a +.+, +,+ or +:+. + # Spacing and punctuation is also permitted with the exception of +?+, newline and carriage return, together with literal text enclosed in single quotes. + # For example, +MM/dd HH.mm.ss,SSSSSS 'in' yyyy+ is a valid override format.One valuable use case for this parameter is when the format is semi-structured text, there are multiple timestamp formats in the text, and you know which format corresponds to the primary timestamp, but you do not want to specify the full +grok_pattern+. + # Another is when the timestamp format is one that the structure finder does not consider by default.If this parameter is not specified, the structure finder chooses the best format from a built-in set.If the special value +null+ is specified the structure finder will not look for a primary timestamp in the text. + # When the format is semi-structured text this will result in the structure finder treating the text as single-line messages. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The contents of the file to be analyzed (*Required*) + # @option arguments [Hash] :body text_files # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-find-structure # def find_structure(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'text_structure.find_structure' } @@ -52,14 +124,14 @@ def find_structure(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_text_structure/find_structure' params = Utils.process_params(arguments) payload = if body.is_a? Array - Elasticsearch::API::Utils.__bulkify(body) + Elasticsearch::API::Utils.bulkify(body) else body end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb index 49fad35ecd..4de2efc11b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb @@ -15,20 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module TextStructure module Actions - # Tests a Grok pattern on some text. + # Test a Grok pattern. + # Test a Grok pattern on one or more lines of text. + # The API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings. # - # @option arguments [String] :ecs_compatibility Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled' + # @option arguments [String] :ecs_compatibility The mode of compatibility with ECS compliant Grok patterns. + # Use this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern. + # Valid values are +disabled+ and +v1+. Server default: disabled. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The Grok pattern and text. (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/test-grok-pattern.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-text-structure-test-grok-pattern # def test_grok_pattern(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'text_structure.test_grok_pattern' } @@ -38,7 +42,7 @@ def test_grok_pattern(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_text_structure/test_grok_pattern' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb index 9bf20808c6..6ab9705f53 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb @@ -15,22 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Transform module Actions - # Deletes an existing transform. + # Delete a transform. # - # @option arguments [String] :transform_id The id of the transform to delete - # @option arguments [Boolean] :force When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted. - # @option arguments [Boolean] :delete_dest_index When `true`, the destination index is deleted together with the transform. The default value is `false`, meaning that the destination index will not be deleted. - # @option arguments [Time] :timeout Controls the time to wait for the transform deletion + # @option arguments [String] :transform_id Identifier for the transform. (*Required*) + # @option arguments [Boolean] :force If this value is false, the transform must be stopped before it can be deleted. If true, the transform is + # deleted regardless of its current state. + # @option arguments [Boolean] :delete_dest_index If this value is true, the destination index is deleted together with the transform. If false, the destination + # index will not be deleted + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-delete-transform # def delete_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.delete_transform' } @@ -50,7 +52,7 @@ def delete_transform(arguments = {}) _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_DELETE - path = "_transform/#{Utils.__listify(_transform_id)}" + path = "_transform/#{Utils.listify(_transform_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb index 69d76d7474..26ac55beba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb @@ -15,8 +15,8 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API @@ -34,9 +34,14 @@ def get_node_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = arguments.delete(:body) + + method = if body + Elasticsearch::API::HTTP_POST + else + Elasticsearch::API::HTTP_GET + end - method = Elasticsearch::API::HTTP_GET path = '_transform/_node_stats' params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb index 5065124f1e..938d5792bf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb @@ -15,23 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Transform module Actions - # Retrieves configuration information for transforms. + # Get transforms. + # Get configuration information for transforms. # - # @option arguments [String] :transform_id The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms - # @option arguments [Integer] :from skips a number of transform configs, defaults to 0 - # @option arguments [Integer] :size specifies a max number of transforms to get, defaults to 100 - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) - # @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on transform PUT + # @option arguments [String, Array] :transform_id Identifier for the transform. It can be a transform identifier or a + # wildcard expression. You can get information for all transforms by using + # +_all+, by specifying +*+ as the ++, or by omitting the + # ++. + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no transforms that match. + # - Contains the _all string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # If this parameter is false, the request returns a 404 status code when + # there are no matches or only partial matches. Server default: true. + # @option arguments [Integer] :from Skips the specified number of transforms. Server default: 0. + # @option arguments [Integer] :size Specifies the maximum number of transforms to obtain. Server default: 100. + # @option arguments [Boolean] :exclude_generated Excludes fields that were automatically added when creating the + # transform. This allows the configuration to be in an acceptable format to + # be retrieved and then added to another cluster. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-transform # def get_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.get_transform' } @@ -50,7 +61,7 @@ def get_transform(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _transform_id - "_transform/#{Utils.__listify(_transform_id)}" + "_transform/#{Utils.listify(_transform_id)}" else '_transform' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb index abdf7014d8..4cbe67f419 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb @@ -15,23 +15,32 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Transform module Actions - # Retrieves usage information for transforms. + # Get transform stats. + # Get usage information for transforms. # - # @option arguments [String] :transform_id The id of the transform for which to get stats. '_all' or '*' implies all transforms - # @option arguments [Number] :from skips a number of transform stats, defaults to 0 - # @option arguments [Number] :size specifies a max number of transform stats to get, defaults to 100 + # @option arguments [String, Array] :transform_id Identifier for the transform. It can be a transform identifier or a + # wildcard expression. You can get information for all transforms by using + # +_all+, by specifying +*+ as the ++, or by omitting the + # ++. (*Required*) + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: + # - Contains wildcard expressions and there are no transforms that match. + # - Contains the _all string or no identifiers and there are no matches. + # - Contains wildcard expressions and there are only partial matches. + # If this parameter is false, the request returns a 404 status code when + # there are no matches or only partial matches. Server default: true. + # @option arguments [Integer] :from Skips the specified number of transforms. Server default: 0. + # @option arguments [Integer] :size Specifies the maximum number of transforms to obtain. Server default: 100. # @option arguments [Time] :timeout Controls the time to wait for the stats - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-transform-stats # def get_transform_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.get_transform_stats' } @@ -51,7 +60,7 @@ def get_transform_stats(arguments = {}) _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_GET - path = "_transform/#{Utils.__listify(_transform_id)}/_stats" + path = "_transform/#{Utils.listify(_transform_id)}/_stats" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb index 8ab4f59a7c..61ebee6a99 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb @@ -15,21 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Transform module Actions - # Previews a transform. + # Preview a transform. + # Generates a preview of the results that you will get when you create a transform with the same configuration. + # It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also + # generates a list of mappings and settings for the destination index. These values are determined based on the field + # types of the source index and the transform aggregations. # - # @option arguments [String] :transform_id The id of the transform to preview. - # @option arguments [Time] :timeout Controls the time to wait for the preview + # @option arguments [String] :transform_id Identifier for the transform to preview. If you specify this path parameter, you cannot provide transform + # configuration details in the request body. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the + # timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The definition for the transform to preview + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-preview-transform # def preview_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.preview_transform' } @@ -52,11 +58,11 @@ def preview_transform(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _transform_id - "_transform/#{Utils.__listify(_transform_id)}/_preview" - else - '_transform/_preview' - end + path = if _transform_id + "_transform/#{Utils.listify(_transform_id)}/_preview" + else + '_transform/_preview' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb index 222912fe22..3c96caf5c9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb @@ -15,22 +15,44 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Transform module Actions - # Instantiates a transform. + # Create a transform. + # Creates a transform. + # A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as + # a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a + # unique row per entity. + # You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If + # you choose to use the pivot method for your transform, the entities are defined by the set of +group_by+ fields in + # the pivot object. If you choose to use the latest method, the entities are defined by the +unique_key+ field values + # in the latest object. + # You must have +create_index+, +index+, and +read+ privileges on the destination index and +read+ and + # +view_index_metadata+ privileges on the source indices. When Elasticsearch security features are enabled, the + # transform remembers which roles the user that created it had at the time of creation and uses those same roles. If + # those roles do not have the required privileges on the source and destination indices, the transform fails when it + # attempts unauthorized operations. + # NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any + # +.transform-internal*+ indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do + # not give users any privileges on +.transform-internal*+ indices. If you used transforms prior to 7.5, also do not + # give users any privileges on +.data-frame-internal*+ indices. # - # @option arguments [String] :transform_id The id of the new transform. - # @option arguments [Boolean] :defer_validation If validations should be deferred until transform starts, defaults to false. - # @option arguments [Time] :timeout Controls the time to wait for the transform to start + # @option arguments [String] :transform_id Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), + # hyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters. (*Required*) + # @option arguments [Boolean] :defer_validation When the transform is created, a series of validations occur to ensure its success. For example, there is a + # check for the existence of the source indices and a check that the destination index is not part of the source + # index pattern. You can use this parameter to skip the checks, for example when the source index does not exist + # until after the transform is created. The validations are always run when you start the transform, however, with + # the exception of privilege checks. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The transform definition (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-put-transform # def put_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.put_transform' } @@ -51,7 +73,7 @@ def put_transform(arguments = {}) _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_PUT - path = "_transform/#{Utils.__listify(_transform_id)}" + path = "_transform/#{Utils.listify(_transform_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb index dab3b5e94e..75424a0a05 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb @@ -15,21 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Transform module Actions - # Resets an existing transform. + # Reset a transform. + # Before you can reset it, you must stop it; alternatively, use the +force+ query parameter. + # If the destination index was created by the transform, it is deleted. # - # @option arguments [String] :transform_id The id of the transform to reset - # @option arguments [Boolean] :force When `true`, the transform is reset regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be reset. - # @option arguments [Time] :timeout Controls the time to wait for the transform to reset + # @option arguments [String] :transform_id Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), + # hyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters. (*Required*) + # @option arguments [Boolean] :force If this value is +true+, the transform is reset regardless of its current state. If it's +false+, the transform + # must be stopped before it can be reset. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/reset-transform.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-reset-transform # def reset_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.reset_transform' } @@ -49,7 +53,7 @@ def reset_transform(arguments = {}) _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST - path = "_transform/#{Utils.__listify(_transform_id)}/_reset" + path = "_transform/#{Utils.listify(_transform_id)}/_reset" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb index 74716246b6..0210cf500a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb @@ -15,20 +15,25 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Transform module Actions - # Schedules now a transform. + # Schedule a transform to start now. + # Instantly run a transform to process data. + # If you run this API, the transform will process the new data instantly, + # without waiting for the configured frequency interval. After the API is called, + # the transform will be processed again at +now + frequency+ unless the API + # is called again in the meantime. # - # @option arguments [String] :transform_id The id of the transform. (*Required*) - # @option arguments [Time] :timeout Controls the time to wait for the scheduling to take place + # @option arguments [String] :transform_id Identifier for the transform. (*Required*) + # @option arguments [Time] :timeout Controls the time to wait for the scheduling to take place Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/schedule-now-transform.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-schedule-now-transform # def schedule_now_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.schedule_now_transform' } @@ -48,7 +53,7 @@ def schedule_now_transform(arguments = {}) _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST - path = "_transform/#{Utils.__listify(_transform_id)}/_schedule_now" + path = "_transform/#{Utils.listify(_transform_id)}/_schedule_now" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb index 4f18b6a0b7..ab098407b3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb @@ -15,21 +15,34 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Transform module Actions - # Starts one or more transforms. + # Start a transform. + # When you start a transform, it creates the destination index if it does not already exist. The +number_of_shards+ is + # set to +1+ and the +auto_expand_replicas+ is set to +0-1+. If it is a pivot transform, it deduces the mapping + # definitions for the destination index from the source indices and the transform aggregations. If fields in the + # destination index are derived from scripts (as in the case of +scripted_metric+ or +bucket_script+ aggregations), + # the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce + # mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you + # start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings + # in a pivot transform. + # When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you + # created the transform, they occur when you start the transform—​with the exception of privilege checks. When + # Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the + # time of creation and uses those same roles. If those roles do not have the required privileges on the source and + # destination indices, the transform fails when it attempts unauthorized operations. # - # @option arguments [String] :transform_id The id of the transform to start - # @option arguments [String] :from Restricts the set of transformed entities to those changed after this time - # @option arguments [Time] :timeout Controls the time to wait for the transform to start + # @option arguments [String] :transform_id Identifier for the transform. (*Required*) + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. + # @option arguments [String] :from Restricts the set of transformed entities to those changed after this time. Relative times like now-30d are supported. Only applicable for continuous transforms. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-start-transform # def start_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.start_transform' } @@ -49,7 +62,7 @@ def start_transform(arguments = {}) _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST - path = "_transform/#{Utils.__listify(_transform_id)}/_start" + path = "_transform/#{Utils.listify(_transform_id)}/_start" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb index 00a4c41355..281cda5b62 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb @@ -15,24 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Transform module Actions + # Stop transforms. # Stops one or more transforms. # - # @option arguments [String] :transform_id The id of the transform to stop - # @option arguments [Boolean] :force Whether to force stop a failed transform or not. Default to false - # @option arguments [Boolean] :wait_for_completion Whether to wait for the transform to fully stop before returning or not. Default to false - # @option arguments [Time] :timeout Controls the time to wait until the transform has stopped. Default to 30 seconds - # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) - # @option arguments [Boolean] :wait_for_checkpoint Whether to wait for the transform to reach a checkpoint before stopping. Default to false + # @option arguments [String] :transform_id Identifier for the transform. To stop multiple transforms, use a comma-separated list or a wildcard expression. + # To stop all transforms, use +_all+ or +*+ as the identifier. (*Required*) + # @option arguments [Boolean] :allow_no_match Specifies what to do when the request: contains wildcard expressions and there are no transforms that match; + # contains the +_all+ string or no identifiers and there are no matches; contains wildcard expressions and there + # are only partial matches.If it is true, the API returns a successful acknowledgement message when there are no matches. When there are + # only partial matches, the API stops the appropriate transforms.If it is false, the request returns a 404 status code when there are no matches or only partial matches. Server default: true. + # @option arguments [Boolean] :force If it is true, the API forcefully stops the transforms. + # @option arguments [Time] :timeout Period to wait for a response when +wait_for_completion+ is +true+. If no response is received before the + # timeout expires, the request returns a timeout exception. However, the request continues processing and + # eventually moves the transform to a STOPPED state. Server default: 30s. + # @option arguments [Boolean] :wait_for_checkpoint If it is true, the transform does not completely stop until the current checkpoint is completed. If it is false, + # the transform stops as soon as possible. + # @option arguments [Boolean] :wait_for_completion If it is true, the API blocks until the indexer state completely stops. If it is false, the API returns + # immediately and the indexer is stopped asynchronously in the background. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-stop-transform # def stop_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.stop_transform' } @@ -52,7 +61,7 @@ def stop_transform(arguments = {}) _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST - path = "_transform/#{Utils.__listify(_transform_id)}/_stop" + path = "_transform/#{Utils.listify(_transform_id)}/_stop" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb index 44e04a7ee1..6ab8a3c888 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb @@ -15,22 +15,31 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Transform module Actions + # Update a transform. # Updates certain properties of a transform. + # All updated properties except +description+ do not take effect until after the transform starts the next checkpoint, + # thus there is data consistency in each checkpoint. To use this API, you must have +read+ and +view_index_metadata+ + # privileges for the source indices. You must also have +index+ and +read+ privileges for the destination index. When + # Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the + # time of update and runs with those privileges. # - # @option arguments [String] :transform_id The id of the transform. (*Required*) - # @option arguments [Boolean] :defer_validation If validations should be deferred until transform starts, defaults to false. - # @option arguments [Time] :timeout Controls the time to wait for the update + # @option arguments [String] :transform_id Identifier for the transform. (*Required*) + # @option arguments [Boolean] :defer_validation When true, deferrable validations are not run. This behavior may be + # desired if the source index does not exist until after the transform is + # created. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the + # timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The update transform definition (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-update-transform # def update_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.update_transform' } @@ -51,7 +60,7 @@ def update_transform(arguments = {}) _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST - path = "_transform/#{Utils.__listify(_transform_id)}/_update" + path = "_transform/#{Utils.listify(_transform_id)}/_update" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb index b2d1a84cd6..31c430ce59 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb @@ -15,20 +15,32 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Transform module Actions - # Upgrades all transforms. + # Upgrade all transforms. + # Transforms are compatible across minor versions and between supported major versions. + # However, over time, the format of transform configuration information may change. + # This API identifies transforms that have a legacy configuration format and upgrades them to the latest version. + # It also cleans up the internal data structures that store the transform state and checkpoints. + # The upgrade does not affect the source and destination indices. + # The upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged. + # If a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue. + # Resolve the issue then re-run the process again. + # A summary is returned when the upgrade is finished. + # To ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster. + # You may want to perform a recent cluster backup prior to the upgrade. # - # @option arguments [Boolean] :dry_run Whether to only check for updates but don't execute - # @option arguments [Time] :timeout Controls the time to wait for the upgrade + # @option arguments [Boolean] :dry_run When true, the request checks for updates but does not run them. + # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and + # returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/upgrade-transforms.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-upgrade-transforms # def upgrade_transforms(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.upgrade_transforms' } @@ -36,7 +48,7 @@ def upgrade_transforms(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_transform/_upgrade' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb index 1454a5e592..ece85b95fc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb @@ -15,38 +15,58 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Updates a document with a script or partial document. + # Update a document. + # Update a document by running a script or passing a partial document. + # If the Elasticsearch security features are enabled, you must have the +index+ or +write+ index privilege for the target index or index alias. + # The script can update, delete, or skip modifying the document. + # The API also supports passing a partial document, which is merged into the existing document. + # To fully replace an existing document, use the index API. + # This operation: + # * Gets the document (collocated with the shard) from the index. + # * Runs the specified script. + # * Indexes the result. + # The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. + # The +_source+ field must be enabled to use this API. + # In addition to +_source+, you can access the following variables through the +ctx+ map: +_index+, +_type+, +_id+, +_version+, +_routing+, and +_now+ (the current timestamp). # - # @option arguments [String] :id Document ID - # @option arguments [String] :index The name of the index - # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return - # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field - # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field - # @option arguments [String] :lang The script language (default: painless) - # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (options: true, false, wait_for) - # @option arguments [Number] :retry_on_conflict Specify how many times should the operation be retried when a conflict occurs (default: 0) - # @option arguments [String] :routing Specific routing value - # @option arguments [Time] :timeout Explicit operation timeout - # @option arguments [Number] :if_seq_no only perform the update operation if the last operation that has changed the document has the specified sequence number - # @option arguments [Number] :if_primary_term only perform the update operation if the last operation that has changed the document has the specified primary term - # @option arguments [Boolean] :require_alias When true, requires destination is an alias. Default is false - # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Defaults to true. + # @option arguments [String] :id A unique identifier for the document to be updated. (*Required*) + # @option arguments [String] :index The name of the target index. + # By default, the index is created automatically if it doesn't exist. (*Required*) + # @option arguments [Integer] :if_primary_term Only perform the operation if the document has this primary term. + # @option arguments [Integer] :if_seq_no Only perform the operation if the document has this sequence number. + # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Server default: true. + # @option arguments [String] :lang The script language. Server default: painless. + # @option arguments [String] :refresh If 'true', Elasticsearch refreshes the affected shards to make this operation visible to search. + # If 'wait_for', it waits for a refresh to make this operation visible to search. + # If 'false', it does nothing with refreshes. Server default: false. + # @option arguments [Boolean] :require_alias If +true+, the destination must be an index alias. + # @option arguments [Integer] :retry_on_conflict The number of times the operation should be retried when a conflict occurs. Server default: 0. + # @option arguments [String] :routing A custom value used to route operations to a specific shard. + # @option arguments [Time] :timeout The period to wait for the following operations: dynamic mapping updates and waiting for active shards. + # Elasticsearch waits for at least the timeout period before failing. + # The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m. + # @option arguments [Integer, String] :wait_for_active_shards The number of copies of each shard that must be active before proceeding with the operation. + # Set to 'all' or any positive integer up to the total number of shards in the index (+number_of_replicas++1). + # The default value of +1+ means it waits for each primary shard to be active. Server default: 1. + # @option arguments [Boolean, String, Array] :_source If +false+, source retrieval is turned off. + # You can also specify a comma-separated list of the fields you want to retrieve. Server default: true. + # @option arguments [String, Array] :_source_excludes The source fields you want to exclude. + # @option arguments [String, Array] :_source_includes The source fields you want to retrieve. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The request definition requires either `script` or partial `doc` (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update # def update(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'update' } - defined_params = %i[index id].each_with_object({}) do |variable, set_variables| + defined_params = [:index, :id].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? @@ -65,11 +85,11 @@ def update(arguments = {}) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_update/#{Utils.__listify(_id)}" + path = "#{Utils.listify(_index)}/_update/#{Utils.listify(_id)}" params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb index fb65ca3564..d61bbfb994 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb @@ -15,51 +15,142 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Performs an update on every document in the index without changing the source, - # for example to pick up a mapping change. + # Update documents. + # Updates documents that match the specified query. + # If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. + # If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias: + # * +read+ + # * +index+ or +write+ + # You can specify the query criteria in the request URI or the request body using the same syntax as the search API. + # When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning. + # When the versions match, the document is updated and the version number is incremented. + # If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails. + # You can opt to count version conflicts instead of halting and returning by setting +conflicts+ to +proceed+. + # Note that if you opt to count version conflicts, the operation could attempt to update more documents from the source than +max_docs+ until it has successfully updated +max_docs+ documents or it has gone through every document in the source query. + # NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number. + # While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents. + # A bulk update request is performed for each batch of matching documents. + # Any query or update failures cause the update by query request to fail and the failures are shown in the response. + # Any update requests that completed successfully still stick, they are not rolled back. + # **Throttling update requests** + # To control the rate at which update by query issues batches of update operations, you can set +requests_per_second+ to any positive decimal number. + # This pads each batch with a wait time to throttle the rate. + # Set +requests_per_second+ to +-1+ to turn off throttling. + # Throttling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account. + # The padding time is the difference between the batch size divided by the +requests_per_second+ and the time spent writing. + # By default the batch size is 1000, so if +requests_per_second+ is set to +500+: + # + + # target_time = 1000 / 500 per second = 2 seconds + # wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds + # + + # Since the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set. + # This is "bursty" instead of "smooth". + # **Slicing** + # Update by query supports sliced scroll to parallelize the update process. + # This can improve efficiency and provide a convenient way to break the request down into smaller parts. + # Setting +slices+ to +auto+ chooses a reasonable number for most data streams and indices. + # This setting will use one slice per shard, up to a certain limit. + # If there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards. + # Adding +slices+ to +_update_by_query+ just automates the manual process of creating sub-requests, which means it has some quirks: + # * You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices. + # * Fetching the status of the task for the request with +slices+ only contains the status of completed slices. + # * These sub-requests are individually addressable for things like cancellation and rethrottling. + # * Rethrottling the request with +slices+ will rethrottle the unfinished sub-request proportionally. + # * Canceling the request with slices will cancel each sub-request. + # * Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution. + # * Parameters like +requests_per_second+ and +max_docs+ on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using +max_docs+ with +slices+ might not result in exactly +max_docs+ documents being updated. + # * Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time. + # If you're slicing manually or otherwise tuning automatic slicing, keep in mind that: + # * Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead. + # * Update performance scales linearly across available resources with the number of slices. + # Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources. + # **Update the document source** + # Update by query supports scripts to update the document source. + # As with the update API, you can set +ctx.op+ to change the operation that is performed. + # Set +ctx.op = "noop"+ if your script decides that it doesn't have to make any changes. + # The update by query operation skips updating the document and increments the +noop+ counter. + # Set +ctx.op = "delete"+ if your script decides that the document should be deleted. + # The update by query operation deletes the document and increments the +deleted+ counter. + # Update by query supports only +index+, +noop+, and +delete+. + # Setting +ctx.op+ to anything else is an error. + # Setting any other field in +ctx+ is an error. + # This API enables you to only modify the source of matching documents; you cannot move them. # - # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - # @option arguments [String] :analyzer The analyzer to use for the query string - # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false) - # @option arguments [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR) - # @option arguments [String] :df The field to use as default where no field prefix is given in the query string - # @option arguments [Number] :from Starting offset (default: 0) - # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) - # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - # @option arguments [String] :conflicts What to do when the update by query hits version conflicts? (options: abort, proceed) - # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - # @option arguments [String] :pipeline Ingest pipeline to set on index requests made by this action. (default: none) - # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) - # @option arguments [String] :q Query in the Lucene query string syntax - # @option arguments [List] :routing A comma-separated list of specific routing values - # @option arguments [Time] :scroll Specify how long a consistent view of the index should be maintained for scrolled search - # @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch) - # @option arguments [Time] :search_timeout Explicit timeout for each search request. Defaults to no timeout. - # @option arguments [Number] :max_docs Maximum number of documents to process (default: all documents) - # @option arguments [List] :sort A comma-separated list of : pairs - # @option arguments [Number] :terminate_after The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. - # @option arguments [List] :stats Specific 'tag' of the request for logging and statistical purposes - # @option arguments [Boolean] :version Specify whether to return document version as part of a hit + # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases to search. + # It supports wildcards (+*+). + # To search all data streams or indices, omit this parameter or use +*+ or +_all+. (*Required*) + # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. + # This behavior applies even if the request targets other open indices. + # For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true. + # @option arguments [String] :analyzer The analyzer to use for the query string. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [String] :conflicts The preferred behavior when update by query hits version conflicts: +abort+ or +proceed+. Server default: abort. + # @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+. + # This parameter can be used only when the +q+ query string parameter is specified. Server default: OR. + # @option arguments [String] :df The field to use as default where no field prefix is given in the query string. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [String, Array] :expand_wildcards The type of index that wildcard patterns can match. + # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # It supports comma-separated values, such as +open,hidden+. + # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. + # @option arguments [Integer] :from Starting offset (default: 0) + # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. + # @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + # This parameter can be used only when the +q+ query string parameter is specified. + # @option arguments [Integer] :max_docs The maximum number of documents to process. + # It defaults to all documents. + # When set to a value less then or equal to +scroll_size+ then a scroll will not be used to retrieve the results for the operation. + # @option arguments [String] :pipeline The ID of the pipeline to use to preprocess incoming documents. + # If the index has a default ingest pipeline specified, then setting the value to +_none+ disables the default ingest pipeline for this request. + # If a final pipeline is configured it will always run, regardless of the value of this parameter. + # @option arguments [String] :preference The node or shard the operation should be performed on. + # It is random by default. + # @option arguments [String] :q A query in the Lucene query string syntax. + # @option arguments [Boolean] :refresh If +true+, Elasticsearch refreshes affected shards to make the operation visible to search after the request completes. + # This is different than the update API's +refresh+ parameter, which causes just the shard that received the request to be refreshed. + # @option arguments [Boolean] :request_cache If +true+, the request cache is used for this request. + # It defaults to the index-level setting. + # @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second. Server default: -1. + # @option arguments [String] :routing A custom value used to route operations to a specific shard. + # @option arguments [Time] :scroll The period to retain the search context for scrolling. Server default: 5m. + # @option arguments [Integer] :scroll_size The size of the scroll request that powers the operation. Server default: 1000. + # @option arguments [Time] :search_timeout An explicit timeout for each search request. + # By default, there is no timeout. + # @option arguments [String] :search_type The type of the search operation. Available options include +query_then_fetch+ and +dfs_query_then_fetch+. + # @option arguments [Integer, String] :slices The number of slices this task should be divided into. Server default: 1. + # @option arguments [Array] :sort A comma-separated list of : pairs. + # @option arguments [Array] :stats The specific +tag+ of the request for logging and statistical purposes. + # @option arguments [Integer] :terminate_after The maximum number of documents to collect for each shard. + # If a query reaches this limit, Elasticsearch terminates the query early. + # Elasticsearch collects documents before sorting.IMPORTANT: Use with caution. + # Elasticsearch applies this parameter to each shard handling the request. + # When possible, let Elasticsearch perform early termination automatically. + # Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + # @option arguments [Time] :timeout The period each update request waits for the following operations: dynamic mapping updates, waiting for active shards. + # By default, it is one minute. + # This guarantees Elasticsearch waits for at least the timeout before failing. + # The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m. + # @option arguments [Boolean] :version If +true+, returns the document version as part of a hit. # @option arguments [Boolean] :version_type Should the document increment the version number (internal) on hit or not (reindex) - # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to index level setting - # @option arguments [Boolean] :refresh Should the affected indexes be refreshed? - # @option arguments [Time] :timeout Time each individual bulk request should wait for shards that are unavailable. - # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - # @option arguments [Number] :scroll_size Size on the scroll request powering the update by query - # @option arguments [Boolean] :wait_for_completion Should the request should block until the update by query operation is complete. - # @option arguments [Number] :requests_per_second The throttle to set on this request in sub-requests per second. -1 means no throttle. - # @option arguments [Number|string] :slices The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`. + # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. + # Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). + # The +timeout+ parameter controls how long each write request waits for unavailable shards to become available. + # Both work exactly the way they work in the bulk API. Server default: 1. + # @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the operation is complete. + # If +false+, Elasticsearch performs some preflight checks, launches the request, and returns a task ID that you can use to cancel or get the status of the task. + # Elasticsearch creates a record of this task as a document at +.tasks/task/${taskId}+. Server default: true. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The search definition using the Query DSL + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query # def update_by_query(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'update_by_query' } @@ -74,12 +165,12 @@ def update_by_query(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST - path = "#{Utils.__listify(_index)}/_update_by_query" + path = "#{Utils.listify(_index)}/_update_by_query" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb index 801ed1bcd4..2bd65039ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Actions - # Changes the number of requests per second for a particular Update By Query operation. + # Throttle an update by query operation. + # Change the number of requests per second for a particular update by query operation. + # Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. # - # @option arguments [String] :task_id The task id to rethrottle - # @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (*Required*) + # @option arguments [String] :task_id The ID for the task. (*Required*) + # @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second. + # To turn off throttling, set it to +-1+. Server default: -1. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query-rethrottle # def update_by_query_rethrottle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'update_by_query_rethrottle' } @@ -47,7 +50,7 @@ def update_by_query_rethrottle(arguments = {}) _task_id = arguments.delete(:task_id) method = Elasticsearch::API::HTTP_POST - path = "_update_by_query/#{Utils.__listify(_task_id)}/_rethrottle" + path = "_update_by_query/#{Utils.listify(_task_id)}/_rethrottle" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb index 6539662686..9f307aa63f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb @@ -15,25 +15,32 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Watcher module Actions - # Acknowledges a watch, manually throttling the execution of the watch's actions. + # Acknowledge a watch. + # Acknowledging a watch enables you to manually throttle the execution of the watch's actions. + # The acknowledgement state of an action is stored in the +status.actions..ack.state+ structure. + # IMPORTANT: If the specified watch is currently being executed, this API will return an error + # The reason for this behavior is to prevent overwriting the watch status from a watch execution. + # Acknowledging an action throttles further executions of that action until its +ack.state+ is reset to +awaits_successful_execution+. + # This happens when the condition of the watch is not met (the condition evaluates to false). # - # @option arguments [String] :watch_id Watch ID - # @option arguments [List] :action_id A comma-separated list of the action ids to be acked + # @option arguments [String] :watch_id The watch identifier. (*Required*) + # @option arguments [String, Array] :action_id A comma-separated list of the action identifiers to acknowledge. + # If you omit this parameter, all of the actions of the watch are acknowledged. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch # def ack_watch(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'watcher.ack_watch' } - defined_params = %i[watch_id action_id].each_with_object({}) do |variable, set_variables| + defined_params = [:watch_id, :action_id].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? @@ -51,9 +58,9 @@ def ack_watch(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = if _watch_id && _action_id - "_watcher/watch/#{Utils.__listify(_watch_id)}/_ack/#{Utils.__listify(_action_id)}" + "_watcher/watch/#{Utils.listify(_watch_id)}/_ack/#{Utils.listify(_action_id)}" else - "_watcher/watch/#{Utils.__listify(_watch_id)}/_ack" + "_watcher/watch/#{Utils.listify(_watch_id)}/_ack" end params = {} diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb index 739a1d774d..00b486517a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb @@ -15,19 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Watcher module Actions - # Activates a currently inactive watch. + # Activate a watch. + # A watch can be either active or inactive. # - # @option arguments [String] :watch_id Watch ID + # @option arguments [String] :watch_id The watch identifier. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-activate-watch # def activate_watch(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'watcher.activate_watch' } @@ -47,7 +48,7 @@ def activate_watch(arguments = {}) _watch_id = arguments.delete(:watch_id) method = Elasticsearch::API::HTTP_PUT - path = "_watcher/watch/#{Utils.__listify(_watch_id)}/_activate" + path = "_watcher/watch/#{Utils.listify(_watch_id)}/_activate" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb index 645558f549..82505ddec9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb @@ -15,19 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Watcher module Actions - # Deactivates a currently active watch. + # Deactivate a watch. + # A watch can be either active or inactive. # - # @option arguments [String] :watch_id Watch ID + # @option arguments [String] :watch_id The watch identifier. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-deactivate-watch # def deactivate_watch(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'watcher.deactivate_watch' } @@ -47,7 +48,7 @@ def deactivate_watch(arguments = {}) _watch_id = arguments.delete(:watch_id) method = Elasticsearch::API::HTTP_PUT - path = "_watcher/watch/#{Utils.__listify(_watch_id)}/_deactivate" + path = "_watcher/watch/#{Utils.listify(_watch_id)}/_deactivate" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb index 8a6ae856d7..d5448f2faa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb @@ -15,19 +15,24 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Watcher module Actions - # Removes a watch from Watcher. + # Delete a watch. + # When the watch is removed, the document representing the watch in the +.watches+ index is gone and it will never be run again. + # Deleting a watch does not delete any watch execution records related to this watch from the watch history. + # IMPORTANT: Deleting a watch must be done by using only this API. + # Do not delete the watch directly from the +.watches+ index using the Elasticsearch delete document API + # When Elasticsearch security features are enabled, make sure no write privileges are granted to anyone for the +.watches+ index. # - # @option arguments [String] :id Watch ID + # @option arguments [String] :id The watch identifier. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-delete-watch # def delete_watch(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'watcher.delete_watch' } @@ -47,11 +52,11 @@ def delete_watch(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE - path = "_watcher/watch/#{Utils.__listify(_id)}" + path = "_watcher/watch/#{Utils.listify(_id)}" params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) - Utils.__rescue_from_not_found do + Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb index 72d49ad08b..2387f7ee98 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb @@ -15,21 +15,30 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Watcher module Actions - # Forces the execution of a stored watch. + # Run a watch. + # This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes. + # For testing and debugging purposes, you also have fine-grained control on how the watch runs. + # You can run the watch without running all of its actions or alternatively by simulating them. + # You can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after it runs. + # You can use the run watch API to run watches that are not yet registered by specifying the watch definition inline. + # This serves as great tool for testing and debugging your watches prior to adding them to Watcher. + # When Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches. + # If your user is allowed to read index +a+, but not index +b+, then the exact same set of rules will apply during execution of a watch. + # When using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch. # - # @option arguments [String] :id Watch ID - # @option arguments [Boolean] :debug indicates whether the watch should execute in debug mode + # @option arguments [String] :id The watch identifier. + # @option arguments [Boolean] :debug Defines whether the watch runs in debug mode. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body Execution control + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-execute-watch # def execute_watch(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'watcher.execute_watch' } @@ -48,7 +57,7 @@ def execute_watch(arguments = {}) method = Elasticsearch::API::HTTP_PUT path = if _id - "_watcher/watch/#{Utils.__listify(_id)}/_execute" + "_watcher/watch/#{Utils.listify(_id)}/_execute" else '_watcher/watch/_execute' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb index 00eb7f13f6..408a7b04e1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Watcher module Actions - # Retrieve settings for the watcher system index + # Get Watcher index settings. + # Get settings for the Watcher internal index (+.watches+). + # Only a subset of settings are shown, for example +index.auto_expand_replicas+ and +index.number_of_replicas+. # - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-settings.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-settings # def get_settings(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'watcher.get_settings' } @@ -35,7 +38,7 @@ def get_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_watcher/settings' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb index bb2f184baa..a283afede0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb @@ -15,19 +15,19 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Watcher module Actions - # Retrieves a watch by its ID. + # Get a watch. # - # @option arguments [String] :id Watch ID + # @option arguments [String] :id The watch identifier. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-watch # def get_watch(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'watcher.get_watch' } @@ -47,7 +47,7 @@ def get_watch(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET - path = "_watcher/watch/#{Utils.__listify(_id)}" + path = "_watcher/watch/#{Utils.listify(_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb index 111294f4e5..590620685e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb @@ -15,24 +15,33 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Watcher module Actions - # Creates a new watch, or updates an existing one. + # Create or update a watch. + # When a watch is registered, a new document that represents the watch is added to the +.watches+ index and its trigger is immediately registered with the relevant trigger engine. + # Typically for the +schedule+ trigger, the scheduler is the trigger engine. + # IMPORTANT: You must use Kibana or this API to create a watch. + # Do not add a watch directly to the +.watches+ index by using the Elasticsearch index API. + # If Elasticsearch security features are enabled, do not give users write privileges on the +.watches+ index. + # When you add a watch you can also define its initial active state by setting the *active* parameter. + # When Elasticsearch security features are enabled, your watch can index or search only on indices for which the user that stored the watch has privileges. + # If the user is able to read index +a+, but not index +b+, the same will apply when the watch runs. # - # @option arguments [String] :id Watch ID - # @option arguments [Boolean] :active Specify whether the watch is in/active by default - # @option arguments [Number] :version Explicit version number for concurrency control - # @option arguments [Number] :if_seq_no only update the watch if the last operation that has changed the watch has the specified sequence number - # @option arguments [Number] :if_primary_term only update the watch if the last operation that has changed the watch has the specified primary term + # @option arguments [String] :id The identifier for the watch. (*Required*) + # @option arguments [Boolean] :active The initial state of the watch. + # The default value is +true+, which means the watch is active by default. Server default: true. + # @option arguments [Integer] :if_primary_term only update the watch if the last operation that has changed the watch has the specified primary term + # @option arguments [Integer] :if_seq_no only update the watch if the last operation that has changed the watch has the specified sequence number + # @option arguments [Integer] :version Explicit version number for concurrency control # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body The watch + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch # def put_watch(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'watcher.put_watch' } @@ -52,7 +61,7 @@ def put_watch(arguments = {}) _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT - path = "_watcher/watch/#{Utils.__listify(_id)}" + path = "_watcher/watch/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb index 83d9bc0570..23055bd54f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb @@ -15,19 +15,21 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Watcher module Actions - # Retrieves stored watches. + # Query watches. + # Get all registered watches in a paginated manner and optionally filter watches by a query. + # Note that only the +_id+ and +metadata.*+ fields are queryable or sortable. # # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body From, size, query, sort and search_after + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-query-watches.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-query-watches # def query_watches(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'watcher.query_watches' } @@ -35,7 +37,7 @@ def query_watches(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = if body Elasticsearch::API::HTTP_POST @@ -43,7 +45,7 @@ def query_watches(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_watcher/_query/watches' + path = '_watcher/_query/watches' params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb index ef2b8ea8e3..cd07f8afdb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb @@ -15,19 +15,20 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Watcher module Actions - # Starts Watcher if it is not already running. + # Start the watch service. + # Start the Watcher service if it is not already running. # - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-start # def start(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'watcher.start' } @@ -35,7 +36,7 @@ def start(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_watcher/_start' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb index 4ef01863df..ac7f26b57b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb @@ -15,20 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Watcher module Actions - # Retrieves the current Watcher metrics. + # Get Watcher statistics. + # This API always returns basic metrics. + # You retrieve more metrics by using the metric parameter. # - # @option arguments [List] :metric Controls what additional stat metrics should be include in the response (options: _all, queued_watches, current_watches, pending_watches) - # @option arguments [Boolean] :emit_stacktraces Emits stack traces of currently running watches + # @option arguments [Watchermetric] :metric Defines which additional metrics are included in the response. + # @option arguments [Boolean] :emit_stacktraces Defines whether stack traces are generated for each watch that is running. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stats # def stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'watcher.stats' } @@ -47,7 +49,7 @@ def stats(arguments = {}) method = Elasticsearch::API::HTTP_GET path = if _metric - "_watcher/stats/#{Utils.__listify(_metric)}" + "_watcher/stats/#{Utils.listify(_metric)}" else '_watcher/stats' end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb index 2f112aedd6..e12f35c0aa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb @@ -15,19 +15,22 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Watcher module Actions - # Stops Watcher if it is running. + # Stop the watch service. + # Stop the Watcher service if it is running. # - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stop # def stop(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'watcher.stop' } @@ -35,7 +38,7 @@ def stop(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_POST path = '_watcher/_stop' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb index b316761c9e..ca087b1fda 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb @@ -15,21 +15,26 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module Watcher module Actions - # Update settings for the watcher system index + # Update Watcher index settings. + # Update settings for the Watcher internal index (+.watches+). + # Only a subset of settings can be modified. + # This includes +index.auto_expand_replicas+ and +index.number_of_replicas+. # - # @option arguments [Time] :timeout Specify timeout for waiting for acknowledgement from all nodes - # @option arguments [Time] :master_timeout Specify timeout for connection to master + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. + # @option arguments [Time] :timeout The period to wait for a response. + # If no response is received before the timeout expires, the request fails and returns an error. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body An object with the new index settings (*Required*) + # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-update-settings.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-update-settings # def update_settings(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'watcher.update_settings' } @@ -39,7 +44,7 @@ def update_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT path = '_watcher/settings' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb index 89cb118784..a9c6fdc7f3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb @@ -15,21 +15,27 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module XPack module Actions - # Retrieves information about the installed X-Pack features. + # Get information. + # The information provided by the API includes: + # * Build information including the build number and timestamp. + # * License information about the currently installed license. + # * Feature information for the features that are currently enabled and available under the current license. # - # @option arguments [Boolean] :human Defines whether additional human-readable information is included in the response. In particular, it adds descriptions and a tag line. The default value is true. - # @option arguments [List] :categories Comma-separated list of info categories. Can be any of: build, license, features - # @option arguments [Boolean] :accept_enterprise If this param is used it must be set to true *Deprecated* + # @option arguments [Array] :categories A comma-separated list of the information categories to include in the response. + # For example, +build,license,features+. + # @option arguments [Boolean] :accept_enterprise If this param is used it must be set to true + # @option arguments [Boolean] :human Defines whether additional human-readable information is included in the response. + # In particular, it adds descriptions and a tag line. Server default: true. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-info # def info(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'xpack.info' } @@ -37,7 +43,7 @@ def info(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_xpack' diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb index 2317ef931e..6fdc8e725a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb @@ -15,19 +15,23 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch module API module XPack module Actions - # Retrieves usage information about the installed X-Pack features. + # Get usage information. + # Get information about the features that are currently enabled and available under the current license. + # The API also provides some usage statistics. # - # @option arguments [Time] :master_timeout Specify timeout for watch write operation + # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. + # If no response is received before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-xpack # def usage(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'xpack.usage' } @@ -35,7 +39,7 @@ def usage(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil + body = nil method = Elasticsearch::API::HTTP_GET path = '_xpack/usage' From 44a7f4201f4d0675ac9531ebca94bec29df3b47d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 13 Mar 2025 11:45:38 +0000 Subject: [PATCH 497/540] [API] Updates specs --- .../spec/unit/actions/clear_scroll_spec.rb | 27 ++---------- .../spec/unit/actions/cluster/reroute_spec.rb | 25 ++++++----- .../actions/indices/get_field_mapping_spec.rb | 9 ++-- .../ingest/get_ip_location_database_spec.rb | 2 +- .../spec/unit/actions/mtermvectors_spec.rb | 41 +++++++++++-------- .../spec/unit/actions/scroll_spec.rb | 4 +- .../spec/unit/perform_request_spec.rb | 6 ++- 7 files changed, 53 insertions(+), 61 deletions(-) diff --git a/elasticsearch-api/spec/unit/actions/clear_scroll_spec.rb b/elasticsearch-api/spec/unit/actions/clear_scroll_spec.rb index 041c13d832..f61f40b303 100644 --- a/elasticsearch-api/spec/unit/actions/clear_scroll_spec.rb +++ b/elasticsearch-api/spec/unit/actions/clear_scroll_spec.rb @@ -18,37 +18,18 @@ require 'spec_helper' describe 'client#clear_scroll' do - let(:expected_args) do [ 'DELETE', - '_search/scroll/abc123', + '_search/scroll', {}, - nil, + { scroll_id: 123 }, {}, - { defined_params: { scroll_id: 'abc123' }, endpoint: 'clear_scroll' } + { endpoint: 'clear_scroll' } ] end it 'performs the request' do - expect(client_double.clear_scroll(scroll_id: 'abc123')).to be_a Elasticsearch::API::Response - end - - context 'when a list of scroll ids is provided' do - - let(:expected_args) do - [ - 'DELETE', - '_search/scroll/abc123,def456', - {}, - nil, - {}, - { defined_params: { scroll_id: ['abc123', 'def456'] }, endpoint: 'clear_scroll' } - ] - end - - it 'performs the request' do - expect(client_double.clear_scroll(scroll_id: ['abc123', 'def456'])).to be_a Elasticsearch::API::Response - end + expect(client_double.clear_scroll(body: { scroll_id: 123 })).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/unit/actions/cluster/reroute_spec.rb b/elasticsearch-api/spec/unit/actions/cluster/reroute_spec.rb index 49848ce103..b0278bbab8 100644 --- a/elasticsearch-api/spec/unit/actions/cluster/reroute_spec.rb +++ b/elasticsearch-api/spec/unit/actions/cluster/reroute_spec.rb @@ -21,12 +21,12 @@ let(:expected_args) do [ - 'POST', - '_cluster/reroute', - {}, - {}, - {}, - { endpoint: 'cluster.reroute' } + 'POST', + '_cluster/reroute', + {}, + nil, + {}, + { endpoint: 'cluster.reroute' } ] end @@ -35,15 +35,14 @@ end context 'when a body is specified' do - let(:expected_args) do [ - 'POST', - '_cluster/reroute', - {}, - { commands: [ move: { index: 'myindex', shard: 0 }] }, - {}, - { endpoint: 'cluster.reroute' } + 'POST', + '_cluster/reroute', + {}, + { commands: [ move: { index: 'myindex', shard: 0 }] }, + {}, + { endpoint: 'cluster.reroute' } ] end diff --git a/elasticsearch-api/spec/unit/actions/indices/get_field_mapping_spec.rb b/elasticsearch-api/spec/unit/actions/indices/get_field_mapping_spec.rb index cd12bf16bc..e9550b65e9 100644 --- a/elasticsearch-api/spec/unit/actions/indices/get_field_mapping_spec.rb +++ b/elasticsearch-api/spec/unit/actions/indices/get_field_mapping_spec.rb @@ -26,7 +26,7 @@ {}, nil, {}, - { endpoint: 'indices.get_field_mapping' } + { endpoint: 'indices.get_field_mapping', defined_params: { fields: 'foo' } } ] end @@ -35,11 +35,10 @@ end it 'performs the request' do - expect(client_double.indices.get_field_mapping(field: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.indices.get_field_mapping(fields: 'foo')).to be_a Elasticsearch::API::Response end context 'when an index is specified' do - let(:url) do 'foo/_mapping/field/bam' end @@ -51,12 +50,12 @@ {}, nil, {}, - { defined_params: { index: 'foo' }, endpoint: 'indices.get_field_mapping' } + { defined_params: { index: 'foo', fields: 'bam' }, endpoint: 'indices.get_field_mapping' } ] end it 'performs the request' do - expect(client_double.indices.get_field_mapping(index: 'foo', field: 'bam')).to be_a Elasticsearch::API::Response + expect(client_double.indices.get_field_mapping(index: 'foo', fields: 'bam')).to be_a Elasticsearch::API::Response end end end diff --git a/elasticsearch-api/spec/unit/actions/ingest/get_ip_location_database_spec.rb b/elasticsearch-api/spec/unit/actions/ingest/get_ip_location_database_spec.rb index 41c356c3d3..e8aeb2504d 100644 --- a/elasticsearch-api/spec/unit/actions/ingest/get_ip_location_database_spec.rb +++ b/elasticsearch-api/spec/unit/actions/ingest/get_ip_location_database_spec.rb @@ -22,7 +22,7 @@ [ 'GET', '_ingest/ip_location/database/foo', - {}, + { body: {} }, nil, {}, { defined_params: { id: 'foo' }, endpoint: 'ingest.get_ip_location_database' } diff --git a/elasticsearch-api/spec/unit/actions/mtermvectors_spec.rb b/elasticsearch-api/spec/unit/actions/mtermvectors_spec.rb index 1bbc458fb4..cc4265f391 100644 --- a/elasticsearch-api/spec/unit/actions/mtermvectors_spec.rb +++ b/elasticsearch-api/spec/unit/actions/mtermvectors_spec.rb @@ -18,26 +18,35 @@ require 'spec_helper' describe 'client#mtermvectors' do - let(:expected_args) do - [ - 'POST', - 'my-index/_mtermvectors', - {}, - body, - {}, - { defined_params: { index: 'my-index' }, endpoint: 'mtermvectors' } - ] - end - - let(:body) do - { ids: [1, 2, 3] } - end + context 'in body' do + let(:expected_args) do + [ + 'POST', + 'my-index/_mtermvectors', + {}, + { ids: [1, 2, 3] }, + {}, + { defined_params: { index: 'my-index' }, endpoint: 'mtermvectors' } + ] + end - it 'performs the request' do - expect(client_double.mtermvectors(index: 'my-index', body: { ids: [1, 2, 3] })).to be_a Elasticsearch::API::Response + it 'performs the request' do + expect(client_double.mtermvectors(index: 'my-index', body: { ids: [1, 2, 3] })).to be_a Elasticsearch::API::Response + end end context 'when a list of ids is passed instead of a body' do + let(:expected_args) do + [ + 'GET', + 'my-index/_mtermvectors', + { ids: '1,2,3' }, + nil, + {}, + { defined_params: { index: 'my-index' }, endpoint: 'mtermvectors' } + ] + end + it 'performs the request' do expect(client_double.mtermvectors(index: 'my-index', ids: [1, 2, 3])).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/unit/actions/scroll_spec.rb b/elasticsearch-api/spec/unit/actions/scroll_spec.rb index 36ba031209..d7b2b3aee4 100644 --- a/elasticsearch-api/spec/unit/actions/scroll_spec.rb +++ b/elasticsearch-api/spec/unit/actions/scroll_spec.rb @@ -22,11 +22,11 @@ let(:expected_args) do [ 'GET', - '_search/scroll/cXVlcn...', + '_search/scroll', {}, nil, {}, - { defined_params: { scroll_id: 'cXVlcn...' }, endpoint: 'scroll' } + { endpoint: 'scroll' } ] end diff --git a/elasticsearch-api/spec/unit/perform_request_spec.rb b/elasticsearch-api/spec/unit/perform_request_spec.rb index 6fb47ae02a..0b67570705 100644 --- a/elasticsearch-api/spec/unit/perform_request_spec.rb +++ b/elasticsearch-api/spec/unit/perform_request_spec.rb @@ -23,7 +23,11 @@ describe 'Perform request args' do Elasticsearch::API::FilesHelper.files.each do |filepath| spec = Elasticsearch::API::EndpointSpec.new(filepath) - next if spec.module_namespace.flatten.first == '_internal' || spec.visibility != 'public' + next if spec.module_namespace.flatten.first == '_internal' || + spec.visibility != 'public' || + # TODO: Once the test suite is migrated to elasticsearch-specification, these should be removed + spec.module_namespace.flatten.first == 'rollup' || + ['scroll', 'clear_scroll', 'connector.last_sync'].include?(spec.endpoint_name) # These are the path parts defined by the user in the method argument defined_path_parts = spec.path_params.inject({}) do |params, part| From 61149f78f0fc802d619fe0ff7799c01ed5d842cd Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 13 Mar 2025 16:02:14 +0000 Subject: [PATCH 498/540] [DOCS] Updates Changelog 9.x --- CHANGELOG-9.x.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-9.x.md b/CHANGELOG-9.x.md index ef1d09842f..1b16cd0f77 100644 --- a/CHANGELOG-9.x.md +++ b/CHANGELOG-9.x.md @@ -2,7 +2,7 @@ ## Gem -The size of both `elasticsearch` and `elasticsearch-api` gems will be smaller, since some unnecessary files that were being included in the gem have been removed. +The size of both `elasticsearch` and `elasticsearch-api` gems will be smaller, since some unnecessary files that were being included in the gem have been removed. There's also been a lot of old code cleanup for `9.x`. The required Ruby version is set to `2.6` to keep compatiblity wit JRuby 9.3. However, we only test the code against currently supported Ruby versions. @@ -12,6 +12,11 @@ The CI build now runs tests to ensure compatibility with Elasticsearch Serverles ## Elasticsearch API +* The source code is now based on `elasticsearch-specification`, so the API documentation is much more detailed and extensive. +* Scroll APIs: Since sending the `scroll_id` as a parameter was deprecated, now it needs to be sent in the body for `clear_scroll`, `scroll`. +* `indices.get_field_mapping` - `:fields` is a required parameter. +* The functions in `utils.rb` that had names starting with double underscore have been renamed to remove these. + ### Development #### Testing From e58f4632ddf263d535ab185ba694381fc6badc21 Mon Sep 17 00:00:00 2001 From: Colleen McGinnis Date: Tue, 25 Mar 2025 09:08:05 -0500 Subject: [PATCH 499/540] [docs] Miscellaneous docs clean up (#2604) * remove unused substitutions * move images * fix image path --- docs/docset.yml | 478 ------------------ docs/reference/connecting.md | 8 +- docs/reference/getting-started.md | 4 +- docs/{ => reference}/images/api_key_name.png | Bin docs/{ => reference}/images/cloud_api_key.png | Bin docs/{ => reference}/images/cloud_id.png | Bin .../{ => reference}/images/create_api_key.png | Bin docs/{ => reference}/images/es_endpoint.jpg | Bin .../images/otel-waterfall-retry.png | Bin .../images/otel-waterfall-with-http.png | Bin .../images/otel-waterfall-without-http.png | Bin docs/reference/opentelemetry.md | 6 +- 12 files changed, 9 insertions(+), 487 deletions(-) rename docs/{ => reference}/images/api_key_name.png (100%) rename docs/{ => reference}/images/cloud_api_key.png (100%) rename docs/{ => reference}/images/cloud_id.png (100%) rename docs/{ => reference}/images/create_api_key.png (100%) rename docs/{ => reference}/images/es_endpoint.jpg (100%) rename docs/{ => reference}/images/otel-waterfall-retry.png (100%) rename docs/{ => reference}/images/otel-waterfall-with-http.png (100%) rename docs/{ => reference}/images/otel-waterfall-without-http.png (100%) diff --git a/docs/docset.yml b/docs/docset.yml index fb1b1471b7..d1f01be642 100644 --- a/docs/docset.yml +++ b/docs/docset.yml @@ -9,482 +9,4 @@ toc: - toc: reference - toc: release-notes subs: - ref: "https://www.elastic.co/guide/en/elasticsearch/reference/current" - ref-bare: "https://www.elastic.co/guide/en/elasticsearch/reference" - ref-8x: "https://www.elastic.co/guide/en/elasticsearch/reference/8.1" - ref-80: "https://www.elastic.co/guide/en/elasticsearch/reference/8.0" - ref-7x: "https://www.elastic.co/guide/en/elasticsearch/reference/7.17" - ref-70: "https://www.elastic.co/guide/en/elasticsearch/reference/7.0" - ref-60: "https://www.elastic.co/guide/en/elasticsearch/reference/6.0" - ref-64: "https://www.elastic.co/guide/en/elasticsearch/reference/6.4" - xpack-ref: "https://www.elastic.co/guide/en/x-pack/6.2" - logstash-ref: "https://www.elastic.co/guide/en/logstash/current" - kibana-ref: "https://www.elastic.co/guide/en/kibana/current" - kibana-ref-all: "https://www.elastic.co/guide/en/kibana" - beats-ref-root: "https://www.elastic.co/guide/en/beats" - beats-ref: "https://www.elastic.co/guide/en/beats/libbeat/current" - beats-ref-60: "https://www.elastic.co/guide/en/beats/libbeat/6.0" - beats-ref-63: "https://www.elastic.co/guide/en/beats/libbeat/6.3" - beats-devguide: "https://www.elastic.co/guide/en/beats/devguide/current" - auditbeat-ref: "https://www.elastic.co/guide/en/beats/auditbeat/current" - packetbeat-ref: "https://www.elastic.co/guide/en/beats/packetbeat/current" - metricbeat-ref: "https://www.elastic.co/guide/en/beats/metricbeat/current" - filebeat-ref: "https://www.elastic.co/guide/en/beats/filebeat/current" - functionbeat-ref: "https://www.elastic.co/guide/en/beats/functionbeat/current" - winlogbeat-ref: "https://www.elastic.co/guide/en/beats/winlogbeat/current" - heartbeat-ref: "https://www.elastic.co/guide/en/beats/heartbeat/current" - journalbeat-ref: "https://www.elastic.co/guide/en/beats/journalbeat/current" - ingest-guide: "https://www.elastic.co/guide/en/ingest/current" - fleet-guide: "https://www.elastic.co/guide/en/fleet/current" - apm-guide-ref: "https://www.elastic.co/guide/en/apm/guide/current" - apm-guide-7x: "https://www.elastic.co/guide/en/apm/guide/7.17" - apm-app-ref: "https://www.elastic.co/guide/en/kibana/current" - apm-agents-ref: "https://www.elastic.co/guide/en/apm/agent" - apm-android-ref: "https://www.elastic.co/guide/en/apm/agent/android/current" - apm-py-ref: "https://www.elastic.co/guide/en/apm/agent/python/current" - apm-py-ref-3x: "https://www.elastic.co/guide/en/apm/agent/python/3.x" - apm-node-ref-index: "https://www.elastic.co/guide/en/apm/agent/nodejs" - apm-node-ref: "https://www.elastic.co/guide/en/apm/agent/nodejs/current" - apm-node-ref-1x: "https://www.elastic.co/guide/en/apm/agent/nodejs/1.x" - apm-rum-ref: "https://www.elastic.co/guide/en/apm/agent/rum-js/current" - apm-ruby-ref: "https://www.elastic.co/guide/en/apm/agent/ruby/current" - apm-java-ref: "https://www.elastic.co/guide/en/apm/agent/java/current" - apm-go-ref: "https://www.elastic.co/guide/en/apm/agent/go/current" - apm-dotnet-ref: "https://www.elastic.co/guide/en/apm/agent/dotnet/current" - apm-php-ref: "https://www.elastic.co/guide/en/apm/agent/php/current" - apm-ios-ref: "https://www.elastic.co/guide/en/apm/agent/swift/current" - apm-lambda-ref: "https://www.elastic.co/guide/en/apm/lambda/current" - apm-attacher-ref: "https://www.elastic.co/guide/en/apm/attacher/current" - docker-logging-ref: "https://www.elastic.co/guide/en/beats/loggingplugin/current" - esf-ref: "https://www.elastic.co/guide/en/esf/current" - kinesis-firehose-ref: "https://www.elastic.co/guide/en/kinesis/{{kinesis_version}}" - estc-welcome-current: "https://www.elastic.co/guide/en/starting-with-the-elasticsearch-platform-and-its-solutions/current" - estc-welcome: "https://www.elastic.co/guide/en/starting-with-the-elasticsearch-platform-and-its-solutions/current" - estc-welcome-all: "https://www.elastic.co/guide/en/starting-with-the-elasticsearch-platform-and-its-solutions" - hadoop-ref: "https://www.elastic.co/guide/en/elasticsearch/hadoop/current" - stack-ref: "https://www.elastic.co/guide/en/elastic-stack/current" - stack-ref-67: "https://www.elastic.co/guide/en/elastic-stack/6.7" - stack-ref-68: "https://www.elastic.co/guide/en/elastic-stack/6.8" - stack-ref-70: "https://www.elastic.co/guide/en/elastic-stack/7.0" - stack-ref-80: "https://www.elastic.co/guide/en/elastic-stack/8.0" - stack-ov: "https://www.elastic.co/guide/en/elastic-stack-overview/current" - stack-gs: "https://www.elastic.co/guide/en/elastic-stack-get-started/current" - stack-gs-current: "https://www.elastic.co/guide/en/elastic-stack-get-started/current" - javaclient: "https://www.elastic.co/guide/en/elasticsearch/client/java-api/current" - java-api-client: "https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current" - java-rest: "https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current" - jsclient: "https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current" - jsclient-current: "https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current" - es-ruby-client: "https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current" - es-dotnet-client: "https://www.elastic.co/guide/en/elasticsearch/client/net-api/current" - es-php-client: "https://www.elastic.co/guide/en/elasticsearch/client/php-api/current" - es-python-client: "https://www.elastic.co/guide/en/elasticsearch/client/python-api/current" - defguide: "https://www.elastic.co/guide/en/elasticsearch/guide/2.x" - painless: "https://www.elastic.co/guide/en/elasticsearch/painless/current" - plugins: "https://www.elastic.co/guide/en/elasticsearch/plugins/current" - plugins-8x: "https://www.elastic.co/guide/en/elasticsearch/plugins/8.1" - plugins-7x: "https://www.elastic.co/guide/en/elasticsearch/plugins/7.17" - plugins-6x: "https://www.elastic.co/guide/en/elasticsearch/plugins/6.8" - glossary: "https://www.elastic.co/guide/en/elastic-stack-glossary/current" - upgrade_guide: "https://www.elastic.co/products/upgrade_guide" - blog-ref: "https://www.elastic.co/blog/" - curator-ref: "https://www.elastic.co/guide/en/elasticsearch/client/curator/current" - curator-ref-current: "https://www.elastic.co/guide/en/elasticsearch/client/curator/current" - metrics-ref: "https://www.elastic.co/guide/en/metrics/current" - metrics-guide: "https://www.elastic.co/guide/en/metrics/guide/current" - logs-ref: "https://www.elastic.co/guide/en/logs/current" - logs-guide: "https://www.elastic.co/guide/en/logs/guide/current" - uptime-guide: "https://www.elastic.co/guide/en/uptime/current" - observability-guide: "https://www.elastic.co/guide/en/observability/current" - observability-guide-all: "https://www.elastic.co/guide/en/observability" - siem-guide: "https://www.elastic.co/guide/en/siem/guide/current" - security-guide: "https://www.elastic.co/guide/en/security/current" - security-guide-all: "https://www.elastic.co/guide/en/security" - endpoint-guide: "https://www.elastic.co/guide/en/endpoint/current" - sql-odbc: "https://www.elastic.co/guide/en/elasticsearch/sql-odbc/current" - ecs-ref: "https://www.elastic.co/guide/en/ecs/current" - ecs-logging-ref: "https://www.elastic.co/guide/en/ecs-logging/overview/current" - ecs-logging-go-logrus-ref: "https://www.elastic.co/guide/en/ecs-logging/go-logrus/current" - ecs-logging-go-zap-ref: "https://www.elastic.co/guide/en/ecs-logging/go-zap/current" - ecs-logging-go-zerolog-ref: "https://www.elastic.co/guide/en/ecs-logging/go-zap/current" - ecs-logging-java-ref: "https://www.elastic.co/guide/en/ecs-logging/java/current" - ecs-logging-dotnet-ref: "https://www.elastic.co/guide/en/ecs-logging/dotnet/current" - ecs-logging-nodejs-ref: "https://www.elastic.co/guide/en/ecs-logging/nodejs/current" - ecs-logging-php-ref: "https://www.elastic.co/guide/en/ecs-logging/php/current" - ecs-logging-python-ref: "https://www.elastic.co/guide/en/ecs-logging/python/current" - ecs-logging-ruby-ref: "https://www.elastic.co/guide/en/ecs-logging/ruby/current" - ml-docs: "https://www.elastic.co/guide/en/machine-learning/current" - eland-docs: "https://www.elastic.co/guide/en/elasticsearch/client/eland/current" - eql-ref: "https://eql.readthedocs.io/en/latest/query-guide" - extendtrial: "https://www.elastic.co/trialextension" - wikipedia: "https://en.wikipedia.org/wiki" - forum: "https://discuss.elastic.co/" - xpack-forum: "https://discuss.elastic.co/c/50-x-pack" - security-forum: "https://discuss.elastic.co/c/x-pack/shield" - watcher-forum: "https://discuss.elastic.co/c/x-pack/watcher" - monitoring-forum: "https://discuss.elastic.co/c/x-pack/marvel" - graph-forum: "https://discuss.elastic.co/c/x-pack/graph" - apm-forum: "https://discuss.elastic.co/c/apm" - enterprise-search-ref: "https://www.elastic.co/guide/en/enterprise-search/current" - app-search-ref: "https://www.elastic.co/guide/en/app-search/current" - workplace-search-ref: "https://www.elastic.co/guide/en/workplace-search/current" - enterprise-search-node-ref: "https://www.elastic.co/guide/en/enterprise-search-clients/enterprise-search-node/current" - enterprise-search-php-ref: "https://www.elastic.co/guide/en/enterprise-search-clients/php/current" - enterprise-search-python-ref: "https://www.elastic.co/guide/en/enterprise-search-clients/python/current" - enterprise-search-ruby-ref: "https://www.elastic.co/guide/en/enterprise-search-clients/ruby/current" - elastic-maps-service: "https://maps.elastic.co" - integrations-docs: "https://docs.elastic.co/en/integrations" - integrations-devguide: "https://www.elastic.co/guide/en/integrations-developer/current" - time-units: "https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#time-units" - byte-units: "https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#byte-units" - apm-py-ref-v: "https://www.elastic.co/guide/en/apm/agent/python/current" - apm-node-ref-v: "https://www.elastic.co/guide/en/apm/agent/nodejs/current" - apm-rum-ref-v: "https://www.elastic.co/guide/en/apm/agent/rum-js/current" - apm-ruby-ref-v: "https://www.elastic.co/guide/en/apm/agent/ruby/current" - apm-java-ref-v: "https://www.elastic.co/guide/en/apm/agent/java/current" - apm-go-ref-v: "https://www.elastic.co/guide/en/apm/agent/go/current" - apm-ios-ref-v: "https://www.elastic.co/guide/en/apm/agent/swift/current" - apm-dotnet-ref-v: "https://www.elastic.co/guide/en/apm/agent/dotnet/current" - apm-php-ref-v: "https://www.elastic.co/guide/en/apm/agent/php/current" - ecloud: "Elastic Cloud" - esf: "Elastic Serverless Forwarder" - ess: "Elasticsearch Service" - ece: "Elastic Cloud Enterprise" - eck: "Elastic Cloud on Kubernetes" - serverless-full: "Elastic Cloud Serverless" - serverless-short: "Serverless" - es-serverless: "Elasticsearch Serverless" - es3: "Elasticsearch Serverless" - obs-serverless: "Elastic Observability Serverless" - sec-serverless: "Elastic Security Serverless" - serverless-docs: "https://docs.elastic.co/serverless" - cloud: "https://www.elastic.co/guide/en/cloud/current" - ess-utm-params: "?page=docs&placement=docs-body" - ess-baymax: "?page=docs&placement=docs-body" - ess-trial: "https://cloud.elastic.co/registration?page=docs&placement=docs-body" - ess-product: "https://www.elastic.co/cloud/elasticsearch-service?page=docs&placement=docs-body" - ess-console: "https://cloud.elastic.co?page=docs&placement=docs-body" - ess-console-name: "Elasticsearch Service Console" - ess-deployments: "https://cloud.elastic.co/deployments?page=docs&placement=docs-body" - ece-ref: "https://www.elastic.co/guide/en/cloud-enterprise/current" - eck-ref: "https://www.elastic.co/guide/en/cloud-on-k8s/current" - ess-leadin: "You can run Elasticsearch on your own hardware or use our hosted Elasticsearch Service that is available on AWS, GCP, and Azure. https://cloud.elastic.co/registration{ess-utm-params}[Try the Elasticsearch Service for free]." - ess-leadin-short: "Our hosted Elasticsearch Service is available on AWS, GCP, and Azure, and you can https://cloud.elastic.co/registration{ess-utm-params}[try it for free]." - ess-icon: "image:https://doc-icons.s3.us-east-2.amazonaws.com/logo_cloud.svg[link=\"https://cloud.elastic.co/registration{ess-utm-params}\", title=\"Supported on Elasticsearch Service\"]" - ece-icon: "image:https://doc-icons.s3.us-east-2.amazonaws.com/logo_cloud_ece.svg[link=\"https://cloud.elastic.co/registration{ess-utm-params}\", title=\"Supported on Elastic Cloud Enterprise\"]" - cloud-only: "This feature is designed for indirect use by https://cloud.elastic.co/registration{ess-utm-params}[Elasticsearch Service], https://www.elastic.co/guide/en/cloud-enterprise/{ece-version-link}[Elastic Cloud Enterprise], and https://www.elastic.co/guide/en/cloud-on-k8s/current[Elastic Cloud on Kubernetes]. Direct use is not supported." - ess-setting-change: "image:https://doc-icons.s3.us-east-2.amazonaws.com/logo_cloud.svg[link=\"{ess-trial}\", title=\"Supported on {ess}\"] indicates a change to a supported https://www.elastic.co/guide/en/cloud/current/ec-add-user-settings.html[user setting] for Elasticsearch Service." - ess-skip-section: "If you use Elasticsearch Service, skip this section. Elasticsearch Service handles these changes for you." - api-cloud: "https://www.elastic.co/docs/api/doc/cloud" - api-ece: "https://www.elastic.co/docs/api/doc/cloud-enterprise" - api-kibana-serverless: "https://www.elastic.co/docs/api/doc/serverless" - es-feature-flag: "This feature is in development and not yet available for use. This documentation is provided for informational purposes only." - es-ref-dir: "'{{elasticsearch-root}}/docs/reference'" - apm-app: "APM app" - uptime-app: "Uptime app" - synthetics-app: "Synthetics app" - logs-app: "Logs app" - metrics-app: "Metrics app" - infrastructure-app: "Infrastructure app" - siem-app: "SIEM app" - security-app: "Elastic Security app" - ml-app: "Machine Learning" - dev-tools-app: "Dev Tools" - ingest-manager-app: "Ingest Manager" - stack-manage-app: "Stack Management" - stack-monitor-app: "Stack Monitoring" - alerts-ui: "Alerts and Actions" - rules-ui: "Rules" - rac-ui: "Rules and Connectors" - connectors-ui: "Connectors" - connectors-feature: "Actions and Connectors" - stack-rules-feature: "Stack Rules" - user-experience: "User Experience" - ems: "Elastic Maps Service" - ems-init: "EMS" - hosted-ems: "Elastic Maps Server" - ipm-app: "Index Pattern Management" - ingest-pipelines: "ingest pipelines" - ingest-pipelines-app: "Ingest Pipelines" - ingest-pipelines-cap: "Ingest pipelines" - ls-pipelines: "Logstash pipelines" - ls-pipelines-app: "Logstash Pipelines" - maint-windows: "maintenance windows" - maint-windows-app: "Maintenance Windows" - maint-windows-cap: "Maintenance windows" - custom-roles-app: "Custom Roles" - data-source: "data view" - data-sources: "data views" - data-source-caps: "Data View" - data-sources-caps: "Data Views" - data-source-cap: "Data view" - data-sources-cap: "Data views" - project-settings: "Project settings" - manage-app: "Management" - index-manage-app: "Index Management" - data-views-app: "Data Views" - rules-app: "Rules" - saved-objects-app: "Saved Objects" - tags-app: "Tags" - api-keys-app: "API keys" - transforms-app: "Transforms" - connectors-app: "Connectors" - files-app: "Files" - reports-app: "Reports" - maps-app: "Maps" - alerts-app: "Alerts" - crawler: "Enterprise Search web crawler" - ents: "Enterprise Search" - app-search-crawler: "App Search web crawler" - agent: "Elastic Agent" - agents: "Elastic Agents" - fleet: "Fleet" - fleet-server: "Fleet Server" - integrations-server: "Integrations Server" - ingest-manager: "Ingest Manager" - ingest-management: "ingest management" - package-manager: "Elastic Package Manager" - integrations: "Integrations" - package-registry: "Elastic Package Registry" - artifact-registry: "Elastic Artifact Registry" - aws: "AWS" - stack: "Elastic Stack" - xpack: "X-Pack" es: "Elasticsearch" - kib: "Kibana" - esms: "Elastic Stack Monitoring Service" - esms-init: "ESMS" - ls: "Logstash" - beats: "Beats" - auditbeat: "Auditbeat" - filebeat: "Filebeat" - heartbeat: "Heartbeat" - metricbeat: "Metricbeat" - packetbeat: "Packetbeat" - winlogbeat: "Winlogbeat" - functionbeat: "Functionbeat" - journalbeat: "Journalbeat" - es-sql: "Elasticsearch SQL" - esql: "ES|QL" - elastic-agent: "Elastic Agent" - k8s: "Kubernetes" - log-driver-long: "Elastic Logging Plugin for Docker" - security: "X-Pack security" - security-features: "security features" - operator-feature: "operator privileges feature" - es-security-features: "Elasticsearch security features" - stack-security-features: "Elastic Stack security features" - endpoint-sec: "Endpoint Security" - endpoint-cloud-sec: "Endpoint and Cloud Security" - elastic-defend: "Elastic Defend" - elastic-sec: "Elastic Security" - elastic-endpoint: "Elastic Endpoint" - swimlane: "Swimlane" - sn: "ServiceNow" - sn-itsm: "ServiceNow ITSM" - sn-itom: "ServiceNow ITOM" - sn-sir: "ServiceNow SecOps" - jira: "Jira" - ibm-r: "IBM Resilient" - webhook: "Webhook" - webhook-cm: "Webhook - Case Management" - opsgenie: "Opsgenie" - bedrock: "Amazon Bedrock" - gemini: "Google Gemini" - hive: "TheHive" - monitoring: "X-Pack monitoring" - monitor-features: "monitoring features" - stack-monitor-features: "Elastic Stack monitoring features" - watcher: "Watcher" - alert-features: "alerting features" - reporting: "X-Pack reporting" - report-features: "reporting features" - graph: "X-Pack graph" - graph-features: "graph analytics features" - searchprofiler: "Search Profiler" - xpackml: "X-Pack machine learning" - ml: "machine learning" - ml-cap: "Machine learning" - ml-init: "ML" - ml-features: "machine learning features" - stack-ml-features: "Elastic Stack machine learning features" - ccr: "cross-cluster replication" - ccr-cap: "Cross-cluster replication" - ccr-init: "CCR" - ccs: "cross-cluster search" - ccs-cap: "Cross-cluster search" - ccs-init: "CCS" - ilm: "index lifecycle management" - ilm-cap: "Index lifecycle management" - ilm-init: "ILM" - dlm: "data lifecycle management" - dlm-cap: "Data lifecycle management" - dlm-init: "DLM" - search-snap: "searchable snapshot" - search-snaps: "searchable snapshots" - search-snaps-cap: "Searchable snapshots" - slm: "snapshot lifecycle management" - slm-cap: "Snapshot lifecycle management" - slm-init: "SLM" - rollup-features: "data rollup features" - ipm: "index pattern management" - ipm-cap: "Index pattern" - rollup: "rollup" - rollup-cap: "Rollup" - rollups: "rollups" - rollups-cap: "Rollups" - rollup-job: "rollup job" - rollup-jobs: "rollup jobs" - rollup-jobs-cap: "Rollup jobs" - dfeed: "datafeed" - dfeeds: "datafeeds" - dfeed-cap: "Datafeed" - dfeeds-cap: "Datafeeds" - ml-jobs: "machine learning jobs" - ml-jobs-cap: "Machine learning jobs" - anomaly-detect: "anomaly detection" - anomaly-detect-cap: "Anomaly detection" - anomaly-job: "anomaly detection job" - anomaly-jobs: "anomaly detection jobs" - anomaly-jobs-cap: "Anomaly detection jobs" - dataframe: "data frame" - dataframes: "data frames" - dataframe-cap: "Data frame" - dataframes-cap: "Data frames" - watcher-transform: "payload transform" - watcher-transforms: "payload transforms" - watcher-transform-cap: "Payload transform" - watcher-transforms-cap: "Payload transforms" - transform: "transform" - transforms: "transforms" - transform-cap: "Transform" - transforms-cap: "Transforms" - dataframe-transform: "transform" - dataframe-transform-cap: "Transform" - dataframe-transforms: "transforms" - dataframe-transforms-cap: "Transforms" - dfanalytics-cap: "Data frame analytics" - dfanalytics: "data frame analytics" - dataframe-analytics-config: "'{dataframe} analytics config'" - dfanalytics-job: "'{dataframe} analytics job'" - dfanalytics-jobs: "'{dataframe} analytics jobs'" - dfanalytics-jobs-cap: "'{dataframe-cap} analytics jobs'" - cdataframe: "continuous data frame" - cdataframes: "continuous data frames" - cdataframe-cap: "Continuous data frame" - cdataframes-cap: "Continuous data frames" - cdataframe-transform: "continuous transform" - cdataframe-transforms: "continuous transforms" - cdataframe-transforms-cap: "Continuous transforms" - ctransform: "continuous transform" - ctransform-cap: "Continuous transform" - ctransforms: "continuous transforms" - ctransforms-cap: "Continuous transforms" - oldetection: "outlier detection" - oldetection-cap: "Outlier detection" - olscore: "outlier score" - olscores: "outlier scores" - fiscore: "feature influence score" - evaluatedf-api: "evaluate {dataframe} analytics API" - evaluatedf-api-cap: "Evaluate {dataframe} analytics API" - binarysc: "binary soft classification" - binarysc-cap: "Binary soft classification" - regression: "regression" - regression-cap: "Regression" - reganalysis: "regression analysis" - reganalysis-cap: "Regression analysis" - depvar: "dependent variable" - feature-var: "feature variable" - feature-vars: "feature variables" - feature-vars-cap: "Feature variables" - classification: "classification" - classification-cap: "Classification" - classanalysis: "classification analysis" - classanalysis-cap: "Classification analysis" - infer-cap: "Inference" - infer: "inference" - lang-ident-cap: "Language identification" - lang-ident: "language identification" - data-viz: "Data Visualizer" - file-data-viz: "File Data Visualizer" - feat-imp: "feature importance" - feat-imp-cap: "Feature importance" - nlp: "natural language processing" - nlp-cap: "Natural language processing" - apm-agent: "APM agent" - apm-go-agent: "Elastic APM Go agent" - apm-go-agents: "Elastic APM Go agents" - apm-ios-agent: "Elastic APM iOS agent" - apm-ios-agents: "Elastic APM iOS agents" - apm-java-agent: "Elastic APM Java agent" - apm-java-agents: "Elastic APM Java agents" - apm-dotnet-agent: "Elastic APM .NET agent" - apm-dotnet-agents: "Elastic APM .NET agents" - apm-node-agent: "Elastic APM Node.js agent" - apm-node-agents: "Elastic APM Node.js agents" - apm-php-agent: "Elastic APM PHP agent" - apm-php-agents: "Elastic APM PHP agents" - apm-py-agent: "Elastic APM Python agent" - apm-py-agents: "Elastic APM Python agents" - apm-ruby-agent: "Elastic APM Ruby agent" - apm-ruby-agents: "Elastic APM Ruby agents" - apm-rum-agent: "Elastic APM Real User Monitoring (RUM) JavaScript agent" - apm-rum-agents: "Elastic APM RUM JavaScript agents" - apm-lambda-ext: "Elastic APM AWS Lambda extension" - project-monitors: "project monitors" - project-monitors-cap: "Project monitors" - private-location: "Private Location" - private-locations: "Private Locations" - pwd: "YOUR_PASSWORD" - esh: "ES-Hadoop" - default-dist: "default distribution" - oss-dist: "OSS-only distribution" - observability: "Observability" - api-request-title: "Request" - api-prereq-title: "Prerequisites" - api-description-title: "Description" - api-path-parms-title: "Path parameters" - api-query-parms-title: "Query parameters" - api-request-body-title: "Request body" - api-response-codes-title: "Response codes" - api-response-body-title: "Response body" - api-example-title: "Example" - api-examples-title: "Examples" - api-definitions-title: "Properties" - multi-arg: "†footnoteref:[multi-arg,This parameter accepts multiple arguments.]" - multi-arg-ref: "†footnoteref:[multi-arg]" - yes-icon: "image:https://doc-icons.s3.us-east-2.amazonaws.com/icon-yes.png[Yes,20,15]" - no-icon: "image:https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png[No,20,15]" - es-repo: "https://github.com/elastic/elasticsearch/" - es-issue: "https://github.com/elastic/elasticsearch/issues/" - es-pull: "https://github.com/elastic/elasticsearch/pull/" - es-commit: "https://github.com/elastic/elasticsearch/commit/" - kib-repo: "https://github.com/elastic/kibana/" - kib-issue: "https://github.com/elastic/kibana/issues/" - kibana-issue: "'{kib-repo}issues/'" - kib-pull: "https://github.com/elastic/kibana/pull/" - kibana-pull: "'{kib-repo}pull/'" - kib-commit: "https://github.com/elastic/kibana/commit/" - ml-repo: "https://github.com/elastic/ml-cpp/" - ml-issue: "https://github.com/elastic/ml-cpp/issues/" - ml-pull: "https://github.com/elastic/ml-cpp/pull/" - ml-commit: "https://github.com/elastic/ml-cpp/commit/" - apm-repo: "https://github.com/elastic/apm-server/" - apm-issue: "https://github.com/elastic/apm-server/issues/" - apm-pull: "https://github.com/elastic/apm-server/pull/" - kibana-blob: "https://github.com/elastic/kibana/blob/current/" - apm-get-started-ref: "https://www.elastic.co/guide/en/apm/get-started/current" - apm-server-ref: "https://www.elastic.co/guide/en/apm/server/current" - apm-server-ref-v: "https://www.elastic.co/guide/en/apm/server/current" - apm-server-ref-m: "https://www.elastic.co/guide/en/apm/server/master" - apm-server-ref-62: "https://www.elastic.co/guide/en/apm/server/6.2" - apm-server-ref-64: "https://www.elastic.co/guide/en/apm/server/6.4" - apm-server-ref-70: "https://www.elastic.co/guide/en/apm/server/7.0" - apm-overview-ref-v: "https://www.elastic.co/guide/en/apm/get-started/current" - apm-overview-ref-70: "https://www.elastic.co/guide/en/apm/get-started/7.0" - apm-overview-ref-m: "https://www.elastic.co/guide/en/apm/get-started/master" - infra-guide: "https://www.elastic.co/guide/en/infrastructure/guide/current" - a-data-source: "a data view" - icon-bug: "pass:[]" - icon-checkInCircleFilled: "pass:[]" - icon-warningFilled: "pass:[]" diff --git a/docs/reference/connecting.md b/docs/reference/connecting.md index 3b83f27e15..76768e2975 100644 --- a/docs/reference/connecting.md +++ b/docs/reference/connecting.md @@ -16,7 +16,7 @@ This document contains code snippets to show you how to connect to various {{es} If you are using [Elastic Cloud](https://www.elastic.co/cloud), the client offers an easy way to connect to it. You need the Cloud ID that you can find in the cloud console, then your username and password. -:::{image} ../images/cloud_id.png +:::{image} images/cloud_id.png :alt: Cloud ID ::: @@ -34,19 +34,19 @@ client = Elasticsearch::Client.new( You can also connect to the Cloud by using API Key authentication. You can generate an `API key` in the `Management` page under the section `Security`. -:::{image} ../images/cloud_api_key.png +:::{image} images/cloud_api_key.png :alt: API key ::: When you click on `Create API key` you can choose a name and set the other options (eg. restrict privileges, expire after time, etc). -:::{image} ../images/api_key_name.png +:::{image} images/api_key_name.png :alt: Choose an API name ::: After this step you will get the `API key` in the API keys page. -:::{image} ../images/cloud_api_key.png +:::{image} images/cloud_api_key.png :alt: API key ::: diff --git a/docs/reference/getting-started.md b/docs/reference/getting-started.md index 41920656aa..82d5753b23 100644 --- a/docs/reference/getting-started.md +++ b/docs/reference/getting-started.md @@ -38,13 +38,13 @@ client = Elasticsearch::Client.new( Your Elasticsearch endpoint can be found on the **My deployment** page of your deployment: -:::{image} ../images/es_endpoint.jpg +:::{image} images/es_endpoint.jpg :alt: Finding Elasticsearch endpoint ::: You can generate an API key on the **Management** page under Security. -:::{image} ../images/create_api_key.png +:::{image} images/create_api_key.png :alt: Create API key ::: diff --git a/docs/images/api_key_name.png b/docs/reference/images/api_key_name.png similarity index 100% rename from docs/images/api_key_name.png rename to docs/reference/images/api_key_name.png diff --git a/docs/images/cloud_api_key.png b/docs/reference/images/cloud_api_key.png similarity index 100% rename from docs/images/cloud_api_key.png rename to docs/reference/images/cloud_api_key.png diff --git a/docs/images/cloud_id.png b/docs/reference/images/cloud_id.png similarity index 100% rename from docs/images/cloud_id.png rename to docs/reference/images/cloud_id.png diff --git a/docs/images/create_api_key.png b/docs/reference/images/create_api_key.png similarity index 100% rename from docs/images/create_api_key.png rename to docs/reference/images/create_api_key.png diff --git a/docs/images/es_endpoint.jpg b/docs/reference/images/es_endpoint.jpg similarity index 100% rename from docs/images/es_endpoint.jpg rename to docs/reference/images/es_endpoint.jpg diff --git a/docs/images/otel-waterfall-retry.png b/docs/reference/images/otel-waterfall-retry.png similarity index 100% rename from docs/images/otel-waterfall-retry.png rename to docs/reference/images/otel-waterfall-retry.png diff --git a/docs/images/otel-waterfall-with-http.png b/docs/reference/images/otel-waterfall-with-http.png similarity index 100% rename from docs/images/otel-waterfall-with-http.png rename to docs/reference/images/otel-waterfall-with-http.png diff --git a/docs/images/otel-waterfall-without-http.png b/docs/reference/images/otel-waterfall-without-http.png similarity index 100% rename from docs/images/otel-waterfall-without-http.png rename to docs/reference/images/otel-waterfall-without-http.png diff --git a/docs/reference/opentelemetry.md b/docs/reference/opentelemetry.md index ccc4863a8c..359ecdd3cf 100644 --- a/docs/reference/opentelemetry.md +++ b/docs/reference/opentelemetry.md @@ -9,21 +9,21 @@ You can use [OpenTelemetry](https://opentelemetry.io/) to monitor the performanc The native instrumentation in the Ruby Client follows the [OpenTelemetry Semantic Conventions for {{es}}](https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/). In particular, the instrumentation in the client covers the logical layer of {{es}} requests. A single span per request is created that is processed by the service through the Ruby Client. The following image shows a trace that records the handling of two different {{es}} requests: a `ping` request and a `search` request. -:::{image} ../images/otel-waterfall-without-http.png +:::{image} images/otel-waterfall-without-http.png :alt: Distributed trace with Elasticsearch spans :class: screenshot ::: Usually, OpenTelemetry auto-instrumentation modules come with instrumentation support for HTTP-level communication. In this case, in addition to the logical {{es}} client requests, spans will be captured for the physical HTTP requests emitted by the client. The following image shows a trace with both, {{es}} spans (in blue) and the corresponding HTTP-level spans (in red): -:::{image} ../images/otel-waterfall-with-http.png +:::{image} images/otel-waterfall-with-http.png :alt: Distributed trace with Elasticsearch spans :class: screenshot ::: Advanced Ruby Client behavior such as nodes round-robin and request retries are revealed through the combination of logical {{es}} spans and the physical HTTP spans. The following example shows a `search` request in a scenario with two nodes: -:::{image} ../images/otel-waterfall-retry.png +:::{image} images/otel-waterfall-retry.png :alt: Distributed trace with Elasticsearch spans :class: screenshot ::: From 9fb343e558feaa8780ac6ac388cef4e9cc266b2a Mon Sep 17 00:00:00 2001 From: Kaarina Tungseth Date: Wed, 26 Mar 2025 00:45:26 -0500 Subject: [PATCH 500/540] Updates navigation titles and descriptions for release notes (#2605) --- docs/release-notes/breaking-changes.md | 8 ++------ docs/release-notes/deprecations.md | 8 +++----- docs/release-notes/index.md | 2 -- docs/release-notes/known-issues.md | 2 +- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/docs/release-notes/breaking-changes.md b/docs/release-notes/breaking-changes.md index fba96055e4..047f7e9141 100644 --- a/docs/release-notes/breaking-changes.md +++ b/docs/release-notes/breaking-changes.md @@ -1,14 +1,11 @@ --- -navigation_title: "Elasticsearch Ruby Client" +navigation_title: "Breaking changes" --- # Elasticsearch Ruby Client breaking changes [elasticsearch-ruby-client-breaking-changes] -Before you upgrade, carefully review the Elasticsearch Ruby Client breaking changes and take the necessary steps to mitigate any issues. - -To learn how to upgrade, check out . +Breaking changes can impact your Elastic applications, potentially disrupting normal operations. Before you upgrade, carefully review the Elasticsearch Ruby Client breaking changes and take the necessary steps to mitigate any issues. To learn how to upgrade, check [Upgrade](docs-content://deploy-manage/upgrade.md). % ## Next version [elasticsearch-ruby-client-nextversion-breaking-changes] -% **Release date:** Month day, year % ::::{dropdown} Title of breaking change % Description of the breaking change. @@ -18,7 +15,6 @@ To learn how to upgrade, check out . % :::: % ## 9.0.0 [elasticsearch-ruby-client-900-breaking-changes] -% **Release date:** March 25, 2025 % ::::{dropdown} Title of breaking change % Description of the breaking change. diff --git a/docs/release-notes/deprecations.md b/docs/release-notes/deprecations.md index 4c27fcb8bd..6de975eb85 100644 --- a/docs/release-notes/deprecations.md +++ b/docs/release-notes/deprecations.md @@ -1,14 +1,13 @@ --- -navigation_title: "Elasticsearch Ruby Client" +navigation_title: "Deprecations" --- # Elasticsearch Ruby Client deprecations [elasticsearch-ruby-client-deprecations] -Review the deprecated functionality for your Elasticsearch Ruby Client version. While deprecations have no immediate impact, we strongly encourage you update your implementation after you upgrade. +Over time, certain Elastic functionality becomes outdated and is replaced or removed. To help with the transition, Elastic deprecates functionality for a period before removal, giving you time to update your applications. -To learn how to upgrade, check out . +Review the deprecated functionality for Elasticsearch Ruby Client. While deprecations have no immediate impact, we strongly encourage you update your implementation after you upgrade. To learn how to upgrade, check out [Upgrade](docs-content://deploy-manage/upgrade.md). % ## Next version [elasticsearch-ruby-client-versionnext-deprecations] -% **Release date:** Month day, year % ::::{dropdown} Deprecation title % Description of the deprecation. @@ -18,7 +17,6 @@ To learn how to upgrade, check out . % :::: % ## 9.0.0 [elasticsearch-ruby-client-900-deprecations] -% **Release date:** March 25, 2025 % ::::{dropdown} Deprecation title % Description of the deprecation. diff --git a/docs/release-notes/index.md b/docs/release-notes/index.md index c2d13a705e..f4c2258fb5 100644 --- a/docs/release-notes/index.md +++ b/docs/release-notes/index.md @@ -11,7 +11,6 @@ To check for security updates, go to [Security announcements for the Elastic sta % Release notes include only features, enhancements, and fixes. Add breaking changes, deprecations, and known issues to the applicable release notes sections. % ## version.next [elasticsearch-ruby-client-next-release-notes] -% **Release date:** Month day, year % ### Features and enhancements [elasticsearch-ruby-client-next-features-enhancements] % * @@ -20,7 +19,6 @@ To check for security updates, go to [Security announcements for the Elastic sta % * ## 9.0.0 [elasticsearch-ruby-client-900-release-notes] -**Release date:** March 25, 2025 ### Features and enhancements [elasticsearch-ruby-client-900-features-enhancements] diff --git a/docs/release-notes/known-issues.md b/docs/release-notes/known-issues.md index 91ff1765df..c84a5bea5a 100644 --- a/docs/release-notes/known-issues.md +++ b/docs/release-notes/known-issues.md @@ -1,5 +1,5 @@ --- -navigation_title: "Elasticsearch Ruby Client" +navigation_title: "Known issues" --- From c266718d4b640a4b19d0eb170ba469ff500a6290 Mon Sep 17 00:00:00 2001 From: Colleen McGinnis Date: Thu, 27 Mar 2025 11:31:47 -0500 Subject: [PATCH 501/540] add missing mapped pages (#2608) --- docs/release-notes/index.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/release-notes/index.md b/docs/release-notes/index.md index f4c2258fb5..c26ba12814 100644 --- a/docs/release-notes/index.md +++ b/docs/release-notes/index.md @@ -1,22 +1,24 @@ --- navigation_title: "Elasticsearch Ruby Client" +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/release_notes.html --- # Elasticsearch Ruby Client release notes [elasticsearch-ruby-client-release-notes] -Review the changes, fixes, and more in each version of Elasticsearch Ruby Client. +Review the changes, fixes, and more in each version of Elasticsearch Ruby Client. To check for security updates, go to [Security announcements for the Elastic stack](https://discuss.elastic.co/c/announcements/security-announcements/31). -% Release notes include only features, enhancements, and fixes. Add breaking changes, deprecations, and known issues to the applicable release notes sections. +% Release notes include only features, enhancements, and fixes. Add breaking changes, deprecations, and known issues to the applicable release notes sections. % ## version.next [elasticsearch-ruby-client-next-release-notes] % ### Features and enhancements [elasticsearch-ruby-client-next-features-enhancements] -% * +% * % ### Fixes [elasticsearch-ruby-client-next-fixes] -% * +% * ## 9.0.0 [elasticsearch-ruby-client-900-release-notes] From b915ef5ed56516618de118fa66806be2afbfade5 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 31 Mar 2025 12:26:45 +0100 Subject: [PATCH 502/540] [Gem] Don't use Rubocop with JRuby We use Rubocop just for development and not currently using JRuby for Rubocop development. This could fix the current dependency problem for now. --- Gemfile | 2 +- elasticsearch-api/utils/Gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index c618282910..a2263210df 100644 --- a/Gemfile +++ b/Gemfile @@ -38,5 +38,5 @@ end group :development, :test do gem 'debug' unless defined?(JRUBY_VERSION) gem 'rspec' - gem 'rubocop', '>= 1.51' unless defined?(JRUBY_VERSION) && Gem::Version.new(JRUBY_VERSION) <= Gem::Version.new('9.4') + gem 'rubocop', '>= 1.51' unless defined?(JRUBY_VERSION) end diff --git a/elasticsearch-api/utils/Gemfile b/elasticsearch-api/utils/Gemfile index 6f6f061b67..d7a0fe4d5a 100644 --- a/elasticsearch-api/utils/Gemfile +++ b/elasticsearch-api/utils/Gemfile @@ -24,5 +24,5 @@ gem 'multi_json' gem 'pry' gem 'thor' -gem 'rubocop', '>= 1.51' unless defined?(JRUBY_VERSION) && Gem::Version.new(JRUBY_VERSION) <= Gem::Version.new('9.4') +gem 'rubocop', '>= 1.51' unless defined?(JRUBY_VERSION) gem 'debug' unless defined?(JRUBY_VERSION) From 0b1c2edd5a7e5c96e8e8a22161242d4a019a1ac4 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 31 Mar 2025 14:57:58 +0100 Subject: [PATCH 503/540] [API] Updates create endpoint for new behaviour. The API now makes a request, instead of calling index like in previous versions (< 9.0.0). * `body`, `index` and `id` are now required parameters. * `op_type` is now a String parameter: Set to 'create' to only index the document if it does not already exist (put if absent). If a document with the specified '_id' already exists, the indexing operation will fail. The behavior is the same as using the '/_create' endpoint. If a document ID is specified, this paramater defaults to 'index'. Otherwise, it defaults to `create`. If the request targets a data stream, an `op_type` of `create` is required. Additional new parameters: * :if_primary_term (Integer) - Only perform the operation if the document has this primary term. * :if_seq_no (Integer) - Only perform the operation if the document has this sequence number. --- .../lib/elasticsearch/api/actions/create.rb | 35 +++++++-- .../spec/unit/actions/create_document_spec.rb | 75 ++++++------------- 2 files changed, 52 insertions(+), 58 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb index 98c5805763..8c103ac5aa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb @@ -77,13 +77,23 @@ module Actions # @option arguments [String] :index The name of the data stream or index to target. # If the target doesn't exist and matches the name or wildcard (+*+) pattern of an index template with a +data_stream+ definition, this request creates the data stream. # If the target doesn't exist and doesn’t match a data stream template, this request creates the index. (*Required*) + # @option arguments [Integer] :if_primary_term Only perform the operation if the document has this primary term. + # @option arguments [Integer] :if_seq_no Only perform the operation if the document has this sequence number. # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Server default: true. + # @option arguments [String] :op_type Set to +create+ to only index the document if it does not already exist (put if absent). + # If a document with the specified +_id+ already exists, the indexing operation will fail. + # The behavior is the same as using the +/_create+ endpoint. + # If a document ID is specified, this paramater defaults to +index+. + # Otherwise, it defaults to +create+. + # If the request targets a data stream, an +op_type+ of +create+ is required. # @option arguments [String] :pipeline The ID of the pipeline to use to preprocess incoming documents. # If the index has a default ingest pipeline specified, setting the value to +_none+ turns off the default ingest pipeline for this request. # If a final pipeline is configured, it will always run regardless of the value of this parameter. # @option arguments [String] :refresh If +true+, Elasticsearch refreshes the affected shards to make this operation visible to search. # If +wait_for+, it waits for a refresh to make this operation visible to search. # If +false+, it does nothing with refreshes. Server default: false. + # @option arguments [Boolean] :require_alias If +true+, the destination must be an index alias. + # @option arguments [Boolean] :require_data_stream If +true+, the request's actions must target a data stream (existing or to be created). # @option arguments [String] :routing A custom value that is used to route operations to a specific shard. # @option arguments [Time] :timeout The period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. # Elasticsearch waits for at least the specified timeout period before failing. @@ -110,11 +120,26 @@ def create(arguments = {}) end request_opts[:defined_params] = defined_params unless defined_params.empty? - if arguments[:id] - index arguments.update op_type: 'create' - else - index arguments - end + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _id = arguments.delete(:id) + + _index = arguments.delete(:index) + + method = Elasticsearch::API::HTTP_PUT + path = "#{Utils.listify(_index)}/_create/#{Utils.listify(_id)}" + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) end end end diff --git a/elasticsearch-api/spec/unit/actions/create_document_spec.rb b/elasticsearch-api/spec/unit/actions/create_document_spec.rb index 7175e4f15b..f3c24c26e8 100644 --- a/elasticsearch-api/spec/unit/actions/create_document_spec.rb +++ b/elasticsearch-api/spec/unit/actions/create_document_spec.rb @@ -18,42 +18,40 @@ require 'spec_helper' describe 'client#create_document' do - let(:expected_args) do [ - 'PUT', - 'foo/_doc/123', - { op_type: 'create' }, - { foo: 'bar' }, - {}, - { defined_params: { id: '123', index: 'foo' }, endpoint: 'index' } + 'PUT', + 'foo/_create/123', + {}, + { foo: 'bar' }, + {}, + { defined_params: { id: '123', index: 'foo' }, endpoint: 'create' } ] end it 'performs the request' do - expect(client_double.create(index: 'foo', id: '123', body: { foo: 'bar'})).to be_a Elasticsearch::API::Response + expect(client_double.create(index: 'foo', id: '123', body: { foo: 'bar' })).to be_a Elasticsearch::API::Response end context 'when the request needs to be URL-escaped' do - let(:expected_args) do [ - 'PUT', - 'foo/_doc/123', - { op_type: 'create' }, - {}, - {} + 'PUT', + 'foo/_doc/123', + {}, + {}, + {} ] end let(:expected_args) do [ 'PUT', - 'foo/_doc/123', - { op_type: 'create' }, + 'foo/_create/123', + {}, {}, {}, - { defined_params: { id: '123', index: 'foo' }, endpoint: 'index' } + { defined_params: { id: '123', index: 'foo' }, endpoint: 'create' } ] end @@ -63,58 +61,29 @@ end context 'when an id is provided as an integer' do - - let(:expected_args) do - [ - 'PUT', - 'foo/_doc/1', - { op_type: 'create' }, - { foo: 'bar' }, - {} - ] - end - let(:expected_args) do [ 'PUT', 'foo/_doc/1', { op_type: 'create' }, { foo: 'bar' }, - {}, - { defined_params: { id: 1, index: 'foo' }, endpoint: 'index' } + {} ] end - it 'updates the arguments with the `op_type`' do - expect(client_double.create(index: 'foo', id: 1, body: { foo: 'bar' })).to be_a Elasticsearch::API::Response - end - end - - context 'when an id is not provided' do - let(:expected_args) do [ - 'POST', - 'foo/_doc', - { }, - { foo: 'bar' }, - {} - ] - end - - let(:expected_args) do - [ - 'POST', - 'foo/_doc', - { }, + 'PUT', + 'foo/_create/1', + {}, { foo: 'bar' }, {}, - { defined_params: { index: 'foo' }, endpoint: 'index' } + { defined_params: { id: 1, index: 'foo' }, endpoint: 'create' } ] end - it 'updates the arguments with the `op_type`' do - expect(client_double.create(index: 'foo', body: { foo: 'bar' })).to be_a Elasticsearch::API::Response + it 'performs the request' do + expect(client_double.create(index: 'foo', id: 1, body: { foo: 'bar' })).to be_a Elasticsearch::API::Response end end end From d06e7ff254112fa23732de26057d0654cbd8f811 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 31 Mar 2025 16:12:29 +0100 Subject: [PATCH 504/540] [Test] Only run perform_request_spec test when OTEL var is true --- elasticsearch-api/Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/Rakefile b/elasticsearch-api/Rakefile index 6c6fa4fcf7..957016d205 100644 --- a/elasticsearch-api/Rakefile +++ b/elasticsearch-api/Rakefile @@ -35,6 +35,7 @@ namespace :test do task :unit RSpec::Core::RakeTask.new(:unit) do |t| t.pattern = 'spec/unit/**/*_spec.rb' + t.exclude_pattern = 'spec/unit/perform_request_spec.rb' unless ENV['TEST_WITH_OTEL'] end desc 'Run unit and integration tests' From 69d5006cd8de35ec686d9146769de1bcb16faf22 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 1 Apr 2025 09:24:24 +0100 Subject: [PATCH 505/540] [API] Auto generated code, updates source code documentation * esql.async_query, esql.query - Add Boolean parameter :allow_partial_results. * indices.exists_index_template - Adds Boolean parameters: :local, :flat_settings. * indices.field_usage_states - Removes :wait_for_active_shards parameter. * indices.put_settings - Adds Boolean parameter :reopen. * indices.reload_search_analyzers - Adds String parameter :resource. * indices.rollover - Adds Boolean parameter :lazy. * indices.simulate_index_template - Adds Boolean parameter :create and String parameter :cause. * indices.simulate_template - Adds String parameter :cause. * inference.chat_completion_unified - Argument body is now required. * open_point_in_time - Adds Integer parameter :max_concurrent_shard_requests. --- .../lib/elasticsearch/api/actions/delete_by_query.rb | 2 +- .../lib/elasticsearch/api/actions/esql/async_query.rb | 1 + .../lib/elasticsearch/api/actions/esql/query.rb | 1 + .../lib/elasticsearch/api/actions/indices/analyze.rb | 2 +- .../api/actions/indices/exists_index_template.rb | 2 ++ .../elasticsearch/api/actions/indices/field_usage_stats.rb | 2 -- .../lib/elasticsearch/api/actions/indices/put_settings.rb | 3 +++ .../lib/elasticsearch/api/actions/indices/put_template.rb | 2 +- .../api/actions/indices/reload_search_analyzers.rb | 1 + .../lib/elasticsearch/api/actions/indices/rollover.rb | 2 ++ .../api/actions/indices/simulate_index_template.rb | 2 ++ .../elasticsearch/api/actions/indices/simulate_template.rb | 1 + .../api/actions/inference/chat_completion_unified.rb | 3 ++- elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb | 1 + .../lib/elasticsearch/api/actions/open_point_in_time.rb | 1 + .../lib/elasticsearch/api/actions/update_by_query.rb | 2 +- .../lib/elasticsearch/api/actions/watcher/update_settings.rb | 5 ++++- .../unit/actions/inference/chat_completion_unified_spec.rb | 4 ++-- 18 files changed, 27 insertions(+), 10 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb index edc6d85cf8..1e3c970df0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb @@ -96,7 +96,7 @@ module Actions # @option arguments [String, Array] :expand_wildcards The type of index that wildcard patterns can match. # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. # It supports comma-separated values, such as +open,hidden+. Server default: open. - # @option arguments [Integer] :from Starting offset (default: 0) + # @option arguments [Integer] :from Skips the specified number of documents. Server default: 0. # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. # @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. # This parameter can be used only when the +q+ query string parameter is specified. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb index 290a1632f2..4a6ea2064c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb @@ -26,6 +26,7 @@ module Actions # Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its progress, and retrieve results when they become available. # The API accepts the same parameters and request body as the synchronous query API, along with additional async related properties. # + # @option arguments [Boolean] :allow_partial_results If +true+, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. # @option arguments [String] :delimiter The character to use between values within a CSV row. # It is valid only for the CSV format. # @option arguments [Boolean] :drop_null_columns Indicates whether columns that are entirely +null+ will be removed from the +columns+ and +values+ portion of the results. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb index cfda90c2a7..baed554358 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb @@ -32,6 +32,7 @@ module Actions # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the CSV format. # @option arguments [Boolean] :drop_null_columns Should columns that are entirely +null+ be removed from the +columns+ and +values+ portion of the results? # Defaults to +false+. If +true+ then the response will include an extra section under the name +all_columns+ which has the name of all columns. + # @option arguments [Boolean] :allow_partial_results If +true+, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb index f6fb85a312..fd30b6c1fc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb @@ -63,7 +63,7 @@ def analyze(arguments = {}) else '_analyze' end - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb index b2cbdf23ff..0c8fa3d14d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb @@ -26,6 +26,8 @@ module Actions # Check whether index templates exist. # # @option arguments [String] :name Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported. (*Required*) + # @option arguments [Boolean] :local If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. + # @option arguments [Boolean] :flat_settings If true, returns settings in flat format. # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb index f011c41b19..266d08258d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb @@ -42,8 +42,6 @@ module Actions # Supports comma-separated values, such as +open,hidden+. # @option arguments [Boolean] :ignore_unavailable If +true+, missing or closed indices are not included in the response. # @option arguments [String, Array] :fields Comma-separated list or wildcard expressions of fields to include in the statistics. - # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. - # Set to all or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1. # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-field-usage-stats diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb index 7b4802d47f..91a281aa3f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb @@ -55,6 +55,9 @@ module Actions # received before the timeout expires, the request fails and returns an # error. Server default: 30s. # @option arguments [Boolean] :preserve_existing If +true+, existing index settings remain unchanged. + # @option arguments [Boolean] :reopen Whether to close and reopen the index to apply non-dynamic settings. + # If set to +true+ the indices to which the settings are being applied + # will be closed temporarily and then reopened in order to apply the changes. # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the # timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb index 1a84024197..feda545521 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb @@ -45,7 +45,7 @@ module Actions # @option arguments [Integer] :order Order in which Elasticsearch applies this template if index # matches multiple templates.Templates with lower 'order' values are merged first. Templates with higher # 'order' values are merged later, overriding templates with lower values. - # @option arguments [String] :cause [TODO] + # @option arguments [String] :cause User defined reason for creating/updating the index template # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb index dc84b403ed..669838409d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb @@ -38,6 +38,7 @@ module Actions # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes +_all+ string or when no indices have been specified) # @option arguments [String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) + # @option arguments [String] :resource Changed resource to reload analyzers from if applicable # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-reload-search-analyzers diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index 3d2aea201f..89c04a418b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -60,6 +60,8 @@ module Actions # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. # Set to all or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1. + # @option arguments [Boolean] :lazy If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. + # Only allowed on data streams. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb index 5c25b779da..57ba4a41e6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb @@ -26,6 +26,8 @@ module Actions # Get the index configuration that would be applied to the specified index from an existing index template. # # @option arguments [String] :name Name of the index to simulate (*Required*) + # @option arguments [Boolean] :create Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one + # @option arguments [String] :cause User defined reason for dry-run creating the new template for simulation purposes Server default: false. # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template. # @option arguments [Hash] :headers Custom HTTP headers diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb index ff23b60c61..0fd79acbfb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb @@ -28,6 +28,7 @@ module Actions # @option arguments [String] :name Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit # this parameter and specify the template configuration in the request body. # @option arguments [Boolean] :create If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation. + # @option arguments [String] :cause User defined reason for dry-run creating the new template for simulation purposes # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template. # @option arguments [Hash] :headers Custom HTTP headers diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb index a1efed0125..37ad6f25b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :inference_id The inference Id (*Required*) # @option arguments [Time] :timeout Specifies the amount of time to wait for the inference request to complete. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body request body + # @option arguments [Hash] :body chat_completion_request # # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-unified-inference # @@ -39,6 +39,7 @@ def chat_completion_unified(arguments = {}) end request_opts[:defined_params] = defined_params unless defined_params.empty? + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] arguments = arguments.clone diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb index d28a78406a..f3fe43fe4f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb @@ -48,6 +48,7 @@ module Actions # Typically, this adds a small overhead to a request. # However, using computationally expensive named queries on a large number of hits may add significant overhead. # @option arguments [Integer] :max_concurrent_searches Maximum number of concurrent searches the multi search API can execute. + # Defaults to +max(1, (# of data nodes * min(search thread pool size, 10)))+. # @option arguments [Integer] :max_concurrent_shard_requests Maximum number of concurrent shard requests that each sub-search request executes per node. Server default: 5. # @option arguments [Integer] :pre_filter_shard_size Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. # @option arguments [Boolean] :rest_total_hits_as_int If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb index 0ec8e149e7..a4ad4b55e1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb @@ -60,6 +60,7 @@ module Actions # @option arguments [Boolean] :allow_partial_search_results Indicates whether the point in time tolerates unavailable shards or shard failures when initially creating the PIT. # If +false+, creating a point in time request when a shard is missing or unavailable will throw an exception. # If +true+, the point in time will contain all the shards that are available at the time of the request. + # @option arguments [Integer] :max_concurrent_shard_requests Maximum number of concurrent shard requests that each sub-search request executes per node. Server default: 5. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb index d61bbfb994..15e8cd6b27 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb @@ -101,7 +101,7 @@ module Actions # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. # It supports comma-separated values, such as +open,hidden+. # Valid values are: +all+, +open+, +closed+, +hidden+, +none+. - # @option arguments [Integer] :from Starting offset (default: 0) + # @option arguments [Integer] :from Skips the specified number of documents. Server default: 0. # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index. # @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. # This parameter can be used only when the +q+ query string parameter is specified. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb index ca087b1fda..fbd96cb35e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb @@ -25,7 +25,10 @@ module Actions # Update Watcher index settings. # Update settings for the Watcher internal index (+.watches+). # Only a subset of settings can be modified. - # This includes +index.auto_expand_replicas+ and +index.number_of_replicas+. + # This includes +index.auto_expand_replicas+, +index.number_of_replicas+, +index.routing.allocation.exclude.*+, + # +index.routing.allocation.include.*+ and +index.routing.allocation.require.*+. + # Modification of +index.routing.allocation.include._tier_preference+ is an exception and is not allowed as the + # Watcher shards must always be in the +data_content+ tier. # # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. # If no response is received before the timeout expires, the request fails and returns an error. diff --git a/elasticsearch-api/spec/unit/actions/inference/chat_completion_unified_spec.rb b/elasticsearch-api/spec/unit/actions/inference/chat_completion_unified_spec.rb index 6abc29076e..180bcb3f64 100644 --- a/elasticsearch-api/spec/unit/actions/inference/chat_completion_unified_spec.rb +++ b/elasticsearch-api/spec/unit/actions/inference/chat_completion_unified_spec.rb @@ -23,7 +23,7 @@ 'POST', '_inference/chat_completion/bar/_stream', {}, - nil, + {}, {}, { defined_params: { inference_id: 'bar' }, endpoint: 'inference.chat_completion_unified' } @@ -31,6 +31,6 @@ end it 'performs the request' do - expect(client_double.inference.chat_completion_unified(inference_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.chat_completion_unified(inference_id: 'bar', body: {})).to be_a Elasticsearch::API::Response end end From f1d57fd7d298c893c6ba5f5e81118b7275526797 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 1 Apr 2025 09:25:24 +0100 Subject: [PATCH 506/540] [API] Adds new inference PUT endpoints --- .../inference/post_eis_chat_completion.rb | 63 ++++++++++++++ .../api/actions/inference/put_alibabacloud.rb | 75 ++++++++++++++++ .../actions/inference/put_amazonbedrock.rb | 70 +++++++++++++++ .../api/actions/inference/put_anthropic.rb | 76 ++++++++++++++++ .../actions/inference/put_azureaistudio.rb | 75 ++++++++++++++++ .../api/actions/inference/put_azureopenai.rb | 80 +++++++++++++++++ .../api/actions/inference/put_cohere.rb | 75 ++++++++++++++++ .../api/actions/inference/put_eis.rb | 67 +++++++++++++++ .../actions/inference/put_elasticsearch.rb | 71 +++++++++++++++ .../api/actions/inference/put_elser.rb | 67 +++++++++++++++ .../actions/inference/put_googleaistudio.rb | 75 ++++++++++++++++ .../actions/inference/put_googlevertexai.rb | 75 ++++++++++++++++ .../api/actions/inference/put_hugging_face.rb | 86 +++++++++++++++++++ .../api/actions/inference/put_jinaai.rb | 77 +++++++++++++++++ .../api/actions/inference/put_mistral.rb | 76 ++++++++++++++++ .../api/actions/inference/put_openai.rb | 76 ++++++++++++++++ .../api/actions/inference/put_voyageai.rb | 71 +++++++++++++++ .../post_eis_chat_completion_spec.rb | 36 ++++++++ .../inference/put_alibabacloud_spec.rb | 36 ++++++++ .../inference/put_amazonbedrock_spec.rb | 36 ++++++++ .../actions/inference/put_anthropic_spec.rb | 36 ++++++++ .../inference/put_azureaistudio_spec.rb | 36 ++++++++ .../actions/inference/put_azureopenai_spec.rb | 36 ++++++++ .../unit/actions/inference/put_cohere_spec.rb | 36 ++++++++ .../unit/actions/inference/put_eis_spec.rb | 36 ++++++++ .../inference/put_elasticsearch_spec.rb | 36 ++++++++ .../unit/actions/inference/put_elser_spec.rb | 36 ++++++++ .../inference/put_googleaistudio_spec.rb | 36 ++++++++ .../inference/put_googlevertexai_spec.rb | 36 ++++++++ .../inference/put_hugging_face_spec.rb | 36 ++++++++ .../unit/actions/inference/put_jinaai_spec.rb | 36 ++++++++ .../actions/inference/put_mistral_spec.rb | 36 ++++++++ .../unit/actions/inference/put_openai_spec.rb | 36 ++++++++ .../actions/inference/put_voyageai_spec.rb | 36 ++++++++ 34 files changed, 1867 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_anthropic.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureopenai.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_cohere.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elser.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_hugging_face.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_jinaai.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_mistral.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_openai.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_voyageai.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/post_eis_chat_completion_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_alibabacloud_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_amazonbedrock_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_anthropic_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_azureaistudio_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_azureopenai_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_cohere_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_eis_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_elasticsearch_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_elser_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_googleaistudio_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_googlevertexai_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_hugging_face_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_jinaai_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_mistral_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_openai_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/put_voyageai_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb new file mode 100644 index 0000000000..021d4cc477 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb @@ -0,0 +1,63 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Perform a chat completion task through the Elastic Inference Service (EIS). + # Perform a chat completion inference task with the +elastic+ service. + # + # @option arguments [String] :eis_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body chat_completion_request + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-post-eis-chat-completion + # + def post_eis_chat_completion(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.post_eis_chat_completion' } + + defined_params = [:eis_inference_id].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 'eis_inference_id' missing" unless arguments[:eis_inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _eis_inference_id = arguments.delete(:eis_inference_id) + + method = Elasticsearch::API::HTTP_POST + path = "_inference/chat_completion/#{Utils.listify(_eis_inference_id)}/_stream" + params = {} + + 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/inference/put_alibabacloud.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb new file mode 100644 index 0000000000..149a7332bb --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb @@ -0,0 +1,75 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create an AlibabaCloud AI Search inference endpoint. + # Create an inference endpoint to perform an inference task with the +alibabacloud-ai-search+ service. + # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. + # After creating the endpoint, wait for the model deployment to complete before using it. + # To verify the deployment status, use the get trained model statistics API. + # Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*) + # @option arguments [String] :alibabacloud_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-alibabacloud + # + def put_alibabacloud(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_alibabacloud' } + + defined_params = [:task_type, :alibabacloud_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:alibabacloud_inference_id] + raise ArgumentError, + "Required argument 'alibabacloud_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _alibabacloud_inference_id = arguments.delete(:alibabacloud_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_alibabacloud_inference_id)}" + params = {} + + 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/inference/put_amazonbedrock.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb new file mode 100644 index 0000000000..b640715b96 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb @@ -0,0 +1,70 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create an Amazon Bedrock inference endpoint. + # Creates an inference endpoint to perform an inference task with the +amazonbedrock+ service. + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*) + # @option arguments [String] :amazonbedrock_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonbedrock + # + def put_amazonbedrock(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_amazonbedrock' } + + defined_params = [:task_type, :amazonbedrock_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:amazonbedrock_inference_id] + raise ArgumentError, + "Required argument 'amazonbedrock_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _amazonbedrock_inference_id = arguments.delete(:amazonbedrock_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_amazonbedrock_inference_id)}" + params = {} + + 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/inference/put_anthropic.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_anthropic.rb new file mode 100644 index 0000000000..2f64cf7f3d --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_anthropic.rb @@ -0,0 +1,76 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create an Anthropic inference endpoint. + # Create an inference endpoint to perform an inference task with the +anthropic+ service. + # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. + # After creating the endpoint, wait for the model deployment to complete before using it. + # To verify the deployment status, use the get trained model statistics API. + # Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # + # @option arguments [String] :task_type The task type. + # The only valid task type for the model to perform is +completion+. (*Required*) + # @option arguments [String] :anthropic_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-anthropic + # + def put_anthropic(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_anthropic' } + + defined_params = [:task_type, :anthropic_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:anthropic_inference_id] + raise ArgumentError, + "Required argument 'anthropic_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _anthropic_inference_id = arguments.delete(:anthropic_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_anthropic_inference_id)}" + params = {} + + 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/inference/put_azureaistudio.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb new file mode 100644 index 0000000000..7d522638de --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb @@ -0,0 +1,75 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create an Azure AI studio inference endpoint. + # Create an inference endpoint to perform an inference task with the +azureaistudio+ service. + # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. + # After creating the endpoint, wait for the model deployment to complete before using it. + # To verify the deployment status, use the get trained model statistics API. + # Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*) + # @option arguments [String] :azureaistudio_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-azureaistudio + # + def put_azureaistudio(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_azureaistudio' } + + defined_params = [:task_type, :azureaistudio_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:azureaistudio_inference_id] + raise ArgumentError, + "Required argument 'azureaistudio_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _azureaistudio_inference_id = arguments.delete(:azureaistudio_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_azureaistudio_inference_id)}" + params = {} + + 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/inference/put_azureopenai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureopenai.rb new file mode 100644 index 0000000000..82c9790a28 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureopenai.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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create an Azure OpenAI inference endpoint. + # Create an inference endpoint to perform an inference task with the +azureopenai+ service. + # The list of chat completion models that you can choose from in your Azure OpenAI deployment include: + # * {https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-4-and-gpt-4-turbo-models GPT-4 and GPT-4 Turbo models} + # * {https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-35 GPT-3.5} + # The list of embeddings models that you can choose from in your deployment can be found in the {https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#embeddings Azure models documentation}. + # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. + # After creating the endpoint, wait for the model deployment to complete before using it. + # To verify the deployment status, use the get trained model statistics API. + # Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. + # NOTE: The +chat_completion+ task type only supports streaming and only through the _stream API. (*Required*) + # @option arguments [String] :azureopenai_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-azureopenai + # + def put_azureopenai(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_azureopenai' } + + defined_params = [:task_type, :azureopenai_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:azureopenai_inference_id] + raise ArgumentError, + "Required argument 'azureopenai_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _azureopenai_inference_id = arguments.delete(:azureopenai_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_azureopenai_inference_id)}" + params = {} + + 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/inference/put_cohere.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_cohere.rb new file mode 100644 index 0000000000..fca7d54e36 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_cohere.rb @@ -0,0 +1,75 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create a Cohere inference endpoint. + # Create an inference endpoint to perform an inference task with the +cohere+ service. + # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. + # After creating the endpoint, wait for the model deployment to complete before using it. + # To verify the deployment status, use the get trained model statistics API. + # Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*) + # @option arguments [String] :cohere_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-cohere + # + def put_cohere(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_cohere' } + + defined_params = [:task_type, :cohere_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:cohere_inference_id] + raise ArgumentError, + "Required argument 'cohere_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _cohere_inference_id = arguments.delete(:cohere_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_cohere_inference_id)}" + params = {} + + 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/inference/put_eis.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb new file mode 100644 index 0000000000..18ef9312f4 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb @@ -0,0 +1,67 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create an Elastic Inference Service (EIS) inference endpoint. + # Create an inference endpoint to perform an inference task through the Elastic Inference Service (EIS). + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. + # NOTE: The +chat_completion+ task type only supports streaming and only through the _stream API. (*Required*) + # @option arguments [String] :eis_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-eis + # + def put_eis(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_eis' } + + defined_params = [:task_type, :eis_inference_id].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 'task_type' missing" unless arguments[:task_type] + raise ArgumentError, "Required argument 'eis_inference_id' missing" unless arguments[:eis_inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _eis_inference_id = arguments.delete(:eis_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_eis_inference_id)}" + params = {} + + 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/inference/put_elasticsearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb new file mode 100644 index 0000000000..10dd102dea --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb @@ -0,0 +1,71 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create an Elasticsearch inference endpoint. + # Create an inference endpoint to perform an inference task with the +elasticsearch+ service. + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*) + # @option arguments [String] :elasticsearch_inference_id The unique identifier of the inference endpoint. + # The must not match the +model_id+. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-elasticsearch + # + def put_elasticsearch(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_elasticsearch' } + + defined_params = [:task_type, :elasticsearch_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:elasticsearch_inference_id] + raise ArgumentError, + "Required argument 'elasticsearch_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _elasticsearch_inference_id = arguments.delete(:elasticsearch_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_elasticsearch_inference_id)}" + params = {} + + 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/inference/put_elser.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elser.rb new file mode 100644 index 0000000000..cb615f12f8 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elser.rb @@ -0,0 +1,67 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create an ELSER inference endpoint. + # Create an inference endpoint to perform an inference task with the +elser+ service. + # You can also deploy ELSER by using the Elasticsearch inference integration. + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*) + # @option arguments [String] :elser_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-elser + # + def put_elser(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_elser' } + + defined_params = [:task_type, :elser_inference_id].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 'task_type' missing" unless arguments[:task_type] + raise ArgumentError, "Required argument 'elser_inference_id' missing" unless arguments[:elser_inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _elser_inference_id = arguments.delete(:elser_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_elser_inference_id)}" + params = {} + + 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/inference/put_googleaistudio.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb new file mode 100644 index 0000000000..b95fdec10e --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb @@ -0,0 +1,75 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create an Google AI Studio inference endpoint. + # Create an inference endpoint to perform an inference task with the +googleaistudio+ service. + # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. + # After creating the endpoint, wait for the model deployment to complete before using it. + # To verify the deployment status, use the get trained model statistics API. + # Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*) + # @option arguments [String] :googleaistudio_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-googleaistudio + # + def put_googleaistudio(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_googleaistudio' } + + defined_params = [:task_type, :googleaistudio_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:googleaistudio_inference_id] + raise ArgumentError, + "Required argument 'googleaistudio_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _googleaistudio_inference_id = arguments.delete(:googleaistudio_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_googleaistudio_inference_id)}" + params = {} + + 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/inference/put_googlevertexai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb new file mode 100644 index 0000000000..cee610674a --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb @@ -0,0 +1,75 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create a Google Vertex AI inference endpoint. + # Create an inference endpoint to perform an inference task with the +googlevertexai+ service. + # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. + # After creating the endpoint, wait for the model deployment to complete before using it. + # To verify the deployment status, use the get trained model statistics API. + # Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*) + # @option arguments [String] :googlevertexai_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-googlevertexai + # + def put_googlevertexai(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_googlevertexai' } + + defined_params = [:task_type, :googlevertexai_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:googlevertexai_inference_id] + raise ArgumentError, + "Required argument 'googlevertexai_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _googlevertexai_inference_id = arguments.delete(:googlevertexai_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_googlevertexai_inference_id)}" + params = {} + + 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/inference/put_hugging_face.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_hugging_face.rb new file mode 100644 index 0000000000..9d9e455afc --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_hugging_face.rb @@ -0,0 +1,86 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create a Hugging Face inference endpoint. + # Create an inference endpoint to perform an inference task with the +hugging_face+ service. + # You must first create an inference endpoint on the Hugging Face endpoint page to get an endpoint URL. + # Select the model you want to use on the new endpoint creation page (for example +intfloat/e5-small-v2+), then select the sentence embeddings task under the advanced configuration section. + # Create the endpoint and copy the URL after the endpoint initialization has been finished. + # The following models are recommended for the Hugging Face service: + # * +all-MiniLM-L6-v2+ + # * +all-MiniLM-L12-v2+ + # * +all-mpnet-base-v2+ + # * +e5-base-v2+ + # * +e5-small-v2+ + # * +multilingual-e5-base+ + # * +multilingual-e5-small+ + # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. + # After creating the endpoint, wait for the model deployment to complete before using it. + # To verify the deployment status, use the get trained model statistics API. + # Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*) + # @option arguments [String] :huggingface_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-hugging-face + # + def put_hugging_face(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_hugging_face' } + + defined_params = [:task_type, :huggingface_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:huggingface_inference_id] + raise ArgumentError, + "Required argument 'huggingface_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _huggingface_inference_id = arguments.delete(:huggingface_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_huggingface_inference_id)}" + params = {} + + 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/inference/put_jinaai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_jinaai.rb new file mode 100644 index 0000000000..780face86d --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_jinaai.rb @@ -0,0 +1,77 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create an JinaAI inference endpoint. + # Create an inference endpoint to perform an inference task with the +jinaai+ service. + # To review the available +rerank+ models, refer to . + # To review the available +text_embedding+ models, refer to the . + # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. + # After creating the endpoint, wait for the model deployment to complete before using it. + # To verify the deployment status, use the get trained model statistics API. + # Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*) + # @option arguments [String] :jinaai_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-jinaai + # + def put_jinaai(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_jinaai' } + + defined_params = [:task_type, :jinaai_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:jinaai_inference_id] + raise ArgumentError, + "Required argument 'jinaai_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _jinaai_inference_id = arguments.delete(:jinaai_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_jinaai_inference_id)}" + params = {} + + 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/inference/put_mistral.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_mistral.rb new file mode 100644 index 0000000000..40481c076e --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_mistral.rb @@ -0,0 +1,76 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create a Mistral inference endpoint. + # Creates an inference endpoint to perform an inference task with the +mistral+ service. + # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. + # After creating the endpoint, wait for the model deployment to complete before using it. + # To verify the deployment status, use the get trained model statistics API. + # Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # + # @option arguments [String] :task_type The task type. + # The only valid task type for the model to perform is +text_embedding+. (*Required*) + # @option arguments [String] :mistral_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-mistral + # + def put_mistral(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_mistral' } + + defined_params = [:task_type, :mistral_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:mistral_inference_id] + raise ArgumentError, + "Required argument 'mistral_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _mistral_inference_id = arguments.delete(:mistral_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_mistral_inference_id)}" + params = {} + + 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/inference/put_openai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_openai.rb new file mode 100644 index 0000000000..b7581f39b7 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_openai.rb @@ -0,0 +1,76 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create an OpenAI inference endpoint. + # Create an inference endpoint to perform an inference task with the +openai+ service or +openai+ compatible APIs. + # When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. + # After creating the endpoint, wait for the model deployment to complete before using it. + # To verify the deployment status, use the get trained model statistics API. + # Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. + # NOTE: The +chat_completion+ task type only supports streaming and only through the _stream API. (*Required*) + # @option arguments [String] :openai_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-openai + # + def put_openai(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_openai' } + + defined_params = [:task_type, :openai_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:openai_inference_id] + raise ArgumentError, + "Required argument 'openai_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _openai_inference_id = arguments.delete(:openai_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_openai_inference_id)}" + params = {} + + 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/inference/put_voyageai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_voyageai.rb new file mode 100644 index 0000000000..877425f3ef --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_voyageai.rb @@ -0,0 +1,71 @@ +# 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. +# +# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch-specification +# +module Elasticsearch + module API + module Inference + module Actions + # Create a VoyageAI inference endpoint. + # Create an inference endpoint to perform an inference task with the +voyageai+ service. + # Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. + # + # @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*) + # @option arguments [String] :voyageai_inference_id The unique identifier of the inference endpoint. (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-voyageai + # + def put_voyageai(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.put_voyageai' } + + defined_params = [:task_type, :voyageai_inference_id].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 'task_type' missing" unless arguments[:task_type] + + unless arguments[:voyageai_inference_id] + raise ArgumentError, + "Required argument 'voyageai_inference_id' missing" + end + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _voyageai_inference_id = arguments.delete(:voyageai_inference_id) + + method = Elasticsearch::API::HTTP_PUT + path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_voyageai_inference_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/post_eis_chat_completion_spec.rb b/elasticsearch-api/spec/unit/actions/inference/post_eis_chat_completion_spec.rb new file mode 100644 index 0000000000..b5e62acf81 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/post_eis_chat_completion_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.post_eis_chat_completion' do + let(:expected_args) do + [ + 'POST', + '_inference/chat_completion/foo/_stream', + {}, + {}, + {}, + { defined_params: { eis_inference_id: 'foo' }, + endpoint: 'inference.post_eis_chat_completion' } + ] + end + + it 'performs the request' do + expect(client_double.inference.post_eis_chat_completion(body: {}, eis_inference_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_alibabacloud_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_alibabacloud_spec.rb new file mode 100644 index 0000000000..0ac550822f --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_alibabacloud_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_alibabacloud' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { alibabacloud_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_alibabacloud' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_alibabacloud(task_type: 'foo', alibabacloud_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_amazonbedrock_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_amazonbedrock_spec.rb new file mode 100644 index 0000000000..23d5b57c39 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_amazonbedrock_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_amazonbedrock' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { amazonbedrock_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_amazonbedrock' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_amazonbedrock(task_type: 'foo', amazonbedrock_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_anthropic_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_anthropic_spec.rb new file mode 100644 index 0000000000..3f4c22cbba --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_anthropic_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_anthropic' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { anthropic_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_anthropic' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_anthropic(task_type: 'foo', anthropic_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_azureaistudio_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_azureaistudio_spec.rb new file mode 100644 index 0000000000..add3ed7eec --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_azureaistudio_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_azureaistudio' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { azureaistudio_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_azureaistudio' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_azureaistudio(task_type: 'foo', azureaistudio_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_azureopenai_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_azureopenai_spec.rb new file mode 100644 index 0000000000..ca0ade65b7 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_azureopenai_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_azureopenai' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { azureopenai_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_azureopenai' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_azureopenai(task_type: 'foo', azureopenai_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_cohere_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_cohere_spec.rb new file mode 100644 index 0000000000..7eb82de752 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_cohere_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_cohere' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { cohere_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_cohere' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_cohere(task_type: 'foo', cohere_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_eis_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_eis_spec.rb new file mode 100644 index 0000000000..fefea73059 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_eis_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_eis' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { eis_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_eis' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_eis(task_type: 'foo', eis_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_elasticsearch_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_elasticsearch_spec.rb new file mode 100644 index 0000000000..e91a89c850 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_elasticsearch_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_elasticsearch' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { elasticsearch_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_elasticsearch' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_elasticsearch(task_type: 'foo', elasticsearch_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_elser_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_elser_spec.rb new file mode 100644 index 0000000000..1862e22721 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_elser_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_elser' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { elser_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_elser' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_elser(task_type: 'foo', elser_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_googleaistudio_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_googleaistudio_spec.rb new file mode 100644 index 0000000000..22c5284990 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_googleaistudio_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_googleaistudio' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { googleaistudio_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_googleaistudio' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_googleaistudio(task_type: 'foo', googleaistudio_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_googlevertexai_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_googlevertexai_spec.rb new file mode 100644 index 0000000000..ccf6c883bf --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_googlevertexai_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_googlevertexai' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { googlevertexai_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_googlevertexai' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_googlevertexai(task_type: 'foo', googlevertexai_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_hugging_face_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_hugging_face_spec.rb new file mode 100644 index 0000000000..8feb11c28e --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_hugging_face_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_hugging_face' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { huggingface_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_hugging_face' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_hugging_face(task_type: 'foo', huggingface_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_jinaai_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_jinaai_spec.rb new file mode 100644 index 0000000000..bcbf0e0f00 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_jinaai_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_jinaai' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { jinaai_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_jinaai' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_jinaai(task_type: 'foo', jinaai_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_mistral_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_mistral_spec.rb new file mode 100644 index 0000000000..2d8d8dbd3f --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_mistral_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_mistral' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { mistral_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_mistral' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_mistral(task_type: 'foo', mistral_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_openai_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_openai_spec.rb new file mode 100644 index 0000000000..b58dd6e568 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_openai_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_openai' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { openai_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_openai' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_openai(task_type: 'foo', openai_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_voyageai_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_voyageai_spec.rb new file mode 100644 index 0000000000..8bac99b82d --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/put_voyageai_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.put_voyageai' do + let(:expected_args) do + [ + 'PUT', + '_inference/foo/bar', + {}, + nil, + {}, + { defined_params: { voyageai_inference_id: 'bar', task_type: 'foo' }, + endpoint: 'inference.put_voyageai' } + ] + end + + it 'performs the request' do + expect(client_double.inference.put_voyageai(task_type: 'foo', voyageai_inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end From 73db5be2ac35c3ce802d137c961500ec04b06346 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 1 Apr 2025 10:18:57 +0100 Subject: [PATCH 507/540] Test: Updates perform_request_spec --- elasticsearch-api/spec/unit/perform_request_spec.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/elasticsearch-api/spec/unit/perform_request_spec.rb b/elasticsearch-api/spec/unit/perform_request_spec.rb index 0b67570705..cade50b6f1 100644 --- a/elasticsearch-api/spec/unit/perform_request_spec.rb +++ b/elasticsearch-api/spec/unit/perform_request_spec.rb @@ -39,15 +39,11 @@ params.merge(part.to_sym => 'testing') end - required_params.merge!(body: {}) if ['inference.put', 'inference.update'].include? spec.endpoint_name + required_params.merge!(body: {}) if ['inference.put', 'inference.update', 'inference.chat_completion_unified'].include? spec.endpoint_name let(:client_double) do Class.new { include Elasticsearch::API }.new.tap do |client| expect(client).to receive(:perform_request) do |_, _, _, _, _, request_params| - # The create method ends up becoming an 'index' request - if expected_perform_request_params[:endpoint] == 'create' - expected_perform_request_params[:endpoint] = 'index' - end # Check that the expected hash is passed to the perform_request method expect(request_params).to eq(expected_perform_request_params) end.and_return(response_double) From e2d40b48fc7159a2e3e47c83f38ce2c8bbe8c60c Mon Sep 17 00:00:00 2001 From: Felipe Cotti Date: Tue, 1 Apr 2025 09:50:30 -0300 Subject: [PATCH 508/540] Fix mapped_pages front matter on docs/reference/index (#2609) Co-authored-by: Marci W <333176+marciw@users.noreply.github.com> --- docs/reference/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/index.md b/docs/reference/index.md index 088cd04b9b..09472e1c68 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -1,6 +1,6 @@ --- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/ruby_client.html --- From bee9e8adfdc1fe5f19d74b7bf3c1b13ec0edef45 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 2 Apr 2025 17:03:33 +0100 Subject: [PATCH 509/540] [API] Updates build hash from elasticsearch-specification --- .../lib/elasticsearch/api/actions/async_search/delete.rb | 2 +- .../lib/elasticsearch/api/actions/async_search/get.rb | 2 +- .../lib/elasticsearch/api/actions/async_search/status.rb | 2 +- .../lib/elasticsearch/api/actions/async_search/submit.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb | 2 +- .../lib/elasticsearch/api/actions/cat/allocation.rb | 2 +- .../lib/elasticsearch/api/actions/cat/component_templates.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb | 2 +- .../lib/elasticsearch/api/actions/cat/fielddata.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb | 2 +- .../elasticsearch/api/actions/cat/ml_data_frame_analytics.rb | 2 +- .../lib/elasticsearch/api/actions/cat/ml_datafeeds.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb | 2 +- .../lib/elasticsearch/api/actions/cat/ml_trained_models.rb | 2 +- .../lib/elasticsearch/api/actions/cat/nodeattrs.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb | 2 +- .../lib/elasticsearch/api/actions/cat/pending_tasks.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb | 2 +- .../lib/elasticsearch/api/actions/cat/repositories.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb | 2 +- .../lib/elasticsearch/api/actions/cat/snapshots.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb | 2 +- .../lib/elasticsearch/api/actions/cat/templates.rb | 2 +- .../lib/elasticsearch/api/actions/cat/thread_pool.rb | 2 +- .../lib/elasticsearch/api/actions/cat/transforms.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb | 2 +- .../lib/elasticsearch/api/actions/close_point_in_time.rb | 2 +- .../lib/elasticsearch/api/actions/cluster/allocation_explain.rb | 2 +- .../api/actions/cluster/delete_component_template.rb | 2 +- .../api/actions/cluster/delete_voting_config_exclusions.rb | 2 +- .../api/actions/cluster/exists_component_template.rb | 2 +- .../elasticsearch/api/actions/cluster/get_component_template.rb | 2 +- .../lib/elasticsearch/api/actions/cluster/get_settings.rb | 2 +- .../lib/elasticsearch/api/actions/cluster/health.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb | 2 +- .../lib/elasticsearch/api/actions/cluster/pending_tasks.rb | 2 +- .../api/actions/cluster/post_voting_config_exclusions.rb | 2 +- .../elasticsearch/api/actions/cluster/put_component_template.rb | 2 +- .../lib/elasticsearch/api/actions/cluster/put_settings.rb | 2 +- .../lib/elasticsearch/api/actions/cluster/remote_info.rb | 2 +- .../lib/elasticsearch/api/actions/cluster/reroute.rb | 2 +- .../lib/elasticsearch/api/actions/cluster/state.rb | 2 +- .../lib/elasticsearch/api/actions/cluster/stats.rb | 2 +- .../lib/elasticsearch/api/actions/connector/check_in.rb | 2 +- .../lib/elasticsearch/api/actions/connector/delete.rb | 2 +- .../lib/elasticsearch/api/actions/connector/get.rb | 2 +- .../lib/elasticsearch/api/actions/connector/list.rb | 2 +- .../lib/elasticsearch/api/actions/connector/post.rb | 2 +- .../lib/elasticsearch/api/actions/connector/put.rb | 2 +- .../lib/elasticsearch/api/actions/connector/sync_job_cancel.rb | 2 +- .../elasticsearch/api/actions/connector/sync_job_check_in.rb | 2 +- .../lib/elasticsearch/api/actions/connector/sync_job_claim.rb | 2 +- .../lib/elasticsearch/api/actions/connector/sync_job_delete.rb | 2 +- .../lib/elasticsearch/api/actions/connector/sync_job_error.rb | 2 +- .../lib/elasticsearch/api/actions/connector/sync_job_get.rb | 2 +- .../lib/elasticsearch/api/actions/connector/sync_job_list.rb | 2 +- .../lib/elasticsearch/api/actions/connector/sync_job_post.rb | 2 +- .../api/actions/connector/sync_job_update_stats.rb | 2 +- .../api/actions/connector/update_active_filtering.rb | 2 +- .../elasticsearch/api/actions/connector/update_api_key_id.rb | 2 +- .../elasticsearch/api/actions/connector/update_configuration.rb | 2 +- .../lib/elasticsearch/api/actions/connector/update_error.rb | 2 +- .../lib/elasticsearch/api/actions/connector/update_features.rb | 2 +- .../lib/elasticsearch/api/actions/connector/update_filtering.rb | 2 +- .../api/actions/connector/update_filtering_validation.rb | 2 +- .../elasticsearch/api/actions/connector/update_index_name.rb | 2 +- .../lib/elasticsearch/api/actions/connector/update_name.rb | 2 +- .../lib/elasticsearch/api/actions/connector/update_native.rb | 2 +- .../lib/elasticsearch/api/actions/connector/update_pipeline.rb | 2 +- .../elasticsearch/api/actions/connector/update_scheduling.rb | 2 +- .../elasticsearch/api/actions/connector/update_service_type.rb | 2 +- .../lib/elasticsearch/api/actions/connector/update_status.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/count.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/create.rb | 2 +- .../cross_cluster_replication/delete_auto_follow_pattern.rb | 2 +- .../api/actions/cross_cluster_replication/follow.rb | 2 +- .../api/actions/cross_cluster_replication/follow_info.rb | 2 +- .../api/actions/cross_cluster_replication/follow_stats.rb | 2 +- .../api/actions/cross_cluster_replication/forget_follower.rb | 2 +- .../cross_cluster_replication/get_auto_follow_pattern.rb | 2 +- .../cross_cluster_replication/pause_auto_follow_pattern.rb | 2 +- .../api/actions/cross_cluster_replication/pause_follow.rb | 2 +- .../cross_cluster_replication/put_auto_follow_pattern.rb | 2 +- .../cross_cluster_replication/resume_auto_follow_pattern.rb | 2 +- .../api/actions/cross_cluster_replication/resume_follow.rb | 2 +- .../api/actions/cross_cluster_replication/stats.rb | 2 +- .../api/actions/cross_cluster_replication/unfollow.rb | 2 +- .../api/actions/dangling_indices/delete_dangling_index.rb | 2 +- .../api/actions/dangling_indices/import_dangling_index.rb | 2 +- .../api/actions/dangling_indices/list_dangling_indices.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/delete.rb | 2 +- .../lib/elasticsearch/api/actions/delete_by_query.rb | 2 +- .../lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb | 2 +- .../lib/elasticsearch/api/actions/delete_script.rb | 2 +- .../lib/elasticsearch/api/actions/enrich/delete_policy.rb | 2 +- .../lib/elasticsearch/api/actions/enrich/execute_policy.rb | 2 +- .../lib/elasticsearch/api/actions/enrich/get_policy.rb | 2 +- .../lib/elasticsearch/api/actions/enrich/put_policy.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb | 2 +- .../lib/elasticsearch/api/actions/eql/get_status.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb | 2 +- .../lib/elasticsearch/api/actions/esql/async_query.rb | 2 +- .../lib/elasticsearch/api/actions/esql/async_query_delete.rb | 2 +- .../lib/elasticsearch/api/actions/esql/async_query_get.rb | 2 +- .../lib/elasticsearch/api/actions/esql/async_query_stop.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/exists.rb | 2 +- .../lib/elasticsearch/api/actions/exists_source.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/explain.rb | 2 +- .../lib/elasticsearch/api/actions/features/get_features.rb | 2 +- .../lib/elasticsearch/api/actions/features/reset_features.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb | 2 +- .../lib/elasticsearch/api/actions/fleet/global_checkpoints.rb | 2 +- .../lib/elasticsearch/api/actions/fleet/msearch.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/get.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb | 2 +- .../lib/elasticsearch/api/actions/get_script_context.rb | 2 +- .../lib/elasticsearch/api/actions/get_script_languages.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb | 2 +- .../lib/elasticsearch/api/actions/graph/explore.rb | 2 +- .../lib/elasticsearch/api/actions/health_report.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/index.rb | 2 +- .../api/actions/index_lifecycle_management/delete_lifecycle.rb | 2 +- .../api/actions/index_lifecycle_management/explain_lifecycle.rb | 2 +- .../api/actions/index_lifecycle_management/get_lifecycle.rb | 2 +- .../api/actions/index_lifecycle_management/get_status.rb | 2 +- .../actions/index_lifecycle_management/migrate_to_data_tiers.rb | 2 +- .../api/actions/index_lifecycle_management/move_to_step.rb | 2 +- .../api/actions/index_lifecycle_management/put_lifecycle.rb | 2 +- .../api/actions/index_lifecycle_management/remove_policy.rb | 2 +- .../api/actions/index_lifecycle_management/retry.rb | 2 +- .../api/actions/index_lifecycle_management/start.rb | 2 +- .../api/actions/index_lifecycle_management/stop.rb | 2 +- .../lib/elasticsearch/api/actions/indices/add_block.rb | 2 +- .../lib/elasticsearch/api/actions/indices/analyze.rb | 2 +- .../elasticsearch/api/actions/indices/cancel_migrate_reindex.rb | 2 +- .../lib/elasticsearch/api/actions/indices/clear_cache.rb | 2 +- .../lib/elasticsearch/api/actions/indices/clone.rb | 2 +- .../lib/elasticsearch/api/actions/indices/close.rb | 2 +- .../lib/elasticsearch/api/actions/indices/create.rb | 2 +- .../lib/elasticsearch/api/actions/indices/create_data_stream.rb | 2 +- .../lib/elasticsearch/api/actions/indices/create_from.rb | 2 +- .../lib/elasticsearch/api/actions/indices/data_streams_stats.rb | 2 +- .../lib/elasticsearch/api/actions/indices/delete.rb | 2 +- .../lib/elasticsearch/api/actions/indices/delete_alias.rb | 2 +- .../elasticsearch/api/actions/indices/delete_data_lifecycle.rb | 2 +- .../lib/elasticsearch/api/actions/indices/delete_data_stream.rb | 2 +- .../elasticsearch/api/actions/indices/delete_index_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/delete_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/disk_usage.rb | 2 +- .../lib/elasticsearch/api/actions/indices/downsample.rb | 2 +- .../lib/elasticsearch/api/actions/indices/exists.rb | 2 +- .../lib/elasticsearch/api/actions/indices/exists_alias.rb | 2 +- .../elasticsearch/api/actions/indices/exists_index_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/exists_template.rb | 2 +- .../elasticsearch/api/actions/indices/explain_data_lifecycle.rb | 2 +- .../lib/elasticsearch/api/actions/indices/field_usage_stats.rb | 2 +- .../lib/elasticsearch/api/actions/indices/flush.rb | 2 +- .../lib/elasticsearch/api/actions/indices/forcemerge.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb | 2 +- .../lib/elasticsearch/api/actions/indices/get_alias.rb | 2 +- .../lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb | 2 +- .../api/actions/indices/get_data_lifecycle_stats.rb | 2 +- .../lib/elasticsearch/api/actions/indices/get_data_stream.rb | 2 +- .../lib/elasticsearch/api/actions/indices/get_field_mapping.rb | 2 +- .../lib/elasticsearch/api/actions/indices/get_index_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/get_mapping.rb | 2 +- .../api/actions/indices/get_migrate_reindex_status.rb | 2 +- .../lib/elasticsearch/api/actions/indices/get_settings.rb | 2 +- .../lib/elasticsearch/api/actions/indices/get_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/migrate_reindex.rb | 2 +- .../elasticsearch/api/actions/indices/migrate_to_data_stream.rb | 2 +- .../lib/elasticsearch/api/actions/indices/modify_data_stream.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb | 2 +- .../elasticsearch/api/actions/indices/promote_data_stream.rb | 2 +- .../lib/elasticsearch/api/actions/indices/put_alias.rb | 2 +- .../lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb | 2 +- .../lib/elasticsearch/api/actions/indices/put_index_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/put_mapping.rb | 2 +- .../lib/elasticsearch/api/actions/indices/put_settings.rb | 2 +- .../lib/elasticsearch/api/actions/indices/put_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/recovery.rb | 2 +- .../lib/elasticsearch/api/actions/indices/refresh.rb | 2 +- .../api/actions/indices/reload_search_analyzers.rb | 2 +- .../lib/elasticsearch/api/actions/indices/resolve_cluster.rb | 2 +- .../lib/elasticsearch/api/actions/indices/resolve_index.rb | 2 +- .../lib/elasticsearch/api/actions/indices/rollover.rb | 2 +- .../lib/elasticsearch/api/actions/indices/segments.rb | 2 +- .../lib/elasticsearch/api/actions/indices/shard_stores.rb | 2 +- .../lib/elasticsearch/api/actions/indices/shrink.rb | 2 +- .../api/actions/indices/simulate_index_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/simulate_template.rb | 2 +- .../lib/elasticsearch/api/actions/indices/split.rb | 2 +- .../lib/elasticsearch/api/actions/indices/stats.rb | 2 +- .../lib/elasticsearch/api/actions/indices/update_aliases.rb | 2 +- .../lib/elasticsearch/api/actions/indices/validate_query.rb | 2 +- .../api/actions/inference/chat_completion_unified.rb | 2 +- .../lib/elasticsearch/api/actions/inference/completion.rb | 2 +- .../lib/elasticsearch/api/actions/inference/delete.rb | 2 +- .../lib/elasticsearch/api/actions/inference/get.rb | 2 +- .../api/actions/inference/post_eis_chat_completion.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put_alibabacloud.rb | 2 +- .../elasticsearch/api/actions/inference/put_amazonbedrock.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put_anthropic.rb | 2 +- .../elasticsearch/api/actions/inference/put_azureaistudio.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put_azureopenai.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put_cohere.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put_eis.rb | 2 +- .../elasticsearch/api/actions/inference/put_elasticsearch.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put_elser.rb | 2 +- .../elasticsearch/api/actions/inference/put_googleaistudio.rb | 2 +- .../elasticsearch/api/actions/inference/put_googlevertexai.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put_hugging_face.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put_jinaai.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put_mistral.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put_openai.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put_voyageai.rb | 2 +- .../lib/elasticsearch/api/actions/inference/put_watsonx.rb | 2 +- .../lib/elasticsearch/api/actions/inference/rerank.rb | 2 +- .../lib/elasticsearch/api/actions/inference/sparse_embedding.rb | 2 +- .../elasticsearch/api/actions/inference/stream_completion.rb | 2 +- .../lib/elasticsearch/api/actions/inference/text_embedding.rb | 2 +- .../lib/elasticsearch/api/actions/inference/update.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/info.rb | 2 +- .../elasticsearch/api/actions/ingest/delete_geoip_database.rb | 2 +- .../api/actions/ingest/delete_ip_location_database.rb | 2 +- .../lib/elasticsearch/api/actions/ingest/delete_pipeline.rb | 2 +- .../lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb | 2 +- .../lib/elasticsearch/api/actions/ingest/get_geoip_database.rb | 2 +- .../api/actions/ingest/get_ip_location_database.rb | 2 +- .../lib/elasticsearch/api/actions/ingest/get_pipeline.rb | 2 +- .../lib/elasticsearch/api/actions/ingest/processor_grok.rb | 2 +- .../lib/elasticsearch/api/actions/ingest/put_geoip_database.rb | 2 +- .../api/actions/ingest/put_ip_location_database.rb | 2 +- .../lib/elasticsearch/api/actions/ingest/put_pipeline.rb | 2 +- .../lib/elasticsearch/api/actions/ingest/simulate.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb | 2 +- .../lib/elasticsearch/api/actions/license/delete.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb | 2 +- .../lib/elasticsearch/api/actions/license/get_basic_status.rb | 2 +- .../lib/elasticsearch/api/actions/license/get_trial_status.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb | 2 +- .../lib/elasticsearch/api/actions/license/post_start_basic.rb | 2 +- .../lib/elasticsearch/api/actions/license/post_start_trial.rb | 2 +- .../lib/elasticsearch/api/actions/logstash/delete_pipeline.rb | 2 +- .../lib/elasticsearch/api/actions/logstash/get_pipeline.rb | 2 +- .../lib/elasticsearch/api/actions/logstash/put_pipeline.rb | 2 +- .../machine_learning/clear_trained_model_deployment_cache.rb | 2 +- .../lib/elasticsearch/api/actions/machine_learning/close_job.rb | 2 +- .../api/actions/machine_learning/delete_calendar.rb | 2 +- .../api/actions/machine_learning/delete_calendar_event.rb | 2 +- .../api/actions/machine_learning/delete_calendar_job.rb | 2 +- .../api/actions/machine_learning/delete_data_frame_analytics.rb | 2 +- .../api/actions/machine_learning/delete_datafeed.rb | 2 +- .../api/actions/machine_learning/delete_expired_data.rb | 2 +- .../elasticsearch/api/actions/machine_learning/delete_filter.rb | 2 +- .../api/actions/machine_learning/delete_forecast.rb | 2 +- .../elasticsearch/api/actions/machine_learning/delete_job.rb | 2 +- .../api/actions/machine_learning/delete_model_snapshot.rb | 2 +- .../api/actions/machine_learning/delete_trained_model.rb | 2 +- .../api/actions/machine_learning/delete_trained_model_alias.rb | 2 +- .../api/actions/machine_learning/estimate_model_memory.rb | 2 +- .../api/actions/machine_learning/evaluate_data_frame.rb | 2 +- .../actions/machine_learning/explain_data_frame_analytics.rb | 2 +- .../lib/elasticsearch/api/actions/machine_learning/flush_job.rb | 2 +- .../lib/elasticsearch/api/actions/machine_learning/forecast.rb | 2 +- .../elasticsearch/api/actions/machine_learning/get_buckets.rb | 2 +- .../api/actions/machine_learning/get_calendar_events.rb | 2 +- .../elasticsearch/api/actions/machine_learning/get_calendars.rb | 2 +- .../api/actions/machine_learning/get_categories.rb | 2 +- .../api/actions/machine_learning/get_data_frame_analytics.rb | 2 +- .../actions/machine_learning/get_data_frame_analytics_stats.rb | 2 +- .../api/actions/machine_learning/get_datafeed_stats.rb | 2 +- .../elasticsearch/api/actions/machine_learning/get_datafeeds.rb | 2 +- .../elasticsearch/api/actions/machine_learning/get_filters.rb | 2 +- .../api/actions/machine_learning/get_influencers.rb | 2 +- .../elasticsearch/api/actions/machine_learning/get_job_stats.rb | 2 +- .../lib/elasticsearch/api/actions/machine_learning/get_jobs.rb | 2 +- .../api/actions/machine_learning/get_memory_stats.rb | 2 +- .../machine_learning/get_model_snapshot_upgrade_stats.rb | 2 +- .../api/actions/machine_learning/get_model_snapshots.rb | 2 +- .../api/actions/machine_learning/get_overall_buckets.rb | 2 +- .../elasticsearch/api/actions/machine_learning/get_records.rb | 2 +- .../api/actions/machine_learning/get_trained_models.rb | 2 +- .../api/actions/machine_learning/get_trained_models_stats.rb | 2 +- .../api/actions/machine_learning/infer_trained_model.rb | 2 +- .../lib/elasticsearch/api/actions/machine_learning/info.rb | 2 +- .../lib/elasticsearch/api/actions/machine_learning/open_job.rb | 2 +- .../api/actions/machine_learning/post_calendar_events.rb | 2 +- .../lib/elasticsearch/api/actions/machine_learning/post_data.rb | 2 +- .../actions/machine_learning/preview_data_frame_analytics.rb | 2 +- .../api/actions/machine_learning/preview_datafeed.rb | 2 +- .../elasticsearch/api/actions/machine_learning/put_calendar.rb | 2 +- .../api/actions/machine_learning/put_calendar_job.rb | 2 +- .../api/actions/machine_learning/put_data_frame_analytics.rb | 2 +- .../elasticsearch/api/actions/machine_learning/put_datafeed.rb | 2 +- .../elasticsearch/api/actions/machine_learning/put_filter.rb | 2 +- .../lib/elasticsearch/api/actions/machine_learning/put_job.rb | 2 +- .../api/actions/machine_learning/put_trained_model.rb | 2 +- .../api/actions/machine_learning/put_trained_model_alias.rb | 2 +- .../machine_learning/put_trained_model_definition_part.rb | 2 +- .../actions/machine_learning/put_trained_model_vocabulary.rb | 2 +- .../lib/elasticsearch/api/actions/machine_learning/reset_job.rb | 2 +- .../api/actions/machine_learning/revert_model_snapshot.rb | 2 +- .../api/actions/machine_learning/set_upgrade_mode.rb | 2 +- .../api/actions/machine_learning/start_data_frame_analytics.rb | 2 +- .../api/actions/machine_learning/start_datafeed.rb | 2 +- .../actions/machine_learning/start_trained_model_deployment.rb | 2 +- .../api/actions/machine_learning/stop_data_frame_analytics.rb | 2 +- .../elasticsearch/api/actions/machine_learning/stop_datafeed.rb | 2 +- .../actions/machine_learning/stop_trained_model_deployment.rb | 2 +- .../api/actions/machine_learning/update_data_frame_analytics.rb | 2 +- .../api/actions/machine_learning/update_datafeed.rb | 2 +- .../elasticsearch/api/actions/machine_learning/update_filter.rb | 2 +- .../elasticsearch/api/actions/machine_learning/update_job.rb | 2 +- .../api/actions/machine_learning/update_model_snapshot.rb | 2 +- .../actions/machine_learning/update_trained_model_deployment.rb | 2 +- .../api/actions/machine_learning/upgrade_job_snapshot.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/mget.rb | 2 +- .../lib/elasticsearch/api/actions/migration/deprecations.rb | 2 +- .../api/actions/migration/get_feature_upgrade_status.rb | 2 +- .../elasticsearch/api/actions/migration/post_feature_upgrade.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb | 2 +- .../lib/elasticsearch/api/actions/msearch_template.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb | 2 +- .../api/actions/nodes/clear_repositories_metering_archive.rb | 2 +- .../api/actions/nodes/get_repositories_metering_info.rb | 2 +- .../lib/elasticsearch/api/actions/nodes/hot_threads.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb | 2 +- .../elasticsearch/api/actions/nodes/reload_secure_settings.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb | 2 +- .../lib/elasticsearch/api/actions/open_point_in_time.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/ping.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb | 2 +- .../lib/elasticsearch/api/actions/query_rules/delete_rule.rb | 2 +- .../lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb | 2 +- .../lib/elasticsearch/api/actions/query_rules/get_rule.rb | 2 +- .../lib/elasticsearch/api/actions/query_rules/get_ruleset.rb | 2 +- .../lib/elasticsearch/api/actions/query_rules/list_rulesets.rb | 2 +- .../lib/elasticsearch/api/actions/query_rules/put_rule.rb | 2 +- .../lib/elasticsearch/api/actions/query_rules/put_ruleset.rb | 2 +- .../lib/elasticsearch/api/actions/query_rules/test.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb | 2 +- .../lib/elasticsearch/api/actions/reindex_rethrottle.rb | 2 +- .../lib/elasticsearch/api/actions/render_search_template.rb | 2 +- .../lib/elasticsearch/api/actions/scripts_painless_execute.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/search.rb | 2 +- .../lib/elasticsearch/api/actions/search_application/delete.rb | 2 +- .../actions/search_application/delete_behavioral_analytics.rb | 2 +- .../lib/elasticsearch/api/actions/search_application/get.rb | 2 +- .../api/actions/search_application/get_behavioral_analytics.rb | 2 +- .../lib/elasticsearch/api/actions/search_application/list.rb | 2 +- .../search_application/post_behavioral_analytics_event.rb | 2 +- .../lib/elasticsearch/api/actions/search_application/put.rb | 2 +- .../api/actions/search_application/put_behavioral_analytics.rb | 2 +- .../api/actions/search_application/render_query.rb | 2 +- .../lib/elasticsearch/api/actions/search_application/search.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb | 2 +- .../lib/elasticsearch/api/actions/search_shards.rb | 2 +- .../lib/elasticsearch/api/actions/search_template.rb | 2 +- .../api/actions/searchable_snapshots/cache_stats.rb | 2 +- .../api/actions/searchable_snapshots/clear_cache.rb | 2 +- .../lib/elasticsearch/api/actions/searchable_snapshots/mount.rb | 2 +- .../lib/elasticsearch/api/actions/searchable_snapshots/stats.rb | 2 +- .../elasticsearch/api/actions/security/activate_user_profile.rb | 2 +- .../lib/elasticsearch/api/actions/security/authenticate.rb | 2 +- .../lib/elasticsearch/api/actions/security/bulk_delete_role.rb | 2 +- .../lib/elasticsearch/api/actions/security/bulk_put_role.rb | 2 +- .../elasticsearch/api/actions/security/bulk_update_api_keys.rb | 2 +- .../lib/elasticsearch/api/actions/security/change_password.rb | 2 +- .../elasticsearch/api/actions/security/clear_api_key_cache.rb | 2 +- .../api/actions/security/clear_cached_privileges.rb | 2 +- .../elasticsearch/api/actions/security/clear_cached_realms.rb | 2 +- .../elasticsearch/api/actions/security/clear_cached_roles.rb | 2 +- .../api/actions/security/clear_cached_service_tokens.rb | 2 +- .../lib/elasticsearch/api/actions/security/create_api_key.rb | 2 +- .../api/actions/security/create_cross_cluster_api_key.rb | 2 +- .../elasticsearch/api/actions/security/create_service_token.rb | 2 +- .../lib/elasticsearch/api/actions/security/delegate_pki.rb | 2 +- .../lib/elasticsearch/api/actions/security/delete_privileges.rb | 2 +- .../lib/elasticsearch/api/actions/security/delete_role.rb | 2 +- .../elasticsearch/api/actions/security/delete_role_mapping.rb | 2 +- .../elasticsearch/api/actions/security/delete_service_token.rb | 2 +- .../lib/elasticsearch/api/actions/security/delete_user.rb | 2 +- .../lib/elasticsearch/api/actions/security/disable_user.rb | 2 +- .../elasticsearch/api/actions/security/disable_user_profile.rb | 2 +- .../lib/elasticsearch/api/actions/security/enable_user.rb | 2 +- .../elasticsearch/api/actions/security/enable_user_profile.rb | 2 +- .../lib/elasticsearch/api/actions/security/enroll_kibana.rb | 2 +- .../lib/elasticsearch/api/actions/security/enroll_node.rb | 2 +- .../lib/elasticsearch/api/actions/security/get_api_key.rb | 2 +- .../api/actions/security/get_builtin_privileges.rb | 2 +- .../lib/elasticsearch/api/actions/security/get_privileges.rb | 2 +- .../lib/elasticsearch/api/actions/security/get_role.rb | 2 +- .../lib/elasticsearch/api/actions/security/get_role_mapping.rb | 2 +- .../elasticsearch/api/actions/security/get_service_accounts.rb | 2 +- .../api/actions/security/get_service_credentials.rb | 2 +- .../lib/elasticsearch/api/actions/security/get_settings.rb | 2 +- .../lib/elasticsearch/api/actions/security/get_token.rb | 2 +- .../lib/elasticsearch/api/actions/security/get_user.rb | 2 +- .../elasticsearch/api/actions/security/get_user_privileges.rb | 2 +- .../lib/elasticsearch/api/actions/security/get_user_profile.rb | 2 +- .../lib/elasticsearch/api/actions/security/grant_api_key.rb | 2 +- .../lib/elasticsearch/api/actions/security/has_privileges.rb | 2 +- .../api/actions/security/has_privileges_user_profile.rb | 2 +- .../elasticsearch/api/actions/security/invalidate_api_key.rb | 2 +- .../lib/elasticsearch/api/actions/security/invalidate_token.rb | 2 +- .../lib/elasticsearch/api/actions/security/oidc_authenticate.rb | 2 +- .../lib/elasticsearch/api/actions/security/oidc_logout.rb | 2 +- .../api/actions/security/oidc_prepare_authentication.rb | 2 +- .../lib/elasticsearch/api/actions/security/put_privileges.rb | 2 +- .../lib/elasticsearch/api/actions/security/put_role.rb | 2 +- .../lib/elasticsearch/api/actions/security/put_role_mapping.rb | 2 +- .../lib/elasticsearch/api/actions/security/put_user.rb | 2 +- .../lib/elasticsearch/api/actions/security/query_api_keys.rb | 2 +- .../lib/elasticsearch/api/actions/security/query_role.rb | 2 +- .../lib/elasticsearch/api/actions/security/query_user.rb | 2 +- .../lib/elasticsearch/api/actions/security/saml_authenticate.rb | 2 +- .../elasticsearch/api/actions/security/saml_complete_logout.rb | 2 +- .../lib/elasticsearch/api/actions/security/saml_invalidate.rb | 2 +- .../lib/elasticsearch/api/actions/security/saml_logout.rb | 2 +- .../api/actions/security/saml_prepare_authentication.rb | 2 +- .../api/actions/security/saml_service_provider_metadata.rb | 2 +- .../elasticsearch/api/actions/security/suggest_user_profiles.rb | 2 +- .../lib/elasticsearch/api/actions/security/update_api_key.rb | 2 +- .../api/actions/security/update_cross_cluster_api_key.rb | 2 +- .../lib/elasticsearch/api/actions/security/update_settings.rb | 2 +- .../api/actions/security/update_user_profile_data.rb | 2 +- .../lib/elasticsearch/api/actions/simulate/ingest.rb | 2 +- .../elasticsearch/api/actions/snapshot/cleanup_repository.rb | 2 +- .../lib/elasticsearch/api/actions/snapshot/clone.rb | 2 +- .../lib/elasticsearch/api/actions/snapshot/create.rb | 2 +- .../lib/elasticsearch/api/actions/snapshot/create_repository.rb | 2 +- .../lib/elasticsearch/api/actions/snapshot/delete.rb | 2 +- .../lib/elasticsearch/api/actions/snapshot/delete_repository.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb | 2 +- .../lib/elasticsearch/api/actions/snapshot/get_repository.rb | 2 +- .../elasticsearch/api/actions/snapshot/repository_analyze.rb | 2 +- .../lib/elasticsearch/api/actions/snapshot/restore.rb | 2 +- .../lib/elasticsearch/api/actions/snapshot/status.rb | 2 +- .../lib/elasticsearch/api/actions/snapshot/verify_repository.rb | 2 +- .../actions/snapshot_lifecycle_management/delete_lifecycle.rb | 2 +- .../actions/snapshot_lifecycle_management/execute_lifecycle.rb | 2 +- .../actions/snapshot_lifecycle_management/execute_retention.rb | 2 +- .../api/actions/snapshot_lifecycle_management/get_lifecycle.rb | 2 +- .../api/actions/snapshot_lifecycle_management/get_stats.rb | 2 +- .../api/actions/snapshot_lifecycle_management/get_status.rb | 2 +- .../api/actions/snapshot_lifecycle_management/put_lifecycle.rb | 2 +- .../api/actions/snapshot_lifecycle_management/start.rb | 2 +- .../api/actions/snapshot_lifecycle_management/stop.rb | 2 +- .../lib/elasticsearch/api/actions/sql/clear_cursor.rb | 2 +- .../lib/elasticsearch/api/actions/sql/delete_async.rb | 2 +- .../lib/elasticsearch/api/actions/sql/get_async.rb | 2 +- .../lib/elasticsearch/api/actions/sql/get_async_status.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb | 2 +- .../lib/elasticsearch/api/actions/sql/translate.rb | 2 +- .../lib/elasticsearch/api/actions/ssl/certificates.rb | 2 +- .../lib/elasticsearch/api/actions/synonyms/delete_synonym.rb | 2 +- .../elasticsearch/api/actions/synonyms/delete_synonym_rule.rb | 2 +- .../lib/elasticsearch/api/actions/synonyms/get_synonym.rb | 2 +- .../lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb | 2 +- .../lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb | 2 +- .../lib/elasticsearch/api/actions/synonyms/put_synonym.rb | 2 +- .../lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb | 2 +- .../api/actions/text_structure/find_field_structure.rb | 2 +- .../api/actions/text_structure/find_message_structure.rb | 2 +- .../elasticsearch/api/actions/text_structure/find_structure.rb | 2 +- .../api/actions/text_structure/test_grok_pattern.rb | 2 +- .../lib/elasticsearch/api/actions/transform/delete_transform.rb | 2 +- .../lib/elasticsearch/api/actions/transform/get_node_stats.rb | 2 +- .../lib/elasticsearch/api/actions/transform/get_transform.rb | 2 +- .../elasticsearch/api/actions/transform/get_transform_stats.rb | 2 +- .../elasticsearch/api/actions/transform/preview_transform.rb | 2 +- .../lib/elasticsearch/api/actions/transform/put_transform.rb | 2 +- .../lib/elasticsearch/api/actions/transform/reset_transform.rb | 2 +- .../api/actions/transform/schedule_now_transform.rb | 2 +- .../lib/elasticsearch/api/actions/transform/start_transform.rb | 2 +- .../lib/elasticsearch/api/actions/transform/stop_transform.rb | 2 +- .../lib/elasticsearch/api/actions/transform/update_transform.rb | 2 +- .../elasticsearch/api/actions/transform/upgrade_transforms.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/update.rb | 2 +- .../lib/elasticsearch/api/actions/update_by_query.rb | 2 +- .../lib/elasticsearch/api/actions/update_by_query_rethrottle.rb | 2 +- .../lib/elasticsearch/api/actions/watcher/ack_watch.rb | 2 +- .../lib/elasticsearch/api/actions/watcher/activate_watch.rb | 2 +- .../lib/elasticsearch/api/actions/watcher/deactivate_watch.rb | 2 +- .../lib/elasticsearch/api/actions/watcher/delete_watch.rb | 2 +- .../lib/elasticsearch/api/actions/watcher/execute_watch.rb | 2 +- .../lib/elasticsearch/api/actions/watcher/get_settings.rb | 2 +- .../lib/elasticsearch/api/actions/watcher/get_watch.rb | 2 +- .../lib/elasticsearch/api/actions/watcher/put_watch.rb | 2 +- .../lib/elasticsearch/api/actions/watcher/query_watches.rb | 2 +- .../lib/elasticsearch/api/actions/watcher/start.rb | 2 +- .../lib/elasticsearch/api/actions/watcher/stats.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb | 2 +- .../lib/elasticsearch/api/actions/watcher/update_settings.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb | 2 +- 516 files changed, 516 insertions(+), 516 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb index abdd7009db..bbdf4f9542 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb index 3fd8699a8f..eb751d0cdb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb index d59f34e8a2..1dc4d475dd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb index 255122ffbc..8bce7f2e13 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index 7a66d6767d..718736eb52 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb index 0c48914fd7..1194dbe4a5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb index 85c32ca565..f86494847e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb index 1e940e1c6a..8742500a7a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb index 7f30de702f..1d0723aaa7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb index 114ec4086d..c4660cfe60 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb index 461cb1748a..5d4b62d810 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb index 1746fba928..66f13eb4f8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb index a11c143955..116ef51257 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb index 2d18055c8c..ab80669b77 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb index 4b6d793289..9d446eaffd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb index 1191978d36..49b17ac493 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb index 2dc94c4aee..49047cddab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb index db22906257..4b8285f505 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb index 5227a8a282..1b701f497d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb index cf2f9c30f3..35f6a3bee5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb index f2963038da..8168371103 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb index dd8738f657..3350fb4fb0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb index ff1cf27100..858f491a46 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb index 55e24c7b03..548b7a0ec0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb index f8a9e8e548..44914c3608 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb index b8656b5236..720d9776dd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb index dd44f27274..c3f559a0af 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb index 601e73d2fb..a47b7de841 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb index 46c7784730..bd1805731a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb index 65125ce46a..77635c5e5f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb index e94c7c2311..98de635cbb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb index 2ada3e053f..7e419b2c02 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb index 48387cd78c..d26f8dc29c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb index 6913912d86..744066bdd3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb index 7491f54b76..1225011109 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb index a3084653c5..ebaeb48b5b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb index 30006edb13..73c813a788 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb index a75610fcaa..6729bf01e6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb index 7030619224..e8ad9a4131 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb index 3774f7f961..0964a2b890 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb index a417c361a5..46c4c0b012 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb index 294a609f3a..e740ebeb12 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb index 6861312202..01abf21dd9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb index f309773b17..2ee401cbb5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb index 2c3a745523..55795195c1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb index 209c445fbc..018d84f8d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb index 51bdfba321..8a59111d6a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb index 3a08d92ea6..400902d5d4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb index 894835ee47..27a7c94b30 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb index 11ad544117..4126a34340 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb index dd0ea85c7c..cbb8f62b75 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb index ec737228ee..58c7ff55f6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb index 88ba43c7a6..87d6f4eee4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb index 391855f16b..50d21f7ccb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb index 56d5d20def..49faf1c2a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb index 2fd2d78997..82e285563d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb index c72c406f3b..d2ca4a8357 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb index 7faa95495c..dbb14cc6c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb index 84f9aa2811..12ae78327d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb index ecf7511397..6827f99a2b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb index 43028fd07c..50f872a524 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb index 507d509fcf..60bd9e71e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb index 117c50cc15..1ec420ab9a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb index ff1f9f8fe3..45214dd8ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb index f81d0dbf08..37cc3534a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb index f1ba538fa2..6156fa0c25 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb index 8143806c0a..cebeb3380e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb index 7a415e1650..7c9562817c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb index 6187ba7c18..20d1b84446 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb index af27874e06..8501252886 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb index 33dc67608d..a9a77970fc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb index e97b28fa1d..0140f1a203 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb index 059e6b4c0c..637aa916e4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb index 7ec801f72c..2450964deb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb index 87c4b25c26..b50f688b65 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb index b76fc77541..8b760001fc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb index 2fc43dfca2..07182aaca8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb index d2ac66676f..c75cef3013 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb index f6f975b110..8b50b002fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb index 8c103ac5aa..4c877ec91d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb index 8f3b605a18..ba060fa2ba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb index 2dd331d743..9e592d5de1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb index 9aebeda6dd..048447e5bc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb index b927c737a8..e864fe751d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb index d9089e2744..f76a65b36d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb index 55bbeabe8e..6099ccfc5c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb index 8a216016fe..3c42b701f7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb index ded431f8cf..02ee08592a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb index a539d5d5b6..929f17b666 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb index 03aece6b91..429dc2a9ab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb index 228c8b4767..40bf9cd1ae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb index b02efbb900..a8101a0849 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb index 3329aa5553..cf4111a59e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb index e65a167c2c..9618974030 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb index 80a63c15c0..861bb0ecb7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb index 15b29475b0..1d4d88812a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb index bcea1d26e3..8cbb171bd5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb index 1e3c970df0..b3d9a2993d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb index 5c3629dd12..d5377337d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb index 7d088f1dec..a35159ba9e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb index 89f909e2b8..009ca054a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb index 4565fbc3c7..e9f9c5dae2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb index 334ead139b..75cc3c28c2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb index 571fe3827a..d3c358e44c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb index 80bc7e23e0..43f04a6780 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb index e265c77438..1d0d00b121 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb index 94f647fb22..1504d30482 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb index 2acf654641..00cbb66a8a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb index 4f9242ed0c..606b2704a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb index 4a6ea2064c..b4562d7c20 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb index 3ea289b715..68c39dc73b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb index 1f8f5f3d81..f090eba4a2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb index 143e27df36..c2f73e8277 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb index baed554358..83e4ed9cb3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb index 31bfdb1d4f..8c51c82500 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb index 962649aedc..a0eb2048f1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb index 43248f1758..c5ab8ed754 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb index 1586b6aa71..b042d0e2a3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb index 752c44f899..f918e8e9eb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb index 31c5bf6379..76cd53d946 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb index c0faf1dfe4..128448474e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb index abdeb239d0..e9f91e6a26 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb index 531678706a..4af52a23ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb index 736d367f98..1390d9c8b1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb index 0f0a4ec19b..3544179814 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb index 110b7d7279..2d007cef1e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb index 5787944c94..cd2e8b85c1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb index 94b4598110..959241d720 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb index 26743e99f0..5dc459b280 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb index fd0c104e8a..ddcceedb66 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb index 57456bf284..9a3f1dfdce 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb index e9723521a3..cc05949c3f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb index 57f4cc5f98..d2455682a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb index beb6d2c6e7..193310438e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb index f7fcb8533a..886d424eef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb index 82e49b9fb5..263363605d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb index 7d0865a81a..187c463790 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb index f3d5b822f8..2c87139e7e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb index d5a5d8cb60..505536a8a3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb index 64b423f5a7..7a44b362e7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb index 7ef1629a94..e7f2bd656a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb index 69c252164a..28a6663667 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb index 6d19386592..535be62c6a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb index fd30b6c1fc..9066034557 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb index 69e7d7fc40..54b84f4d5a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb index c09d9a1f83..a2b115576a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb index cbf8386bef..7d41cb91df 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb index 14590e6b72..beeed3ccdd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb index 3fa8aff58e..d2912abe61 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb index 7aad33de30..2ce8cdc515 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb index d57741f8ae..32f534187d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb index 6ccf444209..e3b4243bf1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb index 2337c57617..c5ab52cbff 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb index 7a38834602..a7324d6b01 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb index 626e523705..ffc0896216 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb index d92701514e..3dec199d46 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb index 7a33af9e9f..94a52f7f3d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb index e08e8914c1..fc101dca12 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb index 2ed7eba8d9..2a2cce80c9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb index 035dddf8c9..f0a54f749b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb index bde6bd1d11..3e8ba3382b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb index 283be91388..d8d74dcd57 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb index 0c8fa3d14d..78874f101b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb index 152fe44ddb..fe39876f16 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb index 3a431f8728..cec3e2167e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb index 266d08258d..2946bb64f3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb index 6aded9150c..884fa6ced7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb index 43d5b01fb3..2e2f4f212e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb index 421e1fce0c..48e10cceac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb index 63aef0ac69..f6af65f093 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb index ac8b7fb06c..503e4ee8bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb index e2ac57055a..ab18db94bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb index 9fef6445ec..b86110081e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb index d9f2b8112c..7a3d3c9cea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb index b4115a1ed6..8d60e9b07a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb index 4191b1389f..f53b9bb827 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb index 60f6975b24..186b3fa6e5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb index fa21b76401..8e6e93808c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb index 53a503cc30..72048d7f52 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb index 3e4a7eb870..5d14434da8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb index 0cd003cac5..4954375314 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb index 157e34c6bb..96026e72e6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb index dca7644c6e..a2e006aaf8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb index a60371738d..e1b3563758 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb index 7548a38c85..2903210ec8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb index 1843ecc83d..e40c812563 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb index 0c8a5784e2..59656bad64 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb index a928692779..1bed0a41f4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb index 91a281aa3f..108bc9a95f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb index feda545521..0e15bffe01 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb index ce0969b78e..5cefb38e9d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb index 286063149b..d83ac80d27 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb index 669838409d..1addf539b5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb index 4b7c8cd616..ed57ffbbce 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb index b2aeac394d..ae2899d48d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index 89c04a418b..18615bab14 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb index 5a893f4355..73c440b7ba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb index ff0c138a15..7023cc37bc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb index 64a96a9a4f..17b9702870 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb index 57ba4a41e6..a17f6028b8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb index 0fd79acbfb..af07653370 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb index 336c9895b8..58a8cee899 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb index ebb4c8bf96..cc5716c933 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb index 0c0cd7a1c2..36ff746abe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb index fe8fbd4a5b..8ce69d99fd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb index 37ad6f25b7..648eda0721 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb index cb8b2e181f..fa265ca14e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb index 4bbbcd4bb5..6a8355f504 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb index 5db62f7c89..5d9b468039 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb index 021d4cc477..cfe4a1a461 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb index 23fe5e9c17..c8e3bed48c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb index 149a7332bb..0f7d6b6144 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb index b640715b96..016f077d41 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_anthropic.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_anthropic.rb index 2f64cf7f3d..1cbdfe9387 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_anthropic.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_anthropic.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb index 7d522638de..bb60225fd3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureopenai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureopenai.rb index 82c9790a28..a501f7e5fc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureopenai.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureopenai.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_cohere.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_cohere.rb index fca7d54e36..4bb51b9e8f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_cohere.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_cohere.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb index 18ef9312f4..994c829eb9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb index 10dd102dea..99010189d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elser.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elser.rb index cb615f12f8..6e78dd0486 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elser.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elser.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb index b95fdec10e..09d728693c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb index cee610674a..f13f348379 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_hugging_face.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_hugging_face.rb index 9d9e455afc..705b5df4b0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_hugging_face.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_hugging_face.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_jinaai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_jinaai.rb index 780face86d..708ce8fe3e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_jinaai.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_jinaai.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_mistral.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_mistral.rb index 40481c076e..7ab3f89b20 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_mistral.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_mistral.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_openai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_openai.rb index b7581f39b7..e5272c2d11 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_openai.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_openai.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_voyageai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_voyageai.rb index 877425f3ef..36a660102d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_voyageai.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_voyageai.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb index 3657cad583..272df6a357 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb index 2a61fe5855..113a6debf2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb index 1d4e4684b6..855a0aec05 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb index 52ed89e631..6d9b96f535 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb index 7be9b68768..583446b872 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb index b48c08a45a..e8a73adc14 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb index 0290eac247..b35d2c66b4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb index 02f312f373..d4cd8b2220 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb index dcef1cecce..11cd58d498 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb index c0650fe9bb..6fc77c3b29 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb index 0ada8ec02d..f501425767 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb index f048c4b255..ee906f28b0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb index 250b9bb376..44f0bfbc0c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb index dfdea6e0ed..9874ead1e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb index eb12d3b194..5b37eface5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb index 6fe9355da4..6fb145e39b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb index 121aaa7739..feb85bdc77 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb index a7408179ac..a273657503 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb index e2c085a3b9..710af62be1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb index 01fba8fde1..b4642da7e9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb index bf4fd1b493..9ccd9ef3ab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb index 5bac819bc0..0955929536 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb index d0c94bf9c8..e1dbb69a15 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb index 28caa2533b..de01a01ef9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb index e7ba4f3d3c..4b4d693dba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb index 735de4b124..123d0bb05c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb index 0ef0cca0a7..e3da0599bd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb index 30fe90a7c5..11c2dc15d2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb index 9debcd5da0..64ab1f9fcf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb index 5b5aa6efdf..f6e7758b26 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb index aa6aa7820a..1da8ae5cb5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb index bb084ad2e8..3b7eb9ae1c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb index 2ca3b10444..7326a223c6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb index c24801b254..b41d9235e9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb index 8e49a024d0..a4fa7d0b0d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb index 0cf70a621f..c253952eb3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb index 76d29f6baa..997574c027 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb index e57a006074..974532abee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb index ad0cbf546a..cf3e8f9f39 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb index 2379ca06d0..9cde74a52f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb index db1a024a0c..d0cd48fbe3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb index 507287984e..a4a4957304 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb index 0cca4a8caf..07a4ee491c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb index 55e1ae300f..1b873f4808 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb index da232f07dd..debdc4dc93 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb index 513dbd04d6..2c7e581c62 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb index 04c6a913b0..d39a8c194c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb index 851d01678b..ff2fc79c51 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb index d65a0d6ceb..2916ebda38 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb index f7f3715926..0fe0d0b091 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb index 8e8c9ff299..77ac2052b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb index 0a2bde4ba1..d1ecf5ad66 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb index 4410a70801..a4a8decb6e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb index 9d178afa76..6415b4a203 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb index fa39c69b19..1a110cdbac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb index 59be4a3535..3373722690 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb index 2c2bceb6c6..7a37443b0f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb index 3e17278c24..8042703937 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb index 65b29fbc12..cf38b09ac6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb index ece2041398..ceacbd8372 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb index 7fede94ea7..2cf8bdc39b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb index 082aa30af6..e216371069 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb index 0aadfe94b4..cde588f724 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb index 03886805d0..f3a95b10ec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb index 4942ad413c..5466c7adb8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb index bd6b57eb87..2f753dd82f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb index 181f6bd742..6b30552ba7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb index 2b3767b811..8c00117b45 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb index cf4ee04d60..f901d2c644 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb index eaccba1b3a..e470a887a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb index fec9b337a9..f124caf1d3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb index 2fa75ce5fa..47d59695ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb index 4c5c8c8c09..c22c14b2e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb index 8f42a9eea6..33348e5a1b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb index 8f165e5b34..facbbca58d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb index 7867aa163c..a984d8dc43 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb index e7818bd8e9..81b528c8f4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb index 95bf1b7cab..59c743d602 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb index fb360bcf25..bb9048046c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb index 47a01cbf06..f256bfcada 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb index 610448a923..8024713546 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb index 026ae8a287..f687f10435 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb index b618ac7e4c..31adce53c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb index 220a93b669..d6b896ac2f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb index 7ef36f9b27..6949656165 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb index 0098ac6f0c..b8a03af2be 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb index ed2fa69b83..18b66aed7b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb index 8658f97917..7e04214040 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb index 09ae68db21..ca130c1759 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb index 6cfe5d538e..fe75799944 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb index 28962abf57..70d7ee67b5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb index 740e6ca514..d80a4f0714 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb index 03d96f9a30..e04858b0c9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb index d43fc75b17..77ea70c9b4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb index 64430334f6..29b9bfd3bd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb index ea04135319..d001ff4295 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb index 37768e2d69..5e511e0d2d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb index 4d45669025..a435e0d65c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb index 496423f3e0..a827cd3d57 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb index f57e275fca..326be10331 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb index 64b9cff288..f6fd5f4ffe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb index 5bf3aa7c18..3789ad7681 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb index 7dfb488e75..88314f73ba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb index bb86a55598..7f722fec84 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb index d113b40b5a..bd5410fcaf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb index f3fe43fe4f..efdb8dbbc4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb index 5ba499f0d0..f3efcc1d05 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb index b99963c16a..3b0b7f1ea1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb index 3ad4c45b11..7d81d002ca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb index 17435353a4..c810a7d2d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb index 7ad48722b4..3aa38f3a08 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb index 00299b1514..21c66b6e6c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb index 6940da5b9c..a80dbeac74 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb index e9b2bf4d65..6a4e26342d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb index 73a98171bc..9d3896381c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb index a4ad4b55e1..073ce48fcb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb index e2e7a66f6a..603660e620 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb index 0d4c61d57b..6c1811ccf4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb index 06b30468cc..c6bce3d653 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb index 34a0884e4c..217a207e16 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb index 415128bed4..f11808eccb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb index de912178e2..ea72cf8e89 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb index 6f9450a030..a0826bac3a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb index 5e726c4e75..90af0ed15d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb index 8d32d0b90a..84c07589f4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb index 66b972cb45..42030f38ef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb index dcdf02dff7..191ce9c914 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb index 55161e4536..3444fa3f76 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb index 130ab943a6..2bbd86a8a4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb index 04700eae37..c035169053 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb index 3deb397c3c..09ef768b65 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb index 97dbda7298..4c2ec7a7c0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb index 4a58dcea68..2185fb8e88 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb index 177b54a314..025e871000 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb index d5a2fc575f..2bf0f652d2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb index 4449134c22..4f7ca1de76 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb index fdcdfc4c79..9894fc1066 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb index 2bf7ecfe75..a6124baf39 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb index 1753a24ee7..5fc021e70b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb index 7b7cdf5542..25c3d58601 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb index 9eddc3786d..99f9d19be8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb index d41ca4da21..1abdbc7163 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb index f90fb133a9..eaa3821f6a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb index b7f12e176f..451f0e2cf5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb index 1130b42d16..cdd42f68e9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb index 93da013150..8c0ee07ea0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb index 1237da39c3..99d72cad2d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb index 41eb19211b..32296de82a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb index 06efd2b868..4dcad6ad70 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb index 8c9610a0be..67c6340590 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb index 73fb59b0c1..9284ff0e40 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb index a13dd73857..170020e4b0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb index de67518c75..3058df5764 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb index 4c9360f172..ce7049153f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb index 4e18787d0c..ba7e3a2c2b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb index 85b4e9fea7..8dd3399b44 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb index dbd8451464..036339d32e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb index a26071661d..b033fa98f8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb index db6f761a87..9c49e03693 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb index e5a45f1a67..19657a44fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb index 4e145bc442..9ab04ed1d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb index bee4c4e272..edd41de60f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb index 8b8bb6edf1..ce9c118c14 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb index b9b338a89c..032935f86a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb index b232a566bd..63fdef9621 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb index edca42ff9f..ba310ecc3c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb index c5b992666d..2ab0a1efd5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb index bab3c8cf2f..1e0adb17b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb index 0fc74f010f..c34714bb42 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb index 8e1142c8dd..4610442abd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb index 2bc8cb57c5..c98b73e518 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb index 30b86ec2a2..5a9b501238 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb index 811ce40315..a87539da84 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb index 5e3da8160b..266457cc89 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb index 9b18c8e597..a6b209b3e1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb index 55a83981a7..4640e93196 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb index c5f9e49cbd..4d0cf1c871 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb index 7306287536..6dafc749fd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb index a1f89b1468..954ac86d1b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb index 7f547ed5ba..8acca9ce86 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb index d3de4c9cd5..845cde92cd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb index 18f00572fd..73600278fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb index 4079fed8f9..b2ae5507af 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb index 540acd3beb..832d1cad90 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb index b2e7feccc2..17080709e6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb index bc2d6b220b..1239d73a70 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb index 488950a148..fc487bf658 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb index 26ba054916..bab357f833 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb index ec1caaca9f..6ef1445b88 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb index 82ac5d28c8..fa7afa21da 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb index 5bb59b68ce..15e98f0917 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb index 3c6be088b7..70fae6d89d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb index b7a690b38c..0e59824dd6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb index bda8197c41..365e774940 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb index 0d87a6af6f..61e95cedd4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb index 06271cea54..30867f08d3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb index 43eb19c56b..e546471666 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb index 03b596aa4b..15d7f9c9c9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb index 10ef366d2d..72b383f899 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb index 5facf778ee..efd8d1b760 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb index d84df5583c..2895021681 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb index 45f2babd0c..1127a45dfd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb index 82b5b1e318..2996a975f5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb index 0b661c21cd..00cd86dd85 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb index 0a2d0377e1..700d72e8a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb index 8167ee80c7..3afdf96831 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb index 3ac13644f7..b6b14be045 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb index 2869b47747..b50f422d02 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb index 477c59e748..d7e35096d2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb index 8a51c2f29f..7d2d9f3ce1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb index e06d970842..56d089ad0a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb index 90ea10d8c4..e2d895c0b4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb index 80f01e9a43..6710c8836e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb index 7c1595368f..730c4181ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb b/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb index 4ab2d42b98..57baae3be5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb index 5527338a51..b925294380 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb index 925759ff51..792c1d75fd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb index a398e747b7..99a0c4e4e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb index 6e90dedd7c..a239f1fc23 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb index 44bd6dc04a..6c76f6a380 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb index 5cb0453cdb..d3c7b02006 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb index a5bd37e8ec..6dbd41b887 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb index 87aa3a1789..268a9b9568 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb index 0a77e940ae..809a7e99f7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb index cade7340f5..f79f041742 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb index d62a87b00c..9894846f38 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb index 35d5b2a751..7ec3d510a4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb index 2e2646c249..43cd73b907 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb index bf07a5a396..0ec5dd3a7d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb index 66ea76d8a2..860eb2387d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb index d6888ebc34..bb49f13857 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb index 3f26c45fab..dc38b89f96 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb index cada77a855..28e3f00e27 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb index 6260834677..7184b0713f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb index 00d132d571..b18d014892 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb index b2eba1d5f8..52a7368102 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb index c7c6dfe84a..d5dc116242 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb index 052c0a5ba4..a56000f1da 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb index 0622304942..71e59dfa9a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb index aba738f988..c2a9828a75 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb index fd4de3da75..885b0d8269 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb index 2064f4e3a6..0f2ce3c5ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb index 2b27c9a165..b06f4184c8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb index 11bd143164..c50cdbaa66 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb index 479c7f3521..ae6c7cbe96 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb index caaf07bb49..5a472189d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb index fec5854a14..4759828561 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb index cce4b22e61..b68f5a9560 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb index 2f4e788060..077b05593b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb index f73755d617..eb3f98c089 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb index dd20ab97d9..849753223c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb index 4ab7f321fa..6604e8d667 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb index 97ced16659..9905a09b1c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb index 6b0c1d731e..addb1999e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb index 75508e31fb..4de838e448 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb index f4137ad0a4..90507a8d86 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb index 75146cb1ac..80ca300324 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb index 6eef39943a..354c8d48df 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb index 4de2efc11b..0b50e0cebe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb index 6ab9705f53..d49c0506bc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb index 26ac55beba..b1d92597d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb index 938d5792bf..73cfc49ab9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb index 4cbe67f419..ada9e3fbb7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb index 61ebee6a99..f19eb5b3b2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb index 3c96caf5c9..59c212630f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb index 75424a0a05..29d0f86540 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb index 0210cf500a..20c497b12a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb index ab098407b3..9b3d0ffa88 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb index 281cda5b62..7ffcaab6fe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb index 6ab8a3c888..bee788cff9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb index 31c430ce59..7193dc41d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb index ece85b95fc..dfe3d80620 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb index 15e8cd6b27..28b6c34ab8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb index 2bd65039ea..ec80d8609a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb index 9f307aa63f..ff4fc11645 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb index 00b486517a..35c6ceb232 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb index 82505ddec9..4909b59706 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb index d5448f2faa..29749b58c6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb index 2387f7ee98..f6bf70769f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb index 408a7b04e1..112acbcef4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb index a283afede0..13eb10f686 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb index 590620685e..6221f834fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb index 23055bd54f..1a804b9b88 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb index cd07f8afdb..d3423129fe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb index ac7f26b57b..6b97ca1047 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb index e12f35c0aa..ab426e6345 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb index fbd96cb35e..3f82aae4d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb index a9c6fdc7f3..d821135e77 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb index 6fdc8e725a..d74663a5be 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80 +# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd # @see https://github.com/elastic/elasticsearch-specification # module Elasticsearch From 35c580268d6300a39c2565bbb74fb8aee7ef621f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 4 Apr 2025 15:45:43 +0100 Subject: [PATCH 510/540] [API] Adds ES_SPECIFICATION_COMMIT The code is automatically generated from elasticsearch-specification: https://github.com/elastic/elasticsearch-specification The value Elasticsearch::ES_SPECIFICATION_COMMIT will be updated with the commit hash of elasticsearch-specification in which the code is based. Instead of writing the commit hash in each generated file, it will be saved in this constant. --- elasticsearch-api/lib/elasticsearch/api/version.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index a8d55bf703..8003e0d5ac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/version.rb +++ b/elasticsearch-api/lib/elasticsearch/api/version.rb @@ -18,5 +18,6 @@ module Elasticsearch module API VERSION = '9.0.0'.freeze + ES_SPECIFICATION_COMMIT = 'dbb89db180052524cab77d324be4f0c00972807a'.freeze end end From 5e38ea48404d737a1bba67bdd4eefa044e35479c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 4 Apr 2025 15:47:46 +0100 Subject: [PATCH 511/540] [API] Updates Build hash message in generated code --- .../lib/elasticsearch/api/actions/async_search/delete.rb | 6 +++--- .../lib/elasticsearch/api/actions/async_search/get.rb | 6 +++--- .../lib/elasticsearch/api/actions/async_search/status.rb | 6 +++--- .../lib/elasticsearch/api/actions/async_search/submit.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/aliases.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/allocation.rb | 6 +++--- .../elasticsearch/api/actions/cat/component_templates.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/count.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/fielddata.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/health.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/indices.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/master.rb | 6 +++--- .../api/actions/cat/ml_data_frame_analytics.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/ml_datafeeds.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/ml_jobs.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/ml_trained_models.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/nodeattrs.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/nodes.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/pending_tasks.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/plugins.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/recovery.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/repositories.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/segments.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/shards.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/snapshots.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/tasks.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/templates.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/thread_pool.rb | 6 +++--- .../lib/elasticsearch/api/actions/cat/transforms.rb | 6 +++--- .../lib/elasticsearch/api/actions/clear_scroll.rb | 6 +++--- .../lib/elasticsearch/api/actions/close_point_in_time.rb | 6 +++--- .../elasticsearch/api/actions/cluster/allocation_explain.rb | 6 +++--- .../api/actions/cluster/delete_component_template.rb | 6 +++--- .../api/actions/cluster/delete_voting_config_exclusions.rb | 6 +++--- .../api/actions/cluster/exists_component_template.rb | 6 +++--- .../api/actions/cluster/get_component_template.rb | 6 +++--- .../lib/elasticsearch/api/actions/cluster/get_settings.rb | 6 +++--- .../lib/elasticsearch/api/actions/cluster/health.rb | 6 +++--- .../lib/elasticsearch/api/actions/cluster/info.rb | 6 +++--- .../lib/elasticsearch/api/actions/cluster/pending_tasks.rb | 6 +++--- .../api/actions/cluster/post_voting_config_exclusions.rb | 6 +++--- .../api/actions/cluster/put_component_template.rb | 6 +++--- .../lib/elasticsearch/api/actions/cluster/put_settings.rb | 6 +++--- .../lib/elasticsearch/api/actions/cluster/remote_info.rb | 6 +++--- .../lib/elasticsearch/api/actions/cluster/reroute.rb | 6 +++--- .../lib/elasticsearch/api/actions/cluster/state.rb | 6 +++--- .../lib/elasticsearch/api/actions/cluster/stats.rb | 6 +++--- .../lib/elasticsearch/api/actions/connector/check_in.rb | 6 +++--- .../lib/elasticsearch/api/actions/connector/delete.rb | 6 +++--- .../lib/elasticsearch/api/actions/connector/get.rb | 6 +++--- .../lib/elasticsearch/api/actions/connector/list.rb | 6 +++--- .../lib/elasticsearch/api/actions/connector/post.rb | 6 +++--- .../lib/elasticsearch/api/actions/connector/put.rb | 6 +++--- .../elasticsearch/api/actions/connector/sync_job_cancel.rb | 6 +++--- .../api/actions/connector/sync_job_check_in.rb | 6 +++--- .../elasticsearch/api/actions/connector/sync_job_claim.rb | 6 +++--- .../elasticsearch/api/actions/connector/sync_job_delete.rb | 6 +++--- .../elasticsearch/api/actions/connector/sync_job_error.rb | 6 +++--- .../lib/elasticsearch/api/actions/connector/sync_job_get.rb | 6 +++--- .../elasticsearch/api/actions/connector/sync_job_list.rb | 6 +++--- .../elasticsearch/api/actions/connector/sync_job_post.rb | 6 +++--- .../api/actions/connector/sync_job_update_stats.rb | 6 +++--- .../api/actions/connector/update_active_filtering.rb | 6 +++--- .../api/actions/connector/update_api_key_id.rb | 6 +++--- .../api/actions/connector/update_configuration.rb | 6 +++--- .../lib/elasticsearch/api/actions/connector/update_error.rb | 6 +++--- .../elasticsearch/api/actions/connector/update_features.rb | 6 +++--- .../elasticsearch/api/actions/connector/update_filtering.rb | 6 +++--- .../api/actions/connector/update_filtering_validation.rb | 6 +++--- .../api/actions/connector/update_index_name.rb | 6 +++--- .../lib/elasticsearch/api/actions/connector/update_name.rb | 6 +++--- .../elasticsearch/api/actions/connector/update_native.rb | 6 +++--- .../elasticsearch/api/actions/connector/update_pipeline.rb | 6 +++--- .../api/actions/connector/update_scheduling.rb | 6 +++--- .../api/actions/connector/update_service_type.rb | 6 +++--- .../elasticsearch/api/actions/connector/update_status.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/count.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/create.rb | 6 +++--- .../cross_cluster_replication/delete_auto_follow_pattern.rb | 6 +++--- .../api/actions/cross_cluster_replication/follow.rb | 6 +++--- .../api/actions/cross_cluster_replication/follow_info.rb | 6 +++--- .../api/actions/cross_cluster_replication/follow_stats.rb | 6 +++--- .../actions/cross_cluster_replication/forget_follower.rb | 6 +++--- .../cross_cluster_replication/get_auto_follow_pattern.rb | 6 +++--- .../cross_cluster_replication/pause_auto_follow_pattern.rb | 6 +++--- .../api/actions/cross_cluster_replication/pause_follow.rb | 6 +++--- .../cross_cluster_replication/put_auto_follow_pattern.rb | 6 +++--- .../cross_cluster_replication/resume_auto_follow_pattern.rb | 6 +++--- .../api/actions/cross_cluster_replication/resume_follow.rb | 6 +++--- .../api/actions/cross_cluster_replication/stats.rb | 6 +++--- .../api/actions/cross_cluster_replication/unfollow.rb | 6 +++--- .../api/actions/dangling_indices/delete_dangling_index.rb | 6 +++--- .../api/actions/dangling_indices/import_dangling_index.rb | 6 +++--- .../api/actions/dangling_indices/list_dangling_indices.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/delete.rb | 6 +++--- .../lib/elasticsearch/api/actions/delete_by_query.rb | 6 +++--- .../elasticsearch/api/actions/delete_by_query_rethrottle.rb | 6 +++--- .../lib/elasticsearch/api/actions/delete_script.rb | 6 +++--- .../lib/elasticsearch/api/actions/enrich/delete_policy.rb | 6 +++--- .../lib/elasticsearch/api/actions/enrich/execute_policy.rb | 6 +++--- .../lib/elasticsearch/api/actions/enrich/get_policy.rb | 6 +++--- .../lib/elasticsearch/api/actions/enrich/put_policy.rb | 6 +++--- .../lib/elasticsearch/api/actions/enrich/stats.rb | 6 +++--- .../lib/elasticsearch/api/actions/eql/delete.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb | 6 +++--- .../lib/elasticsearch/api/actions/eql/get_status.rb | 6 +++--- .../lib/elasticsearch/api/actions/eql/search.rb | 6 +++--- .../lib/elasticsearch/api/actions/esql/async_query.rb | 6 +++--- .../elasticsearch/api/actions/esql/async_query_delete.rb | 6 +++--- .../lib/elasticsearch/api/actions/esql/async_query_get.rb | 6 +++--- .../lib/elasticsearch/api/actions/esql/async_query_stop.rb | 6 +++--- .../lib/elasticsearch/api/actions/esql/query.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/exists.rb | 6 +++--- .../lib/elasticsearch/api/actions/exists_source.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/explain.rb | 6 +++--- .../lib/elasticsearch/api/actions/features/get_features.rb | 6 +++--- .../elasticsearch/api/actions/features/reset_features.rb | 6 +++--- .../lib/elasticsearch/api/actions/field_caps.rb | 6 +++--- .../elasticsearch/api/actions/fleet/global_checkpoints.rb | 6 +++--- .../lib/elasticsearch/api/actions/fleet/msearch.rb | 6 +++--- .../lib/elasticsearch/api/actions/fleet/search.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/get.rb | 6 +++--- .../lib/elasticsearch/api/actions/get_script.rb | 6 +++--- .../lib/elasticsearch/api/actions/get_script_context.rb | 6 +++--- .../lib/elasticsearch/api/actions/get_script_languages.rb | 6 +++--- .../lib/elasticsearch/api/actions/get_source.rb | 6 +++--- .../lib/elasticsearch/api/actions/graph/explore.rb | 6 +++--- .../lib/elasticsearch/api/actions/health_report.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/index.rb | 6 +++--- .../actions/index_lifecycle_management/delete_lifecycle.rb | 6 +++--- .../actions/index_lifecycle_management/explain_lifecycle.rb | 6 +++--- .../api/actions/index_lifecycle_management/get_lifecycle.rb | 6 +++--- .../api/actions/index_lifecycle_management/get_status.rb | 6 +++--- .../index_lifecycle_management/migrate_to_data_tiers.rb | 6 +++--- .../api/actions/index_lifecycle_management/move_to_step.rb | 6 +++--- .../api/actions/index_lifecycle_management/put_lifecycle.rb | 6 +++--- .../api/actions/index_lifecycle_management/remove_policy.rb | 6 +++--- .../api/actions/index_lifecycle_management/retry.rb | 6 +++--- .../api/actions/index_lifecycle_management/start.rb | 6 +++--- .../api/actions/index_lifecycle_management/stop.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/add_block.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/analyze.rb | 6 +++--- .../api/actions/indices/cancel_migrate_reindex.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/clear_cache.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/clone.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/close.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/create.rb | 6 +++--- .../elasticsearch/api/actions/indices/create_data_stream.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/create_from.rb | 6 +++--- .../elasticsearch/api/actions/indices/data_streams_stats.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/delete.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/delete_alias.rb | 6 +++--- .../api/actions/indices/delete_data_lifecycle.rb | 6 +++--- .../elasticsearch/api/actions/indices/delete_data_stream.rb | 6 +++--- .../api/actions/indices/delete_index_template.rb | 6 +++--- .../elasticsearch/api/actions/indices/delete_template.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/disk_usage.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/downsample.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/exists.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/exists_alias.rb | 6 +++--- .../api/actions/indices/exists_index_template.rb | 6 +++--- .../elasticsearch/api/actions/indices/exists_template.rb | 6 +++--- .../api/actions/indices/explain_data_lifecycle.rb | 6 +++--- .../elasticsearch/api/actions/indices/field_usage_stats.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/flush.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/forcemerge.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/get.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/get_alias.rb | 6 +++--- .../elasticsearch/api/actions/indices/get_data_lifecycle.rb | 6 +++--- .../api/actions/indices/get_data_lifecycle_stats.rb | 6 +++--- .../elasticsearch/api/actions/indices/get_data_stream.rb | 6 +++--- .../elasticsearch/api/actions/indices/get_field_mapping.rb | 6 +++--- .../elasticsearch/api/actions/indices/get_index_template.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/get_mapping.rb | 6 +++--- .../api/actions/indices/get_migrate_reindex_status.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/get_settings.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/get_template.rb | 6 +++--- .../elasticsearch/api/actions/indices/migrate_reindex.rb | 6 +++--- .../api/actions/indices/migrate_to_data_stream.rb | 6 +++--- .../elasticsearch/api/actions/indices/modify_data_stream.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/open.rb | 6 +++--- .../api/actions/indices/promote_data_stream.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/put_alias.rb | 6 +++--- .../elasticsearch/api/actions/indices/put_data_lifecycle.rb | 6 +++--- .../elasticsearch/api/actions/indices/put_index_template.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/put_mapping.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/put_settings.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/put_template.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/recovery.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/refresh.rb | 6 +++--- .../api/actions/indices/reload_search_analyzers.rb | 6 +++--- .../elasticsearch/api/actions/indices/resolve_cluster.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/resolve_index.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/rollover.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/segments.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/shard_stores.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/shrink.rb | 6 +++--- .../api/actions/indices/simulate_index_template.rb | 6 +++--- .../elasticsearch/api/actions/indices/simulate_template.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/split.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/stats.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/update_aliases.rb | 6 +++--- .../lib/elasticsearch/api/actions/indices/validate_query.rb | 6 +++--- .../api/actions/inference/chat_completion_unified.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/completion.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/delete.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/get.rb | 6 +++--- .../api/actions/inference/post_eis_chat_completion.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/put.rb | 6 +++--- .../elasticsearch/api/actions/inference/put_alibabacloud.rb | 6 +++--- .../api/actions/inference/put_amazonbedrock.rb | 6 +++--- .../elasticsearch/api/actions/inference/put_anthropic.rb | 6 +++--- .../api/actions/inference/put_azureaistudio.rb | 6 +++--- .../elasticsearch/api/actions/inference/put_azureopenai.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/put_cohere.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/put_eis.rb | 6 +++--- .../api/actions/inference/put_elasticsearch.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/put_elser.rb | 6 +++--- .../api/actions/inference/put_googleaistudio.rb | 6 +++--- .../api/actions/inference/put_googlevertexai.rb | 6 +++--- .../elasticsearch/api/actions/inference/put_hugging_face.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/put_jinaai.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/put_mistral.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/put_openai.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/put_voyageai.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/put_watsonx.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/rerank.rb | 6 +++--- .../elasticsearch/api/actions/inference/sparse_embedding.rb | 6 +++--- .../api/actions/inference/stream_completion.rb | 6 +++--- .../elasticsearch/api/actions/inference/text_embedding.rb | 6 +++--- .../lib/elasticsearch/api/actions/inference/update.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/info.rb | 6 +++--- .../api/actions/ingest/delete_geoip_database.rb | 6 +++--- .../api/actions/ingest/delete_ip_location_database.rb | 6 +++--- .../lib/elasticsearch/api/actions/ingest/delete_pipeline.rb | 6 +++--- .../lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb | 6 +++--- .../elasticsearch/api/actions/ingest/get_geoip_database.rb | 6 +++--- .../api/actions/ingest/get_ip_location_database.rb | 6 +++--- .../lib/elasticsearch/api/actions/ingest/get_pipeline.rb | 6 +++--- .../lib/elasticsearch/api/actions/ingest/processor_grok.rb | 6 +++--- .../elasticsearch/api/actions/ingest/put_geoip_database.rb | 6 +++--- .../api/actions/ingest/put_ip_location_database.rb | 6 +++--- .../lib/elasticsearch/api/actions/ingest/put_pipeline.rb | 6 +++--- .../lib/elasticsearch/api/actions/ingest/simulate.rb | 6 +++--- .../lib/elasticsearch/api/actions/knn_search.rb | 6 +++--- .../lib/elasticsearch/api/actions/license/delete.rb | 6 +++--- .../lib/elasticsearch/api/actions/license/get.rb | 6 +++--- .../elasticsearch/api/actions/license/get_basic_status.rb | 6 +++--- .../elasticsearch/api/actions/license/get_trial_status.rb | 6 +++--- .../lib/elasticsearch/api/actions/license/post.rb | 6 +++--- .../elasticsearch/api/actions/license/post_start_basic.rb | 6 +++--- .../elasticsearch/api/actions/license/post_start_trial.rb | 6 +++--- .../elasticsearch/api/actions/logstash/delete_pipeline.rb | 6 +++--- .../lib/elasticsearch/api/actions/logstash/get_pipeline.rb | 6 +++--- .../lib/elasticsearch/api/actions/logstash/put_pipeline.rb | 6 +++--- .../clear_trained_model_deployment_cache.rb | 6 +++--- .../elasticsearch/api/actions/machine_learning/close_job.rb | 6 +++--- .../api/actions/machine_learning/delete_calendar.rb | 6 +++--- .../api/actions/machine_learning/delete_calendar_event.rb | 6 +++--- .../api/actions/machine_learning/delete_calendar_job.rb | 6 +++--- .../actions/machine_learning/delete_data_frame_analytics.rb | 6 +++--- .../api/actions/machine_learning/delete_datafeed.rb | 6 +++--- .../api/actions/machine_learning/delete_expired_data.rb | 6 +++--- .../api/actions/machine_learning/delete_filter.rb | 6 +++--- .../api/actions/machine_learning/delete_forecast.rb | 6 +++--- .../api/actions/machine_learning/delete_job.rb | 6 +++--- .../api/actions/machine_learning/delete_model_snapshot.rb | 6 +++--- .../api/actions/machine_learning/delete_trained_model.rb | 6 +++--- .../actions/machine_learning/delete_trained_model_alias.rb | 6 +++--- .../api/actions/machine_learning/estimate_model_memory.rb | 6 +++--- .../api/actions/machine_learning/evaluate_data_frame.rb | 6 +++--- .../machine_learning/explain_data_frame_analytics.rb | 6 +++--- .../elasticsearch/api/actions/machine_learning/flush_job.rb | 6 +++--- .../elasticsearch/api/actions/machine_learning/forecast.rb | 6 +++--- .../api/actions/machine_learning/get_buckets.rb | 6 +++--- .../api/actions/machine_learning/get_calendar_events.rb | 6 +++--- .../api/actions/machine_learning/get_calendars.rb | 6 +++--- .../api/actions/machine_learning/get_categories.rb | 6 +++--- .../actions/machine_learning/get_data_frame_analytics.rb | 6 +++--- .../machine_learning/get_data_frame_analytics_stats.rb | 6 +++--- .../api/actions/machine_learning/get_datafeed_stats.rb | 6 +++--- .../api/actions/machine_learning/get_datafeeds.rb | 6 +++--- .../api/actions/machine_learning/get_filters.rb | 6 +++--- .../api/actions/machine_learning/get_influencers.rb | 6 +++--- .../api/actions/machine_learning/get_job_stats.rb | 6 +++--- .../elasticsearch/api/actions/machine_learning/get_jobs.rb | 6 +++--- .../api/actions/machine_learning/get_memory_stats.rb | 6 +++--- .../machine_learning/get_model_snapshot_upgrade_stats.rb | 6 +++--- .../api/actions/machine_learning/get_model_snapshots.rb | 6 +++--- .../api/actions/machine_learning/get_overall_buckets.rb | 6 +++--- .../api/actions/machine_learning/get_records.rb | 6 +++--- .../api/actions/machine_learning/get_trained_models.rb | 6 +++--- .../actions/machine_learning/get_trained_models_stats.rb | 6 +++--- .../api/actions/machine_learning/infer_trained_model.rb | 6 +++--- .../lib/elasticsearch/api/actions/machine_learning/info.rb | 6 +++--- .../elasticsearch/api/actions/machine_learning/open_job.rb | 6 +++--- .../api/actions/machine_learning/post_calendar_events.rb | 6 +++--- .../elasticsearch/api/actions/machine_learning/post_data.rb | 6 +++--- .../machine_learning/preview_data_frame_analytics.rb | 6 +++--- .../api/actions/machine_learning/preview_datafeed.rb | 6 +++--- .../api/actions/machine_learning/put_calendar.rb | 6 +++--- .../api/actions/machine_learning/put_calendar_job.rb | 6 +++--- .../actions/machine_learning/put_data_frame_analytics.rb | 6 +++--- .../api/actions/machine_learning/put_datafeed.rb | 6 +++--- .../api/actions/machine_learning/put_filter.rb | 6 +++--- .../elasticsearch/api/actions/machine_learning/put_job.rb | 6 +++--- .../api/actions/machine_learning/put_trained_model.rb | 6 +++--- .../api/actions/machine_learning/put_trained_model_alias.rb | 6 +++--- .../machine_learning/put_trained_model_definition_part.rb | 6 +++--- .../machine_learning/put_trained_model_vocabulary.rb | 6 +++--- .../elasticsearch/api/actions/machine_learning/reset_job.rb | 6 +++--- .../api/actions/machine_learning/revert_model_snapshot.rb | 6 +++--- .../api/actions/machine_learning/set_upgrade_mode.rb | 6 +++--- .../actions/machine_learning/start_data_frame_analytics.rb | 6 +++--- .../api/actions/machine_learning/start_datafeed.rb | 6 +++--- .../machine_learning/start_trained_model_deployment.rb | 6 +++--- .../actions/machine_learning/stop_data_frame_analytics.rb | 6 +++--- .../api/actions/machine_learning/stop_datafeed.rb | 6 +++--- .../machine_learning/stop_trained_model_deployment.rb | 6 +++--- .../actions/machine_learning/update_data_frame_analytics.rb | 6 +++--- .../api/actions/machine_learning/update_datafeed.rb | 6 +++--- .../api/actions/machine_learning/update_filter.rb | 6 +++--- .../api/actions/machine_learning/update_job.rb | 6 +++--- .../api/actions/machine_learning/update_model_snapshot.rb | 6 +++--- .../machine_learning/update_trained_model_deployment.rb | 6 +++--- .../api/actions/machine_learning/upgrade_job_snapshot.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/mget.rb | 6 +++--- .../lib/elasticsearch/api/actions/migration/deprecations.rb | 6 +++--- .../api/actions/migration/get_feature_upgrade_status.rb | 6 +++--- .../api/actions/migration/post_feature_upgrade.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb | 6 +++--- .../lib/elasticsearch/api/actions/msearch_template.rb | 6 +++--- .../lib/elasticsearch/api/actions/mtermvectors.rb | 6 +++--- .../actions/nodes/clear_repositories_metering_archive.rb | 6 +++--- .../api/actions/nodes/get_repositories_metering_info.rb | 6 +++--- .../lib/elasticsearch/api/actions/nodes/hot_threads.rb | 6 +++--- .../lib/elasticsearch/api/actions/nodes/info.rb | 6 +++--- .../api/actions/nodes/reload_secure_settings.rb | 6 +++--- .../lib/elasticsearch/api/actions/nodes/stats.rb | 6 +++--- .../lib/elasticsearch/api/actions/nodes/usage.rb | 6 +++--- .../lib/elasticsearch/api/actions/open_point_in_time.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/ping.rb | 6 +++--- .../lib/elasticsearch/api/actions/put_script.rb | 6 +++--- .../elasticsearch/api/actions/query_rules/delete_rule.rb | 6 +++--- .../elasticsearch/api/actions/query_rules/delete_ruleset.rb | 6 +++--- .../lib/elasticsearch/api/actions/query_rules/get_rule.rb | 6 +++--- .../elasticsearch/api/actions/query_rules/get_ruleset.rb | 6 +++--- .../elasticsearch/api/actions/query_rules/list_rulesets.rb | 6 +++--- .../lib/elasticsearch/api/actions/query_rules/put_rule.rb | 6 +++--- .../elasticsearch/api/actions/query_rules/put_ruleset.rb | 6 +++--- .../lib/elasticsearch/api/actions/query_rules/test.rb | 6 +++--- .../lib/elasticsearch/api/actions/rank_eval.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb | 6 +++--- .../lib/elasticsearch/api/actions/reindex_rethrottle.rb | 6 +++--- .../lib/elasticsearch/api/actions/render_search_template.rb | 6 +++--- .../elasticsearch/api/actions/scripts_painless_execute.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/search.rb | 6 +++--- .../elasticsearch/api/actions/search_application/delete.rb | 6 +++--- .../search_application/delete_behavioral_analytics.rb | 6 +++--- .../lib/elasticsearch/api/actions/search_application/get.rb | 6 +++--- .../actions/search_application/get_behavioral_analytics.rb | 6 +++--- .../elasticsearch/api/actions/search_application/list.rb | 6 +++--- .../search_application/post_behavioral_analytics_event.rb | 6 +++--- .../lib/elasticsearch/api/actions/search_application/put.rb | 6 +++--- .../actions/search_application/put_behavioral_analytics.rb | 6 +++--- .../api/actions/search_application/render_query.rb | 6 +++--- .../elasticsearch/api/actions/search_application/search.rb | 6 +++--- .../lib/elasticsearch/api/actions/search_mvt.rb | 6 +++--- .../lib/elasticsearch/api/actions/search_shards.rb | 6 +++--- .../lib/elasticsearch/api/actions/search_template.rb | 6 +++--- .../api/actions/searchable_snapshots/cache_stats.rb | 6 +++--- .../api/actions/searchable_snapshots/clear_cache.rb | 6 +++--- .../elasticsearch/api/actions/searchable_snapshots/mount.rb | 6 +++--- .../elasticsearch/api/actions/searchable_snapshots/stats.rb | 6 +++--- .../api/actions/security/activate_user_profile.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/authenticate.rb | 6 +++--- .../elasticsearch/api/actions/security/bulk_delete_role.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/bulk_put_role.rb | 6 +++--- .../api/actions/security/bulk_update_api_keys.rb | 6 +++--- .../elasticsearch/api/actions/security/change_password.rb | 6 +++--- .../api/actions/security/clear_api_key_cache.rb | 6 +++--- .../api/actions/security/clear_cached_privileges.rb | 6 +++--- .../api/actions/security/clear_cached_realms.rb | 6 +++--- .../api/actions/security/clear_cached_roles.rb | 6 +++--- .../api/actions/security/clear_cached_service_tokens.rb | 6 +++--- .../elasticsearch/api/actions/security/create_api_key.rb | 6 +++--- .../api/actions/security/create_cross_cluster_api_key.rb | 6 +++--- .../api/actions/security/create_service_token.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/delegate_pki.rb | 6 +++--- .../elasticsearch/api/actions/security/delete_privileges.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/delete_role.rb | 6 +++--- .../api/actions/security/delete_role_mapping.rb | 6 +++--- .../api/actions/security/delete_service_token.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/delete_user.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/disable_user.rb | 6 +++--- .../api/actions/security/disable_user_profile.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/enable_user.rb | 6 +++--- .../api/actions/security/enable_user_profile.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/enroll_kibana.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/enroll_node.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/get_api_key.rb | 6 +++--- .../api/actions/security/get_builtin_privileges.rb | 6 +++--- .../elasticsearch/api/actions/security/get_privileges.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/get_role.rb | 6 +++--- .../elasticsearch/api/actions/security/get_role_mapping.rb | 6 +++--- .../api/actions/security/get_service_accounts.rb | 6 +++--- .../api/actions/security/get_service_credentials.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/get_settings.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/get_token.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/get_user.rb | 6 +++--- .../api/actions/security/get_user_privileges.rb | 6 +++--- .../elasticsearch/api/actions/security/get_user_profile.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/grant_api_key.rb | 6 +++--- .../elasticsearch/api/actions/security/has_privileges.rb | 6 +++--- .../api/actions/security/has_privileges_user_profile.rb | 6 +++--- .../api/actions/security/invalidate_api_key.rb | 6 +++--- .../elasticsearch/api/actions/security/invalidate_token.rb | 6 +++--- .../elasticsearch/api/actions/security/oidc_authenticate.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/oidc_logout.rb | 6 +++--- .../api/actions/security/oidc_prepare_authentication.rb | 6 +++--- .../elasticsearch/api/actions/security/put_privileges.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/put_role.rb | 6 +++--- .../elasticsearch/api/actions/security/put_role_mapping.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/put_user.rb | 6 +++--- .../elasticsearch/api/actions/security/query_api_keys.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/query_role.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/query_user.rb | 6 +++--- .../elasticsearch/api/actions/security/saml_authenticate.rb | 6 +++--- .../api/actions/security/saml_complete_logout.rb | 6 +++--- .../elasticsearch/api/actions/security/saml_invalidate.rb | 6 +++--- .../lib/elasticsearch/api/actions/security/saml_logout.rb | 6 +++--- .../api/actions/security/saml_prepare_authentication.rb | 6 +++--- .../api/actions/security/saml_service_provider_metadata.rb | 6 +++--- .../api/actions/security/suggest_user_profiles.rb | 6 +++--- .../elasticsearch/api/actions/security/update_api_key.rb | 6 +++--- .../api/actions/security/update_cross_cluster_api_key.rb | 6 +++--- .../elasticsearch/api/actions/security/update_settings.rb | 6 +++--- .../api/actions/security/update_user_profile_data.rb | 6 +++--- .../lib/elasticsearch/api/actions/simulate/ingest.rb | 6 +++--- .../api/actions/snapshot/cleanup_repository.rb | 6 +++--- .../lib/elasticsearch/api/actions/snapshot/clone.rb | 6 +++--- .../lib/elasticsearch/api/actions/snapshot/create.rb | 6 +++--- .../elasticsearch/api/actions/snapshot/create_repository.rb | 6 +++--- .../lib/elasticsearch/api/actions/snapshot/delete.rb | 6 +++--- .../elasticsearch/api/actions/snapshot/delete_repository.rb | 6 +++--- .../lib/elasticsearch/api/actions/snapshot/get.rb | 6 +++--- .../elasticsearch/api/actions/snapshot/get_repository.rb | 6 +++--- .../api/actions/snapshot/repository_analyze.rb | 6 +++--- .../lib/elasticsearch/api/actions/snapshot/restore.rb | 6 +++--- .../lib/elasticsearch/api/actions/snapshot/status.rb | 6 +++--- .../elasticsearch/api/actions/snapshot/verify_repository.rb | 6 +++--- .../snapshot_lifecycle_management/delete_lifecycle.rb | 6 +++--- .../snapshot_lifecycle_management/execute_lifecycle.rb | 6 +++--- .../snapshot_lifecycle_management/execute_retention.rb | 6 +++--- .../actions/snapshot_lifecycle_management/get_lifecycle.rb | 6 +++--- .../api/actions/snapshot_lifecycle_management/get_stats.rb | 6 +++--- .../api/actions/snapshot_lifecycle_management/get_status.rb | 6 +++--- .../actions/snapshot_lifecycle_management/put_lifecycle.rb | 6 +++--- .../api/actions/snapshot_lifecycle_management/start.rb | 6 +++--- .../api/actions/snapshot_lifecycle_management/stop.rb | 6 +++--- .../lib/elasticsearch/api/actions/sql/clear_cursor.rb | 6 +++--- .../lib/elasticsearch/api/actions/sql/delete_async.rb | 6 +++--- .../lib/elasticsearch/api/actions/sql/get_async.rb | 6 +++--- .../lib/elasticsearch/api/actions/sql/get_async_status.rb | 6 +++--- .../lib/elasticsearch/api/actions/sql/query.rb | 6 +++--- .../lib/elasticsearch/api/actions/sql/translate.rb | 6 +++--- .../lib/elasticsearch/api/actions/ssl/certificates.rb | 6 +++--- .../elasticsearch/api/actions/synonyms/delete_synonym.rb | 6 +++--- .../api/actions/synonyms/delete_synonym_rule.rb | 6 +++--- .../lib/elasticsearch/api/actions/synonyms/get_synonym.rb | 6 +++--- .../elasticsearch/api/actions/synonyms/get_synonym_rule.rb | 6 +++--- .../elasticsearch/api/actions/synonyms/get_synonyms_sets.rb | 6 +++--- .../lib/elasticsearch/api/actions/synonyms/put_synonym.rb | 6 +++--- .../elasticsearch/api/actions/synonyms/put_synonym_rule.rb | 6 +++--- .../lib/elasticsearch/api/actions/tasks/cancel.rb | 6 +++--- .../lib/elasticsearch/api/actions/tasks/get.rb | 6 +++--- .../lib/elasticsearch/api/actions/tasks/list.rb | 6 +++--- .../lib/elasticsearch/api/actions/terms_enum.rb | 6 +++--- .../lib/elasticsearch/api/actions/termvectors.rb | 6 +++--- .../api/actions/text_structure/find_field_structure.rb | 6 +++--- .../api/actions/text_structure/find_message_structure.rb | 6 +++--- .../api/actions/text_structure/find_structure.rb | 6 +++--- .../api/actions/text_structure/test_grok_pattern.rb | 6 +++--- .../elasticsearch/api/actions/transform/delete_transform.rb | 6 +++--- .../elasticsearch/api/actions/transform/get_node_stats.rb | 6 +++--- .../elasticsearch/api/actions/transform/get_transform.rb | 6 +++--- .../api/actions/transform/get_transform_stats.rb | 6 +++--- .../api/actions/transform/preview_transform.rb | 6 +++--- .../elasticsearch/api/actions/transform/put_transform.rb | 6 +++--- .../elasticsearch/api/actions/transform/reset_transform.rb | 6 +++--- .../api/actions/transform/schedule_now_transform.rb | 6 +++--- .../elasticsearch/api/actions/transform/start_transform.rb | 6 +++--- .../elasticsearch/api/actions/transform/stop_transform.rb | 6 +++--- .../elasticsearch/api/actions/transform/update_transform.rb | 6 +++--- .../api/actions/transform/upgrade_transforms.rb | 6 +++--- elasticsearch-api/lib/elasticsearch/api/actions/update.rb | 6 +++--- .../lib/elasticsearch/api/actions/update_by_query.rb | 6 +++--- .../elasticsearch/api/actions/update_by_query_rethrottle.rb | 6 +++--- .../lib/elasticsearch/api/actions/watcher/ack_watch.rb | 6 +++--- .../lib/elasticsearch/api/actions/watcher/activate_watch.rb | 6 +++--- .../elasticsearch/api/actions/watcher/deactivate_watch.rb | 6 +++--- .../lib/elasticsearch/api/actions/watcher/delete_watch.rb | 6 +++--- .../lib/elasticsearch/api/actions/watcher/execute_watch.rb | 6 +++--- .../lib/elasticsearch/api/actions/watcher/get_settings.rb | 6 +++--- .../lib/elasticsearch/api/actions/watcher/get_watch.rb | 6 +++--- .../lib/elasticsearch/api/actions/watcher/put_watch.rb | 6 +++--- .../lib/elasticsearch/api/actions/watcher/query_watches.rb | 6 +++--- .../lib/elasticsearch/api/actions/watcher/start.rb | 6 +++--- .../lib/elasticsearch/api/actions/watcher/stats.rb | 6 +++--- .../lib/elasticsearch/api/actions/watcher/stop.rb | 6 +++--- .../elasticsearch/api/actions/watcher/update_settings.rb | 6 +++--- .../lib/elasticsearch/api/actions/xpack/info.rb | 6 +++--- .../lib/elasticsearch/api/actions/xpack/usage.rb | 6 +++--- 516 files changed, 1548 insertions(+), 1548 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb index bbdf4f9542..940a47498d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 AsyncSearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb index eb751d0cdb..93e982c95e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 AsyncSearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb index 1dc4d475dd..67c4c0f650 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 AsyncSearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb index 8bce7f2e13..546cf0714c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 AsyncSearch diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index 718736eb52..7f5fd0b714 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb index 1194dbe4a5..0211dbc973 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb index f86494847e..b08f92074c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb index 8742500a7a..3d77c58d2c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb index 1d0723aaa7..3bd4eb3fd2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb index c4660cfe60..5a08c6d8ec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb index 5d4b62d810..241b38e607 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb index 66f13eb4f8..9e60e0a3ab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb index 116ef51257..993d292105 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb index ab80669b77..68c3f8d712 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb index 9d446eaffd..f4744c521e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb index 49b17ac493..4e54293420 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb index 49047cddab..cf4bdfe666 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb index 4b8285f505..4d4401af64 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb index 1b701f497d..b2035b5d0c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb index 35f6a3bee5..e5bb34ad56 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb index 8168371103..345f0d1332 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb index 3350fb4fb0..db1602a6e9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb index 858f491a46..93dec9c32c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb index 548b7a0ec0..b565d40edd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb index 44914c3608..cab1160b86 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb index 720d9776dd..04550ec87c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb index c3f559a0af..2d39833e93 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb index a47b7de841..050890bc76 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb index bd1805731a..5bdc457bcd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb index 77635c5e5f..be0cd62fdc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb index 98de635cbb..9390a25881 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cat diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb index 7e419b2c02..520f28001a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb index d26f8dc29c..537ed0eff6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb index 744066bdd3..fb48a14d65 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb index 1225011109..7f50cd4187 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb index ebaeb48b5b..390eadc180 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb index 73c813a788..f895baacec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb index 6729bf01e6..3f57430a52 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb index e8ad9a4131..6f636d813d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb index 0964a2b890..bf5a38b0ff 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb index 46c4c0b012..0de66c3a67 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb index e740ebeb12..f0430b73c3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb index 01abf21dd9..35bd36c80c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb index 2ee401cbb5..498d36572c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb index 55795195c1..655fa2cc63 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb index 018d84f8d9..a04ecc1dcf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb index 8a59111d6a..dd24a9608d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb index 400902d5d4..e242fde3e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb index 27a7c94b30..fa07c366fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Cluster diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb index 4126a34340..6211600bbe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/check_in.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb index cbb8f62b75..c060a3bcff 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/delete.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb index 58c7ff55f6..8b195f2435 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/get.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb index 87d6f4eee4..ffa9214b01 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/list.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb index 50d21f7ccb..b67330c469 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/post.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb index 49faf1c2a0..18790b593b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/put.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb index 82e285563d..78b8b46990 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb index d2ca4a8357..8d1fa84500 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb index dbb14cc6c5..bfd4ec791b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_claim.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb index 12ae78327d..d71580b6a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_delete.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb index 6827f99a2b..f1ac042d4c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_error.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb index 50f872a524..48168ac0aa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_get.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb index 60bd9e71e3..0e054905bd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_list.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb index 1ec420ab9a..64440d13a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_post.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb index 45214dd8ee..ede9d35e74 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb index 37cc3534a8..3f9e15887c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_active_filtering.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb index 6156fa0c25..4f02552408 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_api_key_id.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb index cebeb3380e..c546b9918f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_configuration.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb index 7c9562817c..bbc3739934 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_error.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb index 20d1b84446..ae99d9707b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_features.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb index 8501252886..0a60fae3bf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb index a9a77970fc..f6567ae438 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb index 0140f1a203..0b9d9df6b5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_index_name.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb index 637aa916e4..6172403ae1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_name.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb index 2450964deb..133e919ce3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb index b50f688b65..8b983849f0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_pipeline.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb index 8b760001fc..960f89eaea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_scheduling.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb index 07182aaca8..e13e597747 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_service_type.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb index c75cef3013..89098f8323 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_status.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Connector diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb index 8b50b002fa..5600a3b1d3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb index 4c877ec91d..d631a1bba9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb index ba060fa2ba..71289336eb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 CrossClusterReplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb index 9e592d5de1..17321f77be 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 CrossClusterReplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb index 048447e5bc..97f99ecb4d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 CrossClusterReplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb index e864fe751d..3997b99c7b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 CrossClusterReplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb index f76a65b36d..0d5a49bfd7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 CrossClusterReplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb index 6099ccfc5c..389006f732 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 CrossClusterReplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb index 3c42b701f7..ae3e7e1607 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 CrossClusterReplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb index 02ee08592a..0e48a15183 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 CrossClusterReplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb index 929f17b666..92318b8ba2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 CrossClusterReplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb index 429dc2a9ab..c2d10db56a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 CrossClusterReplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb index 40bf9cd1ae..5f98010414 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 CrossClusterReplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb index a8101a0849..c43c2431b2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 CrossClusterReplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb index cf4111a59e..08d8fc3e02 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 CrossClusterReplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb index 9618974030..e480bd03b1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 DanglingIndices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb index 861bb0ecb7..ff9ab687c8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 DanglingIndices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb index 1d4d88812a..18cf82e5f4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 DanglingIndices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb index 8cbb171bd5..37367fe4c4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb index b3d9a2993d..c7489af433 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb index d5377337d5..b22377cca1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb index a35159ba9e..f224d397f3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb index 009ca054a6..cad74d11e4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Enrich diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb index e9f9c5dae2..e37f8e2dc3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Enrich diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb index 75cc3c28c2..5e81c61c3b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Enrich diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb index d3c358e44c..191d5d1990 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Enrich diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb index 43f04a6780..357638b8c1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Enrich diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb index 1d0d00b121..64d344296b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Eql diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb index 1504d30482..e80ef5cf1a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Eql diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb index 00cbb66a8a..284943b157 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Eql diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb index 606b2704a0..17cb3967e7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Eql diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb index b4562d7c20..c6937e9b12 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb index 68c39dc73b..baaece9b87 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_delete.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb index f090eba4a2..481f3d093f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb index c2f73e8277..6dc5185d35 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb index 83e4ed9cb3..b99f14d197 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb index 8c51c82500..c1172382ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb index a0eb2048f1..f7932922e5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb index c5ab8ed754..735bc41728 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb index b042d0e2a3..75eb2a5bb1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Features diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb index f918e8e9eb..8679c4b159 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Features diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb index 76cd53d946..2f0de68202 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb index 128448474e..1163f0d4e5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Fleet diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb index e9f91e6a26..890c203c03 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Fleet diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb index 4af52a23ed..11255e9293 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Fleet diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb index 1390d9c8b1..22e6b397eb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb index 3544179814..d2109ac11e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb index 2d007cef1e..e3e0b582b2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb index cd2e8b85c1..e2462b2ff6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb index 959241d720..086754c9df 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb index 5dc459b280..4edfda5d6f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Graph diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb index ddcceedb66..a91afc21ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb index 9a3f1dfdce..3d19167f59 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb index cc05949c3f..9bc116f8ca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 IndexLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb index d2455682a7..d593ac122b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 IndexLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb index 193310438e..cff53ddc53 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 IndexLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb index 886d424eef..e9baf3a82c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 IndexLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb index 263363605d..684a057125 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 IndexLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb index 187c463790..f9527f34dc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 IndexLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb index 2c87139e7e..1f1cf79e72 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 IndexLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb index 505536a8a3..f67eb6364d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 IndexLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb index 7a44b362e7..c347d1cd45 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 IndexLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb index e7f2bd656a..7d03cc34bd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 IndexLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb index 28a6663667..405751a109 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 IndexLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb index 535be62c6a..ee9133da0c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb index 9066034557..c7f6ffe3f5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb index 54b84f4d5a..f24b4fdac8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb index a2b115576a..25666554fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb index 7d41cb91df..61f761be3c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb index beeed3ccdd..0b406803bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb index d2912abe61..6c893494be 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb index 2ce8cdc515..7492c972f7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb index 32f534187d..5648cd94fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb index e3b4243bf1..390865889c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb index c5ab52cbff..f896e8e0d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb index a7324d6b01..4e19211bfc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb index ffc0896216..80154e61dd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb index 3dec199d46..b99a604d4d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb index 94a52f7f3d..a3e30d135d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb index fc101dca12..5619eb22c3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb index 2a2cce80c9..27df7026e7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb index f0a54f749b..4a33d4f837 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb index 3e8ba3382b..e9396806df 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb index d8d74dcd57..b80dffa533 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb index 78874f101b..56034a89bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb index fe39876f16..2c755ef89e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb index cec3e2167e..8016903a31 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb index 2946bb64f3..8c9285caa9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb index 884fa6ced7..cd4e96d82e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb index 2e2f4f212e..7a30c2d2e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb index 48e10cceac..074ea2a3d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb index f6af65f093..7f54b919bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb index 503e4ee8bb..d4e33ecb01 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb index ab18db94bb..a9bc9af528 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb index b86110081e..3e35d02f68 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb index 7a3d3c9cea..c16b6cd2c0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb index 8d60e9b07a..4cfcd8f3f0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb index f53b9bb827..067e4e7a5c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb index 186b3fa6e5..1cb349680f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb index 8e6e93808c..2d8dc4dc06 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb index 72048d7f52..2f8e1b7319 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb index 5d14434da8..cc4a97d57f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb index 4954375314..eac8dc5102 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb index 96026e72e6..cd21d2aff8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb index a2e006aaf8..477f5c1ff3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb index e1b3563758..923a127df0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb index 2903210ec8..6a97a06dea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb index e40c812563..ef432677f4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb index 59656bad64..07324e2b01 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb index 1bed0a41f4..339b61f807 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb index 108bc9a95f..9357527324 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb index 0e15bffe01..c8069ff75b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb index 5cefb38e9d..8734419c83 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb index d83ac80d27..f08348c1cb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb index 1addf539b5..8f57bf9584 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb index ed57ffbbce..50dcf75310 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_cluster.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb index ae2899d48d..2e0331a3f3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index 18615bab14..720fbd318a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb index 73c440b7ba..33719cd46f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb index 7023cc37bc..14d4ee9cb3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb index 17b9702870..2df762cdf1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb index a17f6028b8..ab59e70b81 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb index af07653370..76b4953c60 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb index 58a8cee899..121ea50c0b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb index cc5716c933..056b022fda 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb index 36ff746abe..a34de394a2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb index 8ce69d99fd..7e7fd81ac6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Indices diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb index 648eda0721..03c56cd213 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb index fa265ca14e..a59e3a440e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb index 6a8355f504..fe9e9485b8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb index 5d9b468039..0e6651ab15 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb index cfe4a1a461..0ec1f8e064 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb index c8e3bed48c..979e40cd03 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb index 0f7d6b6144..6622c6a839 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb index 016f077d41..fe507d2147 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_anthropic.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_anthropic.rb index 1cbdfe9387..57b4078bb9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_anthropic.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_anthropic.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb index bb60225fd3..e28ea8a7f7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureopenai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureopenai.rb index a501f7e5fc..d2043dcb1e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureopenai.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_azureopenai.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_cohere.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_cohere.rb index 4bb51b9e8f..b9fff487e6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_cohere.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_cohere.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb index 994c829eb9..1be0cf8425 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb index 99010189d5..7a966ef3a2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elser.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elser.rb index 6e78dd0486..16e6e80bb3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elser.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_elser.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb index 09d728693c..31f9d0f3ad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb index f13f348379..c3d8f45bf7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_hugging_face.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_hugging_face.rb index 705b5df4b0..75d0f80753 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_hugging_face.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_hugging_face.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_jinaai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_jinaai.rb index 708ce8fe3e..a8f63c0e99 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_jinaai.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_jinaai.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_mistral.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_mistral.rb index 7ab3f89b20..dbdb9d1f06 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_mistral.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_mistral.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_openai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_openai.rb index e5272c2d11..c5a338f91b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_openai.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_openai.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_voyageai.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_voyageai.rb index 36a660102d..1143543838 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_voyageai.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_voyageai.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb index 272df6a357..1e8c20ab24 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_watsonx.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb index 113a6debf2..eed8aa6e27 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb index 855a0aec05..4370846956 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb index 6d9b96f535..dd3d03d63d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb index 583446b872..70741d5fa0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb index e8a73adc14..76a0ffe88b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Inference diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb index b35d2c66b4..0b671f74d4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb index d4cd8b2220..13afc23af5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Ingest diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb index 11cd58d498..572ce52327 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Ingest diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb index 6fc77c3b29..310cb3b0a9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Ingest diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb index f501425767..02b90a2898 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Ingest diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb index ee906f28b0..6094f39a00 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Ingest diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb index 44f0bfbc0c..bbaaca5404 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Ingest diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb index 9874ead1e0..48a86d8001 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Ingest diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb index 5b37eface5..a56aae8a0e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Ingest diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb index 6fb145e39b..dded11f00f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Ingest diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb index feb85bdc77..c8c25c27ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Ingest diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb index a273657503..57d23e6482 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Ingest diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb index 710af62be1..f07bdcc564 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Ingest diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb index b4642da7e9..321432a99c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb index 9ccd9ef3ab..b6ca8b5bb7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 License diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb index 0955929536..4dcaaed830 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 License diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb index e1dbb69a15..0ae09ccbfa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 License diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb index de01a01ef9..b640725d0a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 License diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb index 4b4d693dba..b91887af35 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 License diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb index 123d0bb05c..28662b0d8b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 License diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb index e3da0599bd..70e9a89669 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 License diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb index 11c2dc15d2..d75dc68cf9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Logstash diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb index 64ab1f9fcf..08f84d3339 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Logstash diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb index f6e7758b26..89d3620e91 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Logstash diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb index 1da8ae5cb5..d68157dcda 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb index 3b7eb9ae1c..386281093a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb index 7326a223c6..405752a5af 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb index b41d9235e9..e520471ff3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb index a4fa7d0b0d..642a9c689d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb index c253952eb3..337ec1b27e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb index 997574c027..7526f8907e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb index 974532abee..884fff38e7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb index cf3e8f9f39..4b006ed27b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb index 9cde74a52f..2642bab316 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb index d0cd48fbe3..980280bfb1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb index a4a4957304..3657140310 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb index 07a4ee491c..186dbf152c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb index 1b873f4808..a8a279f57a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb index debdc4dc93..fe40188df3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb index 2c7e581c62..c5b24f2ca9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb index d39a8c194c..23866c36f0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb index ff2fc79c51..2d76063a4a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb index 2916ebda38..b1cec0ba2c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb index 0fe0d0b091..e321e7d871 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb index 77ac2052b6..7251f54e40 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb index d1ecf5ad66..26d6c6e6b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb index a4a8decb6e..0afa5dab5f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb index 6415b4a203..2fcab59fbb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb index 1a110cdbac..e408939427 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb index 3373722690..58cbb9278d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb index 7a37443b0f..21849047cf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb index 8042703937..3a4c1063d6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb index cf38b09ac6..79245406fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb index ceacbd8372..ae351aa2dd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb index 2cf8bdc39b..b59b9ecd72 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb index e216371069..13f5bb4b9a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb index cde588f724..2515be5b54 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb index f3a95b10ec..41efb6ca22 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb index 5466c7adb8..5ad6d621f5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb index 2f753dd82f..b80c6bca74 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb index 6b30552ba7..af7f75a551 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb index 8c00117b45..d95911aa51 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb index f901d2c644..c40a2b7555 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb index e470a887a0..c74af85130 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb index f124caf1d3..52a4c06281 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb index 47d59695ed..50a5da4d67 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb index c22c14b2e8..e7a38c065d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb index 33348e5a1b..c7f0924720 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb index facbbca58d..ab209af122 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb index a984d8dc43..92409bf37f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb index 81b528c8f4..de1e603f3c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb index 59c743d602..48798ae7fd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb index bb9048046c..06c1376ebf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb index f256bfcada..e2389b083b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb index 8024713546..ad5960bfa4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb index f687f10435..2cefb4921b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb index 31adce53c5..a51e5433e1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb index d6b896ac2f..86b99c93c0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb index 6949656165..857bb3c395 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb index b8a03af2be..4eed60c620 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb index 18b66aed7b..f89e841e8b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb index 7e04214040..6466ca4643 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb index ca130c1759..cfc856a952 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb index fe75799944..315f2f7137 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb index 70d7ee67b5..6af12449bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb index d80a4f0714..8aa0ea5dc2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb index e04858b0c9..60907e993f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb index 77ea70c9b4..9316c25ad1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb index 29b9bfd3bd..1059a58d58 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb index d001ff4295..85074eb75a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb index 5e511e0d2d..06ee47086e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb index a435e0d65c..2d98a3019a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb index a827cd3d57..dfcaf0190b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb index 326be10331..5461ecc3ef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb index f6fd5f4ffe..2d1ca46d0c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 MachineLearning diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb index 3789ad7681..ddba03593c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb index 88314f73ba..dcf94e965d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Migration diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb index 7f722fec84..ea9e243fbf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Migration diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb index bd5410fcaf..65a6253807 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Migration diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb index efdb8dbbc4..95bf7e4528 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb index f3efcc1d05..48674552ce 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb index 3b0b7f1ea1..ecef716fb1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb index 7d81d002ca..bf24782511 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Nodes diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb index c810a7d2d5..04c26ee052 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Nodes diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb index 3aa38f3a08..3bdee5b48e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Nodes diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb index 21c66b6e6c..30581f8ae5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Nodes diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb index a80dbeac74..7305524369 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Nodes diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb index 6a4e26342d..35b99da1b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Nodes diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb index 9d3896381c..e28f8c4b22 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Nodes diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb index 073ce48fcb..f77430ed07 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb index 603660e620..afa4759727 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb index 6c1811ccf4..8f992288d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb index c6bce3d653..086e5e6849 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_rule.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 QueryRules diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb index 217a207e16..12ee1dbeb5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 QueryRules diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb index f11808eccb..4dcdd82ae5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_rule.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 QueryRules diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb index ea72cf8e89..32b7605928 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 QueryRules diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb index a0826bac3a..af790eabcd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 QueryRules diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb index 90af0ed15d..6137eb3aa5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_rule.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 QueryRules diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb index 84c07589f4..3c6c94365d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 QueryRules diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb index 42030f38ef..9f994a3ed4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/test.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 QueryRules diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb index 191ce9c914..d7f4a5f210 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb index 3444fa3f76..c79b5b9950 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb index 2bbd86a8a4..251b0ddcfd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb index c035169053..0d73feedac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb index 09ef768b65..3618704b6a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb index 4c2ec7a7c0..6aef1c7613 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb index 2185fb8e88..44808d4708 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb index 025e871000..0258e382df 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchApplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb index 2bf0f652d2..f61dbcc479 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchApplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb index 4f7ca1de76..ec1512cee1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchApplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb index 9894fc1066..4b3fbb6518 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchApplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb index a6124baf39..d13f52fe89 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchApplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb index 5fc021e70b..1bf1b2ffba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchApplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb index 25c3d58601..aa31b7b375 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchApplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb index 99f9d19be8..0b6789da76 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchApplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb index 1abdbc7163..a2183ec60f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchApplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb index eaa3821f6a..296541707e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchApplication diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb index 451f0e2cf5..8a5850b60d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb index cdd42f68e9..650d78a078 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb index 8c0ee07ea0..eedc6b23d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb index 99d72cad2d..aba29a4436 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchableSnapshots diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb index 32296de82a..9f6e8b6232 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchableSnapshots diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb index 4dcad6ad70..14cbc50f68 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchableSnapshots diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb index 67c6340590..b14cc08e11 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SearchableSnapshots diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb index 9284ff0e40..1820a7862e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb index 170020e4b0..d343ed41ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb index 3058df5764..16181fe490 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_delete_role.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb index ce7049153f..464bdfe127 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_put_role.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb index ba7e3a2c2b..5fd4b57238 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb index 8dd3399b44..296ef4fd8a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb index 036339d32e..e24496f632 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb index b033fa98f8..5007b253b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb index 9c49e03693..b4df7c77b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb index 19657a44fb..cc4443f1ad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb index 9ab04ed1d8..9c75240a35 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb index edd41de60f..3810fba2bc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb index ce9c118c14..939ec2f287 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb index 032935f86a..3315f2d18f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb index 63fdef9621..e02386aaf6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delegate_pki.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb index ba310ecc3c..494c5608e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb index 2ab0a1efd5..b1d73aa58c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb index 1e0adb17b7..b8a11535d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb index c34714bb42..67b74f02ad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb index 4610442abd..614c4c6501 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb index c98b73e518..1111e9af70 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb index 5a9b501238..15990f220d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb index a87539da84..cf5fefa7da 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb index 266457cc89..7ba93281ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb index a6b209b3e1..a85a0bb38c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb index 4640e93196..d29ac10913 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb index 4d0cf1c871..259c0643a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb index 6dafc749fd..68fdc06bcb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb index 954ac86d1b..e592c8bf51 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb index 8acca9ce86..47daddc981 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb index 845cde92cd..ecc7d53032 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb index 73600278fa..869557efd2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb index b2ae5507af..b3e62afdb7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb index 832d1cad90..3f880b7671 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_settings.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb index 17080709e6..18ec4c54fd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb index 1239d73a70..718ef8b6a2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb index fc487bf658..bf8a58eb27 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb index bab357f833..5ff39cbae5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb index 6ef1445b88..929cb91918 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb index fa7afa21da..2e5ed520f8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb index 15e98f0917..4c9e5c5fec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb index 70fae6d89d..951f2ca7a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb index 0e59824dd6..a10a433d20 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb index 365e774940..b117faf7e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb index 61e95cedd4..e0faf9bbfb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb index 30867f08d3..8accec4a05 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb index e546471666..fc6c9765ab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb index 15d7f9c9c9..70bddd7c69 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb index 72b383f899..7e6c1f3bf3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb index efd8d1b760..a525745c97 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb index 2895021681..19812f21cd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb index 1127a45dfd..357240df7e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb index 2996a975f5..5f0e917d24 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb index 00cd86dd85..4bdbef1763 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb index 700d72e8a0..a048172eeb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb index 3afdf96831..5a80c1adcd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb index b6b14be045..5318467a53 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb index b50f422d02..5a634cbae0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb index d7e35096d2..cc1699b02a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb index 7d2d9f3ce1..87e497b3c2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb index 56d089ad0a..b272f66cd5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb index e2d895c0b4..ee6ff96b8c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb index 6710c8836e..5d26dbb8f3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_settings.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb index 730c4181ea..4344974745 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Security diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb b/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb index 57baae3be5..f90d9eea27 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/simulate/ingest.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Simulate diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb index b925294380..d1dcfb8519 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Snapshot diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb index 792c1d75fd..fc25b78d38 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Snapshot diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb index 99a0c4e4e0..2a33ff7284 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Snapshot diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb index a239f1fc23..fa31b46cc2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Snapshot diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb index 6c76f6a380..1f47f0c2ae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Snapshot diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb index d3c7b02006..86859d8018 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Snapshot diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb index 6dbd41b887..2764523ef5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Snapshot diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb index 268a9b9568..cd28d14211 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Snapshot diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb index 809a7e99f7..2f2a4e15a5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Snapshot diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb index f79f041742..f081373e41 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Snapshot diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb index 9894846f38..d270d55221 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Snapshot diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb index 7ec3d510a4..aea20ebcec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Snapshot diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb index 43cd73b907..9bd26c2282 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SnapshotLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb index 0ec5dd3a7d..ebd69275a2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SnapshotLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb index 860eb2387d..b5d1252d5e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SnapshotLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb index bb49f13857..4b8ef8b6e5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SnapshotLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb index dc38b89f96..d4e865ffff 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SnapshotLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb index 28e3f00e27..335cf26ccf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SnapshotLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb index 7184b0713f..e0158652bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SnapshotLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb index b18d014892..6eacac6a51 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SnapshotLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb index 52a7368102..ada3fd17e9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SnapshotLifecycleManagement diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb index d5dc116242..70cf7c3956 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SQL diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb index a56000f1da..d55dedd5a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SQL diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb index 71e59dfa9a..be93a52c91 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SQL diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb index c2a9828a75..15baca1c96 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SQL diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb index 885b0d8269..a7c0c200e5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SQL diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb index 0f2ce3c5ee..14e8e89f4c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SQL diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb index b06f4184c8..5d6f2882a2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 SSL diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb index c50cdbaa66..131c8abbe4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Synonyms diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb index ae6c7cbe96..fa433aa937 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Synonyms diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb index 5a472189d8..aebd55d8ac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Synonyms diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb index 4759828561..fed3016155 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Synonyms diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb index b68f5a9560..f3b1297bc0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Synonyms diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb index 077b05593b..138bb900c6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Synonyms diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb index eb3f98c089..64243d40f0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Synonyms diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb index 849753223c..3f6f0ccf2d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Tasks diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb index 6604e8d667..3ca9ae65d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Tasks diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb index 9905a09b1c..317642ee95 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Tasks diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb index addb1999e3..ce09a037b1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb index 4de838e448..eacb145c24 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb index 90507a8d86..2cef2c2986 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 TextStructure diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb index 80ca300324..6fc99b4d65 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 TextStructure diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb index 354c8d48df..1b4a535fd8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 TextStructure diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb index 0b50e0cebe..df8bdbde39 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 TextStructure diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb index d49c0506bc..89373e3acf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Transform diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb index b1d92597d8..1f480a8eab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_node_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Transform diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb index 73cfc49ab9..91dcc59eb9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Transform diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb index ada9e3fbb7..3b95969bc6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Transform diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb index f19eb5b3b2..27a9978262 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Transform diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb index 59c212630f..c8c4f3e32c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Transform diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb index 29d0f86540..5bb1dc9e28 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Transform diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb index 20c497b12a..60e9630bf9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Transform diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb index 9b3d0ffa88..48fea92273 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Transform diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb index 7ffcaab6fe..474a880bc5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Transform diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb index bee788cff9..014ecda2aa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Transform diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb index 7193dc41d0..0a3717e86b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Transform diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb index dfe3d80620..cd71f18ea4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb index 28b6c34ab8..0abbf268ca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb index ec80d8609a..d01810fb44 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Actions diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb index ff4fc11645..0597aa10d2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Watcher diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb index 35c6ceb232..4bd6603310 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Watcher diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb index 4909b59706..c2c80414fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Watcher diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb index 29749b58c6..e30f3324cd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Watcher diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb index f6bf70769f..d24e74b3a5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Watcher diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb index 112acbcef4..4ff78f573a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Watcher diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb index 13eb10f686..56a5c74dd1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Watcher diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb index 6221f834fa..a33053d7d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Watcher diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb index 1a804b9b88..144bbbb326 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Watcher diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb index d3423129fe..127a4b17c7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Watcher diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb index 6b97ca1047..b9472aa98f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Watcher diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb index ab426e6345..915ff2b7ac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Watcher diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb index 3f82aae4d9..bd205d873b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 Watcher diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb index d821135e77..5cb6731ce8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 XPack diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb index d74663a5be..d0224f2472 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. # -# Auto generated from commit 3e97c19ea994ba17fbdaa94e813b27c345f9bbbd -# @see https://github.com/elastic/elasticsearch-specification -# +# 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 XPack From 222c41455510156e39c2f9a1d06d0c17652cb71a Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 8 Apr 2025 13:04:21 +0100 Subject: [PATCH 512/540] [API] Removes inference EIS endpoints --- .../inference/post_eis_chat_completion.rb | 63 ----------------- .../api/actions/inference/put_eis.rb | 67 ------------------- .../lib/elasticsearch/api/version.rb | 2 +- .../post_eis_chat_completion_spec.rb | 36 ---------- .../unit/actions/inference/put_eis_spec.rb | 36 ---------- 5 files changed, 1 insertion(+), 203 deletions(-) delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb delete mode 100644 elasticsearch-api/spec/unit/actions/inference/post_eis_chat_completion_spec.rb delete mode 100644 elasticsearch-api/spec/unit/actions/inference/put_eis_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb deleted file mode 100644 index 0ec1f8e064..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/post_eis_chat_completion.rb +++ /dev/null @@ -1,63 +0,0 @@ -# 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 Inference - module Actions - # Perform a chat completion task through the Elastic Inference Service (EIS). - # Perform a chat completion inference task with the +elastic+ service. - # - # @option arguments [String] :eis_inference_id The unique identifier of the inference endpoint. (*Required*) - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body chat_completion_request - # - # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-post-eis-chat-completion - # - def post_eis_chat_completion(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'inference.post_eis_chat_completion' } - - defined_params = [:eis_inference_id].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 'eis_inference_id' missing" unless arguments[:eis_inference_id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - _eis_inference_id = arguments.delete(:eis_inference_id) - - method = Elasticsearch::API::HTTP_POST - path = "_inference/chat_completion/#{Utils.listify(_eis_inference_id)}/_stream" - params = {} - - 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/inference/put_eis.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb deleted file mode 100644 index 1be0cf8425..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put_eis.rb +++ /dev/null @@ -1,67 +0,0 @@ -# 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 Inference - module Actions - # Create an Elastic Inference Service (EIS) inference endpoint. - # Create an inference endpoint to perform an inference task through the Elastic Inference Service (EIS). - # - # @option arguments [String] :task_type The type of the inference task that the model will perform. - # NOTE: The +chat_completion+ task type only supports streaming and only through the _stream API. (*Required*) - # @option arguments [String] :eis_inference_id The unique identifier of the inference endpoint. (*Required*) - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body request body - # - # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-eis - # - def put_eis(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'inference.put_eis' } - - defined_params = [:task_type, :eis_inference_id].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 'task_type' missing" unless arguments[:task_type] - raise ArgumentError, "Required argument 'eis_inference_id' missing" unless arguments[:eis_inference_id] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - _task_type = arguments.delete(:task_type) - - _eis_inference_id = arguments.delete(:eis_inference_id) - - method = Elasticsearch::API::HTTP_PUT - path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_eis_inference_id)}" - params = {} - - 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 8003e0d5ac..72fc9bb45c 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.0.0'.freeze - ES_SPECIFICATION_COMMIT = 'dbb89db180052524cab77d324be4f0c00972807a'.freeze + ES_SPECIFICATION_COMMIT = 'be826b018f81ab6339c42a62077f7651c768421b'.freeze end end diff --git a/elasticsearch-api/spec/unit/actions/inference/post_eis_chat_completion_spec.rb b/elasticsearch-api/spec/unit/actions/inference/post_eis_chat_completion_spec.rb deleted file mode 100644 index b5e62acf81..0000000000 --- a/elasticsearch-api/spec/unit/actions/inference/post_eis_chat_completion_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#inference.post_eis_chat_completion' do - let(:expected_args) do - [ - 'POST', - '_inference/chat_completion/foo/_stream', - {}, - {}, - {}, - { defined_params: { eis_inference_id: 'foo' }, - endpoint: 'inference.post_eis_chat_completion' } - ] - end - - it 'performs the request' do - expect(client_double.inference.post_eis_chat_completion(body: {}, eis_inference_id: 'foo')).to be_a Elasticsearch::API::Response - end -end diff --git a/elasticsearch-api/spec/unit/actions/inference/put_eis_spec.rb b/elasticsearch-api/spec/unit/actions/inference/put_eis_spec.rb deleted file mode 100644 index fefea73059..0000000000 --- a/elasticsearch-api/spec/unit/actions/inference/put_eis_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#inference.put_eis' do - let(:expected_args) do - [ - 'PUT', - '_inference/foo/bar', - {}, - nil, - {}, - { defined_params: { eis_inference_id: 'bar', task_type: 'foo' }, - endpoint: 'inference.put_eis' } - ] - end - - it 'performs the request' do - expect(client_double.inference.put_eis(task_type: 'foo', eis_inference_id: 'bar')).to be_a Elasticsearch::API::Response - end -end From 6cab398f3d2fd84d98018bc816b588689d7821e3 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 8 Apr 2025 13:46:53 +0100 Subject: [PATCH 513/540] Updates perform_request_spec --- elasticsearch-api/spec/unit/perform_request_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/spec/unit/perform_request_spec.rb b/elasticsearch-api/spec/unit/perform_request_spec.rb index cade50b6f1..6860194075 100644 --- a/elasticsearch-api/spec/unit/perform_request_spec.rb +++ b/elasticsearch-api/spec/unit/perform_request_spec.rb @@ -27,7 +27,7 @@ spec.visibility != 'public' || # TODO: Once the test suite is migrated to elasticsearch-specification, these should be removed spec.module_namespace.flatten.first == 'rollup' || - ['scroll', 'clear_scroll', 'connector.last_sync'].include?(spec.endpoint_name) + ['scroll', 'clear_scroll', 'connector.last_sync', 'inference.put_eis'].include?(spec.endpoint_name) # These are the path parts defined by the user in the method argument defined_path_parts = spec.path_params.inject({}) do |params, part| From 60ea1621647225c781665f6568810c0f41c1d1a0 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 8 Apr 2025 15:39:05 +0100 Subject: [PATCH 514/540] [API] Removes timeout from snapshot.clone endpoint --- .../lib/elasticsearch/api/actions/snapshot/clone.rb | 2 -- elasticsearch-api/lib/elasticsearch/api/version.rb | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb index fc25b78d38..6774ae513f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb @@ -31,8 +31,6 @@ module Actions # @option arguments [Time] :master_timeout The period to wait for the master node. # If the master node is not available before the timeout expires, the request fails and returns an error. # To indicate that the request should never timeout, set it to +-1+. Server default: 30s. - # @option arguments [Time] :timeout The period of time to wait for a response. - # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index 72fc9bb45c..51092865e2 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.0.0'.freeze - ES_SPECIFICATION_COMMIT = 'be826b018f81ab6339c42a62077f7651c768421b'.freeze + ES_SPECIFICATION_COMMIT = 'f22adb6578817d606ea57d9de89c789e7979cf1c'.freeze end end From 50d2922d0b0607dde17b68b0e8a5492d5ae68953 Mon Sep 17 00:00:00 2001 From: Marci W <333176+marciw@users.noreply.github.com> Date: Thu, 10 Apr 2025 08:31:40 -0400 Subject: [PATCH 515/540] [Docs] Restore troubleshooting content (#2628) * Restore troubleshooting content * fix links --- docs/reference/toc.yml | 3 +- docs/reference/troubleshoot.md | 74 ++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 docs/reference/troubleshoot.md diff --git a/docs/reference/toc.yml b/docs/reference/toc.yml index be3fc7f854..203353a878 100644 --- a/docs/reference/toc.yml +++ b/docs/reference/toc.yml @@ -21,4 +21,5 @@ toc: - file: client-helpers.md children: - file: Helpers.md - - file: esql.md \ No newline at end of file + - file: esql.md + - file: troubleshoot.md \ No newline at end of file diff --git a/docs/reference/troubleshoot.md b/docs/reference/troubleshoot.md new file mode 100644 index 0000000000..87bc4bfd12 --- /dev/null +++ b/docs/reference/troubleshoot.md @@ -0,0 +1,74 @@ +--- +navigation_title: Troubleshoot +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/troubleshooting.html +--- + +# Troubleshoot: {{es}} Ruby client [troubleshooting] + +Use the information in this section to troubleshoot common problems and find answers for frequently asked questions. + + +## Logging [ruby-ts-logging] + +The client provides several options for logging that can help when things go wrong. Check out the extensive documentation on [Logging](advanced-config.md#logging). + +If you are having trouble sending a request to {{es}} with the client, we suggest enabling `tracing` on the client and testing the cURL command that appears in your terminal: + +```rb +client = Elasticsearch::Client.new(trace: true) +client.info +curl -X GET -H 'x-elastic-client-meta: es=8.9.0,rb=3.2.2,t=8.2.1,fd=2.7.4,nh=0.3.2, User-Agent: elastic-t +ransport-ruby/8.2.1 (RUBY_VERSION: 3.2.2; linux x86_64; Faraday v2.7.4), Content-Type: application/json' 'http://localhost:9200//?pretty' +``` + +Testing the cURL command can help find out if there’s a connection issue or if the issue is in the client code. + + +## Troubleshooting connection issues [ruby-ts-connection] + +When working with multiple hosts, you might want to enable the `retry_on_failure` or `retry_on_status` options to perform a failed request on another node (refer to [Retrying on Failures](advanced-config.md#retry-failures)). + +For optimal performance, use a HTTP library which supports persistent ("keep-alive") connections, such as [patron](https://github.com/toland/patron) or [Typhoeus](https://github.com/typhoeus/typhoeus). Require the library (`require 'patron'`) in your code for Faraday 1.x or the adapter (`require 'faraday/patron'`) for Faraday 2.x, and it will be automatically used. + + +## Adapter is not registered on Faraday [ruby-ts-adapter] + +If you see a message like: + +``` +:adapter is not registered on Faraday::Adapter (Faraday::Error) +``` + +Then you might need to include the adapter library in your Gemfile and require it. You might get this error when migrating from Faraday v1 to Faraday v2. The main change when using Faraday v2 is all adapters, except for the default `net_http` one, have been moved out into separate gems. This means if you’re not using the default adapter and you migrate to Faraday v2, you’ll need to add the adapter gems to your Gemfile. + +These are the gems required for the different adapters with Faraday 2, instead of the libraries on which they were based: + +```ruby +# HTTPCLient +gem 'faraday-httpclient' + +# NetHTTPPersistent +gem 'faraday-net_http_persistent' + +# Patron +gem 'faraday-patron' + +# Typhoeus +gem 'faraday-typhoeus' +``` + +Migrating to Faraday 2 solves the issue as long as the adapter is included (unless you’re using the default one `net-http`). Alternatively, you can lock the version of Faraday in your project to 1.x: `gem 'faraday', '~> 1'` + +::::{important} +Migrating to Faraday v2 requires at least Ruby `2.6`. Faraday v1 requires `2.4`. +:::: + + + +## More Help [_more_help] + +If you need more help, visit the [Elastic community forums](https://discuss.elastic.co/) and get answers from the experts in the community, including people from Elastic. + +If you find a bug, have feedback, or find any other issue using the client, [submit an issue](https://github.com/elastic/elasticsearch-ruby/issues/new/choose) on GitHub. + From 814dcf31a0d0cbf1c53dbbbb9cacd14435821d2c Mon Sep 17 00:00:00 2001 From: Colleen McGinnis Date: Thu, 10 Apr 2025 10:16:39 -0500 Subject: [PATCH 516/540] update apm links (#2629) Co-authored-by: Marci W <333176+marciw@users.noreply.github.com> --- docs/reference/opentelemetry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/opentelemetry.md b/docs/reference/opentelemetry.md index 359ecdd3cf..6b512a99ee 100644 --- a/docs/reference/opentelemetry.md +++ b/docs/reference/opentelemetry.md @@ -5,7 +5,7 @@ mapped_pages: # Using OpenTelemetry [opentelemetry] -You can use [OpenTelemetry](https://opentelemetry.io/) to monitor the performance and behavior of your {{es}} requests through the Ruby Client. The Ruby Client comes with built-in OpenTelemetry instrumentation that emits [distributed tracing spans](docs-content://solutions/observability/apps/traces-2.md) by default. With that, applications [instrumented with OpenTelemetry](https://opentelemetry.io/docs/instrumentation/ruby/manual/) or using the [OpenTelemetry Ruby SDK](https://opentelemetry.io/docs/instrumentation/ruby/automatic/) are inherently enriched with additional spans that contain insightful information about the execution of the {{es}} requests. +You can use [OpenTelemetry](https://opentelemetry.io/) to monitor the performance and behavior of your {{es}} requests through the Ruby Client. The Ruby Client comes with built-in OpenTelemetry instrumentation that emits [distributed tracing spans](docs-content://solutions/observability/apm/traces-ui.md) by default. With that, applications [instrumented with OpenTelemetry](https://opentelemetry.io/docs/instrumentation/ruby/manual/) or using the [OpenTelemetry Ruby SDK](https://opentelemetry.io/docs/instrumentation/ruby/automatic/) are inherently enriched with additional spans that contain insightful information about the execution of the {{es}} requests. The native instrumentation in the Ruby Client follows the [OpenTelemetry Semantic Conventions for {{es}}](https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/). In particular, the instrumentation in the client covers the logical layer of {{es}} requests. A single span per request is created that is processed by the service through the Ruby Client. The following image shows a trace that records the handling of two different {{es}} requests: a `ping` request and a `search` request. From 01611572405ebaebac52f6b14cdf0b3e532163d5 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 10 Apr 2025 15:41:31 +0100 Subject: [PATCH 517/540] [CI] Updates: drop Ruby 3.1 (eol) adds Ruby and JRuby head --- .buildkite/pipeline.yml | 7 +------ .github/workflows/main.yml | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 6752568c9c..9f501ddbcc 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -8,7 +8,6 @@ steps: - "3.4" - "3.3" - "3.2" - - "3.1" ruby_source: - "ruby" transport: @@ -17,16 +16,12 @@ steps: - with: # JRuby tests ruby: "9.4" ruby_source: "jruby" - transport: "8.3" + transport: "8.4" # Test for different versions of transport - with: ruby: "3.4" ruby_source: "ruby" transport: "main" - - with: - ruby: "3.4" - ruby_source: "ruby" - transport: "8.2" env: RUBY_VERSION: "{{ matrix.ruby }}" STACK_VERSION: 9.1.0-SNAPSHOT diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f695527199..b1d5d5a65f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['3.1', '3.2', '3.3', '3.4', 'jruby-9.3', 'jruby-9.4'] + ruby: ['head', '3.2', '3.3', '3.4', 'jruby-9.3', 'jruby-9.4', 'jruby-head'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 397ce4ed1d4d7628f0492d5a4eabc45d26931b0d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 10 Apr 2025 16:06:13 +0100 Subject: [PATCH 518/540] Adds 'ostruct' as a development dependency It used to be loaded from the standard library, but is not part of the default gems since Ruby 3.5.0 --- elasticsearch/elasticsearch.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index c9159c6be4..563638b546 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -52,6 +52,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'base64' s.add_development_dependency 'bundler' s.add_development_dependency 'debug' unless defined?(JRUBY_VERSION) + s.add_development_dependency 'ostruct' s.add_development_dependency 'pry' s.add_development_dependency 'rake' s.add_development_dependency 'require-prof' unless defined?(JRUBY_VERSION) || defined?(Rubinius) From 161d6d9c4467c009f6f281c998e6e4982df4635f Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Thu, 10 Apr 2025 16:41:58 +0100 Subject: [PATCH 519/540] [Tests] Updates perform_request_spec --- elasticsearch-api/spec/unit/perform_request_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/elasticsearch-api/spec/unit/perform_request_spec.rb b/elasticsearch-api/spec/unit/perform_request_spec.rb index 6860194075..0965b56e49 100644 --- a/elasticsearch-api/spec/unit/perform_request_spec.rb +++ b/elasticsearch-api/spec/unit/perform_request_spec.rb @@ -27,7 +27,10 @@ spec.visibility != 'public' || # TODO: Once the test suite is migrated to elasticsearch-specification, these should be removed spec.module_namespace.flatten.first == 'rollup' || - ['scroll', 'clear_scroll', 'connector.last_sync', 'inference.put_eis'].include?(spec.endpoint_name) + [ + 'scroll', 'clear_scroll', 'connector.last_sync', 'inference.put_eis', 'esql.get_query', + 'esql.list_queries' + ].include?(spec.endpoint_name) # These are the path parts defined by the user in the method argument defined_path_parts = spec.path_params.inject({}) do |params, part| From 460ea509c152fb8918bae4d7e504db39149ffc3d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 11 Apr 2025 16:33:20 +0100 Subject: [PATCH 520/540] [API] Updates source code documentation --- .../lib/elasticsearch/api/actions/esql/query.rb | 2 +- .../lib/elasticsearch/api/actions/fleet/msearch.rb | 6 +++--- .../lib/elasticsearch/api/actions/fleet/search.rb | 6 +++--- .../lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb | 2 +- .../lib/elasticsearch/api/actions/ingest/processor_grok.rb | 2 +- .../lib/elasticsearch/api/actions/ingest/put_pipeline.rb | 2 +- .../lib/elasticsearch/api/actions/knn_search.rb | 2 +- .../api/actions/nodes/get_repositories_metering_info.rb | 3 +-- .../elasticsearch/api/actions/scripts_painless_execute.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/version.rb | 2 +- 10 files changed, 14 insertions(+), 15 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb index b99f14d197..8bf8241cd7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-rest.html + # @see https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest # def query(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'esql.query' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb index 890c203c03..adcbdcc5e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb @@ -46,9 +46,9 @@ module Actions # @option arguments [Array] :wait_for_checkpoints A comma separated list of checkpoints. When configured, the search API will only be executed on a shard # after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause # Elasticsearch to immediately execute the search. Server default: []. - # @option arguments [Boolean] :allow_partial_search_results If true, returns partial results if there are shard request timeouts or {https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures shard failures}. If false, returns - # an error with no partial results. Defaults to the configured cluster setting +search.default_allow_partial_results+ - # which is true by default. + # @option arguments [Boolean] :allow_partial_search_results If true, returns partial results if there are shard request timeouts or shard failures. + # If false, returns an error with no partial results. + # Defaults to the configured cluster setting +search.default_allow_partial_results+, which is true by default. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body searches # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb index 11255e9293..a2189664a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb @@ -75,9 +75,9 @@ module Actions # @option arguments [Array] :wait_for_checkpoints A comma separated list of checkpoints. When configured, the search API will only be executed on a shard # after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause # Elasticsearch to immediately execute the search. Server default: []. - # @option arguments [Boolean] :allow_partial_search_results If true, returns partial results if there are shard request timeouts or {https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures shard failures}. If false, returns - # an error with no partial results. Defaults to the configured cluster setting +search.default_allow_partial_results+ - # which is true by default. + # @option arguments [Boolean] :allow_partial_search_results If true, returns partial results if there are shard request timeouts or shard failures. + # If false, returns an error with no partial results. + # Defaults to the configured cluster setting +search.default_allow_partial_results+, which is true by default. # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb index 02b90a2898..0e0e3beab8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb @@ -27,7 +27,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-processor.html + # @see https://www.elastic.co/docs/reference/enrich-processor/geoip-processor # def geo_ip_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.geo_ip_stats' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb index a56aae8a0e..91cffdbb3f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb @@ -29,7 +29,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html + # @see https://www.elastic.co/docs/reference/enrich-processor/grok-processor # def processor_grok(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.processor_grok' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb index 57d23e6482..2d22696020 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html + # @see https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines # def put_pipeline(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ingest.put_pipeline' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb index 321432a99c..ff1db4780a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb @@ -45,7 +45,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search # def knn_search(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'knn_search' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb index 04c26ee052..65e3804c3f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb @@ -31,8 +31,7 @@ module Actions # to fix any issues, but experimental features are not subject to the # support SLA of official GA features. # - # @option arguments [String, Array] :node_id Comma-separated list of node IDs or names used to limit returned information. - # All the nodes selective options are explained {https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes here}. (*Required*) + # @option arguments [String, Array] :node_id Comma-separated list of node IDs or names used to limit returned information. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-get-repositories-metering-info diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb index 3618704b6a..560e47f575 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html + # @see https://www.elastic.co/docs/reference/scripting-languages/painless/painless-api-examples # def scripts_painless_execute(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'scripts_painless_execute' } diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index 51092865e2..923b050cec 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.0.0'.freeze - ES_SPECIFICATION_COMMIT = 'f22adb6578817d606ea57d9de89c789e7979cf1c'.freeze + ES_SPECIFICATION_COMMIT = '55d1444f19ce33e5a7a318e51ccc638a7901959c'.freeze end end From c414616dd2850e73b4549268d918aaec718162cc Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Fri, 11 Apr 2025 16:39:20 +0100 Subject: [PATCH 521/540] [API] Adds back inference.inference endpoint --- .../api/actions/inference/inference.rb | 73 +++++++++++++++++++ .../unit/actions/inference/inference_spec.rb | 36 +++++++++ 2 files changed, 109 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb create mode 100644 elasticsearch-api/spec/unit/actions/inference/inference_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb new file mode 100644 index 0000000000..83959aa4c1 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb @@ -0,0 +1,73 @@ +# 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 Inference + module Actions + # Perform inference on the service. + # This API enables you to use machine learning models to perform specific tasks on data that you provide as an input. + # It returns a response with the results of the tasks. + # The inference endpoint you use can perform one specific task that has been defined when the endpoint was created with the create inference API. + # For details about using this API with a service, such as Amazon Bedrock, Anthropic, or HuggingFace, refer to the service-specific documentation. + # + # @option arguments [String] :task_type The type of inference task that the model performs. + # @option arguments [String] :inference_id The unique identifier for the inference endpoint. (*Required*) + # @option arguments [Time] :timeout The amount of time to wait for the inference request to complete. Server default: 30s. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference + # + def inference(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.inference' } + + defined_params = [:inference_id, :task_type].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 'inference_id' missing" unless arguments[:inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _task_type = arguments.delete(:task_type) + + _inference_id = arguments.delete(:inference_id) + + method = Elasticsearch::API::HTTP_POST + path = if _task_type && _inference_id + "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_inference_id)}" + else + "_inference/#{Utils.listify(_inference_id)}" + 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/spec/unit/actions/inference/inference_spec.rb b/elasticsearch-api/spec/unit/actions/inference/inference_spec.rb new file mode 100644 index 0000000000..dfa2a51890 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/inference/inference_spec.rb @@ -0,0 +1,36 @@ +# 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. + +require 'spec_helper' + +describe 'client#inference.inference' do + let(:expected_args) do + [ + 'POST', + '_inference/bar', + {}, + nil, + {}, + { defined_params: { inference_id: 'bar' }, + endpoint: 'inference.inference' } + ] + end + + it 'performs the request' do + expect(client_double.inference.inference(inference_id: 'bar')).to be_a Elasticsearch::API::Response + end +end From ca3d6e70b1e0616786144a09319f2cc2a852581b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 14 Apr 2025 09:42:56 +0100 Subject: [PATCH 522/540] [API] Adds ignore 404 parameter to query_rules.delete_ruleset --- .../api/actions/query_rules/delete_ruleset.rb | 16 ++++++++++++---- .../lib/elasticsearch/api/version.rb | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb index 12ee1dbeb5..c28dd90c99 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb @@ -50,11 +50,19 @@ def delete_ruleset(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = "_query_rules/#{Utils.listify(_ruleset_id)}" - params = {} + params = Utils.process_params(arguments) - Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, request_opts) - ) + if Array(arguments[:ignore]).include?(404) + Utils.rescue_from_not_found do + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + else + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end end end end diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index 923b050cec..e1d69fc8ff 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.0.0'.freeze - ES_SPECIFICATION_COMMIT = '55d1444f19ce33e5a7a318e51ccc638a7901959c'.freeze + ES_SPECIFICATION_COMMIT = '1403bac9354d232024184bd992ecc76aaa9e68fa'.freeze end end From 7872533b0f43805f249fca9b4759fddccc13b787 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 14 Apr 2025 10:16:53 +0100 Subject: [PATCH 523/540] [DOCS] Updates CHANGELOG for 9.x --- CHANGELOG-9.x.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG-9.x.md b/CHANGELOG-9.x.md index 1b16cd0f77..226cd027fa 100644 --- a/CHANGELOG-9.x.md +++ b/CHANGELOG-9.x.md @@ -1,4 +1,9 @@ # CHANGELOG 9.x +## Ruby version + +Ruby 3.2 and up are tested and supported. At the time of release, we're testingb + +We follow Ruby’s own maintenance policy and officially support all currently maintained versions per [Ruby Maintenance Branches](https://www.ruby-lang.org/en/downloads/branches/). ## Gem From 116655af285bcf07a3e5aa0e3e2f11f6428187c8 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 14 Apr 2025 19:54:47 +0100 Subject: [PATCH 524/540] [Tests] Updates perform_request_spec --- elasticsearch-api/spec/unit/perform_request_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-api/spec/unit/perform_request_spec.rb b/elasticsearch-api/spec/unit/perform_request_spec.rb index 0965b56e49..756a824bce 100644 --- a/elasticsearch-api/spec/unit/perform_request_spec.rb +++ b/elasticsearch-api/spec/unit/perform_request_spec.rb @@ -29,7 +29,7 @@ spec.module_namespace.flatten.first == 'rollup' || [ 'scroll', 'clear_scroll', 'connector.last_sync', 'inference.put_eis', 'esql.get_query', - 'esql.list_queries' + 'esql.list_queries', 'knn_search' ].include?(spec.endpoint_name) # These are the path parts defined by the user in the method argument From a6ef9278043a940ed3b45deb214145acd1b59ed5 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 14 Apr 2025 12:36:55 +0100 Subject: [PATCH 525/540] [DOCS] Updates elastic-transport information --- docs/reference/transport.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/reference/transport.md b/docs/reference/transport.md index 74ec2c2ad2..a4d8721267 100644 --- a/docs/reference/transport.md +++ b/docs/reference/transport.md @@ -21,9 +21,11 @@ Currently these libraries are supported: * [Typhoeus](https://github.com/typhoeus/typhoeus) * [HTTPClient](https://rubygems.org/gems/httpclient) * [Net::HTTP::Persistent](https://rubygems.org/gems/net-http-persistent) +* [Excon](https://github.com/excon/faraday-excon) +* [Async::HTTP](https://github.com/socketry/async-http-faraday) ::::{note} -Use [Typhoeus](https://github.com/typhoeus/typhoeus) v1.4.0 or up since older versions are not compatible with Faraday 1.0. +If using [Typhoeus](https://github.com/typhoeus/typhoeus), v1.4.0 or up is needed, since older versions are not compatible with Faraday 1.0. :::: From 26b0dfaaf6bebf3ed62df35d4c8c6873218cca0e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 14 Apr 2025 19:41:48 +0100 Subject: [PATCH 526/540] [API] Removes knn_search This API was only ever experimental and was deprecated, it isn't supported in 9.0, and only works with `compatible-with=8` is set. --- .../elasticsearch/api/actions/knn_search.rb | 82 ------------------- .../lib/elasticsearch/api/version.rb | 2 +- .../spec/unit/actions/knn_search_spec.rb | 35 -------- 3 files changed, 1 insertion(+), 118 deletions(-) delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb delete mode 100644 elasticsearch-api/spec/unit/actions/knn_search_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb deleted file mode 100644 index ff1db4780a..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb +++ /dev/null @@ -1,82 +0,0 @@ -# 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 Actions - # Run a knn search. - # NOTE: The kNN search API has been replaced by the +knn+ option in the search API. - # Perform a k-nearest neighbor (kNN) search on a dense_vector field and return the matching documents. - # Given a query vector, the API finds the k closest vectors and returns those documents as search hits. - # Elasticsearch uses the HNSW algorithm to support efficient kNN search. - # Like most kNN algorithms, HNSW is an approximate method that sacrifices result accuracy for improved search speed. - # This means the results returned are not always the true k closest neighbors. - # The kNN search API supports restricting the search using a filter. - # The search will return the top k documents that also match the filter query. - # A kNN search response has the exact same structure as a search API response. - # However, certain sections have a meaning specific to kNN search: - # * The document +_score+ is determined by the similarity between the query and document vector. - # * The +hits.total+ object contains the total number of nearest neighbor candidates considered, which is +num_candidates * num_shards+. The +hits.total.relation+ will always be +eq+, indicating an exact value. - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. - # - # @option arguments [String, Array] :index A comma-separated list of index names to search; - # use +_all+ or to perform the operation on all indices. (*Required*) - # @option arguments [String] :routing A comma-separated list of specific routing values. - # @option arguments [Hash] :headers Custom HTTP headers - # @option arguments [Hash] :body request body - # - # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search - # - def knn_search(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'knn_search' } - - defined_params = [:index].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 'index' missing" unless arguments[:index] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = arguments.delete(:body) - - _index = arguments.delete(:index) - - method = if body - Elasticsearch::API::HTTP_POST - else - Elasticsearch::API::HTTP_GET - end - - path = "#{Utils.listify(_index)}/_knn_search" - params = Utils.process_params(arguments) - - Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, request_opts) - ) - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index e1d69fc8ff..b55f25b636 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.0.0'.freeze - ES_SPECIFICATION_COMMIT = '1403bac9354d232024184bd992ecc76aaa9e68fa'.freeze + ES_SPECIFICATION_COMMIT = '2a24e33865256e85eaa8e2de9e793646f147c4df'.freeze end end diff --git a/elasticsearch-api/spec/unit/actions/knn_search_spec.rb b/elasticsearch-api/spec/unit/actions/knn_search_spec.rb deleted file mode 100644 index 2400b84238..0000000000 --- a/elasticsearch-api/spec/unit/actions/knn_search_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# 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. - -require 'spec_helper' - -describe 'client#knn_search' do - let(:expected_args) do - [ - 'GET', - 'foo/_knn_search', - { }, - nil, - {}, - { endpoint: 'knn_search', defined_params: { index: 'foo' } } - ] - end - - it 'performs the request' do - expect(client_double.knn_search(index: 'foo')).to be_a Elasticsearch::API::Response - end -end From 481d42bee2ecd43a586062a26cbe2951937ea604 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 14 Apr 2025 15:52:06 +0100 Subject: [PATCH 527/540] [DOCS] Breaking changes update --- docs/release-notes/breaking-changes.md | 31 ++++++++++++++++++++------ 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/docs/release-notes/breaking-changes.md b/docs/release-notes/breaking-changes.md index 047f7e9141..eea940aa58 100644 --- a/docs/release-notes/breaking-changes.md +++ b/docs/release-notes/breaking-changes.md @@ -14,11 +14,28 @@ Breaking changes can impact your Elastic applications, potentially disrupting no % **Action**
Steps for mitigating deprecation impact. % :::: -% ## 9.0.0 [elasticsearch-ruby-client-900-breaking-changes] +## 9.0.0 [elasticsearch-ruby-client-900-breaking-changes] -% ::::{dropdown} Title of breaking change -% Description of the breaking change. -% For more information, check [PR #](PR link). -% **Impact**
Impact of the breaking change. -% **Action**
Steps for mitigating deprecation impact. -% :::: \ No newline at end of file +### Scroll APIs need to send scroll_id in request body + +Sending the `scroll_id` as a parameter has been deprecated since version 7.0.0. It needs to be specified in the request body for `clear_scroll` and `scroll`. + +**Impact**
+ +Client code using `clear_scroll` or `scroll` APIs and the deprecated `scroll_id` as a parameter needs to be updated. + +**Action**
+ +If you are using the `clear_scroll` or `scroll` APIs, and sending the `scroll_id` as a parameter, you need to update your code to send the `scroll_id` as part of the request body: +```ruby +# Before: +client.clear_scroll(scroll_id: scroll_id) +# Now: +client.clear_scroll(body: { scroll_id: scroll_id }) + +# Before: +client.scroll(scroll_id: scroll_id) +# Now: +client.scroll(body: { scroll_id: scroll_id }) +``` +% :::: From 375d88d7eaff53f8ceca50cf7b72e30d379de7fd Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 14 Apr 2025 12:32:49 +0100 Subject: [PATCH 528/540] [DOCS] Updates 9.0 release notes Update docs/release-notes/known-issues.md Co-authored-by: Marci W <333176+marciw@users.noreply.github.com> --- CHANGELOG-9.x.md | 34 ------------------------------ docs/release-notes/deprecations.md | 6 +++++- docs/release-notes/index.md | 31 ++++++++++++++++++++++++++- docs/release-notes/known-issues.md | 6 +++++- 4 files changed, 40 insertions(+), 37 deletions(-) delete mode 100644 CHANGELOG-9.x.md diff --git a/CHANGELOG-9.x.md b/CHANGELOG-9.x.md deleted file mode 100644 index 226cd027fa..0000000000 --- a/CHANGELOG-9.x.md +++ /dev/null @@ -1,34 +0,0 @@ -# CHANGELOG 9.x -## Ruby version - -Ruby 3.2 and up are tested and supported. At the time of release, we're testingb - -We follow Ruby’s own maintenance policy and officially support all currently maintained versions per [Ruby Maintenance Branches](https://www.ruby-lang.org/en/downloads/branches/). - -## Gem - -The size of both `elasticsearch` and `elasticsearch-api` gems will be smaller, since some unnecessary files that were being included in the gem have been removed. There's also been a lot of old code cleanup for `9.x`. - -The required Ruby version is set to `2.6` to keep compatiblity wit JRuby 9.3. However, we only test the code against currently supported Ruby versions. - -## Elasticsearch Serverless - -The CI build now runs tests to ensure compatibility with Elasticsearch Serverless. You can use this gem for your Serverless deployments. - -## Elasticsearch API - -* The source code is now based on `elasticsearch-specification`, so the API documentation is much more detailed and extensive. -* Scroll APIs: Since sending the `scroll_id` as a parameter was deprecated, now it needs to be sent in the body for `clear_scroll`, `scroll`. -* `indices.get_field_mapping` - `:fields` is a required parameter. -* The functions in `utils.rb` that had names starting with double underscore have been renamed to remove these. - -### Development - -#### Testing - -The gem migrated away from the Elasticsearch REST API tests and test runner in CI. We now run the [Elasticsearch Client tests](https://github.com/elastic/elasticsearch-clients-tests/) with the [Elasticsearch Tests Runner](https://github.com/elastic/es-test-runner-ruby). This gives us more control on what we're testing and makes the Buildkite build way faster in Pull Requests and scheduled builds. - -#### Rake tasks - -* Some old rake tasks that were not being used have been removed. The rest were streamlined, the `es` namespace has been streamlined to make it easier to run Elasticsearch with Docker during development. The `docker` namespace was merged into `es`. -* Elasticsearch's REST API Spec tests can still be ran with `rake test:deprecated:rest_api` and setting the corresponding value for the environment variable `TEST_SUITE` ('platinum' or 'free'). diff --git a/docs/release-notes/deprecations.md b/docs/release-notes/deprecations.md index 6de975eb85..f1574b5278 100644 --- a/docs/release-notes/deprecations.md +++ b/docs/release-notes/deprecations.md @@ -7,6 +7,10 @@ Over time, certain Elastic functionality becomes outdated and is replaced or rem Review the deprecated functionality for Elasticsearch Ruby Client. While deprecations have no immediate impact, we strongly encourage you update your implementation after you upgrade. To learn how to upgrade, check out [Upgrade](docs-content://deploy-manage/upgrade.md). +## 9.0.0 [elasticsearch-ruby-client-900-deprecations] + +_No deprecations_ + % ## Next version [elasticsearch-ruby-client-versionnext-deprecations] % ::::{dropdown} Deprecation title @@ -23,4 +27,4 @@ Review the deprecated functionality for Elasticsearch Ruby Client. While depreca % For more information, check [PR #](PR link). % **Impact**
Impact of deprecation. % **Action**
Steps for mitigating deprecation impact. -% :::: \ No newline at end of file +% :::: diff --git a/docs/release-notes/index.md b/docs/release-notes/index.md index c26ba12814..8e2e8b53c1 100644 --- a/docs/release-notes/index.md +++ b/docs/release-notes/index.md @@ -24,4 +24,33 @@ To check for security updates, go to [Security announcements for the Elastic sta ### Features and enhancements [elasticsearch-ruby-client-900-features-enhancements] -### Fixes [elasticsearch-ruby-client-900-fixes] \ No newline at end of file +Ruby 3.2 and up are tested and supported for 9.0. Older versions of Ruby have reached their end of life. We follow Ruby’s own maintenance policy and officially support all currently maintained versions per [Ruby Maintenance Branches](https://www.ruby-lang.org/en/downloads/branches/). The required Ruby version is set to `2.6` to keep compatiblity wit JRuby 9.3. However, we only test the code against currently supported Ruby versions. + +#### Gem + +The size of both `elasticsearch` and `elasticsearch-api` gems is smaller than in previous versions. Some unnecessary files that were being included in the gem have now been removed. There has also been a lot of old code cleanup for the `9.x` branch. + +#### Elasticsearch Serverless + +With the release of `9.0`, the [Elasticsearch Serverless](https://github.com/elastic/elasticsearch-serverless-ruby) client has been discontinued. You can use this client to build your Elasticsearch Serverless Ruby applications. The Elasticsearch Serverless API is fully supported. The CI build for Elasticsearch Ruby runs tests to ensure compatibility with Elasticsearch Serverless. + +#### Elasticsearch API + +* The source code is now generated from [`elasticsearch-specification`](https://github.com/elastic/elasticsearch-specification/), so the API documentation is much more detailed and extensive. The value `Elasticsearch::ES_SPECIFICATION_COMMIT` is updated with the commit hash of elasticsearch-specification in which the code is based every time it's generated. +* The API code has been updated for compatibility with Elasticsearch API v 9.0. +* `indices.get_field_mapping` - `:fields` is a required parameter. +* `knn_search` - This API has been removed. It was only ever experimental and was deprecated in v`8.4`. It isn't supported in 9.0, and only works when the header `compatible-with=8` is set. The search API should be used for all knn queries. +* The functions in `utils.rb` that had names starting with double underscore have been renamed to remove these (e.g. `__listify` to `listify`). +* **Namespaces clean up**: The API namespaces are now generated dynamically based on the elasticsearch-specification. As such, some deprecated namespace files have been removed from the codebase: + * The `rollup` namespace was removed. The rollup feature was never GA-ed, it has been deprecated since `8.11.0` in favor of downsampling. + * The `data_frame_deprecated`, `remote` namespace files have been removed, no APIs were available. + * The `shutdown` namespace was removed. It is designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + +##### Testing + +The gem `elasticsearch-api` migrated away from the Elasticsearch REST API tests and test runner in CI. We now run the [Elasticsearch Client tests](https://github.com/elastic/elasticsearch-clients-tests/) with the [Elasticsearch Tests Runner](https://github.com/elastic/es-test-runner-ruby). This gives us more control on what we're testing and makes the Buildkite build way faster in Pull Requests and scheduled builds. + +### Fixes [elasticsearch-ruby-client-900-fixes] + +* Some old rake tasks that were not being used have been removed. The rest were streamlined, the `es` namespace has been streamlined to make it easier to run Elasticsearch with Docker during development. The `docker` task namespace was merged into `es`. +* Elasticsearch's REST API Spec tests can still be ran with `rake test:deprecated:rest_api` and setting the corresponding value for the environment variable `TEST_SUITE` ('platinum' or 'free'). diff --git a/docs/release-notes/known-issues.md b/docs/release-notes/known-issues.md index c84a5bea5a..d6f7517cfd 100644 --- a/docs/release-notes/known-issues.md +++ b/docs/release-notes/known-issues.md @@ -5,6 +5,10 @@ navigation_title: "Known issues" # Elasticsearch Ruby Client known issues [elasticsearch-ruby-client-known-issues] +## 9.0.0 + +_No known issues_ + % Use the following template to add entries to this page. % :::{dropdown} Title of known issue @@ -17,4 +21,4 @@ navigation_title: "Known issues" % **Resolved** % On [Month/Day/Year], this issue was resolved. -::: \ No newline at end of file +% ::: From 9bde3c301412859160b3d1526de699e403be2734 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 15 Apr 2025 08:28:47 +0100 Subject: [PATCH 529/540] [CI] Test JRuby 10.0 --- .buildkite/pipeline.yml | 2 +- .github/workflows/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 9f501ddbcc..4c4eb43d54 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -14,7 +14,7 @@ steps: - "8.4" adjustments: - with: # JRuby tests - ruby: "9.4" + ruby: "10.0" ruby_source: "jruby" transport: "8.4" # Test for different versions of transport diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b1d5d5a65f..7f735a542f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['head', '3.2', '3.3', '3.4', 'jruby-9.3', 'jruby-9.4', 'jruby-head'] + ruby: ['head', '3.2', '3.3', '3.4', 'jruby-9.4', 'jruby-10.0'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From ffe6383dcf55e1e2763e890ef44f1f9d0b76afce Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 15 Apr 2025 08:32:31 +0100 Subject: [PATCH 530/540] Revert "[CI] Test JRuby 10.0" This reverts commit 9bde3c301412859160b3d1526de699e403be2734. --- .buildkite/pipeline.yml | 2 +- .github/workflows/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 4c4eb43d54..9f501ddbcc 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -14,7 +14,7 @@ steps: - "8.4" adjustments: - with: # JRuby tests - ruby: "10.0" + ruby: "9.4" ruby_source: "jruby" transport: "8.4" # Test for different versions of transport diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7f735a542f..b1d5d5a65f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['head', '3.2', '3.3', '3.4', 'jruby-9.4', 'jruby-10.0'] + ruby: ['head', '3.2', '3.3', '3.4', 'jruby-9.3', 'jruby-9.4', 'jruby-head'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 67f440a42a9e037b52fdab85fda5170ba943f655 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 15 Apr 2025 14:12:39 +0100 Subject: [PATCH 531/540] [DOCS] Update README.md - compatibility --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e87f0340e..73638153ba 100644 --- a/README.md +++ b/README.md @@ -79,8 +79,8 @@ Elasticsearch language clients are only backwards compatible with default distri | Gem Version | | Elasticsearch Version | Supported | |-------------|---|------------------------|-----------| -| 7.x | → | 7.x | 7.17 | | 8.x | → | 8.x | 8.x | +| 9.x | → | 9.x | 9.x | | main | → | main | | ## Try Elasticsearch and Kibana locally From 27416f7414efcd3581778af33489c5ec2583de2c Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 16 Apr 2025 10:42:28 +0100 Subject: [PATCH 532/540] [DOCS] Updates build badges on README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73638153ba..939ecf6e0a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Elasticsearch -[![7.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml/badge.svg?branch=7.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/7.17.yml) [![8.16](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.16.yml/badge.svg?branch=8.16)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.16.yml) [![8.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.17.yml/badge.svg?branch=8.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.17.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) +[![8.17](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.17.yml/badge.svg?branch=8.17)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.17.yml) [![8.18](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.18.yml/badge.svg?branch=8.18)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/8.18.yml) [![9.0](https://github.com/elastic/elasticsearch-ruby/actions/workflows/9.0.yml/badge.svg?branch=9.0)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/9.0.yml) [![main](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/elastic/elasticsearch-ruby/actions/workflows/main.yml) [![Build status](https://badge.buildkite.com/e50e66eb71bf6566a6479c8a29b25458f6781ee8e52cee8d96.svg)](https://buildkite.com/elastic/elasticsearch-ruby) **[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)** or From a69cf846857e0bf439c8408ea6d45218c0d9315b Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 16 Apr 2025 15:30:51 +0100 Subject: [PATCH 533/540] [Tests] Removes skipped tests in YAML runner --- elasticsearch-api/spec/yaml-test-runner/run.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index 9d39880517..56e0d7343e 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -85,6 +85,4 @@ def serverless? Elasticsearch::Tests::Downloader::run(tests_path, branch) runner = Elasticsearch::Tests::TestRunner.new(CLIENT, tests_path, logger) -runner.add_tests_to_skip('knn_search.yml') # TODO: Extract into file -runner.add_tests_to_skip('inference/10_basic.yml') runner.run(ENV['SINGLE_TEST'] || []) From e279b7ef00d204ef9cf5a29cf6fe77f32d4fd4ff Mon Sep 17 00:00:00 2001 From: Colleen McGinnis Date: Wed, 16 Apr 2025 12:51:05 -0500 Subject: [PATCH 534/540] fix image paths for docs-assembler (#2654) --- docs/reference/connecting.md | 16 ++++------------ docs/reference/getting-started.md | 8 ++------ docs/reference/opentelemetry.md | 18 ++++++------------ 3 files changed, 12 insertions(+), 30 deletions(-) diff --git a/docs/reference/connecting.md b/docs/reference/connecting.md index 76768e2975..27bd224a2e 100644 --- a/docs/reference/connecting.md +++ b/docs/reference/connecting.md @@ -16,9 +16,7 @@ This document contains code snippets to show you how to connect to various {{es} If you are using [Elastic Cloud](https://www.elastic.co/cloud), the client offers an easy way to connect to it. You need the Cloud ID that you can find in the cloud console, then your username and password. -:::{image} images/cloud_id.png -:alt: Cloud ID -::: +![Cloud ID](images/cloud_id.png) Once you have collected the Cloud ID you can use the client to connect to your Elastic Cloud instance, as follows: @@ -34,21 +32,15 @@ client = Elasticsearch::Client.new( You can also connect to the Cloud by using API Key authentication. You can generate an `API key` in the `Management` page under the section `Security`. -:::{image} images/cloud_api_key.png -:alt: API key -::: +![API key](images/cloud_api_key.png) When you click on `Create API key` you can choose a name and set the other options (eg. restrict privileges, expire after time, etc). -:::{image} images/api_key_name.png -:alt: Choose an API name -::: +![Choose an API name](images/api_key_name.png) After this step you will get the `API key` in the API keys page. -:::{image} images/cloud_api_key.png -:alt: API key -::: +![API key](images/cloud_api_key.png) **IMPORTANT**: you need to copy and store the `API key` in a secure place, since you will not be able to view it again in Elastic Cloud. diff --git a/docs/reference/getting-started.md b/docs/reference/getting-started.md index 82d5753b23..55b6e9cb25 100644 --- a/docs/reference/getting-started.md +++ b/docs/reference/getting-started.md @@ -38,15 +38,11 @@ client = Elasticsearch::Client.new( Your Elasticsearch endpoint can be found on the **My deployment** page of your deployment: -:::{image} images/es_endpoint.jpg -:alt: Finding Elasticsearch endpoint -::: +![Finding Elasticsearch endpoint](images/es_endpoint.jpg) You can generate an API key on the **Management** page under Security. -:::{image} images/create_api_key.png -:alt: Create API key -::: +![Create API key](images/create_api_key.png) For other connection options, refer to the [*Connecting*](/reference/connecting.md) section. diff --git a/docs/reference/opentelemetry.md b/docs/reference/opentelemetry.md index 6b512a99ee..9ab636dd63 100644 --- a/docs/reference/opentelemetry.md +++ b/docs/reference/opentelemetry.md @@ -9,24 +9,18 @@ You can use [OpenTelemetry](https://opentelemetry.io/) to monitor the performanc The native instrumentation in the Ruby Client follows the [OpenTelemetry Semantic Conventions for {{es}}](https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/). In particular, the instrumentation in the client covers the logical layer of {{es}} requests. A single span per request is created that is processed by the service through the Ruby Client. The following image shows a trace that records the handling of two different {{es}} requests: a `ping` request and a `search` request. -:::{image} images/otel-waterfall-without-http.png -:alt: Distributed trace with Elasticsearch spans -:class: screenshot -::: +% TO DO: Use `:class: screenshot` +![Distributed trace with Elasticsearch spans](images/otel-waterfall-without-http.png) Usually, OpenTelemetry auto-instrumentation modules come with instrumentation support for HTTP-level communication. In this case, in addition to the logical {{es}} client requests, spans will be captured for the physical HTTP requests emitted by the client. The following image shows a trace with both, {{es}} spans (in blue) and the corresponding HTTP-level spans (in red): -:::{image} images/otel-waterfall-with-http.png -:alt: Distributed trace with Elasticsearch spans -:class: screenshot -::: +% TO DO: Use `:class: screenshot` +![Distributed trace with Elasticsearch spans](images/otel-waterfall-with-http.png) Advanced Ruby Client behavior such as nodes round-robin and request retries are revealed through the combination of logical {{es}} spans and the physical HTTP spans. The following example shows a `search` request in a scenario with two nodes: -:::{image} images/otel-waterfall-retry.png -:alt: Distributed trace with Elasticsearch spans -:class: screenshot -::: +% TO DO: Use `:class: screenshot` +![Distributed trace with Elasticsearch spans](images/otel-waterfall-retry.png) The first node is unavailable and results in an HTTP error, while the retry to the second node succeeds. Both HTTP requests are subsumed by the logical {{es}} request span (in blue). From e655e71f1be13cae251ee586b1dafa7db714aa8e Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 16 Apr 2025 16:39:34 +0100 Subject: [PATCH 535/540] [API] Adds esql get_query and list_queries --- .../api/actions/esql/get_query.rb | 65 +++++++++++++++++++ .../api/actions/esql/list_queries.rb | 55 ++++++++++++++++ .../spec/unit/actions/esql/get_query_spec.rb | 35 ++++++++++ .../unit/actions/esql/list_queries_spec.rb | 35 ++++++++++ 4 files changed, 190 insertions(+) create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/esql/get_query.rb create mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/esql/list_queries.rb create mode 100644 elasticsearch-api/spec/unit/actions/esql/get_query_spec.rb create mode 100644 elasticsearch-api/spec/unit/actions/esql/list_queries_spec.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/get_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/get_query.rb new file mode 100644 index 0000000000..46b4e08792 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/get_query.rb @@ -0,0 +1,65 @@ +# 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 a specific running ES|QL query information. + # Returns an object extended information about a running ES|QL query. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [String] :id The query ID (*Required*) + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see [TODO] + # + def get_query(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'esql.get_query' } + + defined_params = [:id].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 'id' missing" unless arguments[:id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _id = arguments.delete(:id) + + method = Elasticsearch::API::HTTP_GET + path = "_query/queries/#{Utils.listify(_id)}" + params = {} + + 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/list_queries.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/list_queries.rb new file mode 100644 index 0000000000..22b804c0ec --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/list_queries.rb @@ -0,0 +1,55 @@ +# 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 running ES|QL queries information. + # Returns an object containing IDs and other information about the running ES|QL queries. + # This functionality is Experimental and may be changed or removed + # completely in a future release. Elastic will take a best effort approach + # to fix any issues, but experimental features are not subject to the + # support SLA of official GA features. + # + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see [TODO] + # + def list_queries(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'esql.list_queries' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = '_query/queries' + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/unit/actions/esql/get_query_spec.rb b/elasticsearch-api/spec/unit/actions/esql/get_query_spec.rb new file mode 100644 index 0000000000..15c9d48bbe --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/esql/get_query_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.esql#query' do + let(:expected_args) do + [ + 'GET', + '_query/queries/test', + {}, + nil, + {}, + { endpoint: 'esql.get_query', defined_params: { id: 'test' } } + ] + end + + it 'performs the request' do + expect(client_double.esql.get_query(id: 'test')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/esql/list_queries_spec.rb b/elasticsearch-api/spec/unit/actions/esql/list_queries_spec.rb new file mode 100644 index 0000000000..4bc4a99d73 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/esql/list_queries_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.esql#list_queries' do + let(:expected_args) do + [ + 'GET', + '_query/queries', + {}, + nil, + {}, + { endpoint: 'esql.list_queries' } + ] + end + + it 'performs the request' do + expect(client_double.esql.list_queries).to be_a Elasticsearch::API::Response + end +end From a0f7ef20b8b4c46ec17c74fd1610ec3b3e0b7c5d Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 21 Apr 2025 13:05:57 +0100 Subject: [PATCH 536/540] [DOCS] Updates source code docs --- .../api/actions/connector/update_filtering_validation.rb | 2 +- .../lib/elasticsearch/api/actions/connector/update_native.rb | 2 +- .../lib/elasticsearch/api/actions/esql/async_query_stop.rb | 2 +- .../elasticsearch/api/actions/indices/cancel_migrate_reindex.rb | 2 +- .../lib/elasticsearch/api/actions/indices/create_from.rb | 2 +- .../api/actions/indices/get_migrate_reindex_status.rb | 2 +- .../lib/elasticsearch/api/actions/indices/migrate_reindex.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/version.rb | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb index f6567ae438..24f0cb02ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-validation-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering-validation # def update_filtering_validation(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_filtering_validation' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb index 133e919ce3..198da2fa76 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/connector/update_native.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body request body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-native-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-native # def update_native(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'connector.update_native' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb index 6dc5185d35..56ad48971c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_stop.rb @@ -33,7 +33,7 @@ module Actions # If +true+, the response will include an extra section under the name +all_columns+ which has the name of all the columns. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-stop-api.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-stop # def async_query_stop(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_stop' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb index f24b4fdac8..384ed76ba7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [String, Array] :index The index or data stream name (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-cancel-migrate-reindex # def cancel_migrate_reindex(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.cancel_migrate_reindex' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb index 5648cd94fb..87a90e8d21 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_from.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body create_from # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-from # def create_from(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.create_from' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb index 1cb349680f..a2d6f3b4b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [String, Array] :index The index or data stream name. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-migration # def get_migrate_reindex_status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.get_migrate_reindex_status' } diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb index cc4a97d57f..65f4f0ebf3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_reindex.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body reindex # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-migrate-reindex # def migrate_reindex(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.migrate_reindex' } diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index b55f25b636..478d02779c 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.0.0'.freeze - ES_SPECIFICATION_COMMIT = '2a24e33865256e85eaa8e2de9e793646f147c4df'.freeze + ES_SPECIFICATION_COMMIT = 'cbfcc73d01310bed2a480ec35aaef98138b598e5'.freeze end end From 7fc4dbc5ec8150634b76e48ab2865fad614c7aa7 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 21 Apr 2025 16:32:19 +0100 Subject: [PATCH 537/540] Updates perform_request_spec Removing APIs that were updated and adding ones without requests yet. --- elasticsearch-api/spec/unit/perform_request_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/spec/unit/perform_request_spec.rb b/elasticsearch-api/spec/unit/perform_request_spec.rb index 756a824bce..6d58d3785a 100644 --- a/elasticsearch-api/spec/unit/perform_request_spec.rb +++ b/elasticsearch-api/spec/unit/perform_request_spec.rb @@ -28,8 +28,8 @@ # TODO: Once the test suite is migrated to elasticsearch-specification, these should be removed spec.module_namespace.flatten.first == 'rollup' || [ - 'scroll', 'clear_scroll', 'connector.last_sync', 'inference.put_eis', 'esql.get_query', - 'esql.list_queries', 'knn_search' + 'scroll', 'clear_scroll', 'connector.last_sync', 'inference.put_eis', 'knn_search', + 'indices.put_data_stream_options', 'indices.delete_data_stream_options', 'indices.get_data_stream_options' ].include?(spec.endpoint_name) # These are the path parts defined by the user in the method argument From b3e400d3fdaf02d57777575bf6c3aadabcd720dc Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 22 Apr 2025 10:40:45 +0100 Subject: [PATCH 538/540] Updates content type header for 9.x --- .../lib/elasticsearch/api/actions/bulk.rb | 4 +++- .../elasticsearch/api/actions/fleet/msearch.rb | 4 +++- .../lib/elasticsearch/api/actions/msearch.rb | 4 +++- .../elasticsearch/api/actions/msearch_template.rb | 4 +++- .../api/actions/text_structure/find_structure.rb | 4 +++- .../lib/elasticsearch/api/version.rb | 2 +- elasticsearch-api/spec/unit/actions/bulk_spec.rb | 9 +++++++-- .../spec/unit/actions/fleet/msearch_spec.rb | 8 +++++++- .../spec/unit/actions/msearch_spec.rb | 10 +++++----- .../spec/unit/actions/msearch_template_spec.rb | 11 +++++------ .../actions/text_structure/find_structure_spec.rb | 8 +++++++- elasticsearch/lib/elasticsearch.rb | 15 ++++++++++++++- 12 files changed, 61 insertions(+), 22 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index 7f5fd0b714..868854b915 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -163,7 +163,9 @@ def bulk(arguments = {}) body end - headers.merge!('Content-Type' => 'application/x-ndjson') + headers.merge!({ + 'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9' + }) Elasticsearch::API::Response.new( perform_request(method, path, params, payload, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb index adcbdcc5e8..4d75a5549f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb @@ -97,7 +97,9 @@ def msearch(arguments = {}) payload = body end - headers.merge!('Content-Type' => 'application/x-ndjson') + headers.merge!({ + 'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9' + }) Elasticsearch::API::Response.new( perform_request(method, path, params, payload, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb index 95bf7e4528..8a9ff5ce7e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb @@ -103,7 +103,9 @@ def msearch(arguments = {}) payload = body end - headers.merge!('Content-Type' => 'application/x-ndjson') + headers.merge!({ + 'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9' + }) Elasticsearch::API::Response.new( perform_request(method, path, params, payload, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb index 48674552ce..04e0cc75fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb @@ -81,7 +81,9 @@ def msearch_template(arguments = {}) payload = body end - headers.merge!('Content-Type' => 'application/x-ndjson') + headers.merge!({ + 'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9' + }) Elasticsearch::API::Response.new( perform_request(method, path, params, payload, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb index 1b4a535fd8..b5fa98ab50 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb @@ -136,7 +136,9 @@ def find_structure(arguments = {}) body end - headers.merge!('Content-Type' => 'application/x-ndjson') + headers.merge!({ + 'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9' + }) Elasticsearch::API::Response.new( perform_request(method, path, params, payload, headers, request_opts) ) diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index 478d02779c..e7be8dfb1a 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.0.0'.freeze - ES_SPECIFICATION_COMMIT = 'cbfcc73d01310bed2a480ec35aaef98138b598e5'.freeze + ES_SPECIFICATION_COMMIT = 'cd9c33775947086a99e6cf299b87733ba0111c28'.freeze end end diff --git a/elasticsearch-api/spec/unit/actions/bulk_spec.rb b/elasticsearch-api/spec/unit/actions/bulk_spec.rb index 0d18d0ee9a..25906f11c7 100644 --- a/elasticsearch-api/spec/unit/actions/bulk_spec.rb +++ b/elasticsearch-api/spec/unit/actions/bulk_spec.rb @@ -25,11 +25,16 @@ params, body, headers, - {:endpoint=>"bulk"} + { endpoint: 'bulk' } ] end - let(:headers) { { 'Content-Type' => 'application/x-ndjson' } } + let(:headers) { + { + 'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9' + } + } + let(:params) { {} } let(:url) { '_bulk' } let(:body) { '' } diff --git a/elasticsearch-api/spec/unit/actions/fleet/msearch_spec.rb b/elasticsearch-api/spec/unit/actions/fleet/msearch_spec.rb index af44de93e8..40ef5f6584 100644 --- a/elasticsearch-api/spec/unit/actions/fleet/msearch_spec.rb +++ b/elasticsearch-api/spec/unit/actions/fleet/msearch_spec.rb @@ -24,11 +24,17 @@ '_fleet/_fleet_msearch', {}, {}, - { 'Content-Type' => 'application/x-ndjson' }, + headers, { endpoint: 'fleet.msearch' } ] end + let(:headers) { + { + 'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9' + } + } + it 'performs the request' do expect(client_double.fleet.msearch(body: {})).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch-api/spec/unit/actions/msearch_spec.rb b/elasticsearch-api/spec/unit/actions/msearch_spec.rb index 3c56a6a46c..a7b576e02c 100644 --- a/elasticsearch-api/spec/unit/actions/msearch_spec.rb +++ b/elasticsearch-api/spec/unit/actions/msearch_spec.rb @@ -41,9 +41,11 @@ {} end - let(:headers) do - { 'Content-Type' => 'application/x-ndjson' } - end + let(:headers) { + { + 'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9' + } + } let(:client) do Class.new { include Elasticsearch::API }.new @@ -89,7 +91,6 @@ end context 'when an index is specified' do - let(:url) do 'foo/_msearch' end @@ -115,7 +116,6 @@ end context 'when multiple indices are specified' do - let(:url) do 'foo,bar/_msearch' end diff --git a/elasticsearch-api/spec/unit/actions/msearch_template_spec.rb b/elasticsearch-api/spec/unit/actions/msearch_template_spec.rb index 5ec1af4dbc..8b30d7d189 100644 --- a/elasticsearch-api/spec/unit/actions/msearch_template_spec.rb +++ b/elasticsearch-api/spec/unit/actions/msearch_template_spec.rb @@ -37,16 +37,17 @@ {} end - let(:headers) do - { 'Content-Type' => 'application/x-ndjson' } - end + let(:headers) { + { + 'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9' + } + } let(:url) do '_msearch/template' end context 'when a body is provided as a document' do - let(:body) do <<-PAYLOAD.gsub(/^\s+/, '') {"index":"foo"} @@ -67,7 +68,6 @@ end context 'when a body is provided as a string' do - let(:body) do %Q|{"foo":"bar"}\n{"moo":"lam"}| end @@ -78,7 +78,6 @@ end context 'when an index is provided' do - let(:url) do 'foo/_msearch/template' end diff --git a/elasticsearch-api/spec/unit/actions/text_structure/find_structure_spec.rb b/elasticsearch-api/spec/unit/actions/text_structure/find_structure_spec.rb index e6d18a9ad7..cd94e76348 100644 --- a/elasticsearch-api/spec/unit/actions/text_structure/find_structure_spec.rb +++ b/elasticsearch-api/spec/unit/actions/text_structure/find_structure_spec.rb @@ -24,11 +24,17 @@ '_text_structure/find_structure', {}, {}, - { 'Content-Type' => 'application/x-ndjson' }, + headers, { endpoint: 'text_structure.find_structure' } ] end + let(:headers) { + { + 'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9' + } + } + it 'performs the request' do expect(client_double.text_structure.find_structure(body: {})).to be_a Elasticsearch::API::Response end diff --git a/elasticsearch/lib/elasticsearch.rb b/elasticsearch/lib/elasticsearch.rb index 77b2ba0ffc..3e55285ad9 100644 --- a/elasticsearch/lib/elasticsearch.rb +++ b/elasticsearch/lib/elasticsearch.rb @@ -52,6 +52,7 @@ def initialize(arguments = {}, &block) api_key(arguments) if arguments[:api_key] setup_cloud(arguments) if arguments[:cloud_id] set_user_agent!(arguments) unless sent_user_agent?(arguments) + set_content_type!(arguments) @transport = Elastic::Transport::Client.new(arguments, &block) end @@ -175,9 +176,21 @@ def set_user_agent!(arguments) if RbConfig::CONFIG && RbConfig::CONFIG['host_os'] user_agent << "#{RbConfig::CONFIG['host_os'].split('_').first[/[a-z]+/i].downcase} #{RbConfig::CONFIG['target_cpu']}" end + set_header({ user_agent: user_agent.join('; ') }, arguments) + end + + def set_content_type!(arguments) + headers = { + 'content-type' => 'application/vnd.elasticsearch+json; compatible-with=9', + 'accept' => 'application/vnd.elasticsearch+json; compatible-with=9' + } + set_header(headers, arguments) + end + + def set_header(header, arguments) arguments[:transport_options] ||= {} arguments[:transport_options][:headers] ||= {} - arguments[:transport_options][:headers].merge!({ user_agent: user_agent.join('; ') }) + arguments[:transport_options][:headers].merge!(header) end end From 8d4a2d13561adbd60ae51d6f3cc8c4a4f8547bb4 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 23 Apr 2025 10:39:26 +0100 Subject: [PATCH 539/540] [CI] Buildkite: Groups Serverless steps in pipeline --- .buildkite/pipeline.yml | 143 +++++++++++++++++++++------------------- 1 file changed, 76 insertions(+), 67 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 9f501ddbcc..1fdc76b1fd 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,84 +1,93 @@ steps: - - label: ":yaml: YAML test suite :ruby: {{ matrix.ruby_source}}:{{ matrix.ruby }} :phone: Transport {{ matrix.transport }}" + - label: >- + :yaml: YAML test suite :ruby: {{ matrix.ruby_source}}:{{ matrix.ruby }} + :phone: Transport {{ matrix.transport }} agents: - provider: "gcp" + provider: gcp matrix: setup: ruby: - - "3.4" - - "3.3" - - "3.2" + - '3.4' + - '3.3' + - '3.2' ruby_source: - - "ruby" + - ruby transport: - - "8.4" + - '8.4' adjustments: - with: # JRuby tests - ruby: "9.4" - ruby_source: "jruby" - transport: "8.4" - # Test for different versions of transport - - with: - ruby: "3.4" - ruby_source: "ruby" - transport: "main" + ruby: '9.4' + ruby_source: jruby + transport: '8.4' + - with: # Test for main branch of transport + ruby: '3.4' + ruby_source: ruby + transport: main env: - RUBY_VERSION: "{{ matrix.ruby }}" + RUBY_VERSION: '{{ matrix.ruby }}' STACK_VERSION: 9.1.0-SNAPSHOT ES_YAML_TESTS_BRANCH: main - TRANSPORT_VERSION: "{{ matrix.transport }}" - RUBY_SOURCE: "{{ matrix.ruby_source }}" - TEST_SUITE: "platinum" + TRANSPORT_VERSION: '{{ matrix.transport }}' + RUBY_SOURCE: '{{ matrix.ruby_source }}' + TEST_SUITE: platinum DEBUG: true command: ./.buildkite/run-yaml-tests.sh - artifact_paths: "elasticsearch-api/tmp/*" - - label: "Create :elasticsearch: Serverless projects" - key: "create-serverless" - agents: - image: docker.elastic.co/appex-qa/qaf:latest - env: - EC_PROJECT_PREFIX: ruby - EC_REGISTER_BACKEND: buildkite - EC_REGION: aws-eu-west-1 - EC_ENV: qa - commands: - - mkdir ~/.elastic - - touch ~/.elastic/cloud.json - - echo "{\"api_key\":{\"qa\":\"$(vault read -field=qa secret/ci/elastic-elasticsearch-ruby/cloud-access)\"}}" > ~/.elastic/cloud.json - - ./.buildkite/create-serverless.sh - - label: "Run :elasticsearch: Serverless :rspec: Tests :ruby:" - key: run-serverless-tests - depends_on: - - step: create-serverless - # soft_fail: - # - exit_status: 1 - agents: - provider: "gcp" - env: - RUBY_VERSION: "3.4" - RUBY_SOURCE: "ruby" - TEST_SUITE: serverless - ES_YAML_TESTS_BRANCH: main - QUIET: false - command: ./.buildkite/run-yaml-tests.sh - artifact_paths: "elasticsearch-api/tmp/*" - - label: "Destroy :elasticsearch: Serverless projects" - depends_on: - - step: run-serverless-tests - allow_failure: true - agents: - image: docker.elastic.co/appex-qa/qaf:latest - env: - EC_REGISTER_BACKEND: buildkite - EC_ENV: qa - EC_REGION: aws-eu-west-1 - commands: - - mkdir ~/.elastic - - touch ~/.elastic/cloud.json - - export EC_PROJECT_NAME=`buildkite-agent meta-data get "EC_PROJECT_NAME"` - - echo "{\"api_key\":{\"qa\":\"$(vault read -field=qa secret/ci/elastic-elasticsearch-ruby/cloud-access)\"}}" > ~/.elastic/cloud.json - - qaf elastic-cloud projects delete + artifact_paths: elasticsearch-api/tmp/* + - group: 'Elasticsearch Serverless :elasticsearch:' + steps: + - label: 'Create :elasticsearch: Serverless projects' + key: create-serverless + agents: + image: 'docker.elastic.co/appex-qa/qaf:latest' + env: + EC_PROJECT_PREFIX: ruby + EC_REGISTER_BACKEND: buildkite + EC_REGION: aws-eu-west-1 + EC_ENV: qa + commands: + - mkdir ~/.elastic + - touch ~/.elastic/cloud.json + - >- + echo "{\"api_key\":{\"qa\":\"$(vault read -field=qa + secret/ci/elastic-elasticsearch-ruby/cloud-access)\"}}" > + ~/.elastic/cloud.json + - ./.buildkite/create-serverless.sh + - label: 'Run :elasticsearch: Serverless :rspec: Tests :ruby:' + key: run-serverless-tests + depends_on: + - step: create-serverless + agents: + provider: gcp + env: + RUBY_VERSION: '3.4' + RUBY_SOURCE: ruby + TEST_SUITE: serverless + ES_YAML_TESTS_BRANCH: main + QUIET: false + command: ./.buildkite/run-yaml-tests.sh + artifact_paths: elasticsearch-api/tmp/* + - label: 'Destroy :elasticsearch: Serverless projects' + depends_on: + - step: run-serverless-tests + allow_failure: true + agents: + image: 'docker.elastic.co/appex-qa/qaf:latest' + env: + EC_REGISTER_BACKEND: buildkite + EC_ENV: qa + EC_REGION: aws-eu-west-1 + commands: + - mkdir ~/.elastic + - touch ~/.elastic/cloud.json + - >- + export EC_PROJECT_NAME=`buildkite-agent meta-data get + "EC_PROJECT_NAME"` + - >- + echo "{\"api_key\":{\"qa\":\"$(vault read -field=qa + secret/ci/elastic-elasticsearch-ruby/cloud-access)\"}}" > + ~/.elastic/cloud.json + - qaf elastic-cloud projects delete - wait: ~ continue_on_failure: true - - label: "Log Results" + - label: Log Results command: ./.buildkite/log-results.sh From 9bb69af9477b4783cd7874e640fd3689acb6e795 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Wed, 23 Apr 2025 11:20:05 +0100 Subject: [PATCH 540/540] [CI] Buildkite: Retries on 400 and 503 in serverless tests --- elasticsearch-api/spec/yaml-test-runner/run.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index 56e0d7343e..203b790bdf 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -62,9 +62,9 @@ def serverless? if serverless? options.merge!( { - retry_on_status: [409], + retry_on_status: [409, 400, 503], retry_on_failure: 10, - delay_on_retry: 60_000, + delay_on_retry: 5_000, request_timeout: 120 } )

P&LYoy0um6B~q!h*qStUG3)wt-}*cr z7xoPJ6ik`7ltCG4tfCsd%+Y(ruI7Aa(ER6l$eEXtWUtg<_f$h3l^#P5dmI8y7)T=p z$a8$nF5K-?nKR+Z`$}`OtE2ac4y)lg_U^lfskwx+dx6NU^(EJW(~Wf;mYgD5*m+G{ zJ3~L7la&0+U3wAe#S1E(Xk34;r)T|N{x#3 zc1m40gI3a(Gn3E5-StU&<;UE1F92HMPmEBPl~ngippm7r?AY|8Xi1cK~1T z!WY%s^bPh*lMa-#b{J0_y(^4J3sSiT;FX$&W@mPDrLJSWbUX?<+@Z711fWSK`57clkPl2mbLlnu4k*CE&j*= z9EyTT$1dU?8lH?Zc)mwc(96=Lb_%1W-DadDb8WcpBT+H-l~@pOZ$ z$VKv6718!dom{@tU~mbM_XFTvZwx16WP7vpzE=ju$G{ED><_ndD3~G-QDqWvTl&B- z{diTBas=uryTQL_%%^Dju8JukyO=o%Q7~kkW7;%pRc@RRTvD_%&fYp=Ltc>7^O3mZ z^%I&`6%Bs?Un1>X^PT$s;f>>G>0o=x>nZlB^5?HTtXghm@D8!k&I@D}W!oQsRJ7sr z?Yo5z!a3eR`^|NSXseH#e$5l#hP6?2U+=?AEEDy}gcNu=D`&-ok4{oc`<_Zl%G`X- zEXuW(-Kl(mmQn`o3|banar~o4@>jpz%R4=~Y{i9iWzaQ;t!M1z^GyWgPowm{~)maN=tyq-Zq4M=AG4-bxEqbEV?E zE3T2Gy$WBq7)-RPK}FXGvYd7GiGy=q-yRGn@DQUa z4k}B8O}qsHd^;I}lp{#UDPlYiw}6VTdL4D=xW_6kd6eu=d(!_l8ZY8CzB(dzNK z&c{!RxkqoN)!al7uYi66xH6EpdAups)cXCsuYXX_W?u^DvfdTaDLn9(s(r2%SQk4_ zziaaNtV1`+I27_OND1mm8xX$g&TOiL%*6*Z6K{gAK=vbm^OzjB0Lpsf%7mvNBc%3y z_`av)V<$x%#rk~wNIH0{^2_J$On3A)`G7`63`o||)zfz=h%5YruY}6BA{vNK3ucZq zo$`KlSt9-bRtd%Ix@>aniDyV9Id?rGuPN=W{-t#{Wwe6s^-8;}h^czvKmP-myMJjo z6W|FU1(1M|0`T%9lBM&z)z$QG>%git~1v&k2(%Vsr3-3{&zV2i6=%B6pD_ms~@7-we z&Mv!uGRyPBEOC(~-pK z)dr@@Z+uU`T3R6Hy;6tL+s`NZhYq}Mdae95M*VuLmG`w&X&EZ*k3H66NDWIum3!rfYlWr=Nr4G=PXKk+Ek#H*{-v+IAjD$=ED@ar^-tzyBA{!M{cWV zS!bw}LuzmVpd-r$a0f$&r$_ZO<*hkZ^x3C7ts3XG=dW60b+R2Nc>O6d6`z$lQPowK zB}zqQ*h9}g@yjFD?BC)Qs`K-KXkaQdyUXSsxTH^*n()6~_=V~0etsWr-WF%r7oZj6 zal2I#+L1rXnlm*B|Hb*Vq5R@m3@3pNzD&7TGvQ%<+r%VHO&11#PEq~nZXa(IIsZr% zDyKH82vtf%v~;}Li|^4$zQMV4qmSF~Zt<1?VJrW4vZ&rFo78iViz!611lLZ@SyP-l+?m;b{u>##cU>2O6ln|)u(AR=RlAdc(1zZA0D&NB3yW9Uz-hC zSZ9_11RWgP7lpG7j59h(Uay@{78skAp*q_{I2}&fW|OM3M4+NVD$C~h)zxL_1#I() z1$&2^SbQ-sxBT{5hCS{yi<3h8++fwBZXx?XicI`k`=qvsp1hi+s!Q}sOmYP`TVB|A z|A3#doCW{3h9mwbF)!cn(r~tyo;#3*m$Z46o*)pIHs2s(3YNB}|Js{X!K8y3eYx#F ziXVx4wDBtS5Nm;~KYbz>_EzNT-*YRk^eCs)qV?Ye8}b-^KS7wf+ObDP1$IUgbV+G5 ziOvG~D?e1S=JmLI8D1EkTvgApt^5IlOs+M)bgnFtt0w{Vh?3ZE`SkLiRxlW)7luri{2Pt)3+raD|<=|<&l2e~*@nLJfl; zmBcTfY)bWa){sa<3rG7410e*4jFS{=5~Z*7>4T$~pQa-Dj6Xtng4Ye7YL-Z62p_ie zgCyU@C*pOKGXLJZ6Rvxt(C4KER*$<*eNvh~) zBZS`72bKFlSx*>vdUcS~wF`0nwgLPPGs@437dtVE<7tC2a8K?5oFpmeP?^#L>~k+1 z=+*aR>v`!WwTU&lHW{^9=$rbw22Cfa7qIV9Ci$Pm)%&OFhm}j3g%!lG$ee(0(rtJ} zbPv>;g7y-!1(TRYexU;B*SW-b{a5tPcn>cPe_9l5i!^&|j^&rGW@|Qb!st&!ak)$A!r9*S0Kmofvq9xI?>@&to!x$czl zvcsyJb%n9N2JvLUuO^~o*Hu?4E@;!R&ZhK>u@=CjyP9_q|h-8`ridW>M|A|Ax$}#`CT5Vi6fn?L2c0gp2=_qHMNq zv80Esv!r&(U+gFDEJF0<%vl1;;Wo9y;dD8C_e1zujW{=Lr>V<=oiO(*QHqJx3|bVX z;m6v538l?WsL(#x31T<2*YJ1HV6-A=Qm=utfzLT8oLiFeI2z3q&~@~jpOjagtQ_of`H9drfLy|7-s z$>`vm;d(qW8T#tLMWnpbDiYVsg$ihyYE(q(PLBUBb*@XX*9{A(PzF6u9w}MwyARQk ztf#@`C+gv{Qv>mC^ad@_`{@fbTv0zu{T^YdJR(U)e2|{Ul@EAz%`$Sftg=m(Xat&U zz~yq)!g=TH3UI??8YpR%x=H4N?kZlK982gS%tFluaXOy%tFs=Yp@-ItZwi?DPWIee z%X{!$&J(Sfijh4Q9B74QSFkA2OA=HE(`^ixh4Gey0*J<`we??L~4*Kv+^YU*ql zJL8W{KG3cBbpcArL8s!0_CZX*aJF4PI?XJui2mre*4Uph)&)J&RnCox>0T8A4ezh{ znqezn%n25lu+Vh11%@i8-2@_i(7(cHuW?R?O{KrVtw@~M8v2{a^Pl-en>GT%)CH~O zk^a%gB^73`RY&$n4jT?2c9qZ40)lh2%IH8seIM>JR@@1!FYBl>$s>-n0Up? zkhvObs(;8KBq~ScjIVvm+%3iOr$iJRhu48;39aqB40N25aos3oAbKG49~#0IcgS)V zv#s1&mV(Hoiug2Q$ZfU-nz5+p1Di`Xr9Nc9)}# z@c#qoa`M^YWmz51SvZZYX3m&0_M8DTkhW*^?9w!;ibVU=PM0g+kug4Wk`!sHlcQ+H zdyXvA<0yac4^4DoG@5bHBozGhO-%?O3mt)zFboJ5sLS_}s?8+!?6>Zi*sobH8nL)a z>7oFYku1%Kox)k~3y(s*NYCI+g2as>rFCPWmsgZcSzK{?l7ZLlhsEXnB|$>S2zX@; zFeeo@5_~PHuO@A9wd9G7dIYv&%y{sH?_TyotHFrFMzf^+bn=Q+t?O_$x_{mQ$h*BO zT7fZT)|40aaDz>L+$*s8@>rxuFD2O&*{w{{h~ZQgg3m>xx?l<4KwtM& z6p;knUWR|(<*&aZ$%F%LRa>Zei2o@R-+mTiq8G#@1QzBA9s0PWXJT`do+4_$hI=JDxYyAn%n$iIQxr^MMemLm~1Z)Kg>&H!&8bBO#3Z_SB__VQjgLk(60(m^pkdw z>MI6Dx=%n%w}iI#=TUeSJBR+Qm#7s09+=~s{@GKmHkO2(lel2QuU~DtH-*k2_I67E z`_qv(B;zZ_-s^z(3+;7RRs|aifCm#3JB@6_?{cr61B2_Tg}+}8e4%JdN>8fKM|HKi zwgV>4aA|nAGQ<{Xya!N{kD;6}mg!u(lz71wto}(i0ToT>*QBP#+*hu8nvjsd+WqM) zSeZX8Q+Oo4mbZ%GO!km6Wl9;M6ToJ$2(W}y;tAtz-m^7!ZZdW`e6I|iZxB{Z6M74^ z(Pzzq_`F(6r_}2Rl}rL~tFK0xvCUatE%g1!{l2;sYj;3axpF;wdy>U^c6-aLWUpM! zJ+iaBoUQNsxqsf_LSY<(;TVD9P?-2Zq(x-g8obxzj{N0TGM|v1HqVgOso2YguY}>58sqZjwl} zTrVyQ^HIqd_zvH``WNHhoQ%_|Vh}?eN*T$h?zsneifv7q)v$Pb-6C^96*q&Wt&IL= z#f+La!l^C|Xm77#WIUUK@p$gEIzIHb$5_dk_TTh@f6Kk8zj>bgS1f8zf6O~I8uO-% zSpUC2uni&o|KMN#<1a$uZ~IfUIlm8Ezerat{{P?L4}iYp?1|h>Opq>`A;j`;CzctI z?BA*0B5szvB(ood`E%ltOK?-*- z+#P~jK?HXRS`=Qm6ClB@a0*Fqcjq^id_6tWeY@}N?wOuv=FYeNIL}^BLDf0yoW0K4 zd#&}pD3MZD+if5twaz-?U(Nm55fypr_+M?^N9K0FeQU{LZ|e<=)lhQEPIW7y$*lvC zt$SEqD|71@6h0SDYxPnnmVv|oY45xiM)+jt#pNxXz#tWv#ZGdh7}#>PcC-K9K8WZ( zYV7E{ZwUb;*KvrCKf!L|*h(nTcZ_34uJ6o23h1xUDAKqwz&X;`%mEd_E+kQOjd?0~~1r zoW!);4m@fd=fQJnOcS!)7t`BwT#uOFvc1xgDL)N$<{rPQ`LgLIHYu zGbX1}n`oahNLuXn*qY>3E^;@f;xVB!C{?#9wd&_9qPSzH+>`)Y_p&zgCTW)rBYHCr zpyxz9JVmDLbt1{|+>}&1H>p*Lp^cmjo0s-aWTegx&RrUo^!OT`{yh$>o+&G5eL7uz zRE2XjL$Dl<#0w^+PJ33Arq*6;R9fB#h2hLdjnzz4%IlKI>DOhf64kJuQ4%WRy{&fG zmQlpgp5lJ<1O!W;CYoTws)-WLFWiSs>_0+Ca*@WaXZ5h6^rIm{R@&>1xPI}!A>@es zTs!98IL65Wc*D`5?79+y_*Of5H4&Q??_z$<{t zkv+fkS!JUxVxUG(VWHMf!cC);t1x-R<9+p&`?hE3n|)jw5H>ZV);w5>!M&?WJwO7O z&QBWVnV$kBQ`Yx=OeGBy-Yt6Lp1>^v?+>( zM)VEU9H$TFG|Ugqn{Mgw-L|wBj4c*+dgx)b)X&CO##J7s*j7iUpS9ZA`2Cq$f zp%#!}SeT#21;6jAw#7{k(#`!;i)9(^c|f-EowJKmAu{;IzA$(MCAYXQAyN6{R=Gcs z4xFak#2f*so3YC7I|hi%pkyCgJvEKsIN=&o%U+}i*pO_^#JO#4fOfLh#vvubdq+^8 zkl3t<3^!6+*~q=tKl)RJi^C!vLnZsJ(4z+TVz-i-Ef=bcc~71sL+2Jv^=T3NF5wU= z+hK*A9ARBi%SnV~ORg`;T~R8gZKF1R6!D>!^9+hSV2a;fhpSb}qxehNGIQ`k>YEZE z3?OFYf>u)7$S(4JeB%5YgMnU?yQS}z31rt^3!Pq!)k(Qmy~zwF-MYfoqbQwG3ssr< z&H)&nZrtbZA#TkVVP78tEjT;KfAT4`t(|=GeG9wTK8WV7Gx?+?fyyt-X><6POk=91 zp19TMb+1R-^Ad7r0g%?%>|&kw)?@8*58v$B7{XGTEK>W4X-+^MC7~2|fhB9)oYHyG zI_g*8=_aw&S-H}v>dVGuK|QkutE8aQ4l$>q#9eHi(|JahiuSP>o7xb-BEIiWa)(q0 zmigpCZq~LeUo#3Cl(YSWjq<{o9YcNfpvW&^OI=PEk708dB2n8uYNOO%1H*$|cxht= z>lL2;{CSPNr9Y%;{iEnul>lHVe@;RsEXFQuXM64FtW_qMnjtTaYP^*z+=;%R zQnt>;$s09SG*tXY(<_3w0uE{U6eE1VXs7wYH%zErMKC~1? zzPo%tpJUd>5U!ry{8G-5f{@~ROBz>5g^qV)FpaLVt_!{DKz+@5c_pQ>3t@F+=I@WqK#G`AZ@-E>(S zBru*90Z39wNTGi9;1Y6{HaV^$sf(j4=<=k$_Mg&)H5?vWll!&Mcj_kN)mE7bj|9f` z5b2=o>!Wv8ip8ZK9*EdIna-}lP#~=H1A6XbxUp~Vu1=CLivdyD*lw_3+1GqcML+3O z6pj^ic3PYOluBhL5pb~hI1?U7(ipkqV{+A3owUv;^oC-8MS=X7aCgpp`IgeQJ|crk zk=N7x>;e44K|(n@N^E0IASPFs(&bTvSn;EAWHVb{QQyRnVV0Og0o*qS9uT}IrOBVs z-q3b9gd}XKYR)Bm-;SMGEZ2PM?c^`@hBEbJ&>s6Oc#PYZ z{Z9?eADF4|r+@bk{|nrs)9+1{wI5Q7x!PboOagdI%65{qAcFe z)@`or<5*~Q%GXc4ipp1~7Kgs+^?NA0#J#c6CvhsHEq`1hZ&)s-fTeO#f zu1Jv1!>h=y;)bB_w8m5A$DGJZi@mHbe;YD<`TcNsr$W7n`SsEun6X~zC7S#{Q5=G8 z1fsVN^U?u*fa&U$sqK@UK%x)ZXuW7*?%L3`W^OVAB>{GU-d9i#L)kp{Rg1>17?PEm z?~2rvFepP#iI|qsm|R7v71y!r6p5^)c?stN2mS$HI$%>8ylF+*305e@!?$c|<}jhi zUqrgcv=?7#sWX2P8=EV}b)^N!HOXjdDAK(C036l`=cxTRcoHm98&Mxz8b3Rk6bzc~ z!yf^i9tpvn;yw8Bmma1IMv0A$gm%f)LTaxyrnuRw@~g2W#*%zewruBSQP+F)a;L0_ znlx{A1iFh~@^a$t?4}!@>bhCWM?H>kiS(EO4p!6YaO{5iW#rzMUyGIxuk;*;p<|Mj z^iF*jN6?Y9T#1eD-}T7+nP};b&uuoA1hNuWg&Dg=7oRyQ+TPfoNgWER zH@w@ZESw<&?#f=!m;LB=cPYxSv8}GFC9_sl-8zZ)_(}{kG`K{dOGle}NYWPi6AGz- zJvNRIS0PaV-u2`*AUqg_MU>y#vLe>$Z@0I?ai{uABK6Me{QcX z2ST^C*2n5(cs*lKFxlzv>VJwg{*;^l4chVFJNHN9n;+92V1GPqoL6Jp!>s%ml*sg@ zC@=uLC|lVq=tp^e-d8nY`jB)c-7^e2xb{fMC#AK+ZuZ>ejDe5sO!rk3R~#WfPtmtD zCM(=8t@u^WF0;CEM!&uTIP0i&y=F2_CA0`khmUdiveI22{e?0b`QR^cx{7RVBD}kz zLW%0#69fAE6Y;kAeLb|y>_(XQq(ydJW=k7oB>1m8sZ1#G^L<6OtiUc{k8*E-uzzz- zn2E2X^NZLq9%`zm*H-QF`<1T8u5khN16PQ<=SopxlB{-+CMmNgF;uz11svrz3VB~S z{&i=tnfa>dK<2x3(xS3OSz#NxHNN_1xDZd}`xi!apRARb8PKx>bZD8uT@OUodAr8l{=P@6-b8P0EH&(J5sy zznN-*AW3%;Ip6sl6gN$m-AJXMC{J-NIpv7mH!jr{S)VL z{C&Ruukc=1zw7b;ETxW_WKFPQr5qj?$U*sKXE5LtEQU3GpZX%ns`UtVl{rS5;X`fd z9hPEukEU+ewT+bFNDh-tnbVp!_t0s-UWbbGZfq@5CcW{jS1X&8-JQysVB}Vj#7a?g z24yT_y_dh|-Q=(WXNdlwcnp_|irvmn1;99fR^_W53`{gpsa)Pxjvyz3C+BHr?ASK7 zy1U!q6uW&z!%x(8FdUyQZ6Bh3W>+-egem5rfH;0YRu8xf!+>%X#ZVAFGu?L18xGMa zLihb?mU7FnoeLy8PvbNyQ^Hw1yg8dDrJ(O>8e|VyJ8Odh7UReHDHKK5PZTK?D8&kKBdyH#O6+NNT zK-hNm+jp@j-?c(C!i&?5rwQJMDx0(^S>vU0eYA_BPlHY?(#AgN=X#>_43kEo8gl~F zshnLqXP_nh-hu{p6HX9HGePL+G7VFW(cq5-1{j4f~9Dm86Xk>JqGUn6d<^lqcy`z|Yrj)3kcBif*9 z^yC_61kcA&NZQJ2*JmG-q2j}%*4?TEnxOV&=@qE@e95;ahNKr3hfwTi|42vwzycFUmk|0(=`UdSwQ*et0@Dn+>3&95ep zaedRpO)E^>9*-&G*?ZzvDxI#-)Ro$MIR&r2U>>W>EgZ*zS#%b~S1F@EL029?3#+3K zfhuk3sMi}yBhc2cx=a9M!Mn;DKhl#DP*_P&LJe(rxb&s_rI4T@FTd**FWrYnYXHA8 z8<-Q=+YGdaOISH%DQ-{t`3rYJ)HtTd-fB#gRmUz!Ysd-w9J~?0v$M9!uE?O6&ch7R zUXRzsG*_pL<6wi>C#`!3j1-=2x3$xlz)MK&@Cr(|wRC#-^H>Y0T-NV#CY{aInKBn$ z^6d5M2ej80d-3-0JbThPh7CQ!tu(>SP;P_5Sz{$~9LoI`kMQkJe9P}Xf$)ZToOH`} zWy%Gza9uJ8mB5gwCouKj>wE+qXZ1Zp-fveWF*Wj5uJQ+6V}RhgtQU2gKMGF?%AV~% zpAbm>4@lJifm1?J4|fYwve|W^(45Q4xcdZ8mf>T0rvq4b6_>_J?s$fLcuD|kR8M^T z*_fp-YLYjO_QZFOXQ6YzVI<2#8?v3F^Pq&fCUwUcHpti4DvOtWkliuS))xxqI>YO7 zRG%wU#6BJRZ%;N=gIf9CGNdHgm?Da_vFe~9LCQ0qNnYyf!6U>s6>`|rB%bZ0N`QZUlxq2<`l* zfj5dA$e(XV?JU)C@)RnO#eyEP0>&45-K<83hEp8|^_S7AWlyZfH)um2>% z`v;|R?DwuBceKCan(@=ClyB`!$A4G;%{KTm$^X0b)=XoRTqhf>xFS-|z4!iiRm;7v zRibBXuD%gLMdb8vmoU?~3bQFOmV^r2j3OiT-{|Z78m#~43*m!Z5R%`S^AEo>#&3pa zB){`-(5FBA&Qj{8fB2oN>3O=wkN(E*{5N`Mw11#?j>R~Q!ZV$r`v5$typ;$Knl)KU zxXmF#8+4zXd2e@h|8AR83u@mgs?=G=ahmVSf2Ue@Pp7P^;Cv=-$Ze-hd|{ouY{rXA zbOdi@6Q}dho_KUbhh?Oytc7Rt{U@|;#Aj@xnkskPBhV93YSWuJGEwl0n|kTzt}O2x z!&eSEmFb$0ue|1awM&DthjljKn31_32<4FL5;$H+ZE52qXZXql9=q*V9ZD_zddGG| zU>z5Jy?@PxxD|RB?V+)`l(SrK8$qeu-TO8xRCk=2TtmmeR1bh4edN3!x)ExNU+Xh| z_8PzN$pEKf-*G!CRFBW2{E6GPurU(+AzWL>c)OV`E)bE7sNa0MOC}diUnZnk{g%t- zP-le`oW1dtUnf?xKTv+PIxy{IxSO<1L-#NrQJ5L7%Ww1b`X2C2D_uoHDdZYn25FSz z>ZF>_fu4~%5|OE)DYG*TT1j$KDmJQNTTSFJ6a@4tRkg5g+bxB=$et7bvS-bI;&IyX z2udIW#r=t~r1e_a$u<}q9W*>jcvC%gmaC895v^K~w}q+tqN{&pEU7)Byof)?_;$Ax z;2-!^B^)vuwz|PkD~jqKpk)mYOeiYOi)_}~4AJ_z_92f96TW?Y1u+t%dZD}iCNBi#?xybo_J0KTV2uP5^buL(iEIRzO zc}}S}azT76s;gCAjZ=jUq)rzjlS>Qh#rq0ZACu?`s@E`0zeY;&7Qa&TPn@3%a{f>CHmcxFQzcI?bR3D>QZ&uV|G^vLlSoDN`q{ zJXG8FB!a?8Z|idiSWTQM;?-OVZbO(sbu{6dx|EjySD3nTL(NovhZmt zYPo&@4WSZ48nD&%;Ykn@i|^%8$Mqvr;CAU2jQ%eX;~Zp3ZY$ko=tIV%=s)u2+rMAr8-s;+izLJu|HyOooO?Re zfgm~(@{UV*o+kwFPjIPB-L!_ycu9x17`rI^i_kUc#8#%$w(zfeGz6{}b)z-Cdy z03~>_7H0gjN1L+y8TUnVWntrESH}9o@{&`4k)0J8h;HiLz~oxU{>H@=?1Lv1-+#5 zq@EjOzb)y5qvsVjH=7Dek}M_(_@w@1qZK>PI?wgUP5(}G@@o+tG;qPc{Rpe`8Cc<3 z?9eU+-BymouBh~#klY!Q9A<&*;TO8R#83o-N@#F#(p{&)<19tJGj2*sFSd$lbCXGt zG8%Vuj|e4p`z1iJz&+JeWhavBYZ>F-^OWrc?DMwh+Ae`2&s6CX{S+x^2`_xVok1#m zY^!Z(LWnwoYC`)7R}#Ez?0OQP2cCr6t_YJPUv$2z z_^^Dk)bZmYof+j8M)IOJPz%04Y>k>BhAv$%J&bOz2Iz`P`;z3CF#|vXy68-pPyi(l zuN@I_q*Ml{#&eeIuQ`L#+ep8CeTDKxVQRf7nEOQ=!Aq;r_DGCQ4Yr-#OZ!n&nYc>K z*~W_(6>fBDKU)nTN;9Yx=*BpRq>LWUaIcjTyj|gBe)v?|l^;}mc67`ND`<23*g9zD z16slUBL5S9xM-HPevDjoxf`An^Pt)$RYs`~<9n9+u4A1=DnUTRD=nvL=M%w&XBEmK zSgk3l&W!J>ILEE6aeA}Q$w|9I-Cs8lZ{nvZM!#v042MRLutC3rqFpc)-F!HH59AspGB4~`tefE6_-=x;#{V$F*3U_5rPlmO4ga25}L#5_Mfv# zCaaqbrlb(qG%(aU+`X&F3GMb)eY7h2GAtl)W=W#od1&%#BH-=5&=<{_n&pqGN<Tc^x*l* z+tBr}aDn@KH0Pvhh+V1eMDWF6Y9~(F>iz5Vr|k)sU{-F3g41Yr;lMTUHA}PD@y%B5 z+OqG>Gs@s`JuU6FGOLJGzq!h=fK`>wwve00c=+vGH~kC8%cXLV)Yn*|%SJ~ft}m;D zny^jOmdXo0_0pt741L5@XYr-v;iP3pb(zwk6vx^XBa0f}Prn#u~|%*JrBK&WZ2 zjyIo(wjRQ!$$p8}^HSQGuLx!QtQS&B%R~ zDQtq_Xvn(NEql6Ox6&?BmpC+w1S4-TiUX*3g3Y_~Iq^z*GwLVbnQrr2=A&!kHl%dq zRr&IYyg@;CrBJMzk1g73O$d``jP^aD7gbkWP(*}hm-v_OPjWz%D@>~tPcNhQh0%<2 zTIKC^-;O`+4;M@IjpQt|{Tw0GB9_{xKNn;L7d<+hxxhe6b{RD~>4P0?CyDT5cE9vL*Bze5wEC&Y%9L7n9vl$#+gStmllFG5 ze4;}7P+NFtcCXLt@WPAUwM{X#U}|Bd#qcTMOv$!dFF%j^sW<-@3W?FY16r^qbAoM{eq`B$KPq@jq1)}=CPMQU$}2Mq zJ?xgkfLiK%b@6vtyBZrq{=J=Fh9Nuc9UskKh>}x7F8@N|`EM_*W8kaC^B^YNiB#_c z9*%)_Y&`*FUs=MLHg%pVk6ThZvU*yaJ*W>$qWN!du2}Wq;Lb^9K31j|UlTuney<=e z|6hm7DiR3|YZ!(&D3r97w>8%({g8*FAOvAq1LubRP(zy2D}-h1pilDY-_?JIHRSB> z`sM%UnC|VVgSRYgB?N-DPMbG=1(3=4G3#@OW!G@e2&@c>wrPwho*JG;G_N@X#o0$_ z%5W+a>Id-=QGuR*+|V!`z0PZeU&m(`C2(*$c-`kuJt@ZcOY0%Arkp$ZS&tYOQ zW1u#rczk=hPW5C~(Ayr~;*^ndW7_K`m5A&a)lpODL}s_=fxL6jI79T6Cmd2L%e;tx@LG`+ak2> z;P5fqM9dYFy^|!LECYC z)8a)Dn5qMc>h3c5AA787{o?h_o06BgSN|Bm z3dpL8V`~L=a1n$faTjkW&6TP-O)FtRt4A)6Y6GNHL4ICMi?ZTKR&hwllH|()f84gi zDAqw^yV^5zCEIe$v!#cfwf$yDy$1Q@UecMh0Vr9&i`e@Va!4bF!eCB$DA-8SCoI9l~-Hj}7=cj7VY+TYcGyEWcFM*4)$|5Hr&p74wt`k&tm z@sC{!{|STp|6n^u%5@zR9q@j3XQEXQqtGP*ct2OR1N^k}KxXzt&f{Ybgd0O?L$|)O z*(fFR=nyOKvZ&oXLXX6o=9O{m(;G9Kx)tL(i#liSd7Yo#wa2vhxKVqYwh&F%VJ|f4 z*SQ{>LI42bskghj_^~=FM48sCxIjBy?Cg%IlV9w+`e@1e_@vNRPz?niiXco_oT`V~ z@L*wsF+m!7T0An2Qq&QW7F*|^chhBJGdXD8SjjU!#r-kJ*vD)tS8Tom3sS{3E?6Gm zeqGcwFG^+lx(K%U#hSpxJwylB6iI;E5xHHf#IwAlacQ>yDFDw#V4~vKHY$u)^A>&) zpQ zL3P>+iNlJ3o9;8>DbS*pp?2+^C8OhC>E&q>hg@DVsVjC&V#@58Q*qu6bAlCObPI1&(2d<`B z9dk~%Ra{KI9S2>y?SV5SEkTqb*TU7+dB8h!FxR;tLYxVsvgy-hJZdGPcGG*RN5K$aNU5Xc;}dKo zQ=lG@%zC)+SXtFWR#jlFF?TFRUvghdzT2+Qa`Ps{E~qAWMj|M+BK7v}roFKlEB?ed zD4vAsou_Nbm6tw#z2TsdRf@-Ii^! z?{fLEjsCmV^;{%fN!GYM0;sI{HmqX5!0&?>lU(9~Gc^)U!rd{ekOSja(L-vO7^V=q z-j--ug@Ivm9o61^HtI>p%UF?;PC-dA+zp&s)sN-dnc7ypuhXZwT6#r5B**nsU^2rt zSUv5#A(k3DqZ|-m$iLl?LUEI-y$H{#Ci2oD_L4lr&km?awtcI?B`ZOTuf* zsg416xIQtLD;#OCTt}K+*iF}S0WqJ_BHZJcNFI~btQfJ0k zUA7H2#^jFjkX5I2bgZ?Wp;Wqr5Gyz@ky*Z8F0ts+H(~J7o;~$nd*+TSTB3K7e@@bk zeqDU~2p~q19MY7lrh6~3EgS4F3r zL!UP;;dUM`H11@;4tgu#js1jxQ^sl=jIKW8xE?C7X@fEYTCyI&p?tB)#C<+gktLK*iGEpD&m`#t=CW?799hUoT_Wx)=LESvCe-WX|EI2 zXzGd+K-6XFEueSWwx#waVl9Xgk9zg?JC#&$0BNjCq1%aD^^}KJ>DqVg=GO-H%-_EV zQ5n+UWk~NzAqu<~#v@{XAS#yy$`&57XuJc{jrJY9^nJ}ldVi{4_zk?|>}%y;&iM*h z)UK$`Oho>l~3eZw_Vc;w|{7f$gd9)UvC$(@!%gACPVh5>{C2A$q z=Z>FN%O@pYvP||LJ`svC6i($o5V-q!AC{i8R}^a%D`sqPuGV6~?opKCM#$-yQR9{e zCV{$OW_gNfoV3w%fEXsDXQ%6(G}shaF~*Zfnod>=nvC9ka~Bv~UG-fOY>_QxthQnO-iXqCo4q=d~fYi4A$th&9Wb3WT{EOT=qZM zV8&3j#yL;k=u7`LzvXY%4~Qwp;xt`likZ^RzjgYlA4XpgF=`z&%3OTQ^1%ti@)`VG z3xE59!B{9&?(CvslzqOADb;4eZvL(^s8IcJIR?;D`8e^oZ9^0EbpH`da7K8SV<8cX zV}I0;cd@`5Dj=nuS=6pm3ZLtHB8vWslhS>wvi&**Uhq-$dL;eYD*S>qp) zi}*9~p?+9iZ-{mIIUN>R49U_x)6f_pdEM>sYg!4>^z6jeftx4kPyGp!x~(2w4(RVG zXXz><47499g6fwZB9>N0IzmkiId4Udr9H%lH5B{oGi1@MP%W!3I%mL)76 zLU+u2#zJ!51Wej9gXdDg}8AtEBqmdRL}YN?#N&E{k-{haW8BGe<%bnr?nq)ja$QpBz%JqLNgU# zC%bU0>3*w?wthOo^lwprP9Y!OpF87!ON#tU$0&`2_jbOv$!MP-Z>@U{{D%~?Tv8bc zDi#K0l+y8MVm2$gLoCQ+h(C6Eu=?p%ej_LybV{{xuWKuxI&tb>&tq(!fj*4m@C#jR zZlh~i^Q9jFA|mzl5MX1hyC4XvE4a-V2s}lIMm05h<2 z#*>^5R2-I^74(j%6#DJbpSnb$FXXaPbrwLws;h`1xnH^sz}fOn!gZ z+A+NS#dZ6d*AipUR7f4iVkJv{#ltpJ{^5x4CU`F$o+$IkA2a+!$qQcB^djLyP$5Ya;-|NJ85ijPg^;cF3C%uauD-HMpN!2gc|}su;3CiA-dyjDD?4va5d8+DhunF9QiEIOED#w5CkYCT4SUe>#pZT3U5> zA#l^b>=(IqD@z-mZ-*#!j4&5pc59~qW7pX1gCdQezF`4goN02#YpAXSu~cmbjD+q5 zA}W8+ImyQ3%VQ$SAk;}%1c}4)yjzb(|C(!g5*|$;6K3&Q;>N7a3-2a_?a-x!Z4%WX zk_WoUW6YJP|SPZ;;O;XS))Aea;$JMf62g>&6j$`$Wx=xkjJ#5~P*mXnih1Yb;qX? z_(0?@l!X%_z!?#B-RlF4ZSmsh50*AJ5p@A=QtlGi6mnUF5$w{bP(HLqS?M;6vGiA0 z>4^jzsbsxx(UmH+yIv$tNu-@&m-m~3FH=%9z~2kyuduJMi3Vg)-RcVDXncbXA=mxL z^@Icui``Jm&}`<5naechd7tDVfCWuZkj)-l1ZL&L0O&3JRG9mX;pdd+@HKRF!YB5X zFZanu7VQ1{-fA-|Db!$EX1)SHUNahJ3JgQT<6{?m!!L+rI6hJoj+}Qy|DqaI4^%c) zv!SGoYU$j$>(4o*w)5+>O~s4j9VOX7E$*ek-;Y*|j9{~kb9Nzyo=uo>+yGzoefXug z7-;pF5DmkoBb~Q~j^hQr4Q1fNLqgb-Paqp4mBfAV+ttvshx^*VHA*Im;;Ec#41vK- zI@=Gzj}!}~s@jKx_FCTfFwU!Hs;I9y(T*D^y&X5m9t4i^5qHOB3_3P5^{*!X&zJaomQLT_V%(*g*G%pnKQsC1se>-n za2llioI>oou~QS)GO8Nght?GDjfpLU=$Q!Eg}@6giunsqxWkSptk6O{3+ zDhVlvhU0WO&t5x|0*kKCj16#6G2Xe~|7h{yaErZRQalR}&F9zf8n1-B}tf6ry=VLAS*|Vn`Gts45 z6bn1H6btCnyeaCg62adHy(^IIv6Fq?!xNYVJn#p6qS&2b%O@o;7n*99d44nYhEsl0 zM%bA;M@F1oPUktE9G=0@%80gAd&yq5HVYrd__gHwZoNwQIS%Fgwv*A`L(R|)8HP^! zrNt`+RB}gnt%ti)hq`WkeRnwN*s;-NMfJSuPIT!t9U+yh8reI6XAZ*4w11%lYgu?X zU5yp|K1z!)vIi9l*>nj681KD6zSk`|5S%ydb^n3rE9W00zuJUSc8i&i3qxij)YATJ zu?=u%Plbw4-`oU_0gGtW73(G_1VY8|i}S_}D-q+!!H*gQ>wWyAwkE}ppUxHbt&j$U zBy`0GEa<$72yYjH+F@cWpJ6Zc&40t1xsgUjmMQEH1KJkn0SaK4J?8smmmJ6L&-264 zpgbS0@^Ztm)d?!L61Rx#%Awwn)9{!h0fJS}&N?=N1^uewOJ4ANtA-@*FHG0wMuvK6 zXP9-kuCGoXI9kWd-WJq=RWJV@Ix+j*CCa3=E~$jCv3gbi*t?DUX_jFFc-%fH)DWUV`OeK0;_~o0etY`V||N8JxL@hBZUwVzhVk6~EOtxlO zRaQJPxj^7{lql(W(@3(!Nj#>;!N6L49}(bRNik_0J&-M!rmI1F^G!DiGo=P z-dCze^;u2{K|lC@$gEdxPB`*Qod&g>g=(KXgv=zTA073m|I(=Xc{ullE)|BSws*mF zH*>1^=#ITdv(4ffUoB*$6MiYP>2^vQ8}*?*Ve0bo@*5{f+dbgEwJ+8Y1!(rrB1{lx zH6_8DKMS~9IW^c$JuIyy(4ylge+<1p8Ev9lZNQ*MUQ z)9bS#%G;TgtF(#ZApm}_Sopp1HKx<&k&(cHVJpZfX(4`Uo(P)mCbd!abLPntwuiq^ z>Rs>zdRY(9Z*o%W4Dx7*^*<5~aqS|{LuL7#m%rlC=CyQ@xkYerl zqi6G6&sRPT7h*f^oILMOt%mNghu>&7k;&0(30{Zi&Jku1f~a95X=z%OtOuky6vrG? zv(1Q(Xs~aOB5bGhbxTFPdmG)*_t)Gzbmhc{n!`7R^-3_r*1dZ8UVZ06wuf1F?EEObrzq`i zC%R`ES4psc7%fM^Dm-a+rRC%!vdWG0mcG)nTAVB1C^N=hL|^;9vmfLPTOYRd@KUR1 zqINXvyDrmr-i~`PFRV{lPpCaTeax77@BZKfP2!70;ktOb>sMPz;r94F^seuj@tm3z zH>01xX%>4Jf(xsz$%CT|&{f%@MKbOssSiQseit7s_4!|2qWCB8LhT3W$9&b8aaUL- z=UK=GZech1*7O1!bKVg5q=X@DPuiUhd8N3zwvJp#1hwQFSbnIZ8oe<(61^~@L9UG zEwRlb>Yylu!GSrc{@eZx@rQF2$ekieeAI7vr8V1)&dB{lXnfCitEbDx%RbS-Wg=n7cNag=#VEt#gd!de=8r~22vxE3^_n&|v z{CBtr|8#hc+`@Z}T%kR;j62PC8}S(x+7#W){J(z4-K($44V=Q^nz9oP2dA6AU#bdQ zky)JGC73A|N+SATGaVkaXYVGPDgF3^PgR1)ZP-+Z(pI9(aQzGrHt^gV8{K!lB?SQg z#pize3SCw7R{6cgoU`{#qa`IIxhFZb1zH+s_ff+Tw?QS8aXO8|lqxR^$$+>kjSos- zSdv){@Q6jR|6;*tU!t--!zcXc?I-MUiTomzvosu%DF-8IZ*ez4e+vD}w!i9Fb_{-x%qtv=M z+Qi!J{;RIv`^&2NUBrfhQvqBfUGs(!A9a(1eF1*@_4oh=L&I|Zn(8jA9LqiuP;cTCls%Z{-?BJqJhwe;Y@sA;1555Dk^i?OL zcxE!a&XHBn;7hMQv2Iavf2#tt*D0o%R0uMIpT41)aRP&<4L_(A$%G~S^&cqmGTI~( zhTvz<`PI~iLyLChTm^P1C=4ZM=j$Ht%LRVGI-|sL0`Vm`=(D4Zt@TztxNz`2SCsxm z`$fD@-jQuDcf_f`1I+u>Fn5Zm_nNZLS%0n%RlZs)KH2`@mTi{RoY^_!z?$x231Uup zcEP@`m#W_#74OQkcDeaPa)(;2p{S+Lu=bhDr#9H?YAG2qc+S)+y;SM4t@=R)3&{F&xMB0O2qU}1S&_jPg%Zbx$Dc{JDAfA8`B5c#!Mhb%=VWO7SJbr?6 zDMf(wu(eY?C3*0!I(|_h6bgrOE~hSl+TETemp$3?AV?n-8Rq0i2yKo!_X_JxPw!lN zZSZ3OJoJqyPe3R*JQEk-*j0=J)@RALce|V%o0v;n+nYkC_yoy+e&!lUERKB0g2yd% zD^?D)aXtH<*HRvU0MtalR<^xheex7(zGis>_8<-H2ii z+=2?L(6W4ze~jQYgH(lvc+!)R7fR>~R*|tL`QmRbV&<9HU@rCR^#q50MEnLj!EApN zieyhp^N+wM0Y#QIEnZIg9>WbApi~45?C}@MGpck48nD>kRuc?k!^`XF<}{Ii-i9&p z!Fhd9&f69EJlaf!&7@45m)h)Qn54(s0r)Ybm?C^~z%O*qD_J?(>(KEi`om<+MEYMS zq{#1xFLkdzptj=92wKRU|_qshLzMvQ+X#|1+#;RGUcda(>up?n$Vp}-|EV|EWH_ho~+OXe8>X9Y6zI~q&|SZ+6=*+A546f_PW2GV%mojQHo;-Y{!Y(=sOb#|FuVe>EN zDXe?k2xb}sIrN=k3;J2Uok-*03P_0cHzqA5nPX3Crn6tks_Ld=-|7b}j<>yZnXrjJ zvZ!8TD2j2APO2T|q&`pIK{3q_Q2nmP8Ln}|_dBRr6XO20d`3ypa;i)^4u#-?+H-WJ z8YkE>fJNebe4-x{BvXz#GBtLl;0m*&zU0i>Lv8E;T@5DYTCSOSlg83lhXF-mm92HK zlK82q=GzXPfTEY^s-9K`c)M$a<7vp93WJaEg@XVtA*oOejFQU^ALX6VaCLj@)MSPiD<|5M+~g zBG`l&_bL8E~m;wZ_??|8nMRII*Q%<=sX4~ueh)*gejz>Enn@laVNbqJ_zu zw+G^U;~$bfs0h#{d<&3fe;N51XKN@USj=ANjk_ud=4+;I-Hzf9){|uBk!O*nmfy;# ze9h-?hk&Fv;sxi4WbIaXKh&#l{S~lT&(5pXxi^cqF{$ZOj&nUdk9LH4?ivHt`AOS&mMZ``8((9wVu5Lt~NE zYxHxZB1V8-8`N5MaD5&9C1vIz5cBN6u=f^FaX#C=U?bfS+zD=h;1(edd+(|(wSVvf zaKev7XqE?rARilqy6kp(VoaX~|7zm%x=YyT?uF8CuXp(F%p=u+`l;sT%Ojckk`LeF z=lAYE|NPlOGrtDwC~2_9k-t2?24^@}_d1g>U`pt>D;0*zs+x(BQ$4 zr|i}j*SM(69jccVp?1FjRIrZWKhBGO!efnO-p!0Zdmo=k&vM%1WIN7iB|<0rR7=UCbRLOtaVzIB*-BR{FZLvO?>kq4oea z#c=7JLmctc2!ky_?*}RUBq`Haqmo0wL^B-nHxE9T*CdX+M^w_l+LwJ7_JbPSk<~1< zVGHj5kGpB2@h9?ep}rsXaglv8FoG>p zzDMk>_ttQq?!mUNW6xAwqB3c%v61iaatnTkm64nj@gbG*>&u*t3SSwKE+4;_#VHFO z6F%52=XkJS=jnTKP(tcj1L33Uyt7ZC{nuOj$!^=rT$3r0j_VJdRF(U}d)_2hLl+#7 z{V)n2AIFV|bJ_lbv6wwrJm*bOPaAQ7NYU||Q(sqDkF45g0`}|~iyrrSw}D6qI=J$y zZxv^x_jJns=J^OWio&O)KzrCyiyL0w7;Ibh6HJ!)RH+lxN$Q=@A6IvHQuPig(cdEa ziKe5=VSUv=4`ccE$8*`z5?WaRK2)?0`w-k5tuOgk>`p`nxEA>p>g3{pILHXfN$xUyP%Tt%Dj)^xh7MY{R z$a;g9W(skf&Xt7r`v`5Z@mvVbCw-+Nb(oRU+l7zhw{h&$u|DpYA~5+Vlj|?H1}*GD zd23nUo;Ppvz_bB^$O=X}g1dCNp*NhP{#lH2BFLT1qV5W%ad}q?aY=fGE;)uVGAJG{rmYQm#x zk5Ofvv}Jr4hLVE2kER-gnP~?~d<;7jD6Bk-E34>|UOO9P9C}6Rcd|w(ApZ-H=@wU1 zyAj^>In&RzJqz%Ff7jIVXq1<`*lk1KESug@f-i&#d$|X5@4Op2U-Wq;RP4R+ENXZ! z;mR15b;8AM&Ws+8C6!&TYcNC=%tizq))~s_EOEyq^-u<>fA7w(flsGy?x`(c%nxO*yerkEh`qZ5c!(HJthZFA8PUbB&=Kumli zY1XkPYlpH2&Cs3g4!ex0uo7Ol*YyN2@+u_M9+Ty<)~AhCzPhD;B}C}sx0@HVgz`}n z9<9W20Hu#IJi(RzgWpM3+V6em1!hSWVda6Sd!DBVoWN80bu3$=hF6*D7PaIUiWSYLkW z^`~_9bH8_>)O}%|6Q<#3`ntkc42RUqf@|=ZN!=4O= z#;a2Id0^d@l1Lhq+Ywg_JckOwjSx&e;e$6g{0`!H{gE3~+REj9(~sHhaPKF+0U2 z;nSzxHTdpu6V|@^HzuH1TVHa0YmL)3%wsDPrDX8-QX91EHbboIB|Ui)V_Eu!O?EF< z%j0FOj@&y{DW*5i^TE>FkmL71tGm}m_oxAwG#Ue?D}yLKJ~&~o{mt6-S#$?yl}A%J zW-Lva@et1$8<+XF+)CsVt$dc;g?C)JiwmGaNlSw~-|lCgoUpazs+`1tY0umJ#9ob^ zB^=<5KziRfq-&%wmsWuZJ>DJZ`y~}`yCNlkAU^B#@lbWB@{#2)z(=7n-&ZijqkCi; zAdMBVOJ(?Y77nG3sG5MGb^2%+*<}b)Sya@=rpYVkRyVlJ za1Nd$>DteDLp7p^f-(7+pbM7mV%)&-?bcra=GX2dx}vptNZFkX{*$637nq@Y#1fTv z8*FI|Lb1XT(TN3d3$Rvs5NCZmp1!qNmF}B^$+$iwRd>O zIMQZ&tE^<29Vw6^sdKU;-ggJCdezP6WWI{)ZS5Z7_wu~OYKr9bzZ*Pu9Gql3$=mXe zv$`AhLb&C58q2zmJhrV`pJH`IW1P06}b^vi~||KV6F1;@_L}?x+YmcnfL{;6uY?b1<*=W zO?ifS=Z4JfE#9qGU`XqK*E5Ln9@#fQQzEDO47atD5U4x~jg+g7;0NfUF&mFi;uIQ{ zZ*2@CSID*te9PpB1mo$+X5F?U5p#TE5_d!%y_tl>y&LyjXx-Rbw~($gK5>S{WJyQ) z&^b&BxQ*6Tf2AIQA!qBDBHTi?{AeRD8G9B);&R@KfJ+Sdk?;Z=>88S zu#sw%$@9-739?atto2W997Df%wvUuZNvBhM`WFXJtK-h^MLM9)?)Sb*87TWsKYWvX zmD{RC-p=UDZ`(dlI#U&lzTk*_;6QS_q}ISbsQWW{lL}N+slOKinCKe;_wNt8S5HxM z9IMxfSwbLxNi$nM`tw<>jKO~TqRmLDC^S<^gU?ZgOQMoYU2 zJrhF1VveRvCW40J==mW6%YB)d$+Hp>r?Wm|LPT-PTkk`$-EjFCQ`E$%%-cE;1DA!7 z)u@J)b@tFziwa#&TltZ;+)nmW0>0d0|7~cbBn``?pvs;pL{h48*6xm$$1D{o<^5a4 ztmQLYH5kW^lR=pdtl{5xUmH;72eoZ_H!c`Gd9^{8WDLt9edn z?ACnKQ>SVkaZp#cm~UsTJGwN$dFXaf;LQY^Q~8?ues&w*73DUa&dUp|*p<9IWG4f= zit?^3m2eyozLCf3Ed3{>G1V?*4gvcezSe8r#$!fv?9ZZV(oOWdLU$}EZRYsSa?^HW z6$j+*agPq1S*Dhu$fvtw1=MVvj{?2Tuj$YeA2X4SEDSxU;vf3n=0+cADH=DhVqrbhKz-5KBpgA(AQdHO6-WBq<6Qcu8XUkuZDVO51n z*Ata3l_2ab_nzi>Nxj8VU0OTwPna@2_!nTu8>HoO9{l8;7E7gpVvt3ZJrLj@mr~>; z;CL`z0IdQfb2Y+;H_oy`od#Kn%a-j%6a7;1fH;O`C+YjTw@I%JSuyIRxK;lYRPyYS^WS>3f0?GPaTvt+|){*5HRKb&%Q2Y!TE)1-_Go4A(i`1< z%5}k(!qq0CP4~p0uP3as>O-?N^|<8JsOBVvg{+0%1z`!fuTBocrJ(#?BU2H^sQJ1- z-7~TTBFaCnZD2ZTxNUgYJ!QN>nHPUIcGGok31PQT>z{Kz@Rh*Cn^HwuO7%zF#u) zQB(YgGw5!E?!^zktWt8WUw}P}_{qe_o?Gn-+c+;6t%_J>5GyJAf&w-$4EOA59foM} zL;vpiP13bLQC!Q98;M6P1skEY`|g*I#O?331IFW(OQFEqH+)zeQ|<~>%IBb2u|%B- zftlJLVx}NMrqD|3J|_gLpPn2ENj&a0q`Z(1-x=~UZUxnU0a7>GoTKdnoGhdT8$Va~ zVR6|^V=y&ESDa9+uh_X4v2@f^u9S8t#cExCG`)v%p5O z!>X`TCdFj*$J*9&&qYXrv-npJZ$T<=7Fkaty=4bFm9XBb zc%c+mOyAK)1Yy@u96dU@#Z&Dclw1awP%aTFWhPLX9t=yLmTVmt2v9_>jGN0Js z$81_3Um5J5Gm6kmnLSb+^d7$}p29rB-Kz7J1X_v@a2%i#HKU)K9FRaZd=T#b_$)c! z#iUX0s!SM=VO5|Y>ZmG)TUh3;f8PN83>ZYRASIN(8ER2Kpz!Or(&43i`?6|qEnFYM z$VZ39Cd>`Tx;DV-_7BH_tQmYM3TT4*ZoRv5)f@|_J;&ZZ#%um@vbJK6vVy&0A@`ie z)wsEmYJFMzoyz1XSsy|g9KU_!CA_~CU%Rw#?imo>@lm=HMb zcM47ge0gGg;z?qmGTZRhTh#d1@dCRYJw^>z@q1=gBc&%QctOU5smMUSZKfaS;6fiWZO z#iB=KgdV+l{h-i7%d!W193=51*I@dA?o;m(rPim(W`u_W^%Mw<>gLqK{A6fwD#=4m zqztFZXQ;i*qnK=;Rj|xkze;ZXM4?@o6*DNuL)|&0O!M!pE$+DJL(y;4B$}`3E3<2dD9G-@;CS3sem^9T z0fIl?zs4}GIH2Mq;O2$&%!>Z?mQc|@?8v-obAj**|K02oj_exwEpMxb>%9sL*4BJA zkp=gCzk4jqDzhEG&l*cdH{_ev1l(CwdHQW>u^uD=qOcVvFBH@)NPljM9~Eb~axZZc zZ)cVG$l{)4sq244&ih0#rBIfwzIgT}FePWEJOfMLS*h)X7L_UV(aNF_aB6I39V0lw z-&5dSn-2h@RL+h9?^(xmpRKd|Edm$!LsdN{{P=k(Qk{r3=xn&m(=SL-5z?NewS7() z_O#GBLnhC1@SavGFTvXUW`D1k@slb)f`VhovbPGP3C&g@^=o_-d$d*Togl_=g;enzcnavDMGim9orA8(fPf!r}zz& z;)~Lrf5Xgf8rF;pM<&3r2%<3@BPWV|_)^pO!f`TTOZ|+bg~fUChGui886=$JOD<){c=7qR&r-NtxxNfA#8IbP$p|%=dxIG#iTw>woz2zHi z5PVi=&iTY!_ssZCCu7u|^^4VJ-qn-lI_NU~ja!n(;ZQbVzHepri%R_aJ36pn-1N<* z-IQm>N$Nm@Bm2(oAp$5=gzHw?OPb*TZlD+sI`s;pqqDqaoTqdOO=nx#C|&lU($s{f z@39*S!h$^CW|Z?SPK}gMOt5&LZBD(dE2}IaUC8cq@WsSfzKdBEQ4`GvFh;P_YRlE@ zR*1SjlOuOAqr!jty;TGDs{2`+meAp;6~P#z^1CRaD|V6NOaD8B;DX4Pf4w6b07H@l zA<@Tcbl7tG%=a9l>%+$BpikpETveJ@b=$tHZ5;u!a@ z>`m4uFDKe`DPr+IJti8CUG6!mbLIWo z!P}qkn&Mga^XWz<0g-&yI=W6YXUI>vvxuvRGxt?|qDTcB?G~18eLM@9)3Y$mt-Wc5a7+FnQxyy@ub)Q)`?lZb} z_AT<5pyo!@cIHvUH}`w~G z6$=C(q^Jqa3bW!0KhcIe!<&%3PBvd67vOh7VM_}g75N3Y2>d%4{g0{aeJ{v$+|M2? zr%X}l<>(-9`23RG;fStSJs(knrZhhYEXL&Uzqgo7uzdJeWcWP;zX^Eye|AWm0#uQF zBrbh47%Tj{pOoqPLeJ^3-y?)fSx%<*#9}w@P{H$FA3}o4pe$69P~I66%F?7!_&#k`op_-+>-{I*8#*SYfG=wRt+k$ z%t0^+yfXTHfEmvNNZG2JHeKvO%))YXt%@SFO_~%QkFECz2b&)>whKKW@sWL4d`pBC zdkSyx07+8O4 zxB0&gV6VM$shjgiR;_|pbZ;<@tTpH=pP3B%(uiK^E3|bN$(KTn+PpGVB#A=H>4h>cJRHFx*)9B%s=~!Yb5D+dEW3Cky2pI!s|`< zoHD6eeOl%WA2sela5Jw!N?P*RDA|KAjye)Ut>?ZDGwQ8lroql^g1k>$EqcJ{dGQw5+ca4f^hv0WT{D&BiS%Iq~-_zW8t zrf>R&{d?2*83V?U(gFErt}}&1zW|8+KOU=p0jTSn5$ketc9jrx2c9LxQP;iUeZy{A z?Pju(vI=s##ioGoZu2uBv%>njIUKX3+QsOH;P_y?NOsrDd>R6Me<>2cU5B6cF*tpJ@9=7`mXG3irD zH4T?0vUFZ$?KhUT3a$*my1{HStDD-vhN5KTA{lrnrlQ4h}p z#v9u!C-;dY(|v%Mizf}W)dwWsx_p+Mv>M9lITj{-$PNxq)#h}Bc8Z`Jb-IvGC!aVn zDBSFw(>OveKVSl9%4Mt8hJZHKyoHtf^2y0uEX3{ze*umh3XPBX5dvdpsHxnRC047;cIoT-qdGTUd_HAbiU)os)ZDaaLireyN zMU^F~Lp%1|*y=kHf6g(4_B407wnCzUh;aqt$iZ}_yk|gH>%MZ`?7hb;#LD!R^Of+# zy_CQK9X<%lO;bpOG19xhxg!fF85X&e&IW%DM#TFDSh_mnw~d5l3xi>3=$E%udN0|c zxaVuLv79@X>^9vI9JYv(lwR{Pc1s1e@NQ03oTuG7M_UH&dXY^;vaLYm%O$46uGDYt zS;Zpc2w!)G=d3r`P0~&e<0jq17XK!u)B<>}k?o8u!x}+&G0%Nr9J8t;wB-nPW}C#$ zr(nI)Nk;b3KcVO+Nw_y^@Q+*Y6Fk^|{>N9cB?ynkz*QOiz~c@YiM$rmq;*n5KwO3a z%?+LEmY46f&{D3R1gr&ncC|#4xt;gaV=|Kg=Z69T$0y}lBo!7ht3ma*rCD^Z0i8j! zvP$&r;(UmzC{l=61jK7v1Z=tb!jvJaeX@keY$Y6@Dp%UFNzW&Jl`E|#y;^mLDAL)l zeBqJl1oB^iSg(@>HGTw~awF{Y#YKhf{*$IXz59Lgk(hQSB_F{gm8r@mb?c5v2}(vv z+h2e$frOks5m=iEha0H1n3zLv1>kJQ) zj|rGw{nsm*&dKyu9nbE&2qrqzX6GOCFtzj6953sh;(M$;ZwY%B{3Z%C=Upi9Py7ak z4f$Sb!q=$JaV~Xbyty6U+(hkG? zQO+0h6CyP(`Yr^!uNW4}+cd!B zSP^M&Z1(%TfFI5OG6$25Fng``l25aed(N7+FI+-a;v2R&Lc1p!YC4l=KxsUej!Vn} zI?N9eeDEZQz6k(6e~O>zJ+tB?ITxLLkL8U?L_K^zce8jIZd+>}khS=-c50?wY4Wx* z=DiA}x^*XnwTQa(>qc6*i4X{Jm9gfkv_(GE4vi(LrZ$or0~I2*fsMl4(~7FyRFF38 z!Jza0!{_>(LAm_BZvr1c2c>pUho_Z4kwvckHz{fJl_)2_00}yR)AxSDH~!G2$_ChR zkOjKa^+F_96JL+cpF#WgKEW3;bYXa#Gd z5Jc5-9#Pr-_mM~v)OmNFv&6`ZPr5jo>c?>luaUy{E9~2A`$csQ%fw~Rug<&%HP4D1 zXBtaIcCtKd?jIc<3z?t1VFGVRB2o(a7M`>M)$mg8hA#*eYfnZqx7!;};^rbpBCbR& zy*lh5krOZII*tvD**bh44v8K+wCE@_>l%e0S&pRN{{l4r_E3m31uRfAMe#%Y^bE)K ze*ud2$rp>@BaJ7mH@3WBE4{dyy&LZ$nBUwF+J`wPGSA&}s*0(ABVPqRSCFs#=$&)o zIR!uxyCJH()Tn`cSGJ0u2*YHQh+!-(lOSgEiUd@D3onS#=QRwl$?PonIl4WBFLAhJ zz<58C8EyMzol^G0F95mRakcU+ub9{L4JchSS*_J!#;AhuSe>X*_t61nbL4W}vHXR5 zc(vo==p$P;yzr%L@_}F)CrwZwW4-ZpihfU>1vsSahahCG*t&GmZj?(WtA)F2=pyxy@ny43yn74jqwHbf;O&$hN(I9 zfKD;Vg#jvB3URejFtEwH#>b{V%J2^BcNP!r{4LXOYw4X|wOPtT@ZU;&{=1(DV!7CN zsQ>Qv-);aUR=2I5zK@6M{;&U{_tmKU+tD|a2IDL}19%kZX+S5d3j$BV6vl!l2`?B_ zXKs4JP`WHCLvN?^xR;WYkb3s7Qskz`yEU_H^*|x5VwuIzS<)505vW+XxwQF+T&v^J z`p}z~GB@KoS7k-ECd(D>odwg=Bx#E;G|1o2=7f=6#iQB3nd~6H*F|I}6z)ym6x45q z6f*cv9S-K;QivXbes}7!-x=tNDH~{85V2^DwLhvSF2LIG6^#i=9etJ89V$uE>ReSs zKOU_MrDq~mvF)m{5*othE#@PxN(<#XcvdTB28ud9k!3RVj4hGLK`ZQ6!_sTaEsGpQ zD-b@>RRu)bVc~^;Ew_K(vM(tODc?5(pT~W-DydXdrmyISK)g@p^1OzLm5_|!A)tyx zIf2A?@Ne1Q*{Sm^DeMN<+*W=q-{GeQ-6Bd33Lknqqn77%w=@aA?n;}V!vmm4yivxz zK$77GzE%_70R{IVGW3_xEb4O2Z^-}=xq>h6BwN`&h_O*2c=zrMk*%V6C}C3JzOay- zbU5-N%lT6JX^QW%&M~646l0q`nlZ?teN47`QgL&<$pDDiZVxK8DElr|BBd9f?@cEI z!+FJSmfstqlnDkRt{7iFvo6Se)ijZ?N@$0cfW5P-F=)I}L8YRe&^L>4;IkFG zk77gP(DLWZv7M>9!RNJ@?&TU(X%V-sxp0|IERiAJ3KE`Cn5amnuFl6B6AL;QRHpBH z`Bzx~of~_wb7^C_NVTK0;5^ z<|}7S2M+~(rV$WR42kmP%D5>d&>)sxW>Yh0&fxyQrQGT0WcX&axB0sjR@cI~NR%yM zJC0b{=lTJXa~2Zbz?LC~t7G7eKvU6Z8(YFgR9RF{HUZpfln!c3)@R(QCC^}>db!JC zAtDaz8lG{|{4m%Ma;Ozx!d%l(g;Mk2#x9+^s66SW5RA!ktkDB#;22Kk~ zP*wWItMt{pfYSmA9$a8+1h_mYkCj)sSatBI?9d(@`wq7kg1t>}X?PRIEW!X7ptNmF ztZa8?NQ;x5YiynbpDCJ$0yYtYR5ovpekAEKm-oy(6m6Pv0qu=Y$uvWdk?*(itvb8Q zwr!aVMVGw#WPy)`@)44h-w?fdZwg<99t@tZ?v%~pwBoHGh|i`MH&9cCuncOoI;kvk zpAu1v$c+k%1=c^*)ZLU0RS^}*P1f0SO>@@_{ z7+@ihPn<~}C@gMHdfhnE7o_lNhpoZUQ%p5m+hZ$CM-sO!AP7vYtruVat#b71!;`@y zIrwljb>&#sW}(C3pa^NL)0WTRu@NC)n5I8aN4}*67w@^gq^d21Y?JwDhjLT(a{*GaZZN``*gu*(D9^TrIfA5HEOIh4E(fm0+5eFEH-fb|t1Y5zJR|&>q zT_+DQi#ArjPM#d!pl&BJFBD;z$;2&oFtp!ad5Q3+MTL`>g0KdBxsE7#I>A?+{2RpY zzdp+LFTlV58{N%X44%4bZb%!eKf?n|BJM62U=*flxql2RangOJ)V-I+q`|tDQe9yO z@l5jtXoN>fjovY3&!o&vUx&=<^MC!aK?~0=mb2h3xaRdKVs?LWs>5pT_S;uOHzKkp zKGwV*La?Gm`>VQovZFf(ifL2x3sCrvl^LYaLVuy)XNRvk>yEK**;&i0o@oWn1?K+H zlbi0HbOh~APaYGxM8ys)pZ!$6vKupEEW;f4jPZDdDxf0|cmE&41ip9R2i9pIA9dNP z>syh<*NZI|Y+)5v6t5K{OZ4Hm0&?wsi0q~0qlw$HO$3igRMD9Y><|;0M zE`M+dMzz&nB?7$xk(s&5y5)rKH4hV@V@dbg0--P=WP9`Yw%$$LVZCV+8JL@TYgcS1 z!W4$t&lVsSb2zkE6-FQAk}-n|;A}}EfDYFQd_b#Z=YBI=)PnIbgEVUFk?zAx?aA|4 ztDg{3{z+*04u&fLE8B#_WsdQqn)I|p*0?dl&Bo(_2*#E*-PY9Odj2l}FwPL294atL zQ=s~}Cd^dL*2HKTBDm+wz{4u4{a1TybLkK*pMlbLlW5_SPRhMQT4n>!^)8}D9gy{RBBTS(ekRf{qPPFHLqJm>%l|S3*E-m zUD%ths>$-R6C46Vbz5Cc3Mnh_01fAOtu-vus$igX@30TwYT;y+9Q~gY+$0fVD|2_>JQG#@8W+wGD#-#CZpPYw@~Hd z6Lh7x%K zWAWK)#^YU*dJc(#=?>xe#MCJStZ&^dD(!?^66c5BAedn zE6XCg=ogEqg=9$HLABUAy+nt5r}3?mZ&x-yhVN7yROk7;DP1w_GXxxfxNr0V!w9AH z)R-Rex}YP6sI+?{%_`&RV&~3g_sMMm*|%{{7Psb$J16PUvb=8UF=YG88W*5902F1e z6zCCwKq>7(j?$jh(xkqb$64398-=44#3VcsT?8-YYl>|3BF~WXekimE_<`-q|FE>v z?XCKaSp8O)593gl{<1ZtH+?KFEjQdE_M9XLkT#cH&Fui%?RIz}qVZJA3Sa2M30Y3- zr=FQBpXu42`t78=UZ0`3+J7UtWU8p}!u1|9lqj+&$THJ4;qQ2C7M_aIN*pT%1<$@O zG_>6GdasSj;;J`Jsyd@DOZ$q!=bDKJsJ?R8HT3UFZJ{=-Ua#{C|K|lI{?m#R|1BQ) zEt@y)X_}Svg=07EJWB@&LFOG8{by(1eTLh;g zlZ@<`T~I||isbc3eAjzFxnQ?QSJEQ-4`d(S4OTgJm}qv5q&Z3>)y7Y`-bYNRevz*y za<99OTd$cTX4vj~`a%UW_1lk!FVM1ou0^c)h8@#Us4{;`cH+|#Ls5D9=35H1@!nbW z$nWMI+-8vwi zguc=V_r7so@ZVuC?Y81a7&x-1=ShFve}xOyO3q}pOhvJpB+;3;hJ)rTI9vL!`WQkv zNbvR@EpDG;lybvSsK+2veV+>ID~J;;$gt8nFV}o_5EklsH7?s?8G;)!NDcW{wb-M2 zrJ%ZLBBD9e)-tW%Kicyv>i7$2N4iAU7-lpE>F-GTs;g9)@~ImKD5MeO>6Cqw|5m;) ze`~4jVT@zxBpNuaqmL81g|NxdAM~yhuzmTY6Lj`Sc5-*Dbo|ZAS8)#PtsMq;VgAX2HTTgJGZtriw+z%ARHCrQ6y|m^G*P-yc9wLX6f34zAAv$Sx1-m4=`>a z#+zzwbkgeUo_0>qkf5{9tf^xLNy?xyS)j6VbLTkci3ubrBZL722cTp6O%Q)!RG_oW z&)LuSiQH@N=^?B=6&5ZE+pkCu4zPX!WZ5wWbITDrJH4n{X|nZu_j2Q=Y}FA_-XVX3 z<6zbowthDw_{K-H|6}^~7Hi=CCatMTfsT3CFn$(bmXzbrZTb6$PElXq^}C`wfMJco z9n)9G*H{|U)+0KCI?)arBV3$V(}moP1xFuw=WLjcU}-}u4dxG|UV{V>Jo964|Dh4( z5?=2HuFv-*jryTKA;*VhVj3X?016<*-6%|2&Dy?HBxhB zLZh(kjejmnKRZR0542#5;b609{YmJG#o=QvJ!7SzBqYB}3Y9s`qWEsZhGu(e&+5Id zu+}E@q1Vjiy5CrP8XhHx_ObLuS(@lN36GW%X=m9?4}8ids(-u5$Leo|JEbowceD=_(S#SGJT}5q#NXtJr$MVw2MQtKrlj-Hfl9 z4H@Di`5Yb(S=-7#e$(GDB<^))<}S1|Xi*kTd$`AvS+hzou4ZsspQ9@Drq*0Jq=?~#SQ z);=#&ju$6nBr%1k9q8?^IoH7KJ@;BK)^D@K714^6uUkfVpY>J7UuMm_9ecV&Wq)PI zunZ3rX%ff-z8SGdLGBW3Lou*8bmKkuB|epM&j)l_6MHSu*wwd&-+=3A)mLUVOu4gg z7%Pd&y#&Ae^X46E-?r)A$r(RDF6P{pSCC%(CuD zX)a=U*0xm{dbZny9k_~W%UX<^w%zVxK2YDpvV*PaVBXE z&L7FHi~^&nc(3}IZW~XqL-LW5I^{V*9EsC{Iu($II+bQP#M3E>pJ#Y^d?nkA5LE1+ z`FbKy7nXIa#2#EQ zB!Bu_A3KEDL{ZiV?!S%Mi~f&AqZm~5Z)M=0C8JC3x4|;Cne+UaLdlPn0@EMy1$eZf zGF@DXd`T)Q(}^+#+ipTI3RilpBav_2UQ&|}O&aSU?uoRDa}O+hPE++w?dw;W+*4|I zRgNw2$aEh(>2!+6HZv~cS8 z_86A>&4sJ==?tfY)bww?9VU2eabI5jyetk01k}~0wE$I{c9ZcuG2G|j{)&HtYVo zhJV9RM*tv*;=qw~?u(-YK^3L@r{ciDfiy&HpstOna<>m9EoT?CoOV}$ro&;rdY!7- zXh1|+JZO$0SXqjf`NH6*kunNjyw&wM9s@z3tG3a>H`n$1syhX}H2V&$FU@Nr6Z6c} zx?;9@&m6|*Xiq0lgL@k{P73YZaf1lBe0!%NzV7($5UQhUgxJL7^_r6)WJ4VELK(zH zm{b|3hZAQiK@H2YrR|8e&4$H))msMG%;VlnkPhtQnd+oY9z~gruJIBT z86OSb5LE%hPwVcF$q-V^r3K9my(4&)6dfzAPk-YCV1_48%o93X5)!2+^?hbwwfRWh z64EUk5bWAVj%H1b+@RJiX0?PdYKRxeh8B)sg{1QhHIj#@&A$nG6_k$_YlF|Cca{f! zzK+$lM^79Qa-tCC8s$%{5LkTMDdqoTo6U`Z{dDDMQEc9=LA_797c(^DD^fdzJD$?0 z=u3*LL!A)?N_1D7G}y5$+;WV=A29fwiA_~Hw^S>#*)^J3ti@wo)t~Way89i^?zD!Mr|u(J*UG%dqGrLED% zoOugu!3)qu-j9%{(5~}Ol6go0RD%9&)Gh%;Y>@0QYR8bXix8 zhyvKCKpF7;2I_#a`r3P3h-Z=m0pKktp!jn%3$2(`j))d#OQUI<8tT4CAez03kC7S+ z+fr*dnLeS73tDMW!{zr}$t0Ip2aB3L=0SW97dA?p=T-fYXk#DDuw1ggPNz7V))0Z4 zmUF+8`*76zW2)#)gl~8a5~b>YA7;_Y@7|_%6yX%0KDL#gqXtGOcmiG4J@|+ClMTE2 z1Cv?TKZn$N(&Qj$C_B^;A@_?-{4mNTQ$19U`1rmKIx@GkPYB{>94OV5X!WYQMauJ4 z{#h$gk*dy0V&=JV*%j5bZBA6j0_gvUATBrNBKtg_*0Km1UkB8A%jril%44Wk_@eA0 zxEt_8woreCa@Fn^MuaZ3~;db8*g#j#BUqtV|vz$ z%M&6Pt%x1J8A1InxJJ8;HmVrT2xcXyALs44i`3r@P))`QkWc((1PSApVn#tYq)}DZ z2c0==We}~JalH598h~V;0?`2LOmUpAw2WWPegPx1{pS0GeUh-c~mw)vyk(Ur&8;q|10<_>ch!^KHLP+z2#7rB_2nmwY7*{t>e*q@#%t#T`yH+{wwK|TCe*x;Fo@V}B z8!2;_jACLx;{DUTfByXc`|DSXV`S~1eQ=r;zY%DwluIM4@fYA9U*86e>e&dk_0EDC z*NAvSL^Zn~=JB=)v1pf_Nj3KwexTbDlTOT+MkxV{7cug{Y`mWe%Ma4<-F|9x@gKWA z>mKa^@{k8sl|P}Wp4k!6C=}GpK`zziV8n-Co%O#41&)XQ9-Q+ zFgNvIu2O}UIon1fu_5##HrCxwlgNF6Nc+C7E}5NptUy0;{u2%hnMNO|$@!=&8CyAK zlRmpPp#SX85Nry?$+PIm8kd7{TrK=%T0lU*+i5WTofN1JPy_w~ z?60JF6I+;%$NfUoneb*K{5So+EM3hSds9K}2el1feC7z=|dX1$(kegH(xq&r{ zL@gjDK1DQ~z4>sz!dNe1yAf~*d}wMb{QTXNjg@FCZu*JwePW1dF$S1Wihh_?jk7`9 zL>~kh-UefF+B`0% zoyxU&KwI$bg-1L37jKVZk8C$_bCOzr1B9fFZbTblp;Xj%W(|q4>{8a@@*NyaJ$4cd zxo-Cc<7j&_e_Qci0J1eRPFprDfK{0xUSfzNb$F`xOB>l$Q?h50Q6GW{wP%DA8`X6* zE<~(*6EFS`_TB<2u4Y>o?QZDC-Q5DgX`BE_8Yfs9YusG}1Pc&oG`J*Kkl@zPc;f_@ zV8JyIGy#GpLE^Xb|Nq{1@AKXn9-T5Ca9t(t3A)s(O1qQhFb~ELXNkFw>1TmKb2a@GD z?69wi*GC_6=TIl#5kxB4+-c$N7Pjy6N{Fd3NjAny_f%fh#I6|BTe-mBgz}0GBlyZX zVx5=W8O0Te;OrGD_EhRUMA}ecI(@xQvCbc{u3E*!;`v^NG5cWhe&8bkQP-TLgojkR z)?J+V7MPN2rv4o11L|u43-7SDI4OKQ+pz*pOUOu@(8BVK=RjRXIm$c(?H)wg=jLZk zgY{PhS)9$2OqW6o;rPCqU768P5DHUEwiEZZY#15fP91QRTgJXcN#Ku=Y}nTXqZg0{ z*964$y0t!y*NRj!>gWVQLWqH+>SKNNd}I}^9g9i@D*7s>e0F%vb|39g5qMhvaH4V zxxD`r@Eb;Eb!CBwdaRa8wiB!>l%UvBm|-&3fomKv;nE02sg8{fcFm??*D`@Z>k_TL zqAc35c5Gg=Lu04ZQ^c~y@0s?#3Er9@hp6&nV=Aj+4*!= z_d4{(ikDXX^3JV|QHO91LG@sQ)Hk#wi;1*+)_Kk>rd#t>JdHE=vJlTL_DFEK5BNzd z15{!=j=S1BCtfezDO&pgBXX8BLulur-ar&w(2cy#elWUsbyYikCxxwG6$+TB3&~P) z47sR%D_3Ov*3DfzRe*#YA1Bb%W%WBeeSvnRQy4d(i^?(`b@=-X@OdrLfrek zYG#a3Ybb@&djVxVi8ui(Ru0x1-i)cgi!|MS zuH5u^8K%>D6PH~Cx>BlJEu&0!%YT;k6N}?ZE-}?*%IQgFD&?rvP4Cn5l2WkTt19yhqQN35j##t8-d&UJah1Jg zqrxWJ5&y{F2Y`u9x;Sj7#R`%~Vf`->2tNAr>#)*>Mmo;=#g$f&(pMyXnF*eR(KVm# zeTB!Nkyjf5Y~Ma4c`KIqjYOT+wZFA``10lZ$B(DJe#^hOqE8SueZzFE^T&bkrJPJo}k#A^dBOO;(#QPOei6 z`PKiv{jXC)SR9NTef#_ufMDgOeg0Gbd;eGfYi=m-{7b0mFl=4VwgynJHw#7*MibLf z>{WZ*B$1 zdOft6K`#TzpS;<#XTBO|udns4K-NyVTv_$$glynUa&bGK+Z^@PxjVNi1Y8oVluUu) zH?2|_dOrUu73?k`Q0S1OGj931C6@6C)49yH{vaWR;ok6aLuj z1_!Wr9uqffbvme$$aJiFfZSz86e1DANg)!@r4ApNH#VNH&$!L z0}d}ACqm70vjTq-?cH@}#x%bhEl$L&c-abiP``hz%eF0A;l5i4Bj)a7M1W#z!-)&}9>!+CUAfM;$&;L`i$JWcD&vRmc*MSWDS< zKSZnM&N108(pJ7wJr$TPiE1|ED$;D3DJ+4oi!`M23AAaf7(QAOEs?g@I8jpfC@w)r zesg8NPscs}>~W-6&&ONsEg034_%;ERI^hl^AHv9Ej^tEe0(jsjrMLI;fswOfOmBSI zo5{hcsL7#Xz4mgWigij4#C0^?bgY*H@9!-c%NQrribwaBP zNMvdCGq}RyWtx5|ARJXf)Y1A_R58g|>dlD{%*L-B22vQ8ESDHmumfnU(W@~)CV6y? za`bOF3h*?BxOokFMO+Pw7co>RwhYC!d1TCd@xn*DbL%@wOcZ^V$zZf>AxIQTZ%D2` z2sTGIHenx^8JV|hB)36#0%ru{bEp&O`k5Yc^gV;8S6gJY4MQmu=cJd>PD1M<3^ppt zeotw?8cOoak zE(`cXumhJ22Tg3NdV*C;@#lT1#cRCHN4+OgaP;^E~uoS6d(x)tP;W1yD;wWoJQn6!Cl_xIwq=%oF zV0m#!8jb#Lx3HKrq!=EexOFo5Q@Je-6LZCv6Obvs-U>?x&nc;tuAxp)7+qP?mL*yG zj~3+)fp5>-cOD#L9*a;VMtuAYg4geE!7V+>?ABq;z>b=ps)tg6}P7*i*ghN4^ z&C->Nytf@y``1s1dlUMm1)5AsseDZeoa+M1xje+}_@)t02+Cm+AE{W=*5LIl3fi0p z_glGG(`M`IIa4j-s$|idJQ6EX!G;Jr#bct!%Nm1GT!rg>rBm~pDi|Ve&qAMxn3(zJyPl-k1_0OBELnYMDg~XM82`H??7BrRa*IR zd^!d1e3r2tUFf4%zgT3|C&W{-Ql<_zC+UO|TzdD4fm zfhQ!M(@&RB){D5z21$mZ5{F1jT$IS-XZ%t&U+RBn z+Pcog$Ili0m#jSh{}c&?#YsS~mVPhm>oo$c}XAhq2c+q^! zqif#mt^gm)h`96x>kzGaS-5Rt9#Q@8D4KN^W>P0%22a0vy%#?yG@;ku?+z`L@r&W)ZaQzT+dcSf zJV?Hf5k04*OTkl~EHdk)zBrWyfTJTkY+lMeY!>mWXcQc2EZ-gXaS{EbMkOl^@pt4> zaT_C4UuADr$0;dY5#0CWsadQ%S$tu+S>W4;u|UsgAl&)MJ}}|TX1sVC@5)$qD8TFC z5gDfPlfwjV$iO=w75nhqbv0E0KUqDFbx3Hag~i5orSc0uVxz`8q04#(Wx&c7i9s!+ zn5Zlc@*x@nZiCbh_;s_51QA-t(H5$PgmjJ(9d2IzuwLsO3#TM9d`~%--;Xy zj!6fBgaQI{7*2@|xHLJqyLf8qGhU_T@zk`XN)2&5Enh%VTk>V21spi4&C%`|_bF?) zRRp4+9+NNl0l*j`oIW&nj}S*RWKMy6`Yw}J6D8qKM7Eh>U;+&+8TI5$}IE0zj*iyAn`A5B}M_0)mboF*Gw4cX+{G;g@?0oMhZ8m zz^Q>?Rr%20dgw0zp3mNRmauvI|M>+rYu~_6$U%%4KZc07%+-JN^54h*%M>WRB_~Lk z!ZIzyW%>5m)CSYwE9GS6Qs(2WJgunFU84I~HL&x(3018v-0n;n_aj1s+s1UyBV1F(lmg(5%F`-0Bvt9z$4;=YIw3;ve@JH;Y zFMt)}DSG02&^j7^+TUo-ZTn?-#vRlZ747XFUMNxfk7XFJ4%_`J04 z(I2YZM1vPdiyJ+d_NI#!6{2(U(;MdvTF}s<2No5$818dUQLBFS277R@W<&Nmj+o-C zYMigdP+;m}(qWqy?|L>-Mz{+MFx#g%kl-VG=OqV4Y)6;*O;umAo2ls;{ll<@m+W@= z(fx?8w)oD1>0IKgu3*)gzMUdFwl#8f7wz$o4Rg$r`I3r5Tbx!Ql$gD7#!*c5EDJfI zDE!Jml4(w!JT)Ez9B0xbFK!)}$`IgWx3Rl%Iu?5d!tt|T5s8il4o0cBROXhu3A#6D z%6KmIVfaT$BN+63480%WE9PwbPa?JuWlqk>d$z{8VRN~ZbadXRGZzgDQ}RxJ6nR%X z3d74;$PjufrAWn@NjRapR?*|RyJ zdcW?LQvq%u+5Q zg4e69<-%bt%V9CKPD}rAjbSGT>^{J*`?L(V*#<|jPu;kMx>lb<_-*tp!LD+?3XA+~E$VwkjRLRjq`W1w<3u~z7y;(>cRmw1~>y70RnPj8fQS`LK#iU?rBY&B%XXu zv&s*7Ceu`3H66z{m3Js?dAaXZF#|=ay$R%`Nv!x>E%7`QuomrPsxB3LiEPc_1>g6* z_fXw>gW6A&BO)Od5<*#p7E%VjaQE zrvROuHNRVkggn9SSW+$i;@+h;aPDt9Tz47KCE)Om^1g64m-?$R$ zjWO*gl$|0&QxY;6`n`bqR2kguh;T6uw^MA6p{1Sj6i3W8Ka$rFkU zUx9m-Zy4}3;V|-c4WHAL$#VJkBil`Qr!*1JG+G;>E^hf`W+Fd8zzth{hM!02u{)Zj zi&SHE>L%x%!L0;)naa7(omwVlJfX&TuRfofIzHS!i1S660--bDP}gqbMrNntR|Oa~ z2{05hQz))zuMjaW4QXah2Z+*?aP}QOJ>j3y%x?8HR@|MVx8Jv{_qJo!J(_1kPSbdV z;k`^*FWFcdIyJb;>dZIaYr^hQ0Ad4M$XYZ5qodm`C3MaW1zlRI@vEx#MiW#G)-BSv z9iL;pzl$eS270NU^8m`(2S+(p_0q}Aq zTc&x7^9WegmLe|iI$dxn1V}gy4ASlVG@T>0+=jpr_EI$?5ZL9WCl_*!IFN)K1mFu< zwAR$zlr&@?EgmryQ73n<%`c?19U>||AO;ZPz9u=E5zrmR zXN8<#b>LXWbqi043MqSRoUKBfq%meRf>R>VUqhllN)C_oose9M%EFEJiStZOegNWX z4wOX72j1@>C3u-jc}@+q>HIpHo?J!5MP$iC4sf}hf@9USoyf8oNIA|DBn zuenycV0!~{8xGS0YeL*nGz~0Tz@oe`@FiP{!JE)PtLxQ{A?XIwnuUUGKke5kzX{OS zwi^*?C_yyaJj=oFHMY#1>Ho|kb*I?0rVZMt#b4>-T>x%hl`KnR)QHx4EzcL+46Fu* z&q7iKmFMpdJgiAb7c^CDMYss39(5&^F7g-EC`dfznNcybS?wD@>-$-$C0EM> ztyBr1#yt3;iDgfjBmU5%R(cJ?DET&$+g|$(^MLb^yR21hF&Gc-xDrEy9L}T!fJI5Y zxj6JIaVmH}wM@>%gWmHi_bjUhL8RmjTo zraM;CO=+~)*h#6jV6s}u3g+0Hok;_F zJRo1=bX0bBrR8e|Jf4Xu!D}|%_m$GfdDo6duG?x2G>O1(<%aQOv164NeYfw(Eqnkv z++#UKMQawwB?}{hV>SQK+xp(yF(hz&#_sl5L=$-pk~U&rzGvhxw}35477LG~vO2^Y zIA<3wBuvrsfBwIIu+!;{45TF3%aq-2!+!81eDaRDx_URoVgm86fhkLT}glcg;I zKysElW+=Fehg~rtUUa5?e%R;}bF<@ujsMS|zW_=9vDp?ks3&N)#vKJyNpj##==6Yy9vw z0s%zB-pQ2=aW8~IWM5u=oh#W6WyDg@9pCpfFPzA{!AJpd%TiZ2lE{w{Yq;4A`SR)g z>w-J~*J4NKdHc72r~!WGugQF6;i_jbpN;Bl>1+7ecdv9sA~m#grMb9gJg$X2X}NF` zA#Rks?U?gMTZ9lEB7T;7k`bTihCw0i!r{UQin^P^adKQhIsp3UF4+@yIH5-qedB%V zSC575OO;mUr6M>TNRfLj`)V~C&3qBV)9$Lb6#J4|zPE^IC#zDq+hC^4mjZImcpsU# z1-Xc!+0Qgy?eu#cDyxfAPuIICH+_XXZd7$xQceHF@i#i}Wc{IyN(j)ZrH=74Zg5qFbeuZByPJ)W%ziJf6nmwI7|*Mx?Fpn2 z^$_P#$s$KxAwq!RYrLF~QX0fARIW5erJf-7R*O;sfci#4-kJ9Zm(K0)9SJ@o=`2!u zzHfIG@_U##8EyQOrvMNc*=r}Z(cN3crLX&j{<8M8{}E@{4yphYzp?S6Nv6Eo;$0Xk zA1IGhfQ}jt3~rOZOZq1@)W^9*K{VKL5qXyCI)ilQZ*_Vy@DuNET(E`cQuZiHqKgev z&Iq4j>m9|LG{bQ{iL|c#@POyXa8?gx9jw_~{ zy<@sNsNt3%)`=WD84r`Z1jR04Xt#CJ(tBtuqvO>w#| zIHqR{MsJ{^v5+SG+1YQ?IH%&$@VQr_-z5#m+dtLFt_xO`Hhc|~4c)FhB(L4xd@KR( zzW>%4F9ft)m@J)~ltVK@YyD6(Xsc4j_7TUlIupzLE2}D4wL*q%)fzr}@@^kIEy(9K z;v3X?V@(}G1H_%q;e3aADL}UWv|g5LXXgAaNm#Zp%qi{S1VxJVTKxiq|0iSRb-^FZ z6&y7O(Tx*IuHE!Gl_YV=Z;-g>{yx}QI9asV=ZOtqRySv1om?1$TwAS6W|i06I#R+| z-+rY@_Uv^B8Q}!=F-g0Z5l7k$ZKS=+wX_U%^$G8*cytl@<(Xmvz9>Vp?^_)1jP7L)6 zkf)VdUES(129Y{P8^y1F8J`dGUdrXDrxq&;8VmuIn5I*3sPKiar{Ea`jMZuPW47{z z$wxr~g~0ozH^>ak9-3I1dZyD}V9qbI15NruBpx6S*V-8CE}sk%@>=xG4VP!@pzp|% z<;_4ZQ*J)&J8w#<%X-6L*E6OPGNX5CLM*HY?9vWnVJ~g?gt?}1tyuW{S<g3~bX`Qi{J2vlg%Gw1hsBmY& zCP~CA1iI0-RWT)(xg*Bj`uv1g$v-e-qnME@K(3yN0}{~GLWlED-k;bXZfP({%~Ng_ z{FHm9oFx{}E5d9&%ej5AlxY&r=2E?f13lF;uE92G9u4uS$LO8_e{v$K$ z*99PHdfLnvn~gy)fFS{97U392S>enPEri3+7e{l?KCdO?kDtofT7|VX>U6V|a%Nc; zj9VY=GW#keI~1kzcvB7}zn1Yv9!D16kTvo;$>xqC}?&qn5vg2vWFjJiY zkL#-+ya9Z6aAV!HWppTB>@N=ADXPfwACYhqHzHvsO zVtM;r7OzK`kyg73XvvvnV8a+{rWdO3@K_|=DKkO;l_!3L)EzK84ZNwXjh&)l^u;ar z&&E?n>0jn$Z0hv-w3&RYzwa=4*Fhk>FP0f=RTl1W3)>Ito6 z0!K*dqcMZ87QwV@5>a10GVk7p5Qjy4?2M`2BM)qIXs+O1ZZh%AeJd9kKke{H@E7r!uu}(&To<9M?xh=*A;!g9>j1 z{6Q}3M|W(KZ>W^Od~Xim&94i#pES8$W}NrOD!}wST9)v|_s{ykUzN3JhmYH*-Q3$| zj~^ROPLamDbXQEdSwrz?(Vw1EbizMcVD!7oSBVich3-&cDs~;`>QSRi>kr(iZoAAf z6ok|k?{KCUs|&Q0TIph;7G_Js!l%y!nTGoI$(4L-X~U%+NPU?DU|>WJMr2PS&GcX^W z#_ORUy^D(%k_nXdIILTr2CJRWJK<6RY*3lwR~};5GbQ7XM`S*kX@2D2i5E_0dd>T; z`*MpVjlIW~+&P0MYmMgmK9>3` zSYeZg6e926T5e%N#XgNY46<3_8?h(rb&H0|l97kkv#;*RovK58Pk7{v{FqAQx$W0I z@Zio~>wbw^9tV4YiC-B4(mXwcDysKVdQ*K_{38QThncb2L0>v=C6PSlG5c~7sZ+Zt z>SuKq%GyHyHn)-Zh>!oxEqR+;c(}D9w99)fg`(oP&xg!-$VUj<_lVG5X2@BgZ!!lo z?^~;nrgLJtIEM2hgEwDw$v7L#wz$qeZn7jZz1t73oY$Wk`;tYX2{B!<>}2~Kxq!N= zbm+N%uQI$)4)drsq)5K_Vl@uM_)=bxC>#)acq&}&!g&E zCf5PO;mO3|d&fcUv}IRr6Rwz{@!6V8rrZzQC*?*zptDD~7EK1Bczyu~Rl8jqPy=p=5uyBXNiJyWE>NG##zStnd*8)5?hMU@YTDo^!O4uh9bIu$-6c zPQ9teTypeSNFsjljZcyRc!H#7`l0H!^wVm)H|i$Y9D1KTpnc)T_r}Xi2qAnG)~U6F za3UEg-Qs(GI?ZabTK}Gcz(CRbI&>jmjiEM0*r>Z~pOgu`hgT|ZJw<$Q6&e*>CzzpG2MbvuLqJ5h*wjavz{`y3j4 z5_L(^C1o@tFt5>!6Ti0TT$n-Rfrrb_kmTlp4JDV#@=={DQsIL0>6U5cI(jMHpC0#) zgZ^B|Rj$vE>M?wi8v9qW`h*e}2o}JdA4MOeN`7zAw7+e4xK0)?a`;9IC!&H`hJS25 zzASR^fDy9F|FFz1kYkO*N-c<5{uA5nht9tM9aYKl>{Ki!7+U0flk|rsw~*inBZA=$ z#>M7+v$@pV$3?I&3Cx<-fO6z@TE|D@@-}z^U1vohubT$pG4|4ecEGyuD~&u>)-lf=&j7LB9fPk z1Huf^3SW=DvaBc?46V2aZsGTFFIFPP#c>X)#m&r$RG9d%sM_MO*_JNphLJB;zYSE= zI)E}73tw2Ox$D7yrZ*bI5fI;)Y!7OBS8HL}@!>~sUtv3xF$v9*xag75oBe6kCKB+# zJ$=)R5YTalERdP_1vu?CvG9C|&~)t{v-ev=?qU`BFiUe|vMO2{-8A;CPLJVsTn?5e>CF zw7Izr^o2~mIRB?g2AFZpO@^er0){s)RmP|M4&O~*1?c#5)L$i4=Tx%!8@*b z-#jhqKuGGoH5?ta+d%=KRj&LgN!@#+qGG-B9MJ?!MY_qRWie`|IY zk9vH2+h`TL_qLHqV%Y8x9l-x6d#HlzLq~UGv*L|Ej$Y)Z=-w` zeuQ9?HU{ohfBo_c@E>1Z$ZF~J*Q?||KgKv!25#Oiq}6?m$yvtDI|onob>NSiF(f{nEPBvDbiA;8bUv}Aq8V3?>J&yKgE-p zQ($=0Kremv7pcV51f23(MB=*rovHqqjPt>|7?HHj8cNr2}=Nh%$AAwkM>UackNvb z7wniM-v0GP2#S9bJz!@;ibv9R&5x;5)32ESV=q!^`%yYHlq`k zl1N&fMy=#`33qDc<+nEDE%$W$lO1%c^4&c~mnv6XrR6cC{t0br|_c zoz--si-X#qFoiAs^!c_~zhpnd^00dqVC1&hx0f%^ZD&BwWcf6)VW|HcRU?1#$e)bLlwoLynosC*c*|#E z>2di*%44lx`o2SW!H4l#c1UGc+)?Kpie_DloE*2U=VRm~{$B*CDPJiYlulKDJA3rFxcxDn#6OuOhMj{gj=q7>I8-;T%j{_t-_1!TgyK2iOp=J&jxDt?1 zi|=-S5}}_>*-ar|ZEizWq_rCpG19VJ9KF9@X3dn;X>-WaXMR}rvU6{@X{heb;p4gx zr%Spk%Miel?6>+gky%tHT{%02SS1ghQKRYM!pT*_XK|AyQ~AHmZzD_*fVG~{t7KQJ)2+QzAz#MH;eZ#G=WE_BL#^0( zDS9nHwG(H2p_p1PiQMoRonk;)w^z6p>w2Vcfw_qu;jl&sNS?C$=IBEDBdI0HE_c zI~2s$DZz@gtb5BWgQn26<;IOR&dD2asZOkcbjzgcPzoCg6^OiRS$RX0O_i0r5Y9~2 z|0!YJs%I;429bhVE?7*YROID@$HXiJXMOjrv;FakMVb+J-R4UyWRyudxuTS>P7P=L zJ50--h{`!F^HWP*PRiM*T=_CTnYbvwWaNQ~D>m6ZEsCM+_{Lncj-^7%h^_!bH?tya zH8_?|HkoX|YM0O=^eKj&LvNZqtp$F}eeUHRNNX)2|94yAd@I&gsD`(NHNlfi5W!C# zrfCo(2`?UcmfirPVjuk8zk%}~Tq}QfwEW>ZTKRho|DdhqYX<*tnfLl_*uBygcumQ{gcwSV;(T2O8fJ# z-<)xaEj}WBe`{1ri7-M`wo|zW_yG?TBEmYH$!sdGtg~$SChJNC|68%p2a2D*nPz zKUYe~F)5T?rh&?B!Z~wbWFm`ZZ$*v9S0PPx>TzF7EKw+L>_4`BRT~|iZSnwSm{zFn z%;?Q)PZ4b_K?xJ_`R9W}W=0h2*0V@^qtkHzXjZ<-^45>p1=Pt_T&XBkI%W{5n`1d{lDzXQl z;lduONB|bdl%jc%FH-LN^7-snr~me4$ZuRgK~vR(F!UcxgLM@AX;}P9%U*9fRN~=w zz`udAGx%V_8DB3<8eQ27EN>BRR=(%lkSL#qiq|sOx6&_qtP_19OE>@T%m0tlLEvS* zQRT5rpbO}Tc1h>MpI!!iiqfN)VP9qbHJ+c5x{G|{^vO2PAxK}|NRx85G%BpQw)q!8 zD(BPu>rcVLk1WXwNZJL9nWBn#}7u$7DHZDA39Q zEHk{jT6iClVP1CXuEm<_h4(D~ke`g{`DOFg5jOWc1^5H?_R)m|E0SbA zI2^U6q@;HnoK2FrW2571?7}!nfamV1@lvvd!?gikmOpqE&m?Aurbh+XoGv*w;s%k6 z)y?wDE-yrPaS4)&ND}<8A?k3RrWY=$j8h(uRFXJsFPr|v6xp#K10s6qgqK((orM4^ z5j9BT;%qmlB~SexEBG0}d3!%7hc@W}$hx|9=~ArhV>hF&3(Tw>2l{ibwKo?0d5qc( zvF_x!OJt!;(>$qn1*HW919b`-xVGc~Xb6cU%tJlj!@V7x6mOw8UI{JTnBR!S7h9`$ z$;Fp`GJ4_$>J}EcK<_lNTLO&$2o?#exDTnbLxIqRjT;IN+HE|57%p?e^AaBRSK+1y z-@uuP2+$c}7icBre8G^n3o*a_wPp1Nc2*L`mt5))J*Dsz(0Z$?gw<$i}{8VI?y&879 zE&%r!gR+GVi-NQ!In#1zY`To!ZMb^UMQXcC zxXD52!wqK7@VhhJW1o1(6>ubB10V*lWZkj>-8upb{{pxLiyjd&IbKw&&0ECMn)>H#LSoRvM)<|yIR<{c&gGcu zq|jc>SDspG6l&Gon{U@UTMG9GadA}1U9Y@vxu`ywiNN)1qylDdN+#Pm<&P`=63h%c^y0dzO%w)yn=%Cvb7YqWZ^6uqOC){8bxh~%RX{U zd9>9M2aAuwMMPx2swV_is_<24_U*fM@q3wW7Ku9Gc~Y=|9zHW_>~VN+jHlX!!&}A?{P*bb}6{GPjvqx}yVZT~UNEwK}tmmC_d&@J!_5XNP-Ua4_d zr3@5A#S=E^Mz8a^a>jwTuS2Cv_?#~Rsm{*^@(Ok0s;QDXcs(hVz6&ispO|NW|H7ZOE$NHHx>+!rDa zvw<{bj>75%!S~eM;gxVYVLTixAlG@{80OwqG@DJ$dBL9xFV5|vaQ4 zh{V=B*BrhwdKqX)t-1M6GS?@|@~sNWSzB&;^0Kq*D(F8UGpM2ks0aeH)tW4-Ve=5x zlr#4?JSDEDIU>IRN(r{lhI4)a7LC6r+)4NaC|+l`8KC$gYf6>)bU?dH8LlTQJZFBr z+L{Ug;QU75|KZa41(^P9@eA-(o+Ydjixi>y&o&+Wfz6>BAmnfV(5Fg3`KW%tA=%I0 zK1|5=M5&6f&=mYe>vm!XK{Wuf6x9_ z9P^Z)a>b|TeN^|^E7%KX42y#Al^%?Y(t1joxr2Wva)g_L(G1f$97pQ8@KJk-?{C6; zp*T{~D8}!B#LPzi2BEgqcdw8Cc;7$9_7kHwiK<0#Fpgs1q<*5t&S@&GpSQw`hc=Sr zW;Vodj8I3tA`n)dtXSsl>}AoD4H5EzOjf}S_*IK(_QrCEr^^v$^*wj-lR!zei)_5J z6Hk{FB3j8U+iE=uren8&BL~JYq;M}pg6lIb7T{s+=f;c32*C@PI0}>wO%iKNL&U8I zl`;ta6Dj6)!(C*NBJGZ#SjyW+LQ!J6suyjH?k2|$<}+hX&?(=boqkZAu!M`@BNFz- z7>cQnLmdiUaWfib4yS%r-2wk*rYus5_E;HddbEzt~$cB}{E~R;Y7;hp2Hw`<>9Pwm7$hVgY;K5eG(94WKz;*75j3BLQB1Nw?CIUl!{t)kxxyVicr9s8oe!@ z^TUP3dyQ|*FOp%SR<+g?*vnPz;O)HXS}ApEvRZfKF44RzK|4cv>#{gm0_v{q@gxrz zs{rRPLy%@i&jcO+0t{m@Qi?k<%HQDKMC=iC%wjjkqTP-068^?{XY5)7Ren`!Tvd{M za~+!{&gA}s!Bo5)1UEd?OL0e)_6xme%Ic#ii|2J8ja4J6fm{?tzGcD|BsIm-0k4b9 zIp?hh&3|}~RkNG;MaNvY!d;_r0qe>WvI#PEN=c5tAlb!r)BfqOaL3MwSwy7vf* z64;x!pQGzbcyVD2u95soja)>UIyXsEn^f`9+=vKFU7?Gaj_qMdsbMK1F}*KVPR0m; zqW}QqP+qksifIDy69}yzPTx+am$W_l1=x|rN-fNkI<`c5^a{#eiJxkca@)A+SNI8& zd}-sQ^u>Px93=g@m!%L--&Rlq`YoAW%4CQoF?{ZeGEJmUSTO=D#6$Jv-Z=)gW3qz_ zArfR2*d&&>`Z(1LpsiyTuXS~oJJo2{;*$y{FHn?u3^zfh{q_K)2EM`S!?hO5O!g$> z$&{B|jBv~+$2xmHdnXL6&p-WDXP(wndvBaNNZ_S3jK3^_Dmte|n@=VWTpLT1q}w6j zh&WrY!WqE^!>Rj-SI2NMx;PAUS-||EPyG;OUtE1R5n=eYPnk`bjgQiFL%=g2L2Fj2ogR!|7vIZ z*BYlax6oy5dtZwtxTZ-y{*GX3~B<_iSq>;AbLpLEemtg$M4j z3XfxlgQ#k(i@Sl_q$eK`pM^})cE)ncR8V(ad*3k1Ob!+|86m(fQN>PVD#)RTF|^sb zRE%~-4GbJb6D}A&d9p%CgQ_MYYor!1M6j~i^CD0+@^?nzXhY+`$Eii8sQR;S|Nhy( zNdkzpHTg$K%=e5B`(Lh^Q>hh}z&2vQg_^{ehI`IyZg~%myfr&uK!DOaI7}yDx*~hF zT%O=t1W<*K(9A?3nv}qlP;BoPVB8lgeU*UiAx+6KA`0rdlj+Vq=ai)ExFj^OZu>2w zF0^(DV(2~<8U@IAPz!>XsGKMp{Y0b2Eo^|7eYhP=$P^!pH9z<2-iz}gq?V@redC!t zJ7l`g95(nHdWwbP{h@~Mn(h#%kJaY%g>C+Ba&t35xRlO~-3n;e5JE~l|C;tjGNXBK zBWWsO1c9v$-XN_^0;8EB+V+&oprD?NsEknq>?H&Chb@Pa}bn2pCMc9#@%93g+&h z0_;voqQSjF&NZeVndF4~Id&KGJYu@rYgB)!?jqrmOO5V{PN_RLWY&AFll9RP!v(>%}{ZHBOr!pr9Y!7E` zdHq33FIB^b>*J`Jp15P+x#Nv)_^y%3l(5%W5QzE!-ezlXo12Kn;zwhb3|Wi0~J zSzM>bWYjH-6E3j#q;k*fjrD538mpmIqY`qa{^0=Q?8N@eo$T+*9W_D~Ka!v15NO!( z@w1*+ykeC2PAsC`6zS3VhEToB&A9<9PvH;~;aR3~AmJtJ8xU?^ZrD4*bJL7-Qa|9i?}jOWt?^cn0aiW-P&pyklv zbB%ONOy<(KD1#l&!vj`wn)8h4=1j_%Oo;S-Fm?4o#tdgO zj0;j`Xcga2?O<7iK1Qz)ycQ++IbQiDqxC68)2kSAaP0C6QfWIk5jcTgH;W4ei|7MB zi&0(8$s2$Km)sI3?ids#!{|nd%jZ#|(X*v!JdN7E2=}yvdI{}v{>{vVHUsU;<|hP* z7cpsK;WSm-28kl}qVef0EpKNHKZxYV%+$YH&%E`LyTjy>L?Q)Y(x1g z+eb`>Y}sxz%)Gee(t|d_uD6o5Kw7fR>36PnD5xS!Mh1x!2;$qKBidFuOd7T&Pvqa% z;}LvK4LPJn9tXOM+o`UlZf!n@tmJ)ZLv}FN+)tWmuzh&$?*F}Xiuhgq0|_RNI9G|ne$KQW6OPm>>eA{xwmjYi;p|5aNG z2%^22J&?6#xcH`l#Z=7A_Zc&KU$=kG6wd|p_2;mV%=ZunV#le@1>>>Tab8=jaV;2N zhrJJf+IP&~cXJkeVT?<|aSqUVy{t}qD?}}wNiX!Y^zqG#6qUE%>J=#Anry>@v8OVD z=06(66!T<-+SUr_hK^i5s9Q3AQ#%&Mfyd*Y1St4qW{x#V!{|-Lp`8;ezO2S5NAz1n zkwOauW2U@_$J`q}-%9vXod+*Rddq2-G_Lb9AkE~g|h z^P^?V;6t<$JBh2Fr99lzd6yDz!g%l^zMpP5B`w2WSqd*q&L~~NpSOwY@iNx@UK4As ztaC^9#)R0k6ZL)LFWkx7R=ZIh%`Ku{=fqM~I5j)f3G5Kz`0G+Wz-SiGsz-3IZ8wd} zf3YNIr=v_|iyUq0b9t*J%K;T#nYVp-gw0zjhA-J|$hLMzV41ya*6fpD?XqNyJ)TX= zM0DBAfvsacOyqyC_nuKrbz9qT5+Fe69YPBr5JK-&=|!5fP(rVUUZjbQ-a$G@k=_YC zbdcUr2)%=V(o|4XRMZ#mbDneVGsain@qE9&XaC6_V`r?r*4}%qIoCDkysjoC>a>=2 zqkeKOJ_aR1;m{(f^+gtL-hOdOx>Dz2dv~Da&M5CAQL>eURl_4toEgU_cwZmGt&Rl$ zZc@SCwU=6V$-j~Mp0OVFj~WRMe2=qybFIiWmU)po)9goV<*k(+65pl%Ug|6vSsQ>W zaDNb!WPWgy&+KPL4r9me{b8}Z%|y7~16}_XBxCXd$ODU}r-y5J6D*Xhk6V|N9xttJ zBS&*22(`7iT7>NN%1eklg*hvQd~DEymd0T7pA15z4OR-@7h;BWyoY*ZOBXd z^_=+XL|S0S?Q_tJaCXVbU0Q8FIoAkZJf#X^ES(koWj5^0!qsL200EqfyHlzoR*R3x zi}$*An@PA(k!zv2*xNo1<83;#L2CB8OQpgHZJ*eiMTo@JcEJ{hnYfUxi_hjR0G2IT zUNr&pjgpB0jr;C<3{KRgLIcXD!8Gh=lCGVV&-G}h`ypuoZ^jykiibyBrh>Fo#VktE zp6Cm_yRlMYpy7?7(u{a|sWrTAvXnKDgJtn&nRqF_Z>8jK7cy{8EEc62uWjPKI+{7# z%?iy_s{wY^t=r_t3d16cSxsa#`%rTWgm`6m_~y(K8i z`?S{cj>A;`fh1NWZ~@6nd!G>ImI+F=@o=Z)baE47=W74X)z@aq%IGL4lFRt^eO)@B zvX9#p*gKjd>@Ge{9JyAQ0U00$Akr+Ev?N5G624h;A$?52XkMD-HMedbZ2lNBDw~z@ za%dr1xIh2?0oJ>U#?RtT+{fk%G~ukxck8*=+2?DxG^tM?+eqE!fTLkY_@hzk&pd;R9=#YOBIy-M(xg89m;pdm`!kr8 z$v=s15CM9M&l+CDVrpjPxDre^-<~aBaVkWbq(u04lCE2El$We-NQAUqp8Qqt`B!Px zN1h)@&kU+>$=?OoE55W&HA*TRKDFP;rE`;UF+DOHo&I{Ag(}RN%6gJp3c3u%|Wv zpsx5FqqA<=(npS|HH28I#QJ-duW=U^ykKI+Ge4U)AmM36rZDwHSx1T#! z)cjIy-d@qc8rn5o-S#d6T5P%GzEQiBYb{^Rewuis6KiMswN1R*KlKZ{ukTvuI*Lnq zG7+`k{=hwB=7PL~r6=UtHCc~nBwCh!R@9cx{Ts0Vm0Jgw{!1a?-vo|PdaBPl5ahR{Aqc=io1 z5_p%|?EJ{|pq@81(GCMMv)}{dPm|`Pxq2Gm^0z187siEKo*?x#Yg<3LC|2vb=K4BG zUCXaB;onp_s@pp>UMeTf@-lpr{<8}y|1VhXW z&7xCu_PV{3|6N=ERgU8n&$kza=N3uH&T!*vNhNrOy&N5Fwdg7%cc`e+(bx!B45lOV zQ!psH=RrP}#1=Oy$GAcK>a*(Lf%R6T&6$fHeU-)gV(PlmJOP?Yh z(?2s1QM+}_uDoL_W-?kw)K_0N(BEvt)A20i&h$_x*y-DTDjoI1IM;mzxAVsJte!e1 zbnbyQg^YnwPm5|GJ^9JS6JF>k%5_L}8Q&W8>clgcskmwd+MMil+B;7C>h8(#egCd5 zA&}{a3{Rg!mucdABAo)361HXdlBLTh)yF)CAqC6dRxi_I>7U|HL$fi%Z}O^Erj}G+ znfkgXu56c2>yRaAbKl2audKfTha&n}Y-e^`o{oQ;p5L4n`jl$b(Gnv^F3qRY`}U>) zott?4qyo%Z^wok?J4^p3=osJ+IwrXOz}3S*nBeH2uontbhemY3AE+#X0|6FCS^t~p znNd2K9O4`2qd8W$fk#iZ{@#gK+Yp=@6Ga(9C z?Mv&mCyBDR1T7B!*>9JX(BABu?~$n{7(|7_N>Ecjgszo$DHd#YIQ5?>UlDqgPr+yM zp99n7Q_{_>9<%29k3VJU4-h+>Zf*{RLoAMfQSx$awQpMg?{UY3J$F?-?|1LW(Ll~*cf>z?G7#K(yPMC- z?}sMf5iL}a+4;T9e+y2DK%0}NzrOt5-wF|kEzF;ysj}#$DEX2{MRbfkx_^?X4u!0>a69RW$ZJb$8$H}^g|FX@fW1hKg1#gJNS{t(-7lJ- z?7d@LzlHCsm%FtRPgc=)G;wy={TrY`!e~(HvO!4MM5oilj7c?;O0{FHWBMN`?SEjx z{|_M0q(z9`+AX#-A}Q|Y(7ze#2~ubgrR0Nq6tKuVP5>10UV^C^+vOXEj0V98Xdg}z z5zmFteuA2eg(>$AuX&D@ohry9R311sf1yOuf*r&9PfNE{afgXZP%tL$EW%a+=X z;Kfe65C_Ix>8xl*n@h8U*lFhkAFRsoM#mB?LNS%$>D()*clSp4Gr<+;*HRbR&gr;f zse2CvL!sM=?8ZY69(E>w$wkyA^(!C5_2g^@ezoa3&B7HvU*96Fc-CT+E^=ri{%ENG zRDjNOp+PTjBs`LG5&29!a;WKSo6gNWwfl2SkLs=lWo})@Bg(x8)qJFm9_sQUR!Y9D z+Z~!a55aS~T}t1r*qvR+&8OE{#3Ucy`gmZ2G5;vxx5u6kOYBLYkt{c)RmF-2dcj8G zzWo7WlY(9pK;@T7`I>A23cn6XM))W*S41XFq-8NxRyxq%urVj36)eq4#O@R!ixwR< zPFVUE>il$@@0|?kRGK3;#L)H#7W$?U%{s;QKdIq3W!bjMhJN zGQZN43CpENv>Du`647yV;MV=vKSQK}#rSY8-K?~PjTw~7Rd8PY4CN3Nfnlm}Q}^rc z=Z4p$EK|QKt0SvM12@Q-y=M|KEwc>x-bjAR;O@g>vNyOr7y`y?NtZ~yy>e@v0`Yjp zd|{y)V`}I91KKO?_R7#rKAx)=3}4Op!aW>1$OSFKcCMYvDgHO^P;XS2Ne$CplYMvn zE3}$4z%t+LIa`w!k+spH0v$_kuq(;r`>sM}SkH*@qoxNb?|Q6{>Z+8RjQy8;-jPcJ zMI#0DVyE|RKdamMmc{ne113@uala+;X7V6{&m*BG6vHIL#d;Vsmr<|of$D?jcx-6Q z)vF|-yV?nwY6Z9q8zl!ETk53tH~J{gKa|hDZa$Qk^0Zk)J<4j!b#1rIPZr8QJ0Ar) z#~e?l_fIB~dos05{VFM&_-ZM2)i;+KWg4N;9$vfE=0c#d8*uMT)q0tA%KD7`T&zMR z(ZvtZj}nb+5ouz~1&ytqP5Bvjdo4bY$jd71RO(va*`Bu5@u)^|tKSa8%{?bY=Bd?x z+LhBAh-_@{DKx#>J|gRh7p7MY=yt3lO}43)=q=L_cz)LMYo@f^wF^6py@)089ZCVm z(+7>wWW&sVh)j1l+BKN(c7BSrBOq6G;N%*%1Hd7~X|8N)t*LUp4DIQK13UF#M`o7_%>6+e$D4Z+;Mk!6oeI9C3aqo7o@o?yGpt6iw}pesPtQ zWesj!y?i1fcLM-y5_bKk^A~8}JVL#F@9!TS+}k{r9Bg@0YAViZmG*gnZkaMB_sQ(7 zqvVsoiRbf=eZ86wD?%MZ^>Cx_@pOF#jz?j%on8cQabCMpV`4Yerxa>hyY7Hrp$}`D zN0jy6O7~+jvaZpfk{y2&Wu-|Xwax1N$vihIV>}R=9Sz&FOW?AP6=oBQn%-2_Idoxh zUg!C^^h5KLWhN<$9(9pio=}~;`+oC*N}lFx_b$cJcW7o7Z+``L1gYIqHGxN!xlKWV z?;f};?j}_BW`3ceHonWKnlzWo{iPjnAP^MvoYIrt(cV0>S_{J`#5qRzgg>tpD;($~ z;r(QnR=440;o03aBb8SS_PjYUI1rCzksEep-~r;qr2A)xM!e27w`CK9OcGCS<#?mMuRV5A< zvm~$LZaL};somvB^tJo^DXui7z!Q6peq<***o4lVSA?@Zv#q-6x9Fw8!BXL+Vji@0H!ja+}i^3NH?(nt&>YluT?8 z(j1&=Fs|0&p{o8>-ihH?d8;8{FZE6DG}FItCz$jULS)|(%OpL0O~&OCWZ zI+)=)Cy5^tJ|zB|x5y#DsUhM}o@F04S7V0gBDl(z`7fH4W^cakk3`}1PewI@SK6@B z6^JkCG$My{I+bfZpl64)H2krGDb=H=ZQBUns98^Tj*GC*qjlfhtzcx&GZLIauS+RN z_-GxK7C$g(h?p9r`@JCNaz2z&PT!^x4o=W>UVyT5MYeJngl@0~GGAw5XIYBw3Sg?G zLcbk;OgF|W9)ipR5jw57h*p=bTVc^>??Kf&IS((jUtNd(;HYO1fgX2V!T=s<150$n zLWA04lf^@RW^pEJD!?$P^|r%+pwBxo`bCzC8|AiX#;ghm%V-Iu5&!wwMkZqCAM zaheB&pdDXeg@TuI0ha#R#^E*Z*I7l%j@r)ZD`~HpD{D#^{V#HsI#OK2U8X12fJ(=u z_xD-AOlMUPCmQCh8AsK^7dt_mW^g13L_( zzmsfxK$Gx%oS)sKAdIb~>dj+8L|HuB zWdDx!z4O6e$5p@l!i>{2ucmFCEK2}Y$>_Y>DDDiEe7H^y+!;M${tqYp41fS&uQ4^AGeaHRZ5adwlrPxZhAZS3xJ6`rlWG-Jo0`@VzTl6Bo(&O|durZYC z-Xz^H=)-4_oxo-m_dpd!O2GE(ndG|qN6t4Frd=z5mmfw5#H5yR006*_tnlDZZ2UVZ zRR-kcIoErtD_&;P<)MEg?!TBtMg!Yl-j8za^QFI*tlkyxWTolBA-?nrU!2xY-SzT& zUh?RxzU_+u61VOA@!_MophKoB&6y{D9qTJSZ}Se zuuumhJDwbCn#w4_W?o6IUYp`_Gf(x?`4!>-z9PMF9Db=%|5buPJ6GS$}2+i)zck15ZeMH zWnLij*+4@Wz+Y|Q%(VQ}k*S5*#C02ed1t#qk{$MRFtnazu!tn%PK~!B6uK$x=DkUA z{xSTl7AxvG5Sz!!^UgFo5jR%&S4d3tphdtm$WwIq%r-sBQq?TPy~X+oK=#QdGKAoB zw0V^!_(VBGF1XA^^33NkE9-MXrYzG}5xxOl6jT9ib8_Tk-Z3N`{)`tpB?pxUbX!yI z?reFE#P&4c$LP>p)M!(nWW=(EtmDhP8}&6R+rC3yRL54{hwH&v!Gts6?Y!3Ns*_em<+z){2CVDyV03a;?`5T}vb9b}tijfqx)9X^B zEl{l@KR7?hmB7&{{9*_BIC*5fzI9ipl8rbce2#muxcy0(P^8=QZRLys%P*4rbvO?2 z-N^5KwALbmP_*+Tt+5)_K-8-pn&Xfci)3|mjdvv(*SS1WXYlKfnR>sUnMnstZiOVeb~#?uorSDOb3vpJRak%n+YWKRSwGTg)KkFwwM3+?8Y&QMD>AYoid=MV zet&Kghe3`qCr&CTDBo9lv*Yesy40+lV8*jXTh{4}Tj1BQX}1@*Lbbq1@ElYsYvTJo z9u3~`FF+hJoRGm*`>q$?JeRHY)t;R^%^T>Mf-1o)k&N|j z+k`$Bb-fm&o?e}8#5ePz1f)NYIQ;fj=C0gPdw{wWb}fNwGVH{sDm(IWYR65N|gnruxuY?S)&yHlp;cbYIzW}fSO(VMUbrr!#s*B zqY2fMw91lDTP2ZtiKXZ2WGA^3wO$;pk>t9j&imL>-E5y`eqeYlp4&PSA^uLlpYYdl zMO*d8C1-TC(mEuSmTXcmTJ1NWEjZi}ZUC+s4dT7lRq?zveX?uVmo1@4_$PK^RYYGu zDDjgPd-zBp6DSgjPF}TNW0fGelXXXNz_aeCLrrfBokei!7!nM@P5ID$px@N$;>_;S z*fLRyY>HQ8YpS!a6ldryZFL($`FyQaY_5B&ljP?cZK6AGH}FMl0dh$&$ScX3O9;w* zGmLYWf4SXd;`VTsz9X8g@qXMl{a_(6P3OblWS$8>=J!VAC{N}+8yx}jx~}+p$&|NY zs2|!a8EyT=JB^#ZM`TlhTq{qFblSy^ioIu^f%kS4rtdz2CG}BYmkBF$%r54c zZMvxxmZi%x19h48JjM6WSc7*%wQDjv_#^3SH5o$+`fHc^-+Y1&eZQ&S_D-V98~l zWUt=AR$Y=o!W`4Nt)Xw?j%Or%aY)0heSE&E`K#;%m>-qF))+vbr^o(G&u+~%0m>`8 zxF-4&J<4kWb8@`HGp!sM&kv>XH$}ajkRn}DHoY8V<(D#!7;auy%c?)KQ#*%H&?|;_ zkkREciH(#`W@%5kB(P2oT7z+RKwJ#$Md!AH8=f2xpWImNCUT7&HmVjzZj zUT35z9z>Jj$1t$DE#V`{)avW>ge zOG;TeW86tU!#zaJ^jtWKc2%t1CtM=_SfZBfy2q-P8E!T>OdkeUZW4`xo0CSbA0bXf zOV%^kzy-ve)TGT61y8(uo_mE4-FT2q>SasHjiVC_UBc|P)3VjCsvrzCuYlUCYRpg6 zx9Rim{z5_D$^!FZj~ntut>F2bexoIK={h4avm626l15H@{b{CBG3#Ul*wtgIo3DpZ z;trBcFPxaIQ->sKIW1qvzkWR*(x}fFePLOhCWD*D6O>OXjQO)Bq5~t_xj)`$^%Yv5 zlv!)47JHK{zpM16*RjX#R!LH!Nz>M+I8TeZoLwsI;DnM(gT-$@^uDq%D8C;Pg+dQs z5MPArMIXcy3^yj?Z+&lNH{+{}`cYS_n)EK94atPyQ~w_S-NaFIkD&9DCP%ltLzcBh z8uu4&vx-qXdjKu?@ZM`A+Q*yu6VX>CvDDiB4Ub$FP(>u}``ig*#YfemkF{*~oI39) z)IUG7a;e?|Tuea-d%>j+%?&c564eR!6KaqW))Is?Hr^AKil= zkkO3eZI8f5pIR!gk+3t)AiDm-) zqUy$c^bR}&ns{8y(TMk(Iz^DBR*Vz;XP{A|O49c8EUV#Zf0q z@<%Z8)lhM>ioUuB0t3A3S6)pp5AV zVOUP-ICe8BBapFqco;bS8&Cx1C;IdoP&Xpl?)Rt%AVMoE;Z+Uyg~>z&uFo02Y}sCG*D2A_vAEPO}M>ve1B z>hY!6-!cmyPZLJTG&NPC-=1OE?34VPYd%cnx{u_Jl!OY|8$PlmaIhJ4=J0s)*84fk zUdSrG4Ho7TFvl(T2w?D-$DH4t0WN6jw&UqyrMG%7H%Nj)s`*j|KpW?vYSj~8KV5Hq z<&Ah$>-z1GkmapES>PsgV1~|sd5a(GcWHI1=%Dt+g;(hFn)n0pR5hzA1?Swh+}=#O zIE ziK_`rU?;g_C*)72Ln_m$78;&tddj$$G#15bxZ36UdH3RDR=Cf?g~o~({mbM^~UK^FOXcM|2V}`%(hNniGZQ%R!d?;D(!E;Y7h`so&nmVfMp%1 zGDlpo{RYG;IaYY(iQQ2w#j|?);Y|5f9U-91wK3e^eg#659JvLsJme?KXp&lc&T)k% zp<1v5>)GE80f(|F?{H3qqaS@BlE%NwSFgKHm|hx`7Ets!_3%_Ov5${|^OUu;Tw1g~ zxwxL`J*RxZ*GRsBJFS*Q?wO{y%-7X~_D`5Vxx5RviNI$xvOFE#l#828Xq z`-cKqx}nh6Bv%8!xz=Y|#-QmRDxfH~L$HD8YMuORNGKYA^z>;|(Wz;qsCxAsS&my7 z?JjSrjvd?L?zLOe0s%GW%tigoCrr^w5Ip;DaY%`MKE{znPQ)w(97>2cAgiQAhV+O1 z1>xW=9n}gSde+UXwo#wjoIOtf`8>4v+a_OK9TnelYM|0D%!fvdmWn_{piSs$bLRU4 z#|g%GRQ>ZNv^qj*&(x$0%bur~f7Z`ll(RKCdSv{+eX9JO;M9Y@h?dHJ-%RJYK)A-g zuNwEg@;^=!Xg7{m{~zB+spq1ZZ2Z5abN@L!Y5fnJ4X>uI!J40p{Aydw;Ig_VNr$Av z<=hP;5TzWO+ek_8V5@m)SKe$bQCnabO&-3flBZ!CVkGQZygMx(^N0q<(Rk~+vM^~% zi-o*tO$w5{ZgGf3**HKR9E-|(h#5936I{0A(;%ytQBaHbYVGK1hv5u+8xm{6YZpP-r;CEH?cRtNqm~JEhb`CWV2Pg4I+eB zYR!D*9J7YTcBf@5nla0524Y@|-siq!EK}m7(|s~;GdVwTc#a5;zN3=06mF=YY^8VY zsEo*>=D_cq%^Am(6xp=({zzOCNAAbstKkPI{H=oF&}#3AW4tvEKm=kJ3kUhzL@A7B zitgOmpoH*g8Ldr{!hN)74YP$4-lIhmkUl_c!YsD~GILFm)M=aSiWE^~hA4v8)m*Ml zySg*pvsA>Nh?iOtw+pfHj2IEIPpR|56|oVq7$Zi+G|cB zbCa(Hn%OtSP(Dl;hFjrTZefaAL>nh2ge2*`2nVz>W`H(OMc(Fwj`$V^sA{!dk$%B` zkhZyV)yrHx=UXXAI&GiTn6pYhm7Z*&DRL|OIL$0ctboq02vu4e%$%&Yj3#!38M2iJ zsFX5&5e@d@#I8(fpm6TIPB265#@&s{hNS$_tfm;rW_P}e@TwZ)=xN0W;^5FIyqc&| zyOG=2wBzCJ8eV*xC_&V6max_kdru=Dq1Lz&FiP9^0Vkn zNW^cHDGVS^Qm&^MC7(vO-x+A`w@0e2(1fXWuq8f#woU7OFPFnnJT$&Tct*k`hMe2d z(_{=%twu1W8x41OBGswil~xoa{i_i`az!I|wt2EUspt=T@+<5}7(hI?}M{-o&UvwYNlkR6LD zjx{Kb?n`i_Pj!)LL2S?(noxT8^E=!1ciDBuulU!Dw(l7v=k)V=stI)A##xO?wN|8J zn2~F1Y{V<IooiFYH&KsLpNa~m^rM##GqG@Gd%-8iw;_nx2dc6)}f-!WUh_$nL+eXnWprv z4c;y!Z7^cthR!@`*>oN4!IX({UY*)dWK9t`d{yP$Q+DQ7s4G?3Lla0Vw9X>ToppM- z#MqRM!(V{JUc2Z!gmE8)4bWxC0NSfB+)&1i1?|)+CQWWEsgnC?*FE-^R*uIs@9lA( zSpr)TU(z1WMy(oR`((628GV-6-o#TdSc7VoBB`fs38J+eRR7O z$eb3prT%;A4@+E*zs%ap3>Hp4&U81*a_wVDrM{-W+0~Fy2epE0>6O-o?nxd-dwak> z7~yN@GK`dC>I)bZa_1c6HO#^?2&#*uCu83~tf|93kmz;x$P*)@4|PH4vx;HtNOQem zTB7_^bF8=?_It{SsM=7nI(aDPe0kD$A^UD|%xt3&&lo1q`u*t@O0~J28v{O_(gDd_pOxyly4AZPB<$ zy4p`9H#uCOb{xD6UFD@JUyOh0>EA8U>MR5?j`A~MHz;Tja$|IEc^nh1* z{lf;rgQcxfR(w+KrXQK9vIdORcp2Z`17~Ikafy>K$94#E+Rfk!S++-pFEkM`@8hLA%9hlaih$v2JTKyz3V@LiJ!yV3x%6gA3lySYG1?4PbAD zp7Dg*NkDJ8@GUUG`qtj^Q}++`AD_R;BE63pb|x-ujk1YLG*D zZvIS@kVJQUV}HTNgp)f?0P2~d#fl{xg5@01&^>9J<%lpJa59@VTlL z=IP-Sgjp9#iK&w80=)}A;H2bGoh*X1MIH7lh9-XI2N>-~y0ZFcbH?B=^wrENi5-~f zUYCW775jBTLaQ58JvzQSy}@I)y^eQWkup=>CGn`(ydpWHLO?AyrkhH5t!H_GSWh3MS&rX%2{9e2t>B{21K(jN)SGk9Ta+QJ+QJiBl?I~X3(@-hW zeX&8Iv^oM`K{v2aevS8|Fhr;kSDDI9W1|Ceqdnuew5L=|$EJYt2_l@_P9`Y#VpgjW8NEbi>3-)L?MHhuW!3p%}u$gu^#Hm>u=7pp7~% zidH&0?NQaaJyT(UADPko1Rje~v=Wrpb&smAtK3-P7U`@c5Eh=QiImrlF4Cud@C*wn z7`mJE>haBRw-|`&dQF`7jjLfwCoCOmyljOrp4EtG!M;`KjglGNq;pLpgto*fkiws{ zx09U#z8Ecq4nUfE-&W!6CWZkF@W93d$Q}>XyijdM^kMcZEJz4BnJ&!Oy21+)fKEJ? z`x`#^lR|y_x{`F@Z(G?Xhkr8Af3lJPJ8S!zCgiUG>e=5?(3^*(DLcrHoyUAspPr;J zuU2b&4QVHe1i45)ES3T@moDk})gOg~y>AxHWf?b0$rUVVHVz_W0j&V&_?qKfG|XiO z;Nsf+=(!Zs!c+eV9qL4IM!xM6J5rQ*#|^1ku6eN~zNE>?VUU#k9nv;(6S5sClR1r% zV#vFthDe8JVJo<~YNL0?el#n)_)MCulUqs6d!oLUy>U`UyX_-ozlxc zL+(W%ddSR$2=HU@nQsnhG%pE48RWGVPN65_0$x5Hpbg*qyLBBhj{q30t!hmnVY%&J zBTcF%9xtDb*4x#10+j^)Q8m`n1gg)touf1DG55mfy^!Us_KjYcwGm=ZyAf#;<*e{8 z$^7_cYVvcEel1r)e=se*Y2qeHeZnlM@^z}0*X;Q68e<->OsA1lt>t&LjO|3Y^LpFv zy{Sezl7do8L&!y?*QV}!g7x;@?ox3^a-LZi&^_c1&1#JwM@M#5gk>}@!An?-+MdQB zRchqxmM}9l(QRwlnNM3jQ4sJTzpLW}OmzIvjee43CzvcZ&q@JQ6s&j8ugVUc5T(8m zE_xSn_v}H{x&h~W9e0=uJZhfL0Wb(yjpB3BdK0Vt-p|132Y8d|@vL8ywsdyT&`SwU zFNZa}@Mzd&ICP}I8ZR|~&Tvb8HJ0{JhE}GRSj|hpLS~y605w zwpcR~IYc{Y5gub<1rphort!?1lB_vJIn=jV)u7oQpwj&#D9d3h#MIzJw0W{~rhX!= zJn?NlKjjPcd*C#7w|*;p?CY2+U7PfPGqndD)U%z+24@~Fb@YP8Di?FL_l5g_>ji+# zgwEQ4g=pQ0MWs4GmG}QqQWJKM% zPP;trF&jk+jk+vCrn|(3CE9?r4r59(7u%5g4R@KsHa=wsAOH^ymghqPtCD*Vj0Bjx zcYDIID_}a5m7!L1;%kD!=F`a~+(w_snRWvaamf^*)~i8W=8Z+s+KGDi%~IT)_(`9v zG$GM9s6+vQQE2G38XS|(q)3&<4n#fUE|ux{Ji2{iU4@*H1TthF!!&a;YPNGR(p>8q z9nkHWC@^pxNQXoNDq%-RVe%hT)h@9V&O<$cMTw3 zASgKxPDoOs1R(31uO;ZpnPG-YOF#yf+`%F~9Ye$V#d~d17)C6uO7_xX&xR`pWV4%F zlS5mjHTH%WeL?@eZo@EbRv}qXCFgNdg(#k<>v_3W*z0ooDsM|&%ii}s1Y8;x8BWVZRZ>C+bE%{xOH3Yo!zXlmuQ#sE$voX z`h(GL*J?(^jircXC#}V&Igd7%;^!kpH1XXLS$DK(S)^2GykMU|lWj3G)_|}Zdi~?3MFxu7CuPzWF5ars?37=i(iLt`G%cx$`qsv@Z zZMy<-b7{$hKPNpl<>ml5s7#Vcjv14srI_B9Op&w96?J=OPY`8?AM&gU?YCyNtXM6t zj-{R^d#uLslgPZ4M#_oN`NN8~h{{S;NwEOh3E9dwd{0C6hy(G%oUA7eHr5)osJN zu{fS<5pWYQA4ff6#;_x{2@|9OEA0dtuY_uJYW7m6Y%7M>c9OS0_K>|51cG>O~^&7hGR?SlwUxj-QG4R z^P%~Z*$ebssYVi1;=l3d51ZTnb(>E=W&Cg4ujE;i2lj?j0AxXzYyVe65}9JCNuJvu zX=JXh_g4{d&iD0XB-1VYmfTD12KYj_6AaF8@lovD`oo)hs`n&?y^y$M$pndPgMOkm z!0*4NeO7p^pcwiWbr}_Ga&6JvI%!&#r6GG|Zz^h88hg0^8p=b|VsYkdxCHDofoY3rLbLb-IF%ENqBlYZyLiy9hOd$NHyys=(A8|DW?fh>CcJZ1j zYf+qSG*L;g%MPUuW1?=(qTzNT21!7?bznw?P%a82a9^Q)A&rE#fP zrAlKuCAGb)H^mMaA#`^8PLkcQKcAQyt8eHkZ72aQ8yo){&}X12vDC~F!keN`WpGCX z+f9HqRIVR3lT9cm^b^iOuiv-qtc7+1#md-PQf9&6tkkqp;iDa32U!%%aDB|%J ziO?noAwN=Eb&xhd^UNmlow0o&ySR=w`P?y~2lcqEVG6Wh(rFsvp~v%sR4Fy(wRC^AMkpUf637Dh`?W*_S5z>I`BfvO zLgA=tl0*f(rbro1#rjDN+d~rHL*ke@{FqC zTtDI`mpJ3~5^)MzStcU{OtX}xD;W)|ym=ao_my+31qGiV2eCi_IzQrSi)AZYICu^K z``V#vo->K39ZL7S$=#$e+qs8~US+55hRAs22&RG~Yqaqs$aI#rBHr4<$(|pJ2Otpy z6enEspP$?PH3v6Umoh!(RTdG=0*z}8D7({gdL`o97h&C>j}JHIW#VwK2_i~bx0>cl zm-nB|o#$#bjJAKOn$KrO+mTACxLOF@euPlsJX^PGs`JXPeJ8!(6mx}ts7Lp($VISU z>7&1l!wLbNbGZcNxw%TOp-KYv5P5*7TSztp2IDUCE_J$4;8&LjhQ7T~5B%MC3(VEiZo4QbFoOW;R23zjD34a0ECYP$W_yZhh5_;(+po{< z%n#O`gSqW}ByXz6C4iFbR@8b^_sf_YC!9(9&y}t-4`%@@>(R<++|;F)=&yMifE4uhMhKT5+f-7IyNG`tj#J>}NN{2~ryl8K0G?aI^? zC%38POEYujKAiG1c!qAe{Su}F1;5zp4z%2bAFy_gMG@Ed1b;2TXENu zSFQkmS>H91^~5^0wk0U=g3My?!iTFfb%I~&lH^h4+WHf=0000H@Pyk_nW2hl61N+A zlv^N9qigYbB(1)}b*eQz#Xl8M|M_(&24cB`ItoN5{m1y`St@n?{^#`n@6VyQO%kZ& zr6BoVA4}5f4W$i(2KY_2Y(jgrdHrBfb3C}2VJli>s^$&tf+v?&P5@8Jm-44VqsgNw zacRR2K#6;o*Lw?EBCHvJ+5Q_9KVFIAcdIG83qDLOREjjj*`lousH5_=%<*|_X6;~O z^JbQkhrN1S&u;*O*vd_ayW40|1gj`Fq_vnH!ccL$a*IZ&jvy;4&-fv;z{D?}l5{|8;!h*x$F0 znhPl2Yxt-6G?G)mR+XxRq>p+85J@79}&)+0$FL z;B~)yn#}&FsAHDQI1*3IJ99)_DbtR~&R_A99j9tA)h(!+ zNUKJ;4m#b@CBvb=BQ828xFOl~$!N5}QoC~E9Mba6C;IZ}$<~{*5 zMcY0ZDXc4>D44aXvqF{^{RU*C+FraK_#;(#?s*?=`o+=?MAGdvQM2L&T8a8^h<}H?sq5t2mr!LSmrM{tICG zup^;g3RRGmi~n;+y}*5@^|-M&q@mPX!oM;~S0QjYG{Lhn&*-pf1GFuA#Y(XTF^i`Z zI-o)Hd2mEskgtLdQQoaCMsUqT+fCmzf-m1nN2q1a#% zoNS9F#n11r@9&p*_rH!$suL4ah_(i^v47g^Cr$sFd=X#Wjm#dz{m;_;KX&O~c8S^1 zfEK*>F9)yOu@-0+e?D*jk}It;)rmKe^faPKTg1O6cFv7NOYG~6m88bU)K+0*${VaI zp_1m5ag~h#l1PCWdUDRkUqHBBZKQa)xhvoZ0wS0KK%G16gtU}m0Y*nN0yk>XDp0fh z`wZ6#$ddd2tbs#gOH&CCMrn^iNdP#LVIXo_ zDcnruFjs`~=f^BC6&1~urS?H6ha;MF(faP~#C5V)N=0UYEl*<>{8ANisQ8FJ4n`$;Kw?8)6ko5|zrwpC+YoK;g_~4=9V~v%0nW?G|FziY8DHimx-&bhIBvv^ zHH+|6-;M|lEr=K`sOj|~+hQGYj3J)@N5ondXSvG{OPaOjq)wSaoH_Y6{{ z*}^U9 z)zpB))(k3Z-f>Wz1l)R>&rs~deL&cpAW`hcFM*%VLb~t64;)@&1PQO=hrYYK{jUf4 z8?Ywc-D16Uy%esg=YDS+i@+Z4`ysMC(@7fsDj+jO*N zW$Sc2T`L|-JO$;ahpRio3y<_z9W{0}pb8Hr;dvfBfT0?pVdWR!pXBQF(0i?@s*sbU zM4|RfuIA>$kRMyY6hV_dUGe2Vg1I<2tdmSO$lkzaXCJ*l++JP#b)EZ>$<$wt(MReTEb6ac8Z&_qRFxE&jic18NtAYx?Xr0R7!+%l6$^iHNT-vNIfW zFh7VS#*4e#H!2sXx|VQ|yo*UzhXz`FqRmjmIcpH1AEQK0gyen;0MrvZdxGvuw~%A1 zb1h`!#eqcE^X4Jtpe91Xe6k4!hX?Q*lxk%`w&4_vO4LSs4~EP(RI$;8k4_l7Q{N>5 zb2bt}Xw9A9M_Qi0*tw%TO=SAGxD&Ls(rg{V0czUb5)Xn`E1{tGV^``=AWC z?w);x347>!f`jX~E zyWCi{ATz-yf|McJ?;22`aju1`u_B}SYg9>!`)VxAx-2q{o)NpoxLuqpFx4CbF|`bs zrE_BYc-j|0pJ6+kWlbN#lVTGYj_zdn~?~HK<{MVg<>wG zc@E5WV6-I^tsVb3b-tH8SoAXTyT*>n`@7NkTHWDh$_8Vq8b1QrL)NHeT=da z(Ot9;bL{xR7MMr4TVMyxmRWM;=~}G^dG9Kp{W^lrkI#r5h-|LFG`!<2z?bV?=!`Xp zsQKzC+)X9VYB7wVM;;6VIKd^Gf;_iDsuuu!6wHOH;n%&jQ=UVr7bW9#LM`qgm1N-8MC^2ChgPV=OvGBlxoF%UPcn+2t*r+<=! z<2bK$rMd)cOH~3=LzwzKL`DOCtJNGkelN(mP;M@ae&zBDV*U#_l_6>|-!Lv3#!oL{ zm%k%vMwP`Txd4k@b539v;#kRztQbbi+GXiyj|U-8W;>zY@v-DfqQM5qtQ<%|=fiXv z9ng?b;2kCBa-J;h0?GrUBs__B9M9MIj^U4Hl%6PA&MfpxC(f{y1@}tNJx({X?JsNl zQDU?ovFj3YfXF9l2s6Ini(Emn=@!}s%#3P;``~9{5`afCkg}Qwwx!-W6)dM0b=juR zJzb~&9Fsrf5L{8~;$;=IL#$Ua-qGE$_YC>#EAxQHE=lLHsV>kShBcd=jyF*v;Cr1X z>>(2lUKee9eD5VKdEK>On^)%n(`CA$Nk1EG9ZmZUaeXl>Y&Zc#uo*Vw;l`<*eReka zd)Ivzm$lZ>0}=UZ>$t_(O}@~qQm+fh%=w&Numn<;DcP%fU6fyosb~8UcIzcNRgtSs z;`e9TuP0%UbYRR;0(=`Zm}e9L6dVJRZ9MqZ{9ExH&s%Jx2@MBaxka4C{vJ7BQ5d^i z!AknxT|NpJH7>EqWYqb!NwFRa0@{yM(5MWV59B3Gnqh2*_hh_=2$DRwp-VVh4fAQ- z*q`98t|e_whw4!}`ywIv{TlhJ#!=qcWboeKdW^T$_mOW|mN9R%e)qM^KjR4fpWRyu z`Q%qyp9sS8KQGAqh|%+@pb(t;2J{XTA_TRuf)U+X!+}Z^Se6eu)YN5Yh-!60>4sHO zu#$)N;!{jEJfZ|J9!_~xgu<4|N8;WBit&;CA=|A$c~(j}j};qK)KZc4d;Nt+dYm5t zCTtyBh$(mM(8bu%Rzk8#9RN5O`i){5J2GF5Q0WFmQl4;>piveJz|eMAu09Fu!&4f= zL@ghE=-4#qGxH%Oy!06pVab6usydg1fy>=r_RiClnY@+Q&*u+M!M&arojRvnutThZ z!3!HzZZ5TU8`Sjq^Hn%)}-SEmhmy@1f(qLpr+-yT_EIbvwA?s{v%8v0G}w(EY9{=0@*QIWM5D*NV7 z?F}#SN?8vL4lx*t5u9ZmbAcQ-31z6{`AcbIt2mB{g`+_Yi6u2B$GQmzbqriAkx!vO zmXc!g;+J{TQ1UK-dA(-v&B`o&qpUC_{xW>%SSVp=gnv**1;8d%w+>-z|Sqro!j{in<}E<)#a{(M%A4=k`fPf`L0gh zOhqG{&Z*y0>9F&VVK))lUO7~k36G7ijcRKEB zxZA8=lAkgq25PeXh$kt0(hY}A>s^NS&7mTIe#`q+qsQG1V1JWX(P8gM~bM>RcQ@&$R zr;ExP^uKD3aMO`#lKI94I+hQrj2!mDR%)yO*8^ZRZbOSypesi#tM$kBq@lN~->brj zht!KkN6!&w^Wc5lm@yNHb^r@7ZF@PPWefH2NDl_$jKfxC9ZExA);M<>O64$ek?pKp zK3s?XvhNXzoh`8CKvo;P09X^jw3~KqFHButE! z21^Rg5;(e#T-i)d0i4rX@h+C ztsU>N{mp@J@98KQO!`yQ6-@-`wJvC1?&fGt?i%$ig?EINADp)NmnUdO)e)t-EUg=V zi21AQLbf-sH4(wEE0Zz5cl-WmeE#=mE+0rS&wG7@6jS(G`tQgzKlWT>dyCa2%?N)x z%FvA`97@IMkvGMv4>xQLZC?0NOCEEiFX=`8@{508{QnpboyvQs0lWf5X}Ya%hyMxH Ch~I($ diff --git a/docs/getting-started.asciidoc b/docs/getting-started.asciidoc deleted file mode 100644 index a4500847b4..0000000000 --- a/docs/getting-started.asciidoc +++ /dev/null @@ -1,141 +0,0 @@ -[[getting-started-ruby]] -== Getting started - -This page guides you through the installation process of the Ruby client, shows -you how to instantiate the client, and how to perform basic Elasticsearch -operations with it. - -[discrete] -=== Requirements - -A currently maintained version of Ruby (3.0+) or JRuby (9.3+). - -[discrete] -=== Installation - -To install the latest version of the client, run the following command: - -[source,shell] --------------------------- -gem install elasticsearch --------------------------- - -Refer to the <> page to learn more. - - -[discrete] -=== Connecting - -You can connect to the Elastic Cloud using an API key and the Elasticsearch -endpoint. - -[source,rb] ----- -client = Elasticsearch::Client.new( - cloud_id: '', - api_key: '' -) ----- - -Your Elasticsearch endpoint can be found on the **My deployment** page of your -deployment: - -image::images/es_endpoint.jpg[alt="Finding Elasticsearch endpoint",align="center"] - -You can generate an API key on the **Management** page under Security. - -image::images/create_api_key.png[alt="Create API key",align="center"] - -For other connection options, refer to the <> section. - - -[discrete] -=== Operations - -Time to use Elasticsearch! This section walks you through the basic, and most -important, operations of Elasticsearch. For more operations and more advanced -examples, refer to the <> page. - - -[discrete] -==== Creating an index - -This is how you create the `my_index` index: - -[source,rb] ----- -client.indices.create(index: 'my_index') ----- - - -[discrete] -==== Indexing documents - -This is a simple way of indexing a document: - -[source,rb] ----- -document = { name: 'elasticsearch-ruby' } -response = client.index(index: 'my_index', body: document) -# You can get the indexed document id with: -response['_id'] -=> "PlgIDYkBWS9Ngdx5IMy-" -id = response['_id'] ----- - - -[discrete] -==== Getting documents - -You can get documents by using the following code: - -[source,rb] ----- -client.get(index: 'my_index', id: id) ----- - - -[discrete] -==== Searching documents - -This is how you can create a single match query with the Ruby client: - -[source,rb] ----- -client.search(index: 'my_index', body: { query: { match_all: {} } }) ----- - - -[discrete] -==== Updating documents - -This is how you can update a document, for example to add a new field: - -[source,rb] ----- -client.update(index: 'my_index', id: id, body: { doc: { language: 'Ruby' } }) ----- - - -[discrete] -==== Deleting documents - -[source,rb] ----- -client.delete(index: 'my_index', id: id) ----- - - -[discrete] -==== Deleting an index - -[source,rb] ----- -client.indices.delete(index: 'my_index') ----- - - -[discrete] -== Further reading - -* Use <> for a more confortable experience with the APIs. \ No newline at end of file diff --git a/docs/helpers/index.asciidoc b/docs/helpers/index.asciidoc deleted file mode 100644 index 1e475886cd..0000000000 --- a/docs/helpers/index.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[[client-helpers]] -== Client helpers - -The Ruby client includes the following helpers: - -* <> -* <> - -include::bulk-scroll.asciidoc[] -include::esql.asciidoc[] \ No newline at end of file diff --git a/docs/index.asciidoc b/docs/index.asciidoc deleted file mode 100644 index b83dd47058..0000000000 --- a/docs/index.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -= Elasticsearch Ruby Client - -:doctype: book - -include::{asciidoc-dir}/../../shared/versions/stack/{source_branch}.asciidoc[] -include::{asciidoc-dir}/../../shared/attributes.asciidoc[] - -:es-docs: https://www.elastic.co/guide/en/elasticsearch/reference/{branch} - -include::overview.asciidoc[] - -include::getting-started.asciidoc[] - -include::installation.asciidoc[] - -include::connecting.asciidoc[] - -include::config.asciidoc[] - -include::basic-config.asciidoc[] - -include::advanced-config.asciidoc[] - -include::integrations.asciidoc[] - -include::examples.asciidoc[] - -include::troubleshooting.asciidoc[] - -include::helpers/index.asciidoc[] - -include::release_notes/index.asciidoc[] diff --git a/docs/installation.asciidoc b/docs/installation.asciidoc deleted file mode 100644 index 15ce2f60a8..0000000000 --- a/docs/installation.asciidoc +++ /dev/null @@ -1,61 +0,0 @@ -[[ruby-install]] -== Installation - -Install the Rubygem for the latest {es} version by using the following command: - -[source,sh] ------------------------------------- -gem install elasticsearch ------------------------------------- - - -Or add the `elasticsearch` Ruby gem to your Gemfile: - -[source,ruby] ------------------------------------- -gem 'elasticsearch' ------------------------------------- - - - -You can install the Ruby gem for a specific {es} version by using the following -command: - -[source,sh] ------------------------------------- -gem install elasticsearch -v 7.0.0 ------------------------------------- - - -Or you can add a specific version of {es} to your Gemfile: - -[source,ruby] ------------------------------------- -gem 'elasticsearch', '~> 7.0' ------------------------------------- - - -[discrete] -=== {es} and Ruby Version Compatibility - -The {es} client is compatible with currently maintained Ruby versions. We follow -Ruby’s own maintenance policy and officially support all currently maintained -versions per -https://www.ruby-lang.org/en/downloads/branches/[Ruby Maintenance Branches]. - -Language clients are forward compatible; meaning that clients support -communicating with greater or equal minor versions of {es} without breaking. It -does not mean that the client automatically supports new features of newer {es} -versions; it is only possible after a release of a new client version. For -example, a 8.12 client version won't automatically support the new features of -the 8.13 version of {es}, the 8.13 client version is required for that. -{es} language clients are only backwards compatible with default distributions -and without guarantees made. - -|=== -| Gem Version | | {es} Version | Supported - -| 7.x | → | 7.x | 7.17 -| 8.x | → | 8.x | 8.x -| main | → | main | -|=== \ No newline at end of file diff --git a/docs/integrations.asciidoc b/docs/integrations.asciidoc deleted file mode 100644 index c758d17201..0000000000 --- a/docs/integrations.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[[integrations]] -== Integrations - -The Rubygems listed on this page make it easier to operate with {es} by using -the Ruby client. - -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> - -include::transport.asciidoc[] - -include::api.asciidoc[] - -include::open-telemetry.asciidoc[] - -include::ecs.asciidoc[] - -include::model.asciidoc[] - -include::rails.asciidoc[] - -include::persistence.asciidoc[] - -include::dsl.asciidoc[] diff --git a/docs/open-telemetry.asciidoc b/docs/open-telemetry.asciidoc deleted file mode 100644 index 87fd86206b..0000000000 --- a/docs/open-telemetry.asciidoc +++ /dev/null @@ -1,94 +0,0 @@ -[[opentelemetry]] -=== Using OpenTelemetry - -You can use https://opentelemetry.io/[OpenTelemetry] to monitor the performance and behavior of your {es} requests through the Ruby Client. -The Ruby Client comes with built-in OpenTelemetry instrumentation that emits https://www.elastic.co/guide/en/apm/guide/current/apm-distributed-tracing.html[distributed tracing spans] by default. -With that, applications https://opentelemetry.io/docs/instrumentation/ruby/manual/[instrumented with OpenTelemetry] or using the https://opentelemetry.io/docs/instrumentation/ruby/automatic/[OpenTelemetry Ruby SDK] are inherently enriched with additional spans that contain insightful information about the execution of the {es} requests. - -The native instrumentation in the Ruby Client follows the https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/[OpenTelemetry Semantic Conventions for {es}]. In particular, the instrumentation in the client covers the logical layer of {es} requests. A single span per request is created that is processed by the service through the Ruby Client. The following image shows a trace that records the handling of two different {es} requests: a `ping` request and a `search` request. - -[role="screenshot"] -image::images/otel-waterfall-without-http.png[alt="Distributed trace with Elasticsearch spans",align="center"] - -Usually, OpenTelemetry auto-instrumentation modules come with instrumentation support for HTTP-level communication. In this case, in addition to the logical {es} client requests, spans will be captured for the physical HTTP requests emitted by the client. The following image shows a trace with both, {es} spans (in blue) and the corresponding HTTP-level spans (in red): - -[role="screenshot"] -image::images/otel-waterfall-with-http.png[alt="Distributed trace with Elasticsearch spans",align="center"] - -Advanced Ruby Client behavior such as nodes round-robin and request retries are revealed through the combination of logical {es} spans and the physical HTTP spans. The following example shows a `search` request in a scenario with two nodes: - -[role="screenshot"] -image::images/otel-waterfall-retry.png[alt="Distributed trace with Elasticsearch spans",align="center"] - -The first node is unavailable and results in an HTTP error, while the retry to the second node succeeds. Both HTTP requests are subsumed by the logical {es} request span (in blue). - -[discrete] -==== Setup the OpenTelemetry instrumentation - -When using the https://opentelemetry.io/docs/instrumentation/ruby/manual[OpenTelemetry Ruby SDK manually] or using the https://opentelemetry.io/docs/instrumentation/ruby/automatic/[OpenTelemetry Ruby Auto-Instrumentations], the Ruby Client's OpenTelemetry instrumentation is enabled by default and uses the global OpenTelemetry SDK with the global tracer provider. You can provide a tracer provider via the Ruby Client configuration option `opentelemetry_tracer_provider` when instantiating the client. This is sometimes useful for testing or other specific use cases. - -[source,ruby] ------------------------------------- -client = Elasticsearch::Client.new( - cloud_id: '', - api_key: '', - opentelemetry_tracer_provider: tracer_provider -) ------------------------------------- - -[discrete] -==== Configuring the OpenTelemetry instrumentation - -You can configure the OpenTelemetry instrumentation through Environment Variables. -The following configuration options are available. - -[discrete] -[[opentelemetry-config-enable]] -===== Enable / Disable the OpenTelemetry instrumentation - -With this configuration option you can enable (default) or disable the built-in OpenTelemetry instrumentation. - -**Default:** `true` - -|============ -| Environment Variable | `OTEL_RUBY_INSTRUMENTATION_ELASTICSEARCH_ENABLED` -|============ - -[discrete] -===== Capture search request bodies - -Per default, the built-in OpenTelemetry instrumentation does not capture request bodies due to data privacy considerations. You can use this option to enable capturing of search queries from the request bodies of {es} search requests in case you wish to gather this information regardless. The options are to capture the raw search query, sanitize the query with a default list of sensitive keys, or not capture it at all. - -**Default:** `omit` - -**Valid Options:** `omit`, `sanitize`, `raw` - -|============ -| Environment Variable | `OTEL_RUBY_INSTRUMENTATION_ELASTICSEARCH_CAPTURE_SEARCH_QUERY` -|============ - -[discrete] -===== Sanitize the {es} search request body - -You can configure the list of keys whose values are redacted when the search query is captured. Values must be comma-separated. -Note in v8.3.0 and v8.3.1, the environment variable `OTEL_INSTRUMENTATION_ELASTICSEARCH_CAPTURE_SEARCH_QUERY` was available -but is now deprecated in favor of the environment variable including `RUBY`. - -**Default:** `nil` - -|============ -| Environment Variable | `OTEL_RUBY_INSTRUMENTATION_ELASTICSEARCH_SEARCH_QUERY_SANITIZE_KEYS` -|============ - -Example: - -```bash -OTEL_RUBY_INSTRUMENTATION_ELASTICSEARCH_SEARCH_QUERY_SANITIZE_KEYS='sensitive-key,other-sensitive-key' -``` - -[discrete] -==== Overhead - -The OpenTelemetry instrumentation (as any other monitoring approach) may come with a slight overhead on CPU, memory, and/or latency. The overhead may only occur when the instrumentation is enabled (default) and an OpenTelemetry SDK is active in the target application. When the instrumentation is disabled or no OpenTelemetry SDK is active within the target application, monitoring overhead is not expected when using the client. - -Even in cases where the instrumentation is enabled and is actively used (by an OpenTelemetry SDK), the overhead is minimal and negligible in the vast majority of cases. In edge cases where there is a noticeable overhead, the <> to eliminate any potential impact on performance. \ No newline at end of file diff --git a/docs/overview.asciidoc b/docs/overview.asciidoc deleted file mode 100644 index 108094e23b..0000000000 --- a/docs/overview.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -[[ruby_client]] -== Overview - -The `elasticsearch` http://rubygems.org/gems/elasticsearch[Rubygem] provides a low-level client for communicating with an {es} cluster, fully compatible with other official clients. - -More documentation is hosted in https://github.com/elastic/elasticsearch-ruby[Github] and http://rubydoc.info/gems/elasticsearch[RubyDoc]. - -Refer to the <> page for a step-by-step quick start with -the Ruby client. - -[discrete] -=== Features - -* Pluggable logging and tracing -* Pluggable connection selection strategies (round-robin, random, custom) -* Pluggable transport implementation, customizable and extendable -* Pluggable serializer implementation -* Request retries and dead connections handling -* Node reloading (based on cluster state) on errors or on demand -* Modular API implementation -* 100% REST API coverage - - -[discrete] -[[transport-api]] -=== Transport and API - -The `elasticsearch` gem combines two separate Rubygems: - -* https://github.com/elastic/elastic-transport-ruby/[`elastic-transport`] - provides an HTTP Ruby client for connecting to the {es} cluster. Refer to the documentation: <> - -* https://github.com/elastic/elasticsearch-ruby/tree/main/elasticsearch-api[`elasticsearch-api`] - provides a Ruby API for the {es} RESTful API. - -Please consult their respective documentation for configuration options and technical details. - -Notably, the documentation and comprehensive examples for all the API methods are contained in the source, and available online at http://rubydoc.info/gems/elasticsearch-api/Elasticsearch/API/Actions[Rubydoc]. - -Keep in mind, that for optimal performance, you should use an HTTP library which supports persistent ("keep-alive") HTTP connections. diff --git a/docs/rails.asciidoc b/docs/rails.asciidoc deleted file mode 100644 index d1c84e1b86..0000000000 --- a/docs/rails.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[[ruby_on_rails]] -=== Ruby On Rails - -The `elasticsearch-rails` http://rubygems.org/gems/elasticsearch-rails[Rubygem] -provides features suitable for Ruby on Rails applications. - - -[discrete] -==== Features - -* Rake tasks for importing data from application models -* Integration with Rails' instrumentation framework -* Templates for generating example Rails application - - -[discrete] -==== Example applications - -You can generate a fully working example Ruby on Rails application with -templates provides. - -Please refer to the -https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-rails[documentation] -for more information. diff --git a/docs/helpers/bulk-scroll.asciidoc b/docs/reference/Helpers.md similarity index 78% rename from docs/helpers/bulk-scroll.asciidoc rename to docs/reference/Helpers.md index 8d638bab65..67c7be3393 100644 --- a/docs/helpers/bulk-scroll.asciidoc +++ b/docs/reference/Helpers.md @@ -1,98 +1,93 @@ -[[Helpers]] -=== Bulk and Scroll helpers +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/Helpers.html +--- -The {es} Ruby client includes Bulk and Scroll helpers for working with results more efficiently. +# Bulk and Scroll helpers [Helpers] -[discrete] -==== Bulk helper +The {{es}} Ruby client includes Bulk and Scroll helpers for working with results more efficiently. -The Bulk API in Elasticsearch allows you to perform multiple indexing or deletion operations through a single API call, resulting in reduced overhead and improved indexing speed. The actions are specified in the request body using a newline delimited JSON (NDJSON) structure. In the Elasticsearch Ruby client, the `bulk` method supports several data structures as a parameter. You can use the Bulk API in an idiomatic way without concerns about payload formatting. Refer to <> for more information. +## Bulk helper [_bulk_helper] -The BulkHelper provides a better developer experience when using the Bulk API. At its simplest, you can send it a collection of hashes in an array, and it will bulk ingest them into {es}. +The Bulk API in Elasticsearch allows you to perform multiple indexing or deletion operations through a single API call, resulting in reduced overhead and improved indexing speed. The actions are specified in the request body using a newline delimited JSON (NDJSON) structure. In the Elasticsearch Ruby client, the `bulk` method supports several data structures as a parameter. You can use the Bulk API in an idiomatic way without concerns about payload formatting. Refer to [Bulk requests](/reference/examples.md#ex-bulk) for more information. + +The BulkHelper provides a better developer experience when using the Bulk API. At its simplest, you can send it a collection of hashes in an array, and it will bulk ingest them into {{es}}. To use the BulkHelper, require it in your code: -[source,ruby] ----- +```ruby require 'elasticsearch/helpers/bulk_helper' ----- +``` Instantiate a BulkHelper with a client, and an index: -[source,ruby] ----- + +```ruby client = Elasticsearch::Client.new bulk_helper = Elasticsearch::Helpers::BulkHelper.new(client, index) ----- +``` This helper works on the index you pass in during initialization, but you can change the index at any time in your code: -[source,ruby] ----- +```ruby bulk_helper.index = 'new_index' ----- +``` If you want to index a collection of documents, use the `ingest` method: -[source,ruby] ----- +```ruby documents = [ { name: 'document1', date: '2024-05-16' }, { name: 'document2', date: '2023-12-19' }, { name: 'document3', date: '2024-07-07' } ] bulk_helper.ingest(documents) ----- +``` -If you're ingesting a large set of data and want to separate the documents into smaller pieces before sending them to {es}, use the `slice` parameter. +If you’re ingesting a large set of data and want to separate the documents into smaller pieces before sending them to {{es}}, use the `slice` parameter. -[source,ruby] ----- +```ruby bulk_helper.ingest(documents, { slice: 2 }) ----- +``` This way the data will be sent in two different bulk requests. You can also include the parameters you would send to the Bulk API either in the query parameters or in the request body. The method signature is `ingest(docs, params = {}, body = {}, &block)`. Additionally, the method can be called with a block, that will provide access to the response object received from calling the Bulk API and the documents sent in the request: -[source,ruby] ----- +```ruby helper.ingest(documents) { |_, docs| puts "Ingested #{docs.count} documents" } ----- +``` You can update and delete documents with the BulkHelper too. To delete a set of documents, you can send an array of document ids: -[source,ruby] ----- +```ruby ids = ['shm0I4gB6LpJd9ljO9mY', 'sxm0I4gB6LpJd9ljO9mY', 'tBm0I4gB6LpJd9ljO9mY', 'tRm0I4gB6LpJd9ljO9mY', 'thm0I4gB6LpJd9ljO9mY', 'txm0I4gB6LpJd9ljO9mY', 'uBm0I4gB6LpJd9ljO9mY', 'uRm0I4gB6LpJd9ljO9mY', 'uhm0I4gB6LpJd9ljO9mY', 'uxm0I4gB6LpJd9ljO9mY'] helper.delete(ids) ----- +``` To update documents, you can send the array of documents with their respective ids: -[source,ruby] ----- + +```ruby documents = [ {name: 'updated name 1', id: 'AxkFJYgB6LpJd9ljOtr7'}, {name: 'updated name 2', id: 'BBkFJYgB6LpJd9ljOtr7'} ] helper.update(documents) ----- +``` -[discrete] -===== Ingest a JSON file + +### Ingest a JSON file [_ingest_a_json_file] `BulkHelper` also provides a helper to ingest data straight from a JSON file. By giving a file path as an input, the helper will parse and ingest the documents in the file: -[source,ruby] ----- +```ruby file_path = './data.json' helper.ingest_json(file_path) ----- +``` In cases where the array of data you want to ingest is not necessarily in the root of the JSON file, you can provide the keys to access the data, for example given the following JSON file: -[source,json] ----- +```json { "field": "value", "status": 200, @@ -107,56 +102,50 @@ In cases where the array of data you want to ingest is not necessarily in the ro ] } } ----- +``` The following is an example of the Ruby code to ingest the documents in the JSON above: -[source,ruby] ----- +```ruby bulk_helper.ingest_json(file_path, { keys: ['data', 'items'] }) ----- +``` + -[discrete] -==== Scroll helper +## Scroll helper [_scroll_helper] This helper provides an easy way to get results from a Scroll. To use the ScrollHelper, require it in your code: -[source,ruby] ----- +```ruby require 'elasticsearch/helpers/scroll_helper' ----- +``` Instantiate a ScrollHelper with a client, an index, and a body (with the scroll API parameters) which will be used in every following scroll request: -[source,ruby] ----- +```ruby client = Elasticsearch::Client.new scroll_helper = Elasticsearch::Helpers::ScrollHelper.new(client, index, body) ----- +``` There are two ways to get the results from a scroll using the helper. 1. You can iterate over a scroll using the methods in `Enumerable` such as `each` and `map`: -+ --- -[source,ruby] ----- -scroll_helper.each do |item| - puts item -end ----- --- + + ```ruby + scroll_helper.each do |item| + puts item + end + ``` + 2. You can fetch results by page, with the `results` function: -+ --- -[source,ruby] ----- -my_documents = [] -while !(documents = scroll_helper.results).empty? - my_documents << documents -end -scroll_helper.clear ----- --- + + ```ruby + my_documents = [] + while !(documents = scroll_helper.results).empty? + my_documents << documents + end + scroll_helper.clear + ``` + + diff --git a/docs/model.asciidoc b/docs/reference/activemodel_activerecord.md similarity index 55% rename from docs/model.asciidoc rename to docs/reference/activemodel_activerecord.md index 8f4da31f7c..8a143def32 100644 --- a/docs/model.asciidoc +++ b/docs/reference/activemodel_activerecord.md @@ -1,16 +1,16 @@ -[[activemodel_activerecord]] -=== ActiveModel / ActiveRecord +--- +mapped_pages: + - https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/activemodel_activerecord.html +--- -The `elasticsearch-model` http://rubygems.org/gems/elasticsearch-model[Rubygem] -provides integration with Ruby domain objects ("models"), commonly found for -example, in Ruby on Rails applications. +# ActiveModel / ActiveRecord [activemodel_activerecord] -It uses the `elasticsearch` Rubygem as the client communicating with the {es} -cluster. +The `elasticsearch-model` [Rubygem](http://rubygems.org/gems/elasticsearch-model) provides integration with Ruby domain objects ("models"), commonly found for example, in Ruby on Rails applications. +It uses the `elasticsearch` Rubygem as the client communicating with the {{es}} cluster. -[discrete] -==== Features + +## Features [_features_2] * ActiveModel integration with adapters for ActiveRecord and Mongoid * Enumerable-based wrapper for search results @@ -18,44 +18,38 @@ cluster. * Convenience model methods such as `search`, `mapping`, `import`, etc * Support for Kaminari and WillPaginate pagination * Extension implemented via proxy object to shield model namespace from collisions -* Convenience methods for (re)creating the index, setting up mappings, indexing documents, ... +* Convenience methods for (re)creating the index, setting up mappings, indexing documents, …​ -[discrete] -==== Usage +## Usage [_usage] Add the library to your Gemfile: -[source,ruby] ------------------------------------- +```ruby gem 'elasticsearch-rails' ------------------------------------- +``` Include the extension module in your model class: -[source,ruby] ------------------------------------- +```ruby class Article < ActiveRecord::Base include Elasticsearch::Model end ------------------------------------- +``` Import some data and perform a search: -[source,ruby] ------------------------------------- +```ruby Article.import response = Article.search 'fox dog' response.took # => 3 ------------------------------------- +``` -It is possible to either return results as model instances, or decorated -documents from {es}, with the `records` and `results` methods, respectively: +It is possible to either return results as model instances, or decorated documents from {{es}}, with the `records` and `results` methods, respectively: -[source,ruby] ------------------------------------- +```ruby response.records.first # Article Load (0.4ms) SELECT "articles".* FROM "articles" WHERE ... => #